:root {
  --bg: #f5f7f3;
  --ink: #101614;
  --muted: #5e6a66;
  --line: #dce4dd;
  --panel: #ffffff;
  --panel-2: #edf5ef;
  --green: #0e7a4f;
  --green-dark: #084330;
  --lime: #b7f05c;
  --gold: #e2a931;
  --red: #b7473f;
  --blue: #295f9c;
  --shadow: 0 18px 50px rgba(16, 22, 20, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(220, 228, 221, 0.88);
  background: rgba(245, 247, 243, 0.9);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 8px 22px rgba(14, 122, 79, 0.25);
}

.brand-mark::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid white;
  box-shadow: inset 5px 0 0 rgba(255, 255, 255, 0.32);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 650;
  font-size: 14px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: rgba(14, 122, 79, 0.09);
}

.hero {
  position: relative;
  min-height: 560px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: white;
  background: #0b1411;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(7, 17, 14, 0.93) 0%, rgba(7, 17, 14, 0.78) 34%, rgba(7, 17, 14, 0.32) 67%, rgba(7, 17, 14, 0.72) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 150px;
  background: linear-gradient(180deg, rgba(245, 247, 243, 0), var(--bg));
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 116px 0 92px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 750;
}

.eyebrow.dark {
  width: fit-content;
  color: var(--green-dark);
  border-color: rgba(14, 122, 79, 0.18);
  background: rgba(14, 122, 79, 0.08);
}

.hero h1 {
  width: min(760px, 100%);
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero p {
  width: min(690px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  color: #07110e;
  background: var(--lime);
}

.button.secondary {
  color: white;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.button.light {
  color: white;
  background: var(--green);
}

.button.ghost {
  color: var(--green-dark);
  border-color: rgba(14, 122, 79, 0.22);
  background: #f5fbf5;
}

.page-hero {
  padding: 70px 0 36px;
  background: linear-gradient(180deg, #e9f1ec, var(--bg));
}

.page-hero .container {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 34px;
  align-items: end;
}

.page-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.page-hero p {
  color: var(--muted);
  max-width: 780px;
  font-size: 18px;
  margin: 0;
}

.page-hero .eyebrow {
  color: var(--green-dark);
  border-color: rgba(14, 122, 79, 0.18);
  background: rgba(14, 122, 79, 0.08);
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 54px 0;
}

.section.tight {
  padding: 34px 0;
}

.section.alt {
  background: #eef4ef;
  border-block: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-head h2,
.content h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-head p,
.content .lede {
  max-width: 720px;
  color: var(--muted);
  margin: 8px 0 0;
}

.grid {
  display: grid;
  gap: 18px;
}

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

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  letter-spacing: 0;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.stat {
  display: grid;
  gap: 6px;
  border-left: 4px solid var(--green);
}

.stat strong {
  font-size: 30px;
  line-height: 1;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th,
td {
  padding: 15px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #f9fbf8;
}

code,
.code-pill {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.code-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 6px;
  color: #07110e;
  background: #e9f8d6;
  font-weight: 850;
}

.copy-button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green-dark);
  background: white;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.copy-button:hover,
.copy-button.copied {
  border-color: rgba(14, 122, 79, 0.28);
  background: #e4f7e8;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.confidence {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.confidence.confirmed {
  color: #0a4c34;
  background: #dff5e8;
}

.confidence.conflict {
  color: #77520b;
  background: #fff2cf;
}

.confidence.likely-expired {
  color: #7f251f;
  background: #fde1df;
}

.status.active {
  color: #0a4c34;
  background: #dff5e8;
}

.status.retest {
  color: #77520b;
  background: #fff2cf;
}

.status.expired {
  color: #7f251f;
  background: #fde1df;
}

.tier {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  color: white;
  font-weight: 900;
  background: var(--green);
}

.tier.a {
  background: var(--blue);
}

.tier.b {
  background: var(--gold);
  color: #2c2108;
}

.tier.c {
  background: var(--red);
}

.callout {
  padding: 22px;
  border-radius: 8px;
  background: var(--green-dark);
  color: white;
}

.callout p {
  color: rgba(255, 255, 255, 0.78);
}

.code-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.45fr);
  gap: 18px;
  align-items: stretch;
}

.dashboard-main,
.dashboard-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
}

.dashboard-main {
  display: grid;
  gap: 16px;
}

.dashboard-main h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: 0;
}

.dashboard-main p,
.dashboard-side p {
  margin: 0;
  color: var(--muted);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-stats div {
  min-height: 100px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf7;
}

.dashboard-stats strong {
  display: block;
  color: var(--green-dark);
  font-size: 26px;
  line-height: 1;
}

.dashboard-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.dashboard-side {
  color: white;
  background: var(--green-dark);
}

.dashboard-side strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1;
}

.dashboard-side p {
  color: rgba(255, 255, 255, 0.78);
}

.checklist-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-card {
  box-shadow: none;
}

.check-card > span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  border-radius: 7px;
  color: white;
  background: var(--green);
  font-weight: 900;
}

