/* Scale Brand 2.0: light-first, Aeonik with ss02, flat brand colors, pill buttons. */
@font-face { font-family: 'Aeonik'; src: url('/static/fonts/aeonik/Aeonik-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Aeonik'; src: url('/static/fonts/aeonik/Aeonik-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Aeonik'; src: url('/static/fonts/aeonik/Aeonik-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Aeonik'; src: url('/static/fonts/aeonik/Aeonik-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Aeonik Mono'; src: url('/static/fonts/aeonik-mono/Aeonik-Mono-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --bg: #F3F3F3;
  --surface: #FFFFFF;
  --text: #000000;
  --evergreen: #193A29;
  --atlas-blue: #273252;
  --tan: #A8927C;
  --grey-10: #212121;
  --grey-30: #575757;
  --grey-60: #929292;
  --grey-80: #C7C7C7;
  --grey-90: #EAEAEA;
  --grey-95: #F2F2F2;
  --positive: #79C96E;
  --neutral: #EDE272;
  --negative: #D95358;
  --radius: 16px;
  --font: 'Aeonik', 'Host Grotesk', -apple-system, Arial, sans-serif;
  --mono: 'Aeonik Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-feature-settings: 'ss02' 1; font-size: 16px; line-height: 24px; letter-spacing: -0.01em;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--evergreen); }
img { max-width: 100%; }
code, pre, .mono { font-family: var(--mono); font-size: 13px; }
pre { background: var(--grey-95); border: 1px solid var(--grey-90); border-radius: 10px; padding: 14px 16px;
      overflow-x: auto; line-height: 20px; white-space: pre-wrap; word-break: break-word; }
:focus-visible { outline: 2px solid var(--atlas-blue); outline-offset: 2px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }
.narrow { max-width: 760px; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--grey-90); position: sticky; top: 0; z-index: 10; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 22px; width: auto; display: block; }
.brand .product { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
                  color: var(--grey-30); border-left: 1px solid var(--grey-80); padding-left: 12px; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .nav button.linklike { text-decoration: none; padding: 8px 14px; border-radius: 9999px; font-size: 15px; color: var(--grey-10);
                               background: none; border: 0; font: inherit; cursor: pointer; }
.nav a:hover, .nav button.linklike:hover { background: var(--grey-95); color: var(--text); }
.nav a.active { background: var(--grey-95); color: var(--text); }
.nav form { margin: 0; }
.menu-toggle { display: none; }
@media (max-width: 760px) {
  .brand .product { display: none; }
  .menu-toggle { display: inline-flex; background: none; border: 1px solid var(--grey-80); border-radius: 9999px;
                 padding: 6px 14px; font: inherit; cursor: pointer; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface);
         flex-direction: column; align-items: stretch; padding: 8px 1.5rem 16px; border-bottom: 1px solid var(--grey-90); }
  .nav.open { display: flex; }
  .nav a, .nav button.linklike { text-align: left; }
}

main { flex: 1; padding: 48px 0 80px; }
.site-footer { border-top: 1px solid var(--grey-90); background: var(--surface); padding: 24px 0; color: var(--grey-30); font-size: 14px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* type */
.overtitle { font-family: var(--mono); font-size: 13px; line-height: 14px; text-transform: uppercase; letter-spacing: 0.08em;
             color: var(--grey-30); margin: 0 0 16px; }
h1 { font-weight: 400; font-size: 40px; line-height: 44px; letter-spacing: -0.02em; margin: 0 0 16px; }
h1.hero { font-size: 64px; line-height: 64px; letter-spacing: -0.03em; max-width: 14ch; }
h2 { font-weight: 400; font-size: 24px; line-height: 28px; margin: 0 0 12px; }
h3 { font-weight: 500; font-size: 16px; line-height: 20px; margin: 0 0 6px; }
@media (max-width: 640px) { h1 { font-size: 32px; line-height: 38px; } h1.hero { font-size: 40px; line-height: 44px; } }
.lede { font-size: 20px; line-height: 28px; color: var(--grey-10); max-width: 46ch; margin: 0 0 32px; }
.muted { color: var(--grey-30); }
.small { font-size: 14px; line-height: 20px; }
.detail { font-size: 12px; line-height: 14px; color: var(--grey-30); }

/* surfaces */
.card { background: var(--surface); border-radius: var(--radius); padding: 28px; border: 1px solid var(--grey-90); }
.card + .card { margin-top: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.dark { background: var(--evergreen); color: #fff; border: 0; }
.dark .muted, .dark .overtitle { color: rgba(255,255,255,.72); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.two, .grid.three, .grid.four { grid-template-columns: minmax(0, 1fr); } }
.section { margin-top: 56px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9999px; padding: 12px 24px;
       font: inherit; font-weight: 500; font-size: 16px; line-height: 20px; text-decoration: none; cursor: pointer;
       border: 1px solid transparent; transition: transform 400ms ease, background 200ms ease; white-space: nowrap; }
.btn:hover { transform: translateX(4px); }
.btn-brand { background: var(--evergreen); color: #fff; }
.btn-brand:hover { color: #fff; background: #0f2a1c; }
.btn-light { background: var(--surface); color: var(--text); border-color: var(--grey-80); }
.btn-light:hover { color: var(--text); border-color: var(--text); }
.dark .btn-light { border-color: transparent; }
.btn-small { padding: 8px 16px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn .arrow { width: 16px; height: 16px; }

/* forms */
form.form { display: block; }
.field { margin-bottom: 20px; }
.field > label:not(.choice):not(.drop), .label { display: block; font-weight: 500; margin-bottom: 6px; }
.hint { display: block; font-size: 14px; line-height: 20px; color: var(--grey-30); margin: -2px 0 8px; }
.optional { font-weight: 400; color: var(--grey-60); font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1px solid var(--grey-80); border-radius: 10px; padding: 11px 14px; line-height: 22px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--atlas-blue); box-shadow: 0 0 0 3px rgba(39,50,82,.12); }
.choices { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .choices { grid-template-columns: minmax(0, 1fr); } }
.choice { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--grey-80);
          border-radius: 12px; cursor: pointer; background: var(--surface); }
.choice input { margin-top: 4px; accent-color: var(--evergreen); }
.choice:has(input:checked) { border-color: var(--evergreen); box-shadow: inset 0 0 0 1px var(--evergreen); }
.choice .t { font-weight: 500; display: block; }
.choice .d { font-size: 14px; line-height: 20px; color: var(--grey-30); display: block; }
.tabs { display: inline-flex; background: var(--grey-95); border-radius: 9999px; padding: 4px; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs label { padding: 8px 16px; border-radius: 9999px; cursor: pointer; font-size: 15px; }
.tabs input { position: absolute; opacity: 0; pointer-events: none; }
.tabs label:has(input:checked) { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 500; }
.link-row { display: flex; gap: 8px; margin-bottom: 8px; }
.link-row input { flex: 1; }
.icon-btn { border: 1px solid var(--grey-80); background: var(--surface); border-radius: 9999px; width: 44px; flex: none; cursor: pointer; font-size: 18px; }
.drop { display: block; border: 1.5px dashed var(--grey-80); border-radius: 12px; padding: 20px; background: var(--grey-95); text-align: center; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--evergreen); background: #fff; }
.drop input[type=file] { display: block; margin: 8px auto 0; max-width: 100%; font: inherit; font-size: 14px; }
.file-list { list-style: none; padding: 0; margin: 8px 0 0; font-size: 14px; color: var(--grey-30); }
.form-section { padding: 28px 0; border-top: 1px solid var(--grey-90); }
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.form-section > h2 { margin-bottom: 4px; }
.form-section > .hint { margin-bottom: 20px; }

.alert { border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; border: 1px solid; }
.alert-error { background: #fbeced; border-color: var(--negative); }
.alert-info { background: var(--grey-95); border-color: var(--grey-80); }
.alert-ok { background: #eef8ec; border-color: var(--positive); }

/* status */
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 9999px; padding: 4px 12px; font-size: 14px;
        line-height: 20px; font-weight: 500; background: var(--grey-95); color: var(--text); border: 1px solid var(--grey-90); white-space: nowrap; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grey-60); }
.chip.positive .dot { background: var(--positive); }
.chip.neutral .dot { background: #c9bc3a; }
.chip.negative .dot { background: var(--negative); }
.chip.working .dot { background: var(--atlas-blue); animation: pulse 1.4s ease-in-out infinite; }
.chip.error .dot { background: var(--negative); }
.chip.review .dot { background: var(--atlas-blue); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; position: relative; }
.steps li::before { content: ""; position: absolute; left: 11px; top: 36px; bottom: -10px; width: 2px; background: var(--grey-90); }
.steps li:last-child::before { display: none; }
.steps .mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--grey-80); background: var(--surface); flex: none;
               display: grid; place-items: center; }
.steps li.done .mark { background: var(--evergreen); border-color: var(--evergreen); }
.steps li.done .mark::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.steps li.now .mark { border-color: var(--atlas-blue); }
.steps li.now .mark::after { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--atlas-blue);
                             border-right-color: transparent; animation: spin 0.9s linear infinite; }
.steps li.todo { color: var(--grey-60); }
.steps .sub { font-size: 14px; color: var(--grey-30); }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 4px; background: var(--grey-90); border-radius: 9999px; overflow: hidden; position: relative; margin: 20px 0 8px; }
.bar::after { content: ""; position: absolute; inset: 0; width: 35%; background: var(--atlas-blue); border-radius: 9999px; animation: slide 1.6s ease-in-out infinite; }
.bar.determinate::after { animation: none; width: var(--w, 0%); transition: width .2s; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

.result { border-radius: var(--radius); padding: 28px; border: 1px solid var(--grey-90); background: var(--surface); }
.result.positive { border-top: 4px solid var(--positive); }
.result.neutral { border-top: 4px solid #c9bc3a; }
.result.negative { border-top: 4px solid var(--negative); }
.result.review { border-top: 4px solid var(--atlas-blue); }
.stat { padding: 18px 20px; background: var(--grey-95); border-radius: 12px; }
.stat .n { font-size: 32px; line-height: 38px; letter-spacing: -0.01em; }
.stat .k { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--grey-30); }
.feedback { margin: 12px 0 0; padding-left: 20px; }
.feedback li + li { margin-top: 8px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px; border-top: 1px solid var(--grey-90); }
.list li:first-child { border-top: 0; }
.list a.rowlink { text-decoration: none; display: block; }
.list .name { font-weight: 500; }
@media (max-width: 640px) { .list li { flex-direction: column; align-items: flex-start; } }

.empty { text-align: center; padding: 56px 24px; }

/* admin */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
table.data th { text-align: left; font-family: var(--mono); font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: .05em;
                color: var(--grey-30); padding: 12px 14px; border-bottom: 1px solid var(--grey-90); white-space: nowrap; background: var(--surface); }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--grey-90); vertical-align: top; }
table.data tr:hover td { background: var(--grey-95); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters a { text-decoration: none; }
.filters .chip.on { border-color: var(--text); }
dl.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 15px; }
dl.kv dt { color: var(--grey-30); }
dl.kv dd { margin: 0; word-break: break-word; }
@media (max-width: 640px) { dl.kv { grid-template-columns: minmax(0, 1fr); } dl.kv dt { margin-top: 6px; } }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.thumbs a { display: block; border: 1px solid var(--grey-90); border-radius: 10px; overflow: hidden; background: var(--grey-95); aspect-ratio: 16/10; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flag { background: #fbf8dc; border: 1px solid #e3d65a; border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.flag + .flag { margin-top: 8px; }
details summary { cursor: pointer; font-weight: 500; }
.timeline { font-size: 14px; }
.timeline div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 4px 0; }

/* fixes */
.grid > .card + .card { margin-top: 0; }
.nav a.btn-brand { background: var(--evergreen); color: #fff; margin-left: 6px; }
.nav a.btn-brand:hover { background: #0f2a1c; color: #fff; }

/* Google sign-in button (Google's light theme) */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 12px 20px;
              background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 9999px; text-decoration: none;
              font-family: var(--font); font-weight: 500; font-size: 16px; line-height: 20px; }
.btn-google:hover { background: #f8f9fa; color: #1f1f1f; box-shadow: 0 1px 2px rgba(0,0,0,.15); }

/* country combobox */
.combo { position: relative; }
.combo-none, .combo-error { min-height: 0; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 240px; overflow-y: auto;
              margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--grey-80);
              border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.combo-list li { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--grey-95); }
.combo-none { color: var(--grey-30); font-size: 14px; margin: 6px 0 0; }
.combo-error { color: var(--negative); font-size: 14px; margin: 6px 0 0; }
input.invalid { border-color: var(--negative); }

/* status-page view (Scale semantic colors; every state also has an icon + word) */
.status-banner { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: var(--radius); margin: 16px 0;
                 background: var(--surface); border: 1px solid var(--grey-90); border-left: 6px solid var(--positive); }
.status-banner.outage { border-left-color: var(--negative); }
.status-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: #3f8f35; flex: none; }
.status-banner.outage .status-icon { background: var(--negative); }
.status-title { font-size: 20px; line-height: 24px; }
.uptime-card { margin-bottom: 16px; }
.uptime-row { padding: 16px 0; border-top: 1px solid var(--grey-90); }
.uptime-row:first-of-type { border-top: 0; }
.uptime-head { align-items: center; margin-bottom: 8px; }
.uptime-bars { display: flex; gap: 2px; height: 34px; align-items: stretch; }
.uptime-bars .ub { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--grey-90); cursor: default; }
.ub.good, .sw.good { background: var(--positive); }
.ub.degraded, .sw.degraded { background: var(--neutral); }
.ub.outage, .sw.outage { background: var(--negative); }
.ub.none, .sw.none { background: var(--grey-90); }
.uptime-bars .ub:hover { filter: brightness(.85); }
.uptime-foot { display: flex; justify-content: space-between; margin-top: 6px; }
.uptime-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.uptime-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.state-label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.state-label.good { color: #2f6b28; }
.state-label.degraded { color: #6b5d00; }
.state-label.outage { color: #a3262b; }
.state-label.none { color: var(--grey-30); }
.chart-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--grey-10); color: #fff; font-size: 13px; line-height: 18px;
             padding: 8px 10px; border-radius: 8px; max-width: 280px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
@media (max-width: 640px) { .uptime-bars { height: 28px; gap: 1px; } .uptime-bars .ub { min-width: 1px; } }

/* help chat */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
         border-radius: 9999px; background: var(--evergreen); color: #fff; font-size: 12px; font-weight: 500; line-height: 1; }
.chat-log { display: flex; flex-direction: column; gap: 12px; max-height: 55vh; min-height: 160px; overflow-y: auto; padding: 4px 2px 12px; }
.msg { display: flex; flex-direction: column; max-width: 78%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; }
.bubble { padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; word-break: break-word; line-height: 22px; }
.msg.mine .bubble { background: var(--evergreen); color: #fff; border-bottom-right-radius: 4px; }
.msg.theirs .bubble { background: var(--grey-95); border: 1px solid var(--grey-90); border-bottom-left-radius: 4px; }
.msg .meta { font-size: 12px; color: var(--grey-30); margin-top: 4px; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; border-top: 1px solid var(--grey-90); padding-top: 14px; }
.chat-form textarea { min-height: 48px; flex: 1; resize: vertical; }
.chat-error { color: var(--negative); margin: 8px 0 0; }
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: inline-flex; align-items: center; gap: 8px;
            padding: 12px 18px; border-radius: 9999px; background: var(--evergreen); color: #fff; text-decoration: none;
            font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.chat-fab:hover { color: #fff; background: #0f2a1c; }
.chat-fab .badge { background: #fff; color: var(--evergreen); }
.thread-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .thread-grid { grid-template-columns: minmax(0, 1fr); } }
/* guide */
.guide .card { margin-top: 16px; }
.guide h3 { margin-top: 18px; }
.note { border-radius: 10px; padding: 12px 14px; margin-top: 12px; background: var(--grey-95); border: 1px solid var(--grey-90); }
.note.warn { background: #fbf8dc; border-color: #e3d65a; }
.checklist { list-style: none; padding: 0; margin: 12px 0 0; }
.checklist li { position: relative; padding: 6px 0 6px 30px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 9px; width: 16px; height: 16px; border: 1.5px solid var(--grey-60); border-radius: 4px; }

/* funnel (one series: Scale Labs categorical slot 1; numbers stay in text ink) */
.seg { display: inline-flex; background: var(--grey-95); border-radius: 9999px; padding: 3px; gap: 2px; }
.seg a { padding: 5px 12px; border-radius: 9999px; font-size: 14px; text-decoration: none; color: var(--grey-10); }
.seg a.on { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 500; }
table.funnel { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; line-height: 20px; }
table.funnel th { text-align: left; font-family: var(--mono); font-size: 13px; font-weight: 400; text-transform: uppercase;
                  letter-spacing: .05em; color: var(--grey-30); padding: 8px 10px; border-bottom: 1px solid var(--grey-90); }
table.funnel th.f-bar-h { text-align: center; }
table.funnel td { padding: 6px 10px; border-bottom: 1px solid var(--grey-95); vertical-align: middle; }
table.funnel tr:hover td { background: var(--grey-95); }
table.funnel td.num, table.funnel th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 120px; }
.f-stage { white-space: nowrap; }
.f-num { color: var(--grey-60); font-variant-numeric: tabular-nums; }
.f-bar-cell { width: 48%; min-width: 220px; }
.f-track { position: relative; height: 36px; display: flex; justify-content: center; align-items: center; }
.f-bar { position: absolute; top: 2px; bottom: 2px; left: 50%; transform: translateX(-50%); background: #E27553; border-radius: 4px; }
/* one color per series (Scale Labs categorical sequence, in order); the shared sign-up strip is neutral grey */
.funnel.f-webapp .f-bar, .f-key.f-webapp { background: #E27553; }
.funnel.f-legacy .f-bar, .f-key.f-legacy { background: #65C2B9; }
.funnel.f-all .f-bar { background: var(--grey-80); }
.f-title { margin: 20px 0 0; display: flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .12em; color: var(--grey-30); }
.f-key { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
table.funnel tr.f-group td { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--grey-30);
                             padding: 14px 10px 4px; border-bottom: none; background: none; }
table.funnel tr.f-pick { cursor: pointer; }
table.funnel tr.f-pick a { text-decoration: none; }
table.funnel tr.f-pick:hover a { text-decoration: underline; }
table.funnel tr.f-pick.on td { background: var(--grey-90); }
table.funnel tr.f-pick.on td:first-child { box-shadow: inset 3px 0 0 var(--text); font-weight: 500; }
.f-val { position: relative; font-weight: 500; color: var(--text); background: rgba(255,255,255,.85); padding: 1px 8px; border-radius: 9999px;
         font-variant-numeric: tabular-nums; }
.f-prev { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; width: 110px; position: relative; }
.f-prev-bar { position: absolute; left: 0; height: 22px; background: var(--grey-90); border-radius: 3px; max-width: 100%; z-index: 0; }
.f-prev span:last-child { position: relative; z-index: 1; }
/* the two side-by-side funnels are half width: tighter number columns */
.grid table.funnel td.num, .grid table.funnel th.num { width: 76px; padding-left: 6px; padding-right: 6px; }
/* side by side only when each funnel has room; stacked below that */
@media (max-width: 1100px) { .grid.two.funnels { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .grid table.funnel td.num, .grid table.funnel th.num { width: auto; } }
.grid table.funnel .f-prev { width: 70px; }
.grid .f-bar-cell { min-width: 140px; }
@media (max-width: 760px) { .f-bar-cell { min-width: 140px; } table.funnel td.num, table.funnel th.num { width: auto; } }

/* repo rows on the submit form */
.repo-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: stretch; }
.repo-row select { flex: 0 0 auto; width: 17rem; }
.repo-row input { flex: 1 1 auto; min-width: 0; }
@media (max-width: 640px) { .repo-row { flex-wrap: wrap; } .repo-row select { width: 100%; } .repo-row input { flex-basis: calc(100% - 52px); } }
.choice.disabled { opacity: .55; cursor: not-allowed; }
.chip.closed .dot { background: var(--grey-60); }

.main-pick { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 14px; padding: 0 4px; }
.main-pick input { accent-color: var(--evergreen); }

/* the submit form, one step at a time (app.js adds .wizard; without JS every section shows) */
form:not(.wizard) .js-only { display: none !important; }
.wizard .step { display: none; }
.wizard .step.current { display: block; animation: step-in .22s ease-out; border-top: 0; padding-top: 4px; }
@keyframes step-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wizard .step.current { animation: none; } }

.stepper { margin: 0 0 24px; }
.stepper-top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.stepper-count { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--grey-30); }
.stepper-title { font-weight: 500; }
.stepper-bar { height: 6px; background: var(--grey-90); border-radius: 9999px; overflow: hidden; }
.stepper-bar span { display: block; height: 100%; width: var(--w, 0%); background: var(--evergreen); border-radius: 9999px;
                    transition: width .3s ease; }
.stepper-steps { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 0; margin: 12px 0 0; }
.stepper-steps button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 4px 2px;
                        background: none; border: 0; font: inherit; color: var(--grey-60); cursor: pointer; border-radius: 10px; }
.stepper-steps button:disabled { cursor: default; }
.stepper-steps button:not(:disabled):hover { background: var(--grey-95); color: var(--text); }
.stepper-steps .dot { width: 26px; height: 26px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center;
                      font-size: 13px; font-weight: 500; border: 1.5px solid var(--grey-80); background: var(--surface); }
.stepper-steps .name { font-size: 12px; line-height: 14px; text-align: center; }
.stepper-steps li.current button { color: var(--text); }
.stepper-steps li.current .dot { border-color: var(--evergreen); background: var(--evergreen); color: #fff; }
.stepper-steps li.done button { color: var(--grey-10); }
.stepper-steps li.done .dot { border-color: var(--evergreen); color: var(--evergreen); }
.stepper-steps li.done .dot { font-size: 0; }
.stepper-steps li.done .dot::after { content: "✓"; font-size: 14px; }
@media (max-width: 640px) {
  .stepper-steps .name { display: none; }
}

.step-nav { display: flex; align-items: center; gap: 12px; padding-top: 20px; border-top: 1px solid var(--grey-90); }
form:not(.wizard) .step-nav { border-top: 0; padding-top: 0; }
.step-nav-gap { flex: 1; }
.step-error { margin-top: 16px; }

.form-review { display: grid; gap: 12px; margin-bottom: 8px; }
.form-review-group { border: 1px solid var(--grey-90); border-radius: 12px; padding: 16px 18px; }
.form-review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.form-review-head h3 { margin: 0; font-size: 16px; font-weight: 500; }
.form-review dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 6px 16px; margin: 0; font-size: 14px; line-height: 20px; }
.form-review dt { color: var(--grey-30); }
.form-review dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.form-review dd.missing { color: var(--negative); }
@media (max-width: 640px) { .form-review dl { grid-template-columns: 1fr; } .form-review dd { margin-bottom: 6px; } }

/* money totals */
table.money td { padding: 8px 14px; }
table.money td.num, table.money th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.money tr.group td { padding-top: 18px; font-weight: 500; border-bottom: none; }
table.money tr.total td { font-weight: 500; border-top: 1px solid var(--grey-80); }
table.money td.neg { color: var(--negative); }

/* review steps on the admin submission page */
.review-steps { list-style: none; margin: 12px 0 0; padding: 0; }
.review-steps li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--grey-95); }
.review-steps li:last-child { border-bottom: none; }
.review-steps .mark { flex: none; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; border: 2px solid var(--grey-60); }
.review-steps li.done .mark { background: var(--positive); border-color: var(--positive); }
.review-steps li.rejected .mark { background: var(--negative); border-color: var(--negative); }
.review-steps li.now .mark { border-color: var(--atlas-blue); background: var(--atlas-blue); animation: pulse 1.4s ease-in-out infinite; }
.review-steps li.todo { color: var(--grey-30); }
.review-note { margin-top: 6px; padding: 8px 12px; background: var(--grey-95); border-radius: 8px; white-space: pre-wrap; font-size: 14px; }
.review-form { margin-top: 16px; }

/* a collapsible card */
details.collapsible > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; }
details.collapsible > summary::-webkit-details-marker { display: none; }
details.collapsible > summary > div { flex: 1; min-width: 0; }
details.collapsible .summary-totals { display: none; font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
details.collapsible:not([open]) .summary-totals { display: inline; }
details.collapsible .chev { flex: none; width: 10px; height: 10px; border-right: 2px solid var(--grey-30); border-bottom: 2px solid var(--grey-30);
                            transform: rotate(45deg); transition: transform .2s ease; margin: 0 4px 4px; }
details.collapsible:not([open]) .chev { transform: rotate(-45deg); margin-bottom: 0; }
@media (max-width: 760px) { details.collapsible .summary-totals { display: none !important; } }

/* the funnel stages the list is filtered to */
.selection { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding: 12px 16px; background: var(--surface);
             border: 1px solid var(--grey-90); border-radius: 12px; font-size: 14px; }
.selection .chip { text-decoration: none; }

/* a bar too short to hold its value: the value sits just past the bar's right end */
.f-track.f-out .f-val { position: absolute; left: calc(50% + var(--w) / 2 + 6px); background: none; padding: 0; }

/* why the rest dropped out (opens from the "% of prev." cell) */
button.f-drop { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; }
button.f-drop:hover .f-prev span:last-child, button.f-drop[aria-expanded="true"] .f-prev span:last-child { text-decoration: underline; }
button.f-drop:focus-visible { outline: 2px solid var(--atlas-blue); outline-offset: 2px; }
.f-caret { width: 6px; height: 6px; border-right: 1.5px solid var(--grey-30); border-bottom: 1.5px solid var(--grey-30); transform: rotate(45deg);
           margin: 0 2px 3px 2px; transition: transform .2s ease; }
button.f-drop[aria-expanded="true"] .f-caret { transform: rotate(-135deg); margin-bottom: -2px; }
table.funnel tr.f-why td { padding: 0 0 10px; background: none; border-bottom: 1px solid var(--grey-95); }
.f-why-box { margin: 0 0 0 26px; padding: 12px 14px; background: var(--grey-95); border-radius: 10px; }
.f-why-box ul { list-style: none; margin: 8px 0 0; padding: 0; }
.f-why-box li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 4px 8px; }
.f-why-box li > span { position: relative; z-index: 1; }
.f-why-n { font-variant-numeric: tabular-nums; font-weight: 500; }
.f-why-bar { position: absolute !important; left: 0; top: 2px; bottom: 2px; background: var(--surface); border-radius: 4px; z-index: 0 !important; }

/* paging */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--grey-90); flex-wrap: wrap; }
.pager .pg { display: inline-flex; min-width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 9999px;
             text-decoration: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.pager .pg:hover { background: var(--grey-95); }
.pager .pg.on { background: var(--text); color: #fff; }

textarea.short { min-height: 72px; }
.review-steps li.aside { opacity: .6; }

/* What's left (Platform status): usage bars; the numbers beside them carry the meaning, the color only echoes it */
.left-tile .n { font-size: 28px; line-height: 34px; margin: 6px 0 8px; }
.left-tile .detail { margin-top: 4px; }
.meter { height: 8px; background: var(--grey-90); border-radius: 9999px; overflow: hidden; margin: 2px 0 8px; }
.meter span { display: block; height: 100%; width: var(--w, 0%); min-width: 4px; border-radius: 9999px; background: #2e7d55; }
.meter.degraded span { background: #b8860b; }
.meter.outage span { background: var(--negative); }
.neg { color: var(--negative); }

/* the submission deadline banner (Admin → Settings) */
.deadline-bar { background: var(--evergreen); color: #fff; font-size: 14px; line-height: 20px; padding: 10px 0; }
.deadline-bar .container { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.deadline-bar a { color: #fff; font-weight: 500; margin-left: auto; }
.deadline-bar.urgent { background: #8a2c2f; }
.deadline-bar.closed { background: var(--grey-10); }

/* Home: the two requirements everyone must meet, before anything else */
.must { border-left: 6px solid var(--evergreen); padding: 4px 0 4px 20px; margin: 8px 0 28px; }
.must-big { font-size: 48px; line-height: 52px; font-weight: 700; letter-spacing: -0.02em; text-transform: uppercase; margin: 0 0 10px; }
.must-line { font-size: 20px; line-height: 28px; margin: 0 0 4px; color: var(--grey-10); }
@media (max-width: 640px) { .must-big { font-size: 32px; line-height: 36px; } .must-line { font-size: 17px; line-height: 24px; } }

/* NDA and Agreement */
.sign-docs { display: grid; gap: 10px; margin-top: 12px; }
.sign-doc { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--grey-90); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
