/* tack.coach /next/phones — the phone advice page, same tokens and type as /next */
@font-face { font-family: "Bricolage"; src: url(/next/fonts/bricolage-latin.woff2) format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }
@font-face { font-family: "Bricolage"; src: url(/next/fonts/bricolage-latin-ext.woff2) format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4; }
@font-face { font-family: "Instrument"; src: url(/next/fonts/instrument-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }
@font-face { font-family: "Instrument"; src: url(/next/fonts/instrument-latin-ext.woff2) format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4; }

:root {
  --foam: #F4FBFC; --sky: #BFE9F5; --aqua: #19B8C4; --sea: #0A6C8F; --ink: #06263A; --sail: #FFD23F; --buoy: #FF5B2E;
  --ink-soft: rgb(6 38 58 / .72);
  --display: "Bricolage", "Arial Narrow", system-ui, sans-serif;
  --body: "Instrument", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font: 400 1.0625rem/1.55 var(--body);
  background: linear-gradient(180deg, #8FD6EE 0%, var(--sky) 34%, var(--foam) 52%, #5FD3D6 53%, var(--aqua) 70%, var(--sea) 100%) fixed; min-height: 100vh; }
h1, h2 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -.02em; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--gutter); }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 700 1.25rem/1 var(--display); font-stretch: 88%; }
.top-cta { display: flex; align-items: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; white-space: nowrap;
  background: var(--ink); color: var(--foam); text-decoration: none; font-weight: 600; box-shadow: 0 10px 30px -12px rgb(6 38 58 / .6); }