.timeline {
  display: grid;
  gap: 12px;
}

.code-history {
  display: grid;
  gap: 12px;
}

.history-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.history-item.retest {
  border-left-color: var(--gold);
}

.history-item.expired {
  border-left-color: var(--red);
}

.history-date {
  display: grid;
  align-content: start;
  gap: 8px;
}

.history-date time {
  color: var(--green);
  font-weight: 900;
}

.history-date span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef4ef;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.history-item h3,
.history-item p {
  margin: 0;
}

.history-item h3 {
  margin-top: 10px;
}

.history-item p {
  color: var(--muted);
  margin-top: 4px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 142px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.timeline-item time {
  color: var(--green);
  font-weight: 850;
}

.timeline-item h3,
.timeline-item p {
  margin: 0;
}

.timeline-item p {
  color: var(--muted);
  margin-top: 4px;
}

.content {
  max-width: 860px;
}

.content h2 {
  margin-top: 34px;
}

.content h2:first-child {
  margin-top: 0;
}

.content p,
.content li {
  color: var(--muted);
}

.content li + li {
  margin-top: 8px;
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-list a {
  font-weight: 800;
}

.inline-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(14, 122, 79, 0.18);
  border-radius: 8px;
  background: #f5fbf5;
  box-shadow: var(--shadow);
}

.inline-cta h2,
.inline-cta p {
  margin: 0;
}

.inline-cta h2 {
  margin-top: 10px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.06;
}

.inline-cta p {
  max-width: 720px;
  margin-top: 7px;
  color: var(--muted);
}

.role-grid {
  display: grid;
  gap: 18px;
}

.role-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.role-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.role-label,
.fit-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.role-label {
  color: white;
  background: var(--green);
}

.fit-chip {
  color: var(--green-dark);
  background: #e9f8d6;
}

.role-card h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.06;
}

.role-card p {
  margin: 0;
  color: var(--muted);
}

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

.decision-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf7;
}

.decision-grid strong,
.decision-grid span {
  display: block;
}

.decision-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: start;
}

.tool-panel,
.result-panel,
.cta-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
}

.tool-panel-head h2,
.result-panel h2,
.cta-card h2 {
  margin: 12px 0 8px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.05;
}

.tool-panel-head p,
.result-panel p,
.cta-card p {
  color: var(--muted);
}

.selector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.selector-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.selector-grid select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
}

.tool-note {
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  background: #eef8e8;
}

.tool-note p {
  margin: 5px 0 8px;
  color: var(--muted);
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.result-head strong {
  display: block;
  margin-top: 4px;
  font-size: 34px;
  line-height: 1;
  color: var(--green-dark);
}

.tool-metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #e9f8d6;
  font-weight: 900;
  white-space: nowrap;
}

.fit-badge.good {
  color: #295f9c;
  background: #e0edf8;
}

.fit-badge.playable {
  color: #77520b;
  background: #fff2cf;
}

.fit-badge.reroll {
  color: #7f251f;
  background: #fde1df;
}

.result-block {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf7;
}

.result-block p {
  margin: 6px 0 0;
}

.result-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.result-columns > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-columns ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.mini-code-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.mini-code-list div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tool-table table {
  min-width: 760px;
}

.tool-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tool-toolbar button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.tool-toolbar button.is-active {
  color: white;
  border-color: var(--green);
  background: var(--green);
}

[data-controls-tool][data-view="pc"] .mobile-col,
[data-controls-tool][data-view="mobile"] .pc-col {
  display: none;
}

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

.step-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.step-card span {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.step-card h3,
.step-card p {
  margin: 0;
}

.step-card p {
  margin-top: 8px;
  color: var(--muted);
}

.cta-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.footer {
  padding: 42px 0;
  background: #0b1411;
  color: white;
}

.footer .container {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 0.7fr));
  gap: 24px;
}

.footer p {
  color: rgba(255, 255, 255, 0.65);
  margin: 6px 0 0;
}

.footer a {
  color: white;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-links strong {
  margin-bottom: 2px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.74);
  text-decoration: none;
}

.footer-links a:hover {
  color: white;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (max-width: 860px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: 620px;
  }

  .hero-inner {
    padding-top: 84px;
  }

  .page-hero .container,
  .grid.cards,
  .grid.two,
  .grid.four,
  .code-dashboard,
  .checklist-grid,
  .decision-grid,
  .tool-shell,
  .result-columns,
  .step-grid,
  .footer .container {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .inline-cta {
    display: grid;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selector-grid {
    grid-template-columns: 1fr;
  }

  .history-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .nav-links a {
    padding-inline: 8px;
  }

  .hero p,
  .page-hero p {
    font-size: 16px;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .card {
    padding: 18px;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}
