/* OSTREL True Size, phone page. Built on site.css tokens: bone paper, ink lines, mono labels, serif names. */
.tp { min-height: 100vh; min-height: 100dvh; }
.tp-hd { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--bone); border-bottom: 1px solid var(--line); }
.tp-logo { font: 400 26px/1 var(--serif); letter-spacing: -.01em; text-decoration: none; margin-right: auto; }
.tp-link { display: inline-flex; align-items: center; gap: 7px; font: 500 10px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); }
.tp-link[hidden] { display: none; }
.tp-link i { width: 7px; height: 7px; border-radius: 50%; background: var(--brass); }
.tp-link.is-paired i { background: var(--lichen); box-shadow: 0 0 0 3px rgba(79, 92, 65, .2); }
.tp-link.is-reconnecting i { background: transparent; border: 1px solid var(--brass-d); }
.tp-leave { background: transparent; border: 1px solid var(--ink); min-height: 34px; padding: 0 12px; font: 500 10px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.tp-leave[hidden] { display: none; }
.tp-main { max-width: 560px; margin: 0 auto; padding: 18px 16px calc(32px + env(safe-area-inset-bottom)); }
.tp-title .k { margin-bottom: 6px; }
.tp-h { font: 400 clamp(26px, 7vw, 36px)/1.04 var(--serif); letter-spacing: -.01em; margin: 0; }
.tp-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0 14px; border: 1px solid rgba(21, 19, 15, .3); }
.tp-tabs button { min-height: 46px; padding: 0 6px; background: transparent; border: 0; border-right: 1px solid rgba(21, 19, 15, .3); font: 500 10.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.tp-tabs button:last-child { border-right: 0; }
.tp-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tp-step { font-size: 15px; line-height: 1.45; color: var(--graphite); margin: 0 0 12px; }
.tp-fine { font-size: 13px; line-height: 1.5; color: var(--stone); margin: 12px 0 0; }
.tp-block { border: 1px solid var(--ink); background: var(--paper); padding: 14px 16px; font-size: 15px; margin: 0 0 14px; }
.tp-block[hidden] { display: none; }
.is-blocked .tp-pane { visibility: hidden; }
.tp-status { font-size: 14px; color: var(--graphite); margin: 16px 0 0; min-height: 1.4em; }
.tp-gate { border: 1px solid var(--line); background: var(--paper); padding: 18px; }
.tp-gate p { margin: 0 0 14px; font-size: 15px; }
.tp-gate[hidden], [data-measured][hidden] { display: none; }

/* measure the screen: the stage starts at the screen's left edge so the outline can be as wide as a card */
.cal { position: relative; height: clamp(230px, 44vh, 400px); margin: 0 -16px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; background: var(--paper); border-block: 1px solid var(--line); }
.cal-card { position: absolute; left: 16px; top: 16px; box-sizing: border-box; border: 1px solid var(--ink); background: repeating-linear-gradient(135deg, rgba(184, 146, 74, .07) 0 10px, transparent 10px 20px); }
.cal-card::before { content: ""; position: absolute; left: -9px; top: -9px; width: 22px; height: 22px; border-left: 2px solid var(--brass-d); border-top: 2px solid var(--brass-d); }
.cal-card span { position: absolute; left: 14px; top: 14px; font: 500 10px/1.2 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--stone); }
.cal::after { content: ""; position: absolute; inset: auto 0 0; height: 56px; background: linear-gradient(transparent, var(--paper)); pointer-events: none; }
.cal-ruler { position: absolute; left: 16px; top: 48px; height: 30px; border-left: 2px solid var(--brass-d); background:
  linear-gradient(var(--ink), var(--ink)) bottom / 100% 1px no-repeat,
  repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px calc(var(--mm) * 10)) bottom / 100% 18px no-repeat,
  repeating-linear-gradient(90deg, rgba(21, 19, 15, .5) 0 1px, transparent 1px var(--mm)) bottom / 100% 8px no-repeat; }
.cal-ruler[hidden], .cal-card[hidden] { display: none; }
.cal-ruler::after { content: "0 → 40 mm"; position: absolute; left: 4px; top: -18px; font: 500 10px/1 var(--mono); letter-spacing: .08em; color: var(--stone); }
.cal-h { position: absolute; top: 0; bottom: 0; width: 44px; margin-left: -22px; cursor: ew-resize; outline-offset: -4px; }
.cal-h i { position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: var(--ink); }
.cal-h i::after { content: ""; position: absolute; left: -7px; top: 50%; width: 16px; height: 44px; margin-top: -22px; background: var(--ink); border-radius: 8px; }
.tp-ctl { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.tp-sq { width: 48px; height: 48px; flex: none; background: var(--paper); border: 1px solid var(--ink); font: 400 22px/1 var(--sans); }
.tp-out { flex: 1; text-align: center; font: 500 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.tp-range { flex: 1; min-width: 0; }
.tp-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 14px; }
.tp-lk { background: transparent; border: 0; border-bottom: 1px solid currentColor; padding: 0 0 4px; }

/* true size: the photo is placed at an exact scale, so no max-width may resize it */
.tv { position: relative; height: clamp(240px, 46vh, 460px); margin: 0 -16px; overflow: hidden; background: var(--bone); border-block: 1px solid var(--line); }
.tv-img { position: absolute; max-width: none; }
.tv::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, transparent calc(var(--r, 60px) * 1.15), var(--bone) calc(var(--r, 60px) * 2.1)); pointer-events: none; }
.tv-bar { position: absolute; left: 16px; bottom: 14px; z-index: 1; display: flex; align-items: center; gap: 8px; font: 500 10px/1 var(--mono); letter-spacing: .08em; }
.tv-bar i { display: block; height: 7px; border: 1px solid var(--ink); border-top: 0; }
.tv-dims { font: 400 20px/1.25 var(--serif); margin: 14px 0 0; }

