/* WageDecoder -- app.css
 *
 * Design language: current-generation product site (Linear / Vercel / Mercury lineage),
 * not a government form.
 *
 * What that means concretely:
 *   - One typeface, Inter Variable, self-hosted. Tight negative tracking on display sizes.
 *   - A black primary button. Colour is reserved for state, never for decoration.
 *   - 14px cards, 10px inputs, 1px borders at ~7% ink. Soft layered shadows.
 *   - Sentence-case labels at 12px/500. Uppercase only for micro-labels.
 *   - No flag stripes, no seal, no roman numerals. The product is the hero.
 */

@font-face {
  font-family: "Inter";
  src: url("../vendor/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../vendor/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f4f3ef;

  /* Old Glory navy, deepened until it reads as ink rather than as a flag colour.
     Every grey is tinted toward it so the page stays one temperature. */
  --ink: #0f1a2e;
  --ink-2: #454b57;
  /* ink-3/ink-4 are text colours, not decoration: both clear 4.5:1 on --bg and --surface */
  --ink-3: #5c6472;
  --ink-4: #6b7280;

  --line: rgba(15, 26, 46, 0.07);
  --line-2: rgba(15, 26, 46, 0.12);
  --line-3: rgba(15, 26, 46, 0.2);

  /* Old Glory red, desaturated to brick. Used only for the logo's second stroke,
     blocking errors and danger — never as a decorative accent. */
  --flag-red: #a8232f;
  --flag-red-soft: #fbf0f1;

  --accent: #1b4ed8;
  --accent-soft: #eef2fe;

  --ok: #06684a;
  --ok-soft: #ecf6f1;
  --warn: #a8560c;
  --warn-soft: #fdf5ea;
  --danger: #a8232f;
  --danger-soft: #fbf0f1;

  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 8px;

  --shadow-xs: 0 1px 2px rgba(15, 26, 46, 0.05);
  --shadow-sm: 0 1px 2px rgba(15, 26, 46, 0.05), 0 4px 12px -4px rgba(15, 26, 46, 0.07);
  --shadow-md: 0 1px 2px rgba(15, 26, 46, 0.05), 0 12px 32px -12px rgba(15, 26, 46, 0.13);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", system-ui, sans-serif;
  --mono: "SF Mono", "Cascadia Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: #fff; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }

a { color: inherit; text-decoration: none; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface-2);
  padding: 1.5px 5px;
  border-radius: 4px;
  color: var(--ink-2);
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* Visually hidden, still announced. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link: hidden until it receives keyboard focus. */
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  transition: top .14s;
}
.skip:focus { top: 12px; }

.noscript-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
}
.noscript-note a { color: var(--accent); text-decoration: underline; }

/* ============================================================ top bar */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  background: rgba(250, 249, 246, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* The mark is a geometric W built from two V strokes: the first in navy, the second in
   brick red. Two colours, no stars, no shield, no stripes — the flag reference is carried
   by the palette rather than by a picture of a flag. */
.mark {
  width: 25px;
  height: 25px;
  display: block;
  flex: 0 0 auto;
  color: var(--ink);
  overflow: visible;
}
.mark .v1 { stroke: currentColor; }
.mark .v2 { stroke: var(--flag-red); }

.brand-name {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
}

.top nav a {
  padding: 6px 11px;
  border-radius: 7px;
  transition: background .14s, color .14s;
}
.top nav a:hover { background: var(--surface-2); color: var(--ink); }

/* ============================================================ hero */

.hero {
  position: relative;
  padding: 76px 0 54px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% 0 auto 0;
  height: 620px;
  background: radial-gradient(58% 60% at 50% 0%, rgba(15, 26, 46, 0.05), transparent 70%);
  pointer-events: none;
}

.hero > * { position: relative; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.005em;
  box-shadow: var(--shadow-xs);
}

.pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}

.hero h1 {
  margin: 22px auto 0;
  max-width: 15em;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.038em;
  font-weight: 600;
}

.hero h1 em { font-style: normal; color: #7c8291; }

.hero .sub {
  margin: 20px auto 0;
  max-width: 34em;
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink-3);
  letter-spacing: -0.005em;
}

