/* RulingLens try-it page. One stylesheet, no third-party requests. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 400; font-style: normal; font-display: swap; src: url("/static/fonts/outfit-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 500; font-style: normal; font-display: swap; src: url("/static/fonts/outfit-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 600; font-style: normal; font-display: swap; src: url("/static/fonts/outfit-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 700; font-style: normal; font-display: swap; src: url("/static/fonts/outfit-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

:root {
  /* The same tokens as the landing page: warm ground, deep green accent, Outfit for text, Plex Mono for codes. */
  --ground: #F7F6F2;
  --surface: #FFFFFF;
  --soft: #FBFBF8;
  --ink: #1B2625;
  --ink-2: #33403E;
  --ink-3: #4D5A57;
  --line: #D7DCD6;
  --line-2: #E3E6E1;
  --field: #8E9995;
  --accent: #0E7C62;
  --accent-dark: #0B6650;
  --accent-ink: #0A5A47;
  --accent-bg: #E8F2EE;
  --accent-line: #A9D3C5;
  --review: #7A4E0A;
  --review-bg: #FBF1DF;
  --review-line: #E6C892;
  --error: #9B2222;
  --error-bg: #FBECEC;
  --error-line: #E4B4B4;
  --sans: "Outfit", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* aliases used by the newer sections */
  --blue: var(--accent); --blue-soft: var(--accent-bg); --rule: var(--line-2); --muted: var(--ink-3);
  --ok-bg: var(--accent-bg); --ok-ink: var(--accent-ink); --review-ink: var(--review);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
