:root {
  --bg: #f5f6f2;
  --panel: #ffffff;
  --soft: #fbfcfa;
  --ink: #17211b;
  --muted: #657068;
  --line: #dde4dc;
  --green: #1f7a54;
  --blue: #286c96;
  --gold: #b88935;
  --red: #a63b32;
  --violet: #6252a3;
  --shadow: 0 18px 42px rgba(23, 33, 27, .1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(31, 122, 84, .07), transparent 360px),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px 16px 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-weight: 900;
}

.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, #111815, var(--green));
  font-weight: 900;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .76);
  font-size: 13px;
  font-weight: 800;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.intro {
  min-height: 410px;
  padding: 32px;
  display: grid;
  align-content: space-between;
}

h1 {
  margin: 0 0 14px;
  max-width: 820px;
  font-size: clamp(32px, 4.3vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.lead {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.login {
  padding: 26px;
  display: grid;
  align-content: center;
}

.login p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.login form,
.access-form {
  display: grid;
  gap: 10px;
}

.login input {
  min-height: 54px;
  padding: 12px 14px;
  font-size: 18px;
  text-transform: uppercase;
}

.login .btn.primary,
.access-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 0;
  justify-content: center;
  font-size: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wide { grid-column: 1 / -1; }

label {
  display: block;
  margin-bottom: 7px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 46px;
  padding: 10px 12px;
}

textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
  line-height: 1.65;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 84, .12);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.btn.primary {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.btn:disabled {
  opacity: .65;
  cursor: wait;
}

.message {
  min-height: 24px;
  margin-top: 12px;
  color: var(--red);
  font-size: 13px;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(340px, .88fr) minmax(0, 1.12fr);
  gap: 18px;
}

.section {
  padding: 24px;
}

.result {
  white-space: pre-wrap;
  min-height: 620px;
  color: #223029;
  line-height: 1.75;
}

.result b {
  color: var(--ink);
}

.tool-card {
  min-height: 230px;
  padding: 22px;
  display: grid;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.tool-card:hover {
  border-color: rgba(31, 122, 84, .44);
  box-shadow: 0 16px 34px rgba(23, 33, 27, .08);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.check-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.check-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 750;
}

.check-row input {
  width: auto;
  min-height: auto;
}

.footer-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 880px) {
  .hero,
  .workbench,
  .form-grid,
  .grid,
  .cards,
  .check-row {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: auto;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .page {
    padding: 18px 12px 30px;
  }

  .login {
    padding: 20px;
  }

  h1 {
    font-size: 32px;
  }
}
