/* Adapted from the SplitSignal shared design system. */
/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  /* light */
  --bg: #f3f1ea;
  --surface: #fbfaf6;
  --line: #d6d2c4;
  --ink: #111216;
  --muted: #555864;
  --a: #c43d0c;          /* channel A: signal orange */
  --b: #0a6f8c;          /* channel B: signal cyan */
  --glow: 0 0 0 transparent;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --t-xs: .75rem;                              /* labels, mono */
  --t-sm: .875rem;
  --t-md: 1rem;                                /* body */
  --t-lg: clamp(1.125rem, 1rem + .5vw, 1.375rem);
  --t-xl: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --t-2xl: clamp(3rem, 1.4rem + 7.5vw, 8rem);  /* hero only */

  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 7rem;

  --radius: 10px;
  --max: 76rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c10; --surface: #12141b; --line: #262a36;
    --ink: #eceae3; --muted: #9a9ca8;
    --a: #ff6b3d; --b: #46d9ff;
    --glow: 0 0 24px color-mix(in srgb, var(--b) 35%, transparent);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c10; --surface: #12141b; --line: #262a36;
  --ink: #eceae3; --muted: #9a9ca8;
  --a: #ff6b3d; --b: #46d9ff;
  --glow: 0 0 24px color-mix(in srgb, var(--b) 35%, transparent);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--t-md)/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); letter-spacing: -.02em; line-height: 1.2; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-color: var(--a); text-decoration-thickness: 1px; text-underline-offset: .25em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--b); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--a); color: var(--bg); }

/* ---------- Layout ---------- */
.ss-wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.ss-section { padding-block: var(--s8); border-top: 1px solid var(--line); }
.ss-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }

/* ---------- Components ---------- */
/* Label: the machine voice. Mono, uppercase, small. */
.ss-label { font: 500 var(--t-xs)/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ss-label--a { color: var(--a); }

/* Wordmark: two bars, one signal splitting. */
.ss-mark { display: inline-flex; align-items: center; gap: var(--s3); font: 600 var(--t-sm)/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; }
.ss-mark svg { width: 28px; height: 28px; flex: none; }

/* Status pill: a dot and a state. States: --on (operating), --build, --off. */
.ss-pill { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s3); border: 1px solid var(--line); border-radius: 999px; font: 500 var(--t-xs)/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ss-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.ss-pill--on::before { background: var(--b); box-shadow: var(--glow); animation: ss-pulse 2.4s var(--ease) infinite; }
.ss-pill--build::before { background: var(--a); }

/* Card: a product or a note. Add --redacted for unreleased products, --live for released ones. */
.ss-card { position: relative; display: flex; flex-direction: column; gap: var(--s3); min-height: 12rem; padding: var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .3s var(--ease), transform .3s var(--ease); }
.ss-card p { color: var(--muted); }
.ss-card > :last-child { margin-top: auto; }
a.ss-card:hover { border-color: var(--a); transform: translateY(-2px); }
.ss-redact { display: inline-block; font: 600 var(--t-lg)/1.2 var(--mono); letter-spacing: .04em; color: var(--ink); overflow-wrap: anywhere; }
.ss-card .ss-pill { align-self: flex-start; }
.ss-card--redacted .ss-redact { background: var(--ink); color: color-mix(in srgb, var(--bg) 30%, var(--ink)); border-radius: 2px; padding-inline: .15em; user-select: none; }

/* Fact: a big number or word with a label under it. */
.ss-fact { display: flex; flex-direction: column; gap: var(--s2); padding-block: var(--s4); border-top: 1px solid var(--line); }
.ss-fact b { font-size: var(--t-xl); font-weight: 700; letter-spacing: -.03em; line-height: 1; }

/* Button-link */
.ss-btn { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s5); border-radius: 999px; background: var(--ink); color: var(--bg); font: 600 var(--t-sm)/1 var(--font); text-decoration: none; transition: background .2s; }
.ss-btn:hover { background: var(--a); }

@keyframes ss-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Static guide layouts */
.ss-wrap { --max: 72rem; }
.site-header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1rem; padding-block:1.25rem; border-bottom:1px solid var(--line); }
.brand-bars { display:flex; gap:4px; align-items:center; height:28px; }
.brand-bars::before, .brand-bars::after { content:""; display:block; width:7px; height:23px; background:var(--a); transform:skew(-16deg); }
.brand-bars::after { height:16px; background:var(--b); }
nav { display:flex; flex-wrap:wrap; gap:.25rem 1.25rem; }
nav a { display:inline-flex; align-items:center; min-height:44px; font-size:var(--t-sm); }
nav a[aria-current="page"] { color:var(--a); font-weight:700; }
.hero { padding-block:clamp(2.5rem,7vw,5.5rem); max-width:58rem; }
h1 { font-size:clamp(2.5rem,6vw,5.25rem); margin-block:1rem 1.5rem; }
.hero .lede { font-size:var(--t-lg); max-width:44rem; color:var(--muted); }
.hero .updated { margin-top:1.5rem; }
.layout { display:grid; gap:2rem; padding-bottom:4rem; }
article { min-width:0; }
article section { border-top:1px solid var(--line); padding-block:2rem; scroll-margin-top:1rem; }
article h2 { font-size:clamp(1.6rem,3vw,2.2rem); line-height:1.15; margin-bottom:1.25rem; }
article h3 { margin-block:1.5rem .75rem; }
article p + p, article p + ul, article p + ol { margin-top:1rem; }
article ul, article ol { padding-left:1.4rem; }
article li + li { margin-top:.6rem; }
article ul + p, article ol + p { margin-top:1rem; }
.cards { display:grid; gap:1rem; margin-block:1.5rem; }
.cards h3 { margin:0; }
.cards .ss-card { min-height:0; }
.cards .ss-card > :last-child { margin-top:0; }
.callout { padding:1.5rem; background:var(--surface); border:1px solid var(--line); border-left:3px solid var(--b); border-radius:var(--radius); margin-block:1.5rem; }
.callout h2, .callout h3 { margin-top:0; }
.callout .ss-btn { margin-top:1.25rem; line-height:1.4; padding-block:.75rem; }
.toc { padding:1.5rem; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); align-self:start; }
.toc ul { list-style:none; padding:0; margin-top:.75rem; }
.toc a { display:block; padding-block:.5rem; }
.sources { font-size:var(--t-sm); }
footer { border-top:1px solid var(--line); padding-block:2rem; color:var(--muted); font-size:var(--t-sm); }
footer p + p { margin-top:.75rem; }
.skip { position:absolute; left:1rem; top:-8rem; background:var(--surface); padding:1rem; z-index:2; }
.skip:focus { top:1rem; }
@media(min-width:768px) { .layout { grid-template-columns:minmax(0,1fr) 15rem; gap:3rem; } .toc { grid-column:2; grid-row:1; } article { grid-column:1; grid-row:1; } }
@media(min-width:1100px) { .cards { grid-template-columns:repeat(3,minmax(0,1fr)); } }