.btn:hover { background: #0B3B58; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: .9375rem; }

main { position: relative; z-index: 1; width: min(calc(100% - 2 * var(--gutter)), 52rem); margin: 0 auto; display: grid; gap: 18px; padding: 24px 0 56px; }
.intro { display: grid; gap: 16px; padding: 24px 0 18px; }
h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); line-height: .95; font-weight: 800; font-stretch: 80%; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); max-width: 36rem; font-weight: 500; }
.track { margin: 8px 0 0; border-radius: 28px; overflow: hidden; aspect-ratio: 16 / 9; background: linear-gradient(180deg, #CFEFF7, #9ADCEB);
  border: 1px solid rgb(255 255 255 / .8); box-shadow: 0 30px 70px -45px rgb(10 108 143 / .6); }
.track svg { display: block; width: 100%; height: 100%; }
.track .tl-line { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.track .tl-band { fill: none; stroke: var(--sea); stroke-opacity: .22; stroke-linecap: round; stroke-linejoin: round; }
.track text { font: 600 12px var(--body); fill: var(--ink); }
.levels { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.levels button { display: grid; gap: 2px; align-content: start; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 14px 16px; border-radius: 20px;
  background: rgb(255 255 255 / .6); border: 1px solid rgb(255 255 255 / .8); transition: background .15s ease, box-shadow .15s ease; }
.levels button:hover { background: rgb(255 255 255 / .85); }
.levels button[aria-pressed="true"] { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.levels b { font: 750 1.5rem/1.1 var(--display); font-stretch: 84%; }
.levels span { font-size: .9375rem; color: var(--ink-soft); }
.levels button:nth-child(1) b { color: var(--sea); }

.card { display: grid; gap: 12px; padding: clamp(20px, 3vw, 30px); border-radius: 28px; position: relative; z-index: 1;
  background: rgb(244 251 252 / .66); border: 1px solid rgb(255 255 255 / .75);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 30px 70px -45px rgb(10 108 143 / .6), inset 0 1px 0 rgb(255 255 255 / .8); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .card { background: rgb(244 251 252 / .92); } }
.card > p { color: rgb(6 38 58 / .82); }
.card[hidden] { display: none; }
.js .rise { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.js .rise.in { opacity: 1; transform: none; }
.card h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.02; font-weight: 750; font-stretch: 84%; }
.card.best { border-left: 8px solid var(--aqua); }
.card.good { border-left: 8px solid var(--sail); }
.card.live { border-left: 8px solid rgb(6 38 58 / .25); }
.card.yours { border-left: 8px solid var(--aqua); }
.card.yours[data-tier="good"] { border-left-color: var(--sail); }
.card.yours[data-tier="live"] { border-left-color: rgb(6 38 58 / .25); }
.phones li.mine, .guess tr.mine { background: var(--sail); box-shadow: 0 0 0 2px var(--ink); }
.guess tr.mine th, .guess tr.mine td { padding-left: 10px; padding-right: 10px; }

.phones { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.phones li { padding: 8px 14px; border-radius: 999px; background: var(--foam); border: 1px solid rgb(6 38 58 / .1); font-weight: 600; font-size: .9375rem; }
.best .phones li { background: rgb(25 184 196 / .14); }

.guess { border-collapse: collapse; width: 100%; }
.guess th, .guess td { padding: 12px 0; border-top: 1px solid rgb(6 38 58 / .12); vertical-align: middle; text-align: left; }
.guess th { font-weight: 600; }
.guess th small { display: block; font-weight: 400; font-size: .875rem; color: var(--ink-soft); }
.guess td { text-align: right; white-space: nowrap; }
.guess td::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.g-best::before { background: var(--aqua); }
.g-good::before { background: var(--sail); }
.g-live::before { background: rgb(6 38 58 / .3); }
.fine { font-size: .875rem; color: var(--ink-soft); }

.steps { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: baseline; }
.steps li::before { content: counter(s); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sail); font: 750 1.0625rem/1 var(--display); align-self: start; }
.steps b { font-weight: 700; }
.steps span { color: var(--ink-soft); }
.actions { margin-top: 6px; }

.foot { color: var(--foam); background: rgb(6 38 58 / .72); border-radius: 20px; padding: 14px 20px; margin: 0 auto 28px; position: relative; z-index: 1; width: min(calc(100% - 2 * var(--gutter)), 52rem); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .875rem; }
.foot a { margin-right: 18px; }

/* language menu (markup generated by scripts/i18n_sync.py) */
.lang-dd { position: relative; }
.lang-dd summary { list-style: none; cursor: pointer; font-weight: 600; font-size: .875rem; min-height: 40px; padding: 0 12px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px; background: rgb(255 255 255 / .7); }
.lang-dd summary::-webkit-details-marker { display: none; }
.lang-dd summary::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.lang-dd .lang-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; display: grid; min-width: 180px; padding: 6px; border-radius: 18px;
  background: var(--foam); border: 1px solid rgb(6 38 58 / .12); box-shadow: 0 24px 60px -24px rgb(6 38 58 / .55); }
.lang-dd .lang-menu a { display: flex; gap: 10px; padding: 9px 12px; border-radius: 12px; text-decoration: none; font-size: .9375rem; white-space: nowrap; }
.lang-dd .lang-menu a b { min-width: 26px; font-size: .8125rem; color: var(--ink-soft); }
.lang-dd .lang-menu a:hover, .lang-dd .lang-menu a[aria-current] { background: rgb(25 184 196 / .16); }

@media (max-width: 640px) {
  .levels { grid-template-columns: 1fr; }
  .track { aspect-ratio: 4 / 3; }
  .test-grid { grid-template-columns: 1fr; }
  .test-grid .film { order: -1; aspect-ratio: 4 / 5; max-height: none; width: 100%; height: auto; justify-self: stretch; }
  .guess td { white-space: normal; }
}

/* ---------- test card: clip + steps + countdown ---------- */
.test-grid { display: grid; grid-template-columns: 1fr minmax(0, 17rem); gap: clamp(18px, 3vw, 32px); align-items: start; margin-top: 4px; }
.test-copy { display: grid; gap: 16px; }
.test-grid .film { order: 2; margin: 0; position: relative; aspect-ratio: 9 / 16; max-height: 70vh; justify-self: end; width: auto; height: min(70vh, 30rem); border-radius: 22px; overflow: hidden; background: var(--ink); cursor: pointer;
  box-shadow: 0 40px 90px -40px rgb(6 38 58 / .7), 0 0 0 1px rgb(255 255 255 / .6); }
.film video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; display: block; }
.round { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: var(--foam); display: grid; place-items: center; cursor: pointer; }
.round svg { fill: currentColor; }
.film-play { position: absolute; left: 16px; bottom: 16px; background: var(--foam); color: var(--ink); }
.film[data-playing="true"] .i-play, .film:not([data-playing="true"]) .i-pause { display: none; }
.film[data-playing="true"] .i-pause, .film:not([data-playing="true"]) .i-play { display: block; }
.demo { justify-self: start; display: flex; align-items: center; gap: 16px; padding: 10px 18px 10px 10px; border: 0; border-radius: 28px; cursor: pointer; font: inherit; color: var(--ink);
  background: rgb(255 255 255 / .6); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .8); --c: var(--sea); }
.demo[hidden] { display: none; }
.demo .tile { position: relative; width: 88px; height: 120px; border-radius: 18px; background: var(--ink); display: grid; place-items: center; box-shadow: inset 0 0 0 3px #1c4660; }
.demo .tile svg { width: 72px; height: 72px; }
.demo .ring-bg { fill: none; stroke: rgb(255 255 255 / .18); stroke-width: 8; }
.demo .ring { fill: none; stroke: var(--c); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 263.9; stroke-dashoffset: 0; }
.demo .tile b { position: absolute; font: 750 1.75rem/1 var(--display); color: var(--foam); }
.demo .verdict { font: 750 1.5rem/1.1 var(--display); font-stretch: 84%; min-width: 7ch; text-align: left; }
.demo[data-c="best"] { --c: #1FA971; } .demo[data-c="good"] { --c: #E0A800; } .demo[data-c="live"] { --c: var(--buoy); }
.demo .verdict::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; background: var(--c); }

/* ---------- slow waves behind everything ---------- */
.waves { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.waves i { position: absolute; left: 0; width: calc(100% + 800px); height: 60px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='60' viewBox='0 0 400 60'%3E%3Cpath d='M0 30 Q50 6 100 30 T200 30 T300 30 T400 30 V60 H0Z' fill='%23fff'/%3E%3C/svg%3E") repeat-x; background-size: 400px 60px; opacity: .14; animation: wave 40s linear infinite; }
.waves i:nth-child(1) { top: 58%; }
.waves i:nth-child(2) { top: 74%; opacity: .1; animation-duration: 55s; animation-direction: reverse; }
.waves i:nth-child(3) { top: 90%; opacity: .12; animation-duration: 32s; }
@keyframes wave { to { transform: translateX(-800px); } }

/* ---------- shared by /next/marks ---------- */
.status { font-weight: 600; padding: 10px 16px; border-radius: 16px; background: rgb(255 210 63 / .55); justify-self: start; }
.soon { justify-self: start; padding: 10px 16px; border-radius: 999px; border: 1.5px dashed rgb(6 38 58 / .35); font-weight: 600; font-size: .9375rem; color: var(--ink-soft); }
.guess td b { display: block; font: 750 1.375rem/1.1 var(--display); font-stretch: 85%; }
.guess td small { display: block; font-size: .8125rem; color: var(--ink-soft); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 13px; height: 7px; border-left: 2.5px solid var(--sea); border-bottom: 2.5px solid var(--sea); transform: rotate(-45deg); }
.card.ways { border-left: 8px solid var(--buoy); }
.btn { border: 0; cursor: pointer; font: 600 1rem var(--body); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgb(6 38 58 / .85); }
.ask { width: min(calc(100% - 32px), 28rem); padding: 26px; border-radius: 28px; color: var(--ink); border: 1px solid #fff; background: var(--foam); }
.ask::backdrop { background: rgb(6 38 58 / .35); }
.ask h2 { font-size: 1.75rem; line-height: 1.05; font-weight: 750; font-stretch: 84%; margin-bottom: 8px; }
.ask form, .ask-done { display: grid; gap: 14px; }
.ask [hidden] { display: none; }
.ask label { display: grid; gap: 6px; font-weight: 600; font-size: .9375rem; }
.ask label small { font-weight: 400; color: var(--ink-soft); }
.ask input { font: 400 1rem var(--body); color: var(--ink); min-height: 46px; padding: 0 14px; border-radius: 14px; border: 1.5px solid rgb(6 38 58 / .2); background: #fff; }
.ask .hp { position: absolute; left: -9999px; }
.ask-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ask-err { color: #B4321A; font-weight: 600; }

@media (max-width: 640px) {
  .test-grid { grid-template-columns: 1fr; }
  .test-grid .film { order: -1; aspect-ratio: 4 / 5; max-height: none; width: 100%; height: auto; justify-self: stretch; }
}