h1, h2, h3, p, ol, ul { margin: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
code, .mono { font-family: var(--mono); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1:focus, h1:focus-visible { outline: none; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 12px 16px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.main { flex: 1 0 auto; padding-top: 48px; padding-bottom: 56px; }

/* header and footer */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--accent); position: relative; }
.brand-mark::after { content: ""; position: absolute; right: -5px; top: -5px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.brand-name { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.top-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 15px; }
.nav-link { color: var(--ink); text-decoration: none; padding: 10px 0; }
.nav-link:hover { color: var(--accent-dark); text-decoration: underline; }
.who { display: inline-flex; align-items: center; gap: 12px; padding: 4px 0 4px 20px; border-left: 1px solid var(--line); }
.who-email { color: var(--ink-3); max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner { background: var(--review-bg); border-bottom: 1px solid var(--review-line); color: var(--ink); padding: 10px 24px; font-size: 14px; text-align: center; }
.bottom { border-top: 1px solid var(--line); background: var(--surface); }
.bottom-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; padding-bottom: 20px; font-size: 14px; color: var(--ink-3); }
.bottom-row a { color: var(--ink-3); }

/* layout */
.columns { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px 40px; }
.columns.wide-gap { gap: 40px 56px; padding-top: 8px; }
.col-lead { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }
.col-form { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 22px; padding: 32px; }
.col-main { flex: 999 1 520px; min-width: 0; }
.col-result { flex: 999 1 600px; min-width: 0; }
.col-side { flex: 1 1 320px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-l { display: flex; flex-direction: column; gap: 32px; }
.stack-s { display: flex; flex-direction: column; gap: 16px; }
.stack-xs { display: flex; flex-direction: column; gap: 10px; }
.stack-xxs { display: flex; flex-direction: column; gap: 4px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.reliability { margin-top: 48px; }
.narrow { max-width: 640px; margin: 24px auto 0; padding: 36px; }
.measure { max-width: 56ch; }
.measure-wide { max-width: 80ch; color: var(--ink-2); }

/* type */
.eyebrow { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.h-hero { font-size: 44px; line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
.h-hero.smaller { font-size: 38px; }
.h-card { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.h-card.big { font-size: 30px; line-height: 1.2; }
.h-section { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.h-section.small { font-size: 20px; }
.h-side { font-size: 18px; font-weight: 600; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 58ch; }
.quiet { color: var(--ink-3); }
.small { font-size: 15px; }
.strong { font-weight: 600; }
p { color: var(--ink-2); }
.code-hero { font-family: var(--mono); font-size: 64px; line-height: 1.05; font-weight: 500; letter-spacing: 0; color: var(--accent); }
.figure { font-family: var(--mono); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.figure.pending { color: var(--ink-3); }
.entered-name { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
#result-description { overflow-wrap: anywhere; }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.card.roomy { padding: 32px; }
.card.dashed { border-style: dashed; border-color: var(--field); }
.card.flat { padding: 0; }
form.card { padding: 28px; }
.card-foot { border-top: 1px solid var(--line-2); padding-top: 18px; font-size: 15px; color: var(--ink-2); }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 8px; }
label, .label { font-size: 15px; font-weight: 600; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
input, textarea { font: inherit; color: var(--ink); padding: 12px 14px; min-height: 48px; border: 1px solid var(--field); border-radius: 6px; background: var(--surface); width: 100%; }
textarea { resize: vertical; min-height: 150px; }
input::placeholder, textarea::placeholder { color: #5B6A75; opacity: 1; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
.readout { font-family: var(--mono); font-size: 15px; color: var(--ink-2); padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); overflow-wrap: anywhere; }
.hint { font-size: 14px; color: var(--ink-3); }
.error { font-size: 15px; color: var(--error); background: var(--error-bg); border: 1px solid var(--error-line); border-radius: 6px; padding: 10px 12px; }
.notice { font-size: 15px; color: var(--ink); background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: 6px; padding: 10px 12px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 6px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.button.primary { background: var(--accent); color: #FFFFFF; }
.button.primary:hover { background: var(--accent-dark); color: #FFFFFF; }
.button.secondary { background: var(--surface); color: var(--ink); border-color: var(--field); font-weight: 500; }
.button.secondary:hover { border-color: var(--ink-3); color: var(--ink); }
.button.small { min-height: 44px; padding: 0 16px; font-size: 15px; }
.button.block { width: 100%; }
.button[disabled] { opacity: 0.6; cursor: default; }
.link-button { background: none; border: 0; padding: 10px 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; text-align: left; }
.link-button:hover { color: var(--accent-dark); }
.link-button.small { font-size: 14px; padding: 0; }
.who .link-button { color: var(--ink); }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--field); border-radius: 22px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.chip:hover { border-color: var(--ink-3); }

/* numbered steps and cautions */
.steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 14px; }
.step-n { font-family: var(--mono); font-weight: 600; color: var(--ink-3); }
.cautions { padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 12px; color: var(--ink-2); font-size: 15px; }

/* waiting */
.progress { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.progress span { display: block; height: 100%; width: 35%; border-radius: 3px; background: var(--accent); animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .progress span { animation: none; width: 100%; opacity: 0.5; } }

/* result */
.mark { border-radius: 8px; padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; color: var(--ink); }
.mark-icon { flex: none; margin-top: 2px; }
.mark-title { font-size: 20px; font-weight: 600; }
.mark.backed { background: var(--accent-bg); border: 1px solid var(--accent-line); }
.mark.backed .mark-title, .mark.backed .mark-icon { color: var(--accent-ink); }
.mark.review { background: var(--review-bg); border: 1px solid var(--review-line); }
.mark.review .mark-title, .mark.review .mark-icon { color: var(--review); }
.mark.backed .review-only, .mark.review .backed-only { display: none; }

.ruling-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.ruling-id { font-family: var(--mono); font-size: 15px; color: var(--ink-2); }
.ruling-number { font-weight: 600; color: var(--ink); }
.ruling-subject { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.ruling-excerpt { overflow-wrap: anywhere; }
.ruling-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500; align-self: flex-start; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 16px; font-size: 14px; font-weight: 600; }
.pill.same { background: var(--accent-bg); color: var(--accent-ink); }
.pill.different { background: var(--review-bg); color: var(--review); }
.pill.same .different-only, .pill.different .same-only { display: none; }

.list { padding: 0; display: flex; flex-direction: column; }
.list-row { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 16px 24px; border: 0; border-bottom: 1px solid var(--line-2); background: none; font: inherit; color: inherit; text-align: left; width: 100%; }
.list-row:last-child { border-bottom: 0; }
.list-code { flex: 0 0 96px; font-weight: 600; }
.list-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink-2); overflow-wrap: anywhere; }
.code-heading { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.today-row { cursor: pointer; }
.today-row:hover { background: var(--soft); }
.today-row:first-child { border-radius: 10px 10px 0 0; }
.today-row:last-child { border-radius: 0 0 10px 10px; }
.today-name { color: var(--ink); font-weight: 500; }
#result-code-heading { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 70ch; }

@media (max-width: 720px) {
  .main { padding-top: 28px; padding-bottom: 40px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .h-hero { font-size: 32px; }
  .h-hero.smaller { font-size: 28px; }
  .code-hero { font-size: 44px; }
  .lead { font-size: 17px; }
  .col-form, .card.roomy, .narrow { padding: 22px; }
  form.card { padding: 20px; }
  .who { padding-left: 0; border-left: 0; }
  .top-nav .nav-link { display: none; }
  .list-row { padding: 14px 16px; }
}

/* plans and account */
.plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}
.plan-box{border:1px solid var(--line, #dfe3e8);border-radius:10px;padding:14px;display:flex;flex-direction:column;gap:6px}
.plan-box.current{border-color:var(--accent, var(--accent));box-shadow:inset 0 0 0 1px var(--accent, var(--accent))}
.plan-box .plan-name{font-weight:600}.plan-box .plan-price{font-size:22px;font-weight:600}.plan-box ul{margin:4px 0 8px;padding-left:16px;font-size:13px}
.plan-box .button{margin-top:auto}
/* The one-off audit is not a tier: it runs as a band under the four plans — name and price, the words, the button */
.plan-box.one-off{grid-column:1 / -1;flex-direction:row;align-items:center;gap:18px;flex-wrap:wrap;background:var(--surface-2, var(--ground, #F7F6F2))}
.plan-box.one-off .plan-name{min-width:120px}.plan-box.one-off .plan-price{font-size:18px;min-width:96px}
.plan-box.one-off .small{flex:1 1 280px;max-width:60ch}.plan-box.one-off .button{margin-top:0;margin-left:auto;white-space:nowrap;flex:0 0 auto;width:auto}
.meter{height:6px;background:var(--line, #e3e6eb);border-radius:3px;overflow:hidden}.meter i{display:block;height:100%;background:var(--accent, var(--accent))}
.key-row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}
.mono{font-family:ui-monospace,Menlo,Consolas,monospace}
.audit-row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:start}
.audit-links a{margin-right:10px}
.bucket{font-size:12px;padding:2px 7px;border-radius:4px;font-weight:600;margin-right:6px}
.bucket.d{background:#fbeeea;color:#a6452b}.bucket.u{background:#fbf3e3;color:#8a5a0b}.bucket.b{background:var(--accent-bg);color:var(--accent-ink)}

.docs h1{font-size:28px;margin:24px 0 8px}.docs h2{font-size:20px;margin:28px 0 8px}.docs pre{margin:0;padding:14px 16px;overflow:auto;font-size:13px;line-height:1.6}.docs p,.docs li{max-width:72ch}

/* Watch: tariff actions naming the code */
.watch-row { padding: 8px 0; border-top: 1px solid var(--line-2); }
.watch-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin-bottom: 2px; }
.watch-row a { font-weight: 500; }
.watch-pill { font-size: 12px; padding: 2px 8px; background: var(--review-bg); color: var(--review); }

/* Sign in with Google or Apple */
.oauth { margin-bottom: 14px; }
.oauth-button { font-weight: 600; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; margin-top: 4px; }
.or-line::before, .or-line::after { content: ""; flex: 1; border-top: 1px solid var(--line-2); }

/* Selects, in the page's own clothes (the column-mapping step, filters) */
.field select, select.select { -webkit-appearance: none; appearance: none; font: inherit; color: var(--ink); padding: 9px 36px 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; background-image: linear-gradient(45deg, transparent 50%, #5F6673 50%), linear-gradient(135deg, #5F6673 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.field select:hover, select.select:hover { border-color: #c8ccd3; }
.field select:focus-visible, select.select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

/* History */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters input[type="search"] { flex: 1 1 240px; max-width: 360px; font: inherit; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; }
.history-card { container-type: inline-size; overflow: hidden; }
/* Table when the card is wide enough for it (the layout is decided by the card's own width, not the window's):
   when · product · HS6 · mark · line · who · actions */
.history-head, .history-row { display: grid; grid-template-columns: 104px minmax(120px, 1fr) 64px 104px 92px 64px 112px; gap: 4px 12px; align-items: center; padding: 10px 20px; }
.history-head { font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--line-2); }
.history-row { border-bottom: 1px solid var(--line-2); font-size: 14px; }
.history-row:last-child { border-bottom: 0; }
.history-row > * { min-width: 0; }
.history-row .when { white-space: nowrap; }
.history-row .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-row .desc { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-row .mono { font-family: var(--mono); white-space: nowrap; }
.history-row .actions { display: flex; gap: 12px; white-space: nowrap; justify-content: flex-end; }
.history-row .actions button { font: inherit; font-size: 13px; }
.history-foot { padding: 10px 20px; }
.history-empty { padding: 28px 20px; text-align: center; }
.mark-pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 4px; font-weight: 500; white-space: nowrap; }
.mark-pill.backed { background: var(--accent-bg); color: var(--accent-ink); }
.mark-pill.review { background: var(--review-bg); color: var(--review); }
@container (max-width: 780px) {
  /* narrower than the table: a compact card per check — when and actions on the first line, the product, then code · mark · line · who */
  .history-head { display: none; }
  .history-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 14px 20px; }
  .history-row .when { order: 1; }
  .history-row .actions { order: 2; margin-left: auto; }
  .history-row .product { order: 3; flex-basis: 100%; }
  .history-row .name, .history-row .desc { white-space: normal; }
  .history-row > :nth-child(3), .history-row > :nth-child(4), .history-row > :nth-child(5), .history-row > :nth-child(6) { order: 4; }
  .history-row > :nth-child(6)::before { content: "· "; color: var(--line); }
}

/* Webhooks and integrations on the Account page */
.webhook-form { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.webhook-form input[type="url"] { flex: 1 1 280px; font: inherit; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; }
.webhook-form .ev { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 12px 7px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; cursor: pointer; user-select: none; white-space: nowrap; color: var(--ink-3); transition: border-color .12s, background .12s, color .12s; }
.webhook-form .ev input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.webhook-form .ev::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c8ccd3; background: #fff; flex: none; transition: background .12s, border-color .12s; }
.webhook-form .ev:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); color: var(--ink); }
.webhook-form .ev:has(input:checked)::before { border-color: var(--accent); background: var(--accent) linear-gradient(45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%) no-repeat; background-size: 0 0; }
.webhook-form .ev:has(input:checked)::after { content: ""; position: absolute; left: 15px; top: 50%; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translate(0, -62%) rotate(45deg); }
.webhook-form .ev:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.webhook-form .ev:hover { border-color: #c8ccd3; }
.webhook-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; }
.webhook-row .url { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.webhook-row .meta { font-size: 12px; color: var(--ink-3); }
.webhook-row .actions { display: flex; gap: 12px; white-space: nowrap; }
.integ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.integ { border: 1px solid var(--line-2); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.integ h3 { margin: 0; font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.integ p { margin: 0; font-size: 13px; color: var(--ink-3); flex: 1; }
.integ .st { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #f1f2f4; color: var(--ink-3); white-space: nowrap; }
.integ .st.on { background: var(--accent-bg); color: var(--accent-ink); }
.integ .links { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.integ .links a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1.5px solid var(--accent); border-radius: 8px; color: var(--accent-ink); font-size: 14px; font-weight: 500; text-decoration: none; }
.integ .links a:hover { background: var(--accent-bg); }
.integ .links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Team */
.team-form { display: flex; gap: 8px; align-items: center; }
.team-form input { flex: 1 1 240px; max-width: 360px; font: inherit; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; }
.team-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; }
.team-row .who { font-weight: 500; overflow-wrap: anywhere; }
.team-row .meta { font-size: 12px; color: var(--ink-3); }
.team-row .actions { display: flex; gap: 12px; white-space: nowrap; }
.invite-link { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; display: block; margin-top: 6px; }

/* Watch tab */
.wchips { display: flex; flex-wrap: wrap; gap: 8px; }
.wchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13px; background: #fff; }
.wchip .mono { font-family: var(--mono); }
.wchip .label { color: var(--ink-3); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wchip button { border: 0; background: none; font: inherit; color: var(--ink-3); cursor: pointer; padding: 0 4px; border-radius: 50%; line-height: 1; }
.wchip button:hover { color: var(--ink); background: #f1f2f4; }
.watch-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.watch-add input { font: inherit; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 8px; }
.watch-add #watchlist-code { width: 190px; } .watch-add #watchlist-label { flex: 1 1 200px; max-width: 320px; }
.week-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 4px 14px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; align-items: start; }
.week-row .d { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.week-row .tags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.week-row .names { font-size: 13px; margin-top: 3px; }
.ev-row { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.ev-row input { width: 16px; height: 16px; margin: 0; }

/* First sign-in */
.first { max-width: 760px; }
.tries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.try { display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 16px 18px; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.try:hover { border-color: var(--accent); box-shadow: 0 1px 0 rgba(31,78,140,.08); }
.try:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.try .k { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.try .t { font-weight: 600; font-size: 15px; }
.try .d { font-size: 13px; color: var(--ink-3); }
.pointers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 18px 20px; }
.pointers .pt { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
@media (max-width: 760px) { .tries, .pointers { grid-template-columns: 1fr; } }

/* Docs pages: lists and tables */
.docs ul { margin: 8px 0 14px; padding-left: 22px; }
.docs li { margin: 5px 0; }
.docs p + ul { margin-top: -4px; }
.docs table { border-collapse: collapse; margin: 10px 0 16px; font-size: 14px; }
.docs th, .docs td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.docs th { font-weight: 500; color: var(--ink-3); font-size: 12px; }

/* The shell: a sidebar of sections on the left, the page on the right */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; flex: 1 0 auto; }
.shell:has(.side[hidden]) { grid-template-columns: minmax(0, 1fr); }
.side { position: sticky; top: 24px; padding: 28px 0 24px; display: flex; flex-direction: column; gap: 2px; font-size: 16px; }
.side .nav-link { display: block; padding: 9px 14px; border-radius: 8px; color: var(--ink-2); text-decoration: none; line-height: 1.3; }
.side .nav-link:hover { background: var(--accent-bg); color: var(--accent-ink); text-decoration: none; }
.side .nav-link.current { background: var(--accent-bg); color: var(--accent-ink); font-weight: 600; }
.side-group { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 18px 14px 6px; margin-top: 10px; border-top: 1px solid var(--line-2); }
.side .nav-link.in-group { font-size: 15px; color: var(--ink-3); padding-top: 7px; padding-bottom: 7px; }
.side .nav-link.in-group:hover, .side .nav-link.in-group.current { color: var(--accent-ink); }
/* sub-items keep the same left edge as everything else; a thin rule in the gutter says "part of the one above" */
.side .nav-link.sub { padding-left: 28px; position: relative; }
.side .nav-link.sub::before { content: ""; position: absolute; left: 14px; top: 8px; bottom: 8px; width: 2px; border-radius: 1px; background: var(--line-2); }
.side .nav-link.sub.current::before, .side .nav-link.sub:hover::before { background: var(--accent); }
.side-usage { margin: 22px 0 0; padding: 14px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font-size: 13px; }
.side-usage .t { color: var(--ink-3); font-size: 13px; }
.side-usage .n { font-weight: 600; margin: 2px 0 6px; }
.side-usage .bar { height: 5px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.side-usage .bar i { display: block; height: 100%; background: var(--accent); width: 0; }
.side-usage .plan { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--line-2); padding-top: 10px; margin-top: 4px; }
.side-usage .plan a { color: var(--accent); }
.top-nav { gap: 4px 20px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 8px; padding: 14px 0 0; border-bottom: 1px solid var(--line-2); margin-bottom: 8px; }
  .side .nav-link { padding: 6px 10px; font-size: 14px; } .side .nav-link.sub { padding-left: 10px; }
  .side-group { flex-basis: 100%; padding: 10px 10px 2px; }
  .side-usage { display: none; }  /* the meter lives on the Account page on a phone */
  .side a[href^="/docs/"] { display: none; }
}

/* The file picker, in the page's clothes */
.file-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1.5px dashed var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface); }
.file-pick.over { border-color: var(--accent); background: var(--accent-bg); }
.file-pick .file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-pick .file-button { cursor: pointer; margin: 0; }
.file-pick .file-name { font-size: 14px; overflow-wrap: anywhere; }
.file-pick .file-name.chosen { color: var(--ink); font-weight: 500; }
.file-pick:has(.file-input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Code panels in the docs: a dark terminal-coloured surface with a bar for the language and Copy, and a light hand of colour */
.docs .code { margin: 12px 0 18px; border-radius: 10px; overflow: hidden; background: #1E2824; color: #E6EDE9; border: 1px solid #2B3732; }
.docs .code-bar { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px 7px 16px; background: #243029; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #8FA79C; }
.docs .code-copy { font: inherit; font-size: 12px; letter-spacing: 0; text-transform: none; color: #CFE6D9; background: transparent; border: 1px solid #3A4A42; border-radius: 6px; padding: 3px 10px; cursor: pointer; }
.docs .code-copy:hover { background: #2E3C35; color: #fff; }
.docs .code-copy.done { color: #8FE3B6; border-color: #8FE3B6; }
.docs .code code { font-family: var(--mono); color: inherit; background: none; padding: 0; }
.docs .code .v { font-weight: 600; }
.docs .code .v.get { color: #7FDDB0; } .docs .code .v.post { color: #F2CB7A; } .docs .code .v.delete { color: #F39A93; } .docs .code .v.put, .docs .code .v.patch { color: #9FC4F2; }
.docs .code .p { color: #FFFFFF; }
.docs .code .m { color: #A6B8B0; } .docs .code .m .p { color: #D5E2DC; } .docs .code .m .v { opacity: 0.85; }
.docs .code .s { color: #C9E3B4; } .docs .code .k { color: #9FD4F2; } .docs .code .n { color: #F2CB7A; }
.docs .code .c { color: #7C9488; font-style: italic; } .docs .code .a { color: #8FE3B6; }
.docs p code, .docs li code { background: var(--accent-bg); color: var(--accent-ink); padding: 1px 6px; border-radius: 5px; font-size: 0.92em; }