.hero .sub strong { color: var(--ink-2); font-weight: 500; }

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.proof {
  display: flex;
  justify-content: center;
  gap: 44px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.proof div { text-align: center; }
.proof b {
  display: block;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.proof span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-4);
}

/* ============================================================ layout */

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  gap: 20px;
  align-items: start;
  padding: 6px 0 80px;
}

@media (max-width: 1040px) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================ cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow .2s;
}

.card:hover { box-shadow: var(--shadow-sm); }

.card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 16px;
}

.card > header .sec {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* a small square index, not a roman numeral */
.card > header .idx {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-3);
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.card > header h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.card > header .hint {
  font-size: 12px;
  color: var(--ink-4);
  text-align: right;
  line-height: 1.4;
}

.card .body { padding: 0 22px 22px; }

.card > header + .body { border-top: 1px solid var(--line); padding-top: 20px; }

/* ============================================================ form controls */

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

@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .card .body { padding-left: 18px; padding-right: 18px; }
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.field label,
.field > .sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.field .sub,
.field label .sub {
  font-weight: 400;
  font-size: 11.5px;
  color: var(--ink-4);
}

input[type="text"], input[type="number"], input[type="date"], select, textarea {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 9px 12px;
  width: 100%;
  transition: border-color .14s, box-shadow .14s;
}

input::placeholder { color: var(--ink-4); }

input:hover, select:hover { border-color: var(--line-3); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(15, 26, 46, 0.08);
}

/* Keyboard focus is always visible, including on links and buttons that opt out of
   outlines. Placed after the input rules so it wins on equal specificity. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
select:focus-visible,
textarea:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="file"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

input.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

input.err { border-color: var(--danger); background: var(--danger-soft); }
input.err:focus { box-shadow: 0 0 0 3px rgba(168, 35, 47, 0.1); }
input.warn { border-color: #dc9a4a; background: var(--warn-soft); }

.check {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
  padding: 10px 12px;
  margin: 0 -12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .14s;
}
.check:hover { background: var(--surface-2); }

.check input {
  margin: 3px 0 0;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
  cursor: pointer;
}

/* ============================================================ state panel */

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

@media (max-width: 720px) { .state-grid { grid-template-columns: 1fr; } }

.state-cell {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 14px 16px;
}

.state-cell dt {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-4);
  margin-bottom: 6px;
}

.state-cell dd {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.state-cell dd small {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 400;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-4);
  margin-top: 5px;
  letter-spacing: 0;
}

.unverified {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1.5px 6px;
  border-radius: 5px;
  background: var(--warn-soft);
  color: var(--warn);
  margin-left: 6px;
  vertical-align: 2px;
}

.date-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* ============================================================ table */

.table-scroll {
  overflow-x: auto;
  margin: 0 -22px;
  padding: 0 22px;
  /* fade on the right edge: the payroll grid is wider than any column layout, and this
     is the cheapest honest way to say "there is more to the right" */
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
}
.table-scroll::-webkit-scrollbar { height: 10px; }
.table-scroll::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 10px;
  border: 3px solid var(--surface);
}
.table-scroll::-webkit-scrollbar-track { background: transparent; }

table.workers {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 1040px;
  font-size: 13px;
}

table.workers th {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-4);
  text-align: left;
  padding: 0 6px 8px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.01em;
}

table.workers thead tr:first-child th { border-bottom: none; }
table.workers thead tr:last-child th { padding-top: 2px; padding-bottom: 8px; }

table.workers th.num, table.workers td.num { text-align: right; }