/* ring sizer */
.sz { position: relative; margin: 0 -16px; background: var(--paper); border-block: 1px solid var(--line); touch-action: none; user-select: none; -webkit-user-select: none; color: var(--ink); }
.sz-svg { display: block; }
.sz-read { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.sz-read b { font: 400 54px/1 var(--serif); min-width: 1.4em; }
.sz-read > span { display: grid; gap: 3px; font-size: 14px; line-height: 1.35; color: var(--graphite); }
.sz-read [data-sz-alt] { font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink); }

/* picker (alone, not linked) */
.tp-pick { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.tp-pick[hidden] { display: none; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tp-chips .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* the sticky header never covers what the page scrolls to (iPhone: kicker and title hid under it) */
html { scroll-padding-top: calc(var(--tp-hd, 64px) + 8px); }
.tp-title, .tp-pane, .tp-ok, .tv-hd { scroll-margin-top: calc(var(--tp-hd, 64px) + 8px); }

/* a measuring problem is said next to the Save button */
.tp-msg[hidden], .tp-ok[hidden] { display: none; }
.tp-msg { margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--ink); background: var(--paper); font-size: 15px; line-height: 1.45; }

/* the true size pane reads as "the ring": a confirmation once measured, then a headline and a cue to compare */
.tp-ok { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 12px 14px; background: var(--ink); color: var(--paper); font-size: 15px; line-height: 1.4; animation: tp-ok .5s var(--ease, ease) both; }
.tp-ok i { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--lichen); box-shadow: 0 0 0 3px rgba(79, 92, 65, .35); }
@keyframes tp-ok { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .tp-ok { animation: none; } }
.tv-hd { margin: 0 0 12px; outline: none; }
.tv-h { font: 400 clamp(26px, 7vw, 34px)/1.05 var(--serif); letter-spacing: -.01em; margin: 0; }
.tv-hint { margin: 6px 0 0; font-size: 15px; line-height: 1.45; color: var(--graphite); }

/* opened directly on a computer: the phone hand-over banner */
.tp-bn-show { background: transparent; border: 1px solid var(--ink); min-height: 34px; padding: 0 12px; font: 500 10px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.tp-bn-show[hidden], .bn[hidden] { display: none; }
.bn { background: var(--paper); border-bottom: 1px solid var(--line); }
.bn-in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; max-width: 760px; margin: 0 auto; padding: 24px 16px; }
/* the code on a paper tile with brass corner marks, its quiet zone drawn inside the canvas */
.bn-qr-w { --c: var(--brass); position: relative; line-height: 0; background: var(--paper); }
.bn-qr-w::after { content: ""; position: absolute; inset: -8px; pointer-events: none; background:
  linear-gradient(var(--c) 0 0) left top / 14px 1px no-repeat, linear-gradient(var(--c) 0 0) left top / 1px 14px no-repeat,
  linear-gradient(var(--c) 0 0) right top / 14px 1px no-repeat, linear-gradient(var(--c) 0 0) right top / 1px 14px no-repeat,
  linear-gradient(var(--c) 0 0) left bottom / 14px 1px no-repeat, linear-gradient(var(--c) 0 0) left bottom / 1px 14px no-repeat,
  linear-gradient(var(--c) 0 0) right bottom / 14px 1px no-repeat, linear-gradient(var(--c) 0 0) right bottom / 1px 14px no-repeat; }
