/* Layout concept: a search-results page. Content hangs off a narrow left "position" gutter,
   rank numbers are set large in mono, and the orange accent is spent only on rank movement
   and the one primary action per screen. */
:root {
  --bg: #f4f5f7;          /* cool slate paper */
  --surface: #ffffff;
  --sunken: #eceef2;
  --ink: #111419;
  --muted: #5a6270;
  --line: #dde1e7;
  --accent: #d4581f;      /* TubeDesk orange */
  --accent-ink: #a8400f;
  --accent-wash: #fbe6da;
  --on-accent: #ffffff;
  --up: #17804a;
  --up-wash: #e1f3e8;
  --down: #c2362b;
  --down-wash: #fbe5e2;

  --f-display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Instrument Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 12px;
  --shadow: 0 1px 2px rgb(17 20 25 / 0.05), 0 12px 32px -12px rgb(17 20 25 / 0.18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f13; --surface: #151920; --sunken: #11141a; --ink: #e9ecf1; --muted: #9aa3b2; --line: #262c36;
    --accent: #f07a3e; --accent-ink: #ff9a63; --accent-wash: #33201555; --on-accent: #160b05;
    --up: #6fd59a; --up-wash: #12291c; --down: #ff8a7d; --down-wash: #331715;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -12px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f13; --surface: #151920; --sunken: #11141a; --ink: #e9ecf1; --muted: #9aa3b2; --line: #262c36;
  --accent: #f07a3e; --accent-ink: #ff9a63; --accent-wash: #33201555; --on-accent: #160b05;
  --up: #6fd59a; --up-wash: #12291c; --down: #ff8a7d; --down-wash: #331715;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -12px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--f-body); }
img { max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* type scale: 13 / 15 / 16 / 19 / 24 / 32 / clamp(40–64) */
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: 32px; line-height: 1.1; font-weight: 700; }
h3 { font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: 19px; color: var(--muted); max-width: 34em; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.tiny { font-size: 13px; }
.mono { font-family: var(--f-mono); }
.label { font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.3) blur(12px); -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font-family: var(--f-display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.top nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.top nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 760px) { .top nav .opt { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--f-body); padding: 13px 20px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; background: var(--accent); color: var(--on-accent); text-decoration: none;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.quiet { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.quiet:hover { border-color: var(--muted); background: var(--surface); }
.btn.sm { padding: 8px 13px; font-size: 14px; border-radius: 8px; }
.btn.danger { background: transparent; color: var(--down); border-color: var(--line); }
.btn.danger:hover { background: var(--down-wash); border-color: var(--down); }
.btn.danger.solid { background: var(--down); color: #fff; border-color: var(--down); }

/* ---------- hero ---------- */
.hero { padding-block: 72px 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.hero .copy { display: flex; flex-direction: column; gap: 22px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.platforms { font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); padding-block: 44px 40px; gap: 40px; } }

/* the results table (hero visual and reused in docs) */
.serp { margin: 0; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.serp-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.serp-head .q { font-family: var(--f-mono); font-size: 14px; background: var(--sunken); border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 8px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp-head .tag { font-size: 12px; color: var(--muted); white-space: nowrap; }
.serp ol { list-style: none; margin: 0; padding: 0; }
.serp li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.serp li:last-child { border-bottom: 0; }
.serp .pos { font-family: var(--f-mono); font-weight: 700; font-size: 26px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.serp li.mine { background: var(--accent-wash); }
.serp li.mine .pos { color: var(--accent); }
.serp .t { font-weight: 600; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp .c { font-size: 13px; color: var(--muted); }
.serp .you { font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--accent-ink); margin-left: 6px; }
.delta { font-family: var(--f-mono); font-size: 13px; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--up); background: var(--up-wash); }
.delta.down { color: var(--down); background: var(--down-wash); }
.delta.flat { color: var(--muted); background: var(--sunken); }
.serp-foot { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; background: var(--sunken); font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.serp-foot strong { color: var(--ink); font-family: var(--f-mono); font-weight: 600; }

/* ---------- sections ---------- */
.section { padding-block: 80px; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; margin-bottom: 44px; }
.section-head .label { padding-top: 10px; }
.section-head .lead { margin-top: 12px; }
@media (max-width: 760px) { .section { padding-block: 56px; } .section-head { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 32px; } .section-head .label { padding-top: 0; } }

/* tools list: rows, not a card grid */
.tools { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
.tools ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.tools li { padding-block: 22px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.tools li p { color: var(--muted); }
.tools .meta { font-family: var(--f-mono); font-size: 13px; color: var(--accent-ink); }
@media (max-width: 760px) { .tools { grid-template-columns: minmax(0, 1fr); gap: 0; } .tools ul { grid-template-columns: minmax(0, 1fr); } .tools > div:first-child { display: none; } }

/* BYOK: a real 3-step setup sequence, so numbered */
.steps { display: grid; grid-template-columns: 200px repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps .step { display: grid; gap: 10px; align-content: start; }
.steps .n { font-family: var(--f-mono); font-weight: 700; font-size: 14px; color: var(--accent); }
.steps .step p { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .steps { grid-template-columns: minmax(0, 1fr); } .steps > div:first-child { display: none; } }

.costs { margin-top: 44px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
.cost-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.cost-table table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px; }
.cost-table th, .cost-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cost-table th { font-size: 12px; font-family: var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cost-table tr:last-child td { border-bottom: 0; }
.cost-table td.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cost-table th.num { text-align: right; }
@media (max-width: 760px) { .costs { grid-template-columns: minmax(0, 1fr); gap: 10px; } }

/* pricing */
.pricing { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; }
.plan .left { padding: 32px; display: grid; gap: 16px; align-content: start; border-right: 1px solid var(--line); }
.plan .right { padding: 32px; background: var(--sunken); }
.price { font-family: var(--f-display); font-size: 48px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.price small { font-family: var(--f-body); font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: 15px; }
.ticks li::before { content: ""; width: 14px; height: 8px; margin-top: 6px; border-left: 2px solid var(--up); border-bottom: 2px solid var(--up); transform: rotate(-45deg); }
@media (max-width: 860px) { .pricing { grid-template-columns: minmax(0, 1fr); } .pricing > div:first-child { display: none; } .plan { grid-template-columns: minmax(0, 1fr); } .plan .left { border-right: 0; border-bottom: 1px solid var(--line); } }

/* faq */
.faq { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
.faq .list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding-block: 18px;
  font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--f-mono); color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "−"; }
details p { padding-bottom: 20px; color: var(--muted); max-width: 40em; }
@media (max-width: 760px) { .faq { grid-template-columns: minmax(0, 1fr); } .faq > div:first-child { display: none; } }

/* download band */
.download { padding-block: 64px; border-top: 1px solid var(--line); }
.download .wrap > div { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }

/* footer */
footer { border-top: 1px solid var(--line); padding-block: 32px 48px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
footer nav { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* ---------- customer area ---------- */
.acct { padding-block: 48px 96px; display: grid; gap: 28px; }
.acct-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.acct-head .who { font-size: 15px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.signin { max-width: 460px; margin: 40px auto 0; display: grid; gap: 20px; box-shadow: var(--shadow); }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: 14px; }
.field input { font: 16px var(--f-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; width: 100%; }
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-wash); }
.note { padding: 12px 14px; border-radius: 10px; font-size: 15px; }
.note.ok { background: var(--up-wash); color: var(--up); }
.note.err { background: var(--down-wash); color: var(--down); }
.note.info { background: var(--sunken); color: var(--muted); }

.lic { display: grid; gap: 0; padding: 0; overflow: hidden; }
.lic-top { padding: 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: start; }
.lic-key { font-family: var(--f-mono); font-size: 20px; font-weight: 700; letter-spacing: .02em; overflow-wrap: anywhere; }
.lic-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); margin-top: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on { color: var(--up); background: var(--up-wash); }
.pill.off { color: var(--down); background: var(--down-wash); }
.pill.test { color: var(--accent-ink); background: var(--accent-wash); }
.lic-status-note { padding: 0 28px 20px; }
.seats { border-top: 1px solid var(--line); background: var(--sunken); padding: 18px 28px 22px; display: grid; gap: 12px; }
.seats-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.meter { display: flex; gap: 4px; }
.meter i { width: 26px; height: 6px; border-radius: 3px; background: var(--line); }
.meter i.used { background: var(--accent); }
.devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.devices li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.devices .name { font-weight: 600; overflow-wrap: anywhere; }
.devices .sub { font-size: 13px; color: var(--muted); }
.devices .confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: end; }
.empty { font-size: 14px; color: var(--muted); }

.billing { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.billing ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
@media (max-width: 640px) {
  .panel { padding: 22px; } .panel.lic { padding: 0; } .lic-top > .row { justify-content: start !important; } .lic-top { padding: 20px; grid-template-columns: minmax(0, 1fr); } .seats { padding: 16px 20px 20px; }
  .lic-status-note { padding: 0 20px 18px; } .billing { grid-template-columns: minmax(0, 1fr); }
  .devices li { grid-template-columns: minmax(0, 1fr); }
  .devices .confirm { justify-content: start; }
}

.skeleton { height: 120px; border-radius: 16px; background: linear-gradient(90deg, var(--sunken), var(--surface), var(--sunken)); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.center-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: 64px; }
.center-page .inner { display: grid; gap: 16px; justify-items: center; max-width: 460px; }
.big-num { font-family: var(--f-mono); font-size: 96px; font-weight: 700; line-height: 1; color: var(--accent); }