table.workers td {
  padding: 5px 4px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.workers tbody tr:last-child td { border-bottom: none; }

table.workers input, table.workers select {
  padding: 7px 9px;
  font-size: 13px;
  border-radius: 7px;
  border-color: transparent;
  background: transparent;
  transition: background .14s, border-color .14s;
}

table.workers input:hover, table.workers select:hover {
  background: var(--surface-2);
  border-color: transparent;
}

table.workers input:focus, table.workers select:focus {
  background: var(--surface);
  border-color: var(--ink);
}

table.workers .w-last, table.workers .w-first { width: 84px; min-width: 84px; }
table.workers .w-id { width: 56px; min-width: 56px; }
table.workers .w-cls { width: 132px; min-width: 132px; font-weight: 500; }
table.workers .w-day { width: 58px; min-width: 58px; padding: 7px 4px; font-size: 12.5px; }
table.workers .w-money { width: 78px; min-width: 78px; padding: 7px 6px; }

table.workers tfoot td {
  border-bottom: none;
  border-top: 1px solid var(--line-2);
  background: transparent;
  font-weight: 600;
  font-size: 12.5px;
  padding: 12px 6px 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

table.workers tfoot td:first-child {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-4);
}

.row-del {
  border: none;
  background: none;
  color: var(--ink-4);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 5px 7px;
  border-radius: 6px;
  transition: background .14s, color .14s;
}
.row-del:hover { background: var(--danger-soft); color: var(--danger); }

.toolbar { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* ============================================================ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: var(--r-md);
  padding: 9px 16px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background .14s, border-color .14s, transform .06s, box-shadow .14s;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
}

.btn:hover { background: var(--surface-2); border-color: var(--line-3); }
.btn:active { transform: translateY(0.5px); }

/* Black primary — the current top-tier move. Colour is not decoration. */
.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 26, 46, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}
.btn-primary:hover { background: #1b2b47; border-color: #1b2b47; }

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }

.btn-lg { padding: 11px 20px; font-size: 14px; border-radius: 11px; }

.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ============================================================ checks panel */

.checks {
  position: sticky;
  top: 84px;
  border-radius: var(--r-lg);
}

.checks > header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.checks > header h2 { font-size: 13px; font-weight: 600; }
.checks > header .hint { font-size: 11.5px; color: var(--ink-4); }

.score {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.score-ring {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.score-ring.ok { background: var(--ok-soft); color: var(--ok); }
.score-ring.bad { background: var(--danger-soft); color: var(--danger); }

.score-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.score-text span {
  font-size: 11.5px;
  color: var(--ink-4);
}

.findings { max-height: 62vh; overflow-y: auto; }

.findings::-webkit-scrollbar { width: 10px; }
.findings::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 10px;
  border: 3px solid var(--surface);
}
.findings::-webkit-scrollbar-track { background: transparent; }

.finding {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  transition: background .14s;
}
.finding:last-child { border-bottom: none; }
.finding:hover { background: var(--surface-2); }

.finding .f-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 3px;
}

.finding .f-rule {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1.5px 5px;
  border-radius: 4px;
  flex: 0 0 auto;
}

.finding.block .f-rule { background: var(--danger-soft); color: var(--danger); }
.finding.warn .f-rule { background: var(--warn-soft); color: var(--warn); }
.finding.info .f-rule { background: rgba(15, 26, 46, 0.06); color: var(--ink-2); }

.finding .f-msg {
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
  letter-spacing: -0.005em;
}

.finding .f-fix {
  color: var(--ink-3);
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.55;
}

.empty-state {
  padding: 44px 20px;
  text-align: center;
  color: var(--ink-4);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ============================================================ export bar */

.export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}

.export-note {
  font-size: 12.5px;
  color: var(--ink-3);
  max-width: 500px;
  line-height: 1.55;
}
.export-note strong { color: var(--ink); font-weight: 600; }

/* ============================================================ footer */

.foot {
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
  background: var(--surface);
}

.foot-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 980px) { .foot-inner { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 620px) { .foot-inner { grid-template-columns: 1fr; gap: 26px; } }

.foot h3 {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-4);
  margin: 0 0 12px;
}

.foot p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--ink-3); max-width: 34em; }

.foot ul { margin: 0; padding: 0; list-style: none; }
.foot li {
  font-size: 13px;
  line-height: 1.95;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.foot li b { color: var(--ink-2); font-weight: 500; }
.foot li a { color: var(--ink-3); text-decoration: none; }
.foot li a:hover { color: var(--ink); text-decoration: underline; }

.foot .disclaimer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-4);
  max-width: 72em;
}
.foot .disclaimer strong { color: var(--ink-3); font-weight: 500; }

/* ============================================================ print */

#printable { display: none; }