.ss-btn { white-space: nowrap; }
a.ss-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.plan-jumps { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
#plans .plan-heading { font-size: 1rem; margin-block: 1.25rem .4rem; }
.plan-detail { display: block; }
@media (width < 40rem) {
    .plan-table, .plan-table tbody { display: block; }
    .plan-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .plan-table tbody { display: grid; gap: .5rem; }
    .plan-table tbody tr {
        display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas: "data days price" "source checkout checkout" "detail detail detail";
        align-items: baseline; gap: 0 .5rem; padding: .65rem;
        border: 1px solid var(--line); border-radius: .5rem;
    }
    .plan-table td { padding: 0; border: 0; }
    .plan-table td:first-child { display: contents; }
    .plan-data { grid-area: data; overflow-wrap: anywhere; }
    .plan-detail { grid-area: detail; margin-top: .3rem; }
    .plan-table td:nth-child(2) { grid-area: days; }
    .plan-table .price { grid-area: price; }
    .plan-table td:nth-child(4) { grid-area: source; align-self: center; }
    .plan-table td:last-child { grid-area: checkout; justify-self: end; margin-top: .4rem; }
}
.destination-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.destination-grid .ss-card { padding: 1rem; font-weight: 650; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
caption { text-align: left; color: var(--muted); padding-block: .75rem; }
th, td { text-align: left; padding: .6rem; border-bottom: 1px solid var(--line); }
th { font-size: var(--t-sm); }
td.price { white-space: nowrap; }
input[type=search] { display: block; width: 100%; max-width: 32rem; padding: .8rem; font: inherit; }
article .device-list { columns: 15rem; margin-top: 1rem; }
.device-list li { break-inside: avoid; }
@media(max-width:767px) { .layout article { grid-row: 1; } }
/* brand 415: destination grid and price alignment (phone card rules not taken; 612 layout kept) */
.destination-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
  gap: var(--s2);
}

.destination-grid .ss-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  min-height: 44px;
  padding: var(--s2) var(--s3);
  text-align: start;
  overflow-wrap: anywhere;
}

.destination-grid .ss-card > .ss-label {
  flex: none;
  margin: 0;
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.destination-grid .ss-card:focus-visible {
  outline: 2px solid var(--b);
  outline-offset: 2px;
}

.plan-table .price {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (width >= 40rem) {
  .plan-table :is(th, td):nth-child(-n+3) {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
}

/* destination tiles: names wrap only at spaces; count drops under the name on narrow phones */
.destination-grid .ss-card { overflow-wrap: normal; word-break: normal; hyphens: none; }
@media (width < 26rem) {
  .destination-grid .ss-card { flex-direction: column; align-items: flex-start; gap: .15rem; }
  .destination-grid .ss-card > .ss-label { text-align: start; }
}


@media (width < 40rem) {
  .plan-table {
    position: relative;
    /* Reserve a footer for the group's existing pair of links. */
    padding-block-end: calc(44px + var(--s3) + var(--s2));
  }

  .plan-table tbody {
    gap: var(--s1);
  }

  .plan-table tbody tr {
    grid-template-columns: fit-content(55%) auto minmax(max-content, 1fr);
    grid-template-areas: "data days price";
    column-gap: var(--s2);
    padding: var(--s1) var(--s2);
    background: var(--surface);
  }

  .plan-table tbody tr:has(.plan-detail) {
    grid-template-areas: "data days price" "detail detail detail";
  }

  .plan-table td:nth-child(2),
  .plan-table .plan-detail {
    color: var(--muted);
    font-size: var(--t-sm);
  }

  .plan-table .price {
    justify-self: end;
  }

  .plan-table .plan-detail {
    margin: 0;
    overflow-wrap: anywhere;
  }

  .plan-table .plan-detail small {
    font-size: inherit;
  }

  .plan-table tbody tr > td:nth-last-child(-n+2) {
    display: none;
  }

  .plan-table tbody tr:last-child > td:nth-last-child(-n+2) {
    display: block;
    position: absolute;
    grid-area: auto;
    inset-block-end: var(--s2);
    margin: 0;
  }

  .plan-table tbody tr:last-child > td:nth-child(4) {
    inset-inline-start: var(--s2);
  }

  .plan-table tbody tr:last-child > td:last-child {
    inset-inline-end: var(--s2);
  }

  .plan-table tbody tr:last-child > td:nth-child(4) a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
  }
}