.bn-qr { display: block; width: 152px; height: 152px; image-rendering: pixelated; }
.bn .k { margin-bottom: 8px; color: var(--brass-d); }
.bn-h { font: 400 clamp(26px, 3vw, 32px)/1.05 var(--serif); letter-spacing: -.01em; margin: 0; }
.bn-p { margin: 8px 0 0; max-width: 46ch; font-size: 14px; line-height: 1.5; color: var(--graphite); }
.bn-st { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; font-size: 14px; line-height: 1.45; color: var(--graphite); min-height: 1.45em; }
.bn-st::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .52em; border-radius: 50%; background: var(--brass); }
.bn.is-paired .bn-st { color: var(--ink); }
.bn.is-paired .bn-st::before { background: var(--lichen); box-shadow: 0 0 0 3px rgba(79, 92, 65, .16); }
@media (prefers-reduced-motion: no-preference) { .bn:not(.is-paired) .bn-st::before { animation: bn-pulse 2.4s ease-in-out infinite; } }
@keyframes bn-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(184, 146, 74, .45); } 60% { box-shadow: 0 0 0 6px rgba(184, 146, 74, 0); } }
.bn-x { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; padding: 0; background: transparent; border: 0; color: var(--graphite); text-decoration: underline; text-decoration-color: rgba(21, 19, 15, .28); text-underline-offset: 6px; cursor: pointer; }
.bn-x.link { border-bottom: 0; padding-bottom: 0; }
.bn-x:hover { color: var(--ink); text-decoration-color: currentColor; }
@media (max-width: 520px) { .bn-in { gap: 16px; padding: 16px; } .bn-qr { width: 96px; height: 96px; }  }

/* the journey: where you are (step n of 4, a progress line) and small tabs to jump back */
.jr { margin: 18px 0 16px; }
.jr-now { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 8px; }
.jr-n { font: 500 11px/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--brass-d); }
.jr-t { font: 500 11px/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--stone); }
.jr-now { justify-content: space-between; }
.jr-bar { height: 3px; background: rgba(21, 19, 15, .12); }
.jr-bar i { display: block; height: 100%; width: 25%; background: var(--ink); transition: width .5s var(--ease); }
@media (prefers-reduced-motion: reduce) { .jr-bar i { transition: none; } }
.jr-tabs { grid-template-columns: repeat(4, 1fr); margin: 10px 0 0; border-color: rgba(21, 19, 15, .18); }
.jr-tabs button { min-height: 40px; font-size: 9.5px; letter-spacing: .06em; color: var(--graphite); border-right-color: rgba(21, 19, 15, .18); }
.jr-tabs button span { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 3px; border: 1px solid currentColor; border-radius: 50%; font-size: 9px; letter-spacing: 0; }
.jr-tabs button.is-done span { background: var(--lichen); border-color: var(--lichen); color: var(--paper); }
.jr-h { font: 400 clamp(26px, 7vw, 34px)/1.05 var(--serif); letter-spacing: -.01em; margin: 0 0 10px; }
.jr-next { margin-top: 18px; }
.jr-next .btn { width: 100%; justify-content: center; }
.jr-next .btn:disabled { opacity: .45; cursor: not-allowed; }
.tp-pane .tp-pick { margin-top: 22px; }

/* step 3: the ways in */
.sz-ways { display: grid; gap: 8px; margin: 4px 0 16px; }
.sz-way { display: grid; gap: 2px; text-align: left; padding: 14px 16px; min-height: 56px; background: var(--paper); border: 1px solid rgba(21, 19, 15, .3); cursor: pointer; }
.sz-way b { font: 400 21px/1.15 var(--serif); }
.sz-way small { font: 500 10.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--stone); }
.sz-way[aria-checked="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sz-way[aria-checked="true"] small { color: rgba(250, 248, 244, .7); }
.sz-p[hidden] { display: none; }
.sz-p .fld select { width: 100%; min-height: 50px; font-size: 16px; }
.sz-help { display: grid; gap: 14px; }
.sz-help > div { border: 1px solid var(--line); background: var(--paper); padding: 16px; }
.sz-help h3 { font: 400 22px/1.1 var(--serif); margin: 0 0 6px; }
.sz-help p { margin: 0 0 12px; font-size: 15px; line-height: 1.45; color: var(--graphite); }
.tp-ok-q { margin: 12px 0 0; background: var(--bone); color: var(--ink); border: 1px solid var(--line); }

/* step 4: the ring, ready */
.rd { display: grid; grid-template-columns: 1fr; gap: 16px; }
.rd-ph { aspect-ratio: 1; overflow: hidden; background: #d9cfc1; }
.rd-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd-dl { margin: 0; display: grid; gap: 0; }
.rd-dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.rd-dl dt { font: 500 10.5px/1.6 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--stone); flex: none; }
.rd-dl dd { margin: 0; text-align: right; font-size: 15px; line-height: 1.4; }
.rd-dl .rd-pr dd { font: 400 30px/1 var(--serif); }
.rd-acts { display: grid; gap: 8px; margin-top: 16px; }
.rd-acts .btn { width: 100%; justify-content: center; }
.rd-acts [hidden] { display: none; }
.rd-share { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 14px; }
.rd-share[hidden] { display: none; }
.rd-copied { font-size: 14px; color: var(--graphite); }
.tp-msg a, .tp-msg .tp-lk { font-size: inherit; }
.bn-bag { margin: 8px 0 0; font-size: 14px; }
.bn-bag[hidden] { display: none; }
@media (min-width: 700px) { .rd { grid-template-columns: 1fr 1fr; align-items: start; } .sz-ways { grid-template-columns: repeat(3, 1fr); } .sz-help { grid-template-columns: 1fr 1fr; } }