@media print {
  body { background: #fff; }
  .top, .hero, .cols, .export-bar, .foot, .no-print { display: none !important; }
  #printable { display: block; }
  @page { size: letter landscape; margin: 12mm; }
  #printable h2 { font-size: 11pt; margin: 0 0 6pt; }
  #printable .p-meta { font-size: 8pt; line-height: 1.5; margin-bottom: 7pt; }
  #printable table { width: 100%; border-collapse: collapse; font-size: 7.5pt; }
  #printable th, #printable td { border: 0.5pt solid #000; padding: 2.5pt 3pt; }
  #printable th { background: #eee; text-align: left; }
}

/* ============================================================ language switch */

.lang {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  margin-left: 6px;
  border-radius: 8px;
  background: var(--surface-2);
}

.lang button {
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-4);
  cursor: pointer;
  transition: background .14s, color .14s;
}

.lang button:hover { color: var(--ink-2); }

.lang button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

/* ============================================================ license */

.lic {
  max-width: 940px;
  margin: 0 auto 40px;
  padding: 20px 22px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.lic-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.lic-top .eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--flag-red);
}

.lic h3 {
  margin: 6px 0 0;
  font-size: 17px;
  letter-spacing: -.02em;
  font-weight: 600;
}

.lic-sub {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
}

.lic-state {
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-3);
  background: var(--surface-2);
  white-space: nowrap;
}

.lic-state.on {
  color: var(--ok);
  border-color: #bcd9c7;
  background: var(--ok-soft);
}

.lic-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.lic-form input {
  height: 40px;
  padding: 0 11px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

.lic-form input:focus { border-color: var(--ink-3); }

.lic-key { flex: 1 1 250px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.lic-project { flex: 0 1 210px; }
.lic-form .btn { height: 40px; }

.lic-msg {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-4);
}

@media (max-width: 620px) {
  .lic-top { flex-direction: column; }
}

/* ============================================================ pricing */

.pricing {
  border-top: 1px solid var(--line);
  padding: 72px 0 88px;
  background: var(--surface);
}

.price-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }

.price-head .eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--flag-red);
  margin-bottom: 14px;
}

.price-head h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.14;
  letter-spacing: -0.032em;
  font-weight: 600;
}

.price-sub {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-3);
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 1040px) { .price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .price-grid { grid-template-columns: 1fr; } }

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

/* the one dark card: how a current product page marks its recommended plan */
.price-card.featured {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 2px 4px rgba(15, 26, 46, .18), 0 20px 48px -20px rgba(15, 26, 46, .5);
}

.price-card.featured .price-name,
.price-card.featured .price-amount b,
.price-card.featured .price-tagline { color: #fff; }

.price-card.featured .price-amount span { color: rgba(255, 255, 255, .55); }
.price-card.featured .price-features li.yes { color: rgba(255, 255, 255, .82); }
.price-card.featured .price-features li.no { color: rgba(255, 255, 255, .34); }
.price-card.featured .price-features li.yes::before { background: var(--flag-red); }
.price-card.featured .price-features li.no::before { background: rgba(255, 255, 255, .25); }

.price-badge {
  position: absolute;
  top: -9px;
  left: 22px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--flag-red);
  color: #fff;
}

.price-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}

.price-amount {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.price-amount b {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.price-amount span { font-size: 11.5px; color: var(--ink-4); }

.price-tagline {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-3);
  min-height: 2.4em;
}

.price-features {
  list-style: none;
  margin: 18px 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.price-features li {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.5;
}

.price-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
}

.price-features li.yes { color: var(--ink-2); }
.price-features li.yes::before { background: var(--ink); }
.price-features li.no { color: var(--ink-4); text-decoration: line-through; }
.price-features li.no::before { background: var(--line-3); }

.price-cta { width: 100%; }

.price-card.featured .price-cta.btn-primary {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}
.price-card.featured .price-cta.btn-primary:hover { background: #eceae4; border-color: #eceae4; }

.price-note {
  margin: 26px auto 0;
  max-width: 62em;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-4);
  text-align: center;
}

/* ============================================================ drag to restore */

body.dragging::after {
  content: attr(data-drop);
  position: fixed;
  inset: 12px;
  z-index: 100;
  display: grid;
  place-items: center;
  border: 2px dashed var(--ink);
  border-radius: var(--r-lg);
  background: rgba(250, 249, 246, 0.9);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  pointer-events: none;
  backdrop-filter: blur(2px);
}
