:root {
  /* Layout: sticky top bar, one centred column (max 1120px), cards only for real objects (watches, clients, forms). */
  --bg: #edf0f3;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --ink: #121c26;
  --muted: #5b6774;
  --line: #d9dfe5;
  --accent: #1d4f91;
  --accent-ink: #ffffff;
  --accent-soft: #e2ebf6;
  --ok: #23734a;
  --ok-soft: #e1f1e8;
  --warn: #8a5a0a;
  --warn-soft: #f8edd6;
  --danger: #ad2a20;
  --danger-soft: #f9e3e1;
  --lume: #e7b84a;
  --night: #44506b;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(18, 28, 38, .06), 0 6px 18px rgba(18, 28, 38, .05);
  --display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c141d;
    --surface: #131e2a;
    --surface-2: #192634;
    --ink: #e5ebf1;
    --muted: #97a4b2;
    --line: #283748;
    --accent: #86b4f0;
    --accent-ink: #0c141d;
    --accent-soft: #1b2e45;
    --ok: #74c597;
    --ok-soft: #173126;
    --warn: #e3b25e;
    --warn-soft: #34291a;
    --danger: #f08a80;
    --danger-soft: #3b1f1d;
    --lume: #e7b84a;
    --night: #8394b8;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0c141d;
    --surface: #131e2a;
    --surface-2: #192634;
    --ink: #e5ebf1;
    --muted: #97a4b2;
    --line: #283748;
    --accent: #86b4f0;
    --accent-ink: #0c141d;
    --accent-soft: #1b2e45;
    --ok: #74c597;
    --ok-soft: #173126;
    --warn: #e3b25e;
    --warn-soft: #34291a;
    --danger: #f08a80;
    --danger-soft: #3b1f1d;
    --lume: #e7b84a;
    --night: #8394b8;
    --shadow: none;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; margin-bottom: 4px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
.topbar__inner { max-width: 1320px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__link { white-space: nowrap; color: var(--ink); padding: 7px 8px; border-radius: 8px; font-size: .95rem; }
.nav__link:hover { background: var(--surface-2); text-decoration: none; }
.nav__link.is-active { color: var(--accent); background: var(--accent-soft); }
.nav__sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.lang { width: auto; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 5px 6px; font: inherit; font-size: .85rem; }
.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__long, .lang--top { display: none; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }
.demo-banner { background: var(--warn-soft); color: var(--warn); font-size: .85rem; text-align: center; padding: 6px 16px; border-top: 1px solid var(--line); }
@media (max-width: 1300px) {
  .nav__toggle { display: block; }
  .lang--top { display: block; margin-left: auto; }
  .lang--nav, .nav__short { display: none; }
  .nav__long { display: inline; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 2px; }
  .nav.is-open { display: flex; }
  .nav__sep { width: auto; height: 1px; margin: 6px 0; }
  .topbar { position: relative; }
}

/* ---------- page ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 28px 16px 48px; }
.page--narrow { max-width: 760px; }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page__head p { margin: 6px 0 0; }
.page__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 16px 40px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); min-width: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.two-col > .card { margin-bottom: 0; }
.two-col + * { margin-top: 16px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.empty { color: var(--muted); margin: 4px 0 12px; }
.error { color: var(--danger); background: var(--danger-soft); padding: 8px 12px; border-radius: 8px; }
.success { color: var(--ok); background: var(--ok-soft); padding: 8px 12px; border-radius: 8px; display: inline-block; }
.notice { background: var(--warn-soft); color: var(--ink); border-left: 3px solid var(--warn); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.warn { color: var(--warn); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  border-radius: 9px; padding: 9px 16px; font: 600 .95rem var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent-soft); filter: none; }
.btn--small { padding: 5px 11px; font-size: .85rem; }
.btn--large { padding: 12px 22px; font-size: 1.05rem; }
.btn--huge { width: 100%; padding: 22px; font-size: 1.25rem; border-radius: 14px; }
.btn--danger { border-color: var(--danger); background: var(--danger); color: var(--surface); }
.btn--ghost.btn--danger { background: transparent; color: var(--danger); }
.btn--oauth { width: 100%; background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--oauth:hover { background: var(--surface-2); }
.btn--apple { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.confirm { display: inline-flex; gap: 6px; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 16px; }
.form__row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.form__row > .field { flex: 1 1 140px; }
.form__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field__label { font-size: .85rem; font-weight: 600; }
.field__hint { font-size: .8rem; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
/* checkboxes: empty white box with a frame until ticked (native dark boxes looked already ticked) */
input[type="checkbox"] { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; flex: none; margin: 1px 0 0; border: 2px solid #8a97a6;
  border-radius: 5px; background: #fff; display: inline-grid; place-content: center; cursor: pointer; transition: background .1s, border-color .1s; }
input[type="checkbox"]::before { content: ""; width: 11px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
  transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .1s; }
input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::before { transform: translateY(-1px) rotate(-45deg) scale(1); border-color: var(--accent-ink); }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check--box { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface-2); }
.switch { display: inline-flex; gap: 8px; align-items: center; }
.search { margin-bottom: 12px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 16px 0; font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth { display: flex; flex-direction: column; gap: 10px; }
.details { margin-top: 12px; }
.details summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.reminder-box { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.copy { display: flex; gap: 8px; }
.copy input { font-family: var(--mono); font-size: .8rem; }

/* ---------- badges, lists, tables ---------- */
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; vertical-align: middle; white-space: nowrap; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -8px 0 16px; }
.badges .badge { margin-left: 0; }
.badge--muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.list { list-style: none; margin: 0; padding: 0; }
.list__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list__item:first-child { border-top: 0; }
.list__item--stack { flex-wrap: wrap; }
.list__item--stack > .form { width: 100%; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.table tr.is-mine td { background: var(--accent-soft); }
.matrix td { text-align: center; font-weight: 700; min-width: 70px; }
.matrix td.is-fit { color: var(--ok); background: var(--ok-soft); }
.matrix td.is-near { color: var(--warn); background: var(--warn-soft); }
.matrix th[scope="row"] { text-transform: none; letter-spacing: 0; color: var(--ink); font-size: .88rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { margin: 0; }
.ticks { padding-left: 0; list-style: none; margin: 0 0 18px; }
.ticks li { padding: 6px 0 6px 28px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 4px; color: var(--ok); font-weight: 700; }

/* ---------- reminders ---------- */
.reminders { list-style: none; margin: 0; padding: 0; }
.reminder { display: grid; grid-template-columns: 12px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.reminder:first-child { border-top: 0; }
.reminder p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.reminder__dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.reminder--overdue .reminder__dot { background: var(--danger); }
.reminder--soon .reminder__dot { background: var(--warn); }
.reminder strong a { color: var(--ink); }
.channels { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .channels { grid-template-columns: 1fr; } }
.feed { margin-top: 14px; }

/* ---------- clock & home ---------- */
.hero { text-align: center; padding: 36px 0 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.clock__time { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(3.2rem, 15vw, 7.5rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.clock__date { color: var(--muted); margin-top: 8px; }
.clock__sync { margin-top: 12px; font-size: .92rem; display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot--ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot--warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.hero__cta { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.features { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s; }
.feature:hover { border-color: var(--accent); text-decoration: none; }
.feature h2 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- measure ---------- */
.measure { text-align: center; }
.steps { text-align: left; margin: 0 0 14px; padding-left: 20px; color: var(--muted); }
.dial { width: min(260px, 70vw); margin: 4px auto 8px; }
.dial svg { width: 100%; display: block; }
.dial__face { fill: var(--surface-2); stroke: var(--line); stroke-width: 2; }
.dial__tick { stroke: var(--muted); stroke-width: 1.5; }
.dial__tick--major { stroke: var(--ink); stroke-width: 3; }
.dial__hand { stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.dial__hub { fill: var(--accent); }
.measure__time { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 2.2rem; font-weight: 600; margin-bottom: 16px; }
.form__row--time .field { flex: 1 1 80px; }
.form__row--time input { font-family: var(--mono); font-size: 1.3rem; text-align: center; }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 8px; }
.stats--cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stats--cards .stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat { display: flex; flex-direction: column; }
.stat__label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat__value { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 1.8rem; font-weight: 600; }
.chart { width: 100%; height: auto; margin-top: 8px; }
.chart__zero { stroke: var(--line); stroke-dasharray: 4 4; }
.chart__line { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart__dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.chart__label { font: 11px var(--mono); fill: var(--muted); }

/* ---------- collection ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.watch-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--ink); display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.watch-card:hover { border-color: var(--accent); text-decoration: none; }
.watch-card .muted { margin: 2px 0 0; font-size: .9rem; }
.watch-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.watch-card__meta .badge { margin-left: 0; }
.watch-card__facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: .9rem; }
.watch-card__facts dt { color: var(--muted); }
.watch-card__facts dd { margin: 0; text-align: right; }
.danger-zone { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- zones ---------- */
.converter { margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.daynight { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.daynight.is-day { background: var(--lume); }
.daynight.is-night { background: var(--night); }
.add-zone { margin-top: 14px; }
.zones td { white-space: nowrap; }

/* ---------- workshop ---------- */
.subnav { display: flex; gap: 6px; margin: -6px 0 18px; flex-wrap: wrap; }
.subnav a { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); font-size: .9rem; background: var(--surface); }
.subnav a:hover { border-color: var(--accent); text-decoration: none; }
.cw { border-top: 1px solid var(--line); padding: 14px 0; }
.card__head + .cw { border-top: 0; padding-top: 0; }
.cw__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cw > .form { margin-top: 12px; background: var(--surface-2); border-radius: 10px; padding: 14px; }
.list--jobs { margin: 8px 0 0 12px; }
.mail-preview { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }

@media (max-width: 560px) {
  .page { padding-top: 20px; }
  .card { padding: 16px; }
  .list__item { flex-wrap: wrap; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 560px) {
  .stats--cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stats--cards .stat { padding: 10px; }
  .stats--cards .stat__label { font-size: .68rem; letter-spacing: .02em; }
  .stats--cards .stat__value { font-size: 1.4rem; }
}

/* ---------- brand, theme toggle, footer links, ads, legal ---------- */
.logo { display: inline-flex; align-items: baseline; font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: .08em; color: var(--ink); line-height: 1; }
.logo__o { width: .84em; height: .84em; margin: 0 .06em 0 .04em; align-self: center; position: relative; top: -.02em; }
.brand:hover .logo { color: var(--ink); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 10px; font: inherit; font-size: .85rem; white-space: nowrap; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.footer__links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.linklike:hover { text-decoration: underline; }
.ad { margin: 24px 0; display: flex; flex-direction: column; gap: 4px; }
.ad__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ad__box { border: 1px dashed var(--line); border-radius: var(--radius); min-height: 100px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; color: var(--muted); font-size: .85rem; background: var(--surface-2); }
.legal { max-width: 70ch; }
.legal__section + .legal__section { margin-top: 20px; }
.legal h2 { font-size: 1.05rem; margin-bottom: 8px; }
.legal ul { padding-left: 20px; margin: 0 0 10px; }
.legal li { margin-bottom: 6px; }
.legal a { word-break: break-all; }
.todo { background: var(--warn-soft); color: var(--warn); padding: 0 4px; border-radius: 4px; }
.measure__ref { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; text-align: left; }
.dial--small { width: 110px; margin: 0; }
.measure__ref .measure__time { margin-bottom: 0; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 16px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.plan--featured { border: 2px solid var(--accent); }
.plan h2 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plan h2 .badge { margin-left: 0; }
.plan__price { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 1.9rem; font-weight: 700; }
.plan__price .muted { font-family: var(--sans); font-size: .95rem; font-weight: 400; }
.plan .ticks { margin: 0; flex: 1; }
.plan .btn { align-self: flex-start; }
.legal-list { padding-left: 20px; margin: 0 0 10px; }
.legal-list li { margin-bottom: 8px; }
.upgrade { border-color: var(--accent); }

/* atomic note under the big clock */
.clock__atomic { max-width: 560px; margin: 10px auto 0; font-size: .92rem; color: var(--muted); }

/* sync countdown (home) */
.sync { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 24px; box-shadow: var(--shadow); text-align: center; transition: background .2s; }
.sync h2 { margin: 0 0 12px; font-size: 1.15rem; }
.sync__controls { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; margin-bottom: 12px; }
.sync__controls .check { align-items: center; }
.sync__controls input[type="time"] { width: auto; }
.sync__display { min-height: 92px; display: flex; flex-direction: column; justify-content: center; }
.sync__label { color: var(--muted); font-size: .92rem; }
.sync__count { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(2.4rem, 11vw, 3.6rem); font-weight: 600; }
.sync__now { font-family: var(--display); font-size: clamp(2.4rem, 11vw, 3.6rem); font-weight: 700; color: var(--ok); letter-spacing: .04em; }
.sync--now { background: var(--ok-soft); border-color: var(--ok); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.seg button { border: 0; background: transparent; color: var(--ink); padding: 8px 14px; font: inherit; font-size: .92rem; cursor: pointer; min-height: 40px; }
.seg button.is-on { background: var(--accent); color: var(--accent-ink); }
.measure__countdown { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); margin: 0 0 12px; }

/* community comparison */
.histo__bar { fill: var(--accent); opacity: .55; }
.histo__zero { stroke: var(--muted); stroke-width: 1; }
.histo__mark { stroke: var(--lume); stroke-width: 3; }
.histo__marklabel { fill: var(--ink); font-weight: 700; }
.stat__value--small { font-size: 1.25rem; padding-top: .35rem; }
.verified { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.verified .badge { margin-left: 0; }

/* plans */
.section-title { font-size: 1.25rem; margin: 28px 0 12px; }
.plan-line { margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.plan-line .badge { margin-left: 0; }
.upgrade--inline { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 14px 16px; }
.upgrade--inline p { margin: 0 0 8px; }
.histo { max-width: 680px; display: block; margin-left: auto; margin-right: auto; }

/* watch specification */
.cell-picker { display: flex; flex-direction: column; gap: 6px; }
.features-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 18px; margin-top: 12px; }
.features-pick__group { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 12px; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.features-pick__group legend { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; padding: 0 4px; }
.check--small { font-size: .92rem; align-items: center; gap: 8px; }
.specs-offer { margin-top: 12px; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.specs-offer p { margin: 0; flex: 1 1 260px; }
.feature-list { margin-top: 14px; }
.badges--wrap { margin: 6px 0 0; }

/* countdown light signals: a very short flash every second, then a long blue flash on the moment */
.flash-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 1000; opacity: 0; }
/* tick: a very short flash in the colour opposite to the page (dark on light theme, light on dark theme) */
.flash-overlay--tick { background: var(--ink); animation: flash-tick .15s linear forwards; }
.flash-overlay--zero { background: radial-gradient(circle at 50% 45%, #5aa2ff 0%, #1d4f91 70%); animation: flash-zero 1.4s ease-out forwards; }
@keyframes flash-tick { 0% { opacity: .95; } 70% { opacity: .95; } 100% { opacity: 0; } }
@keyframes flash-zero { 0% { opacity: 0; } 6% { opacity: 1; } 45% { opacity: 1; } 100% { opacity: 0; } }
.sync__signals { color: var(--accent); font-weight: 600; margin: 4px 0 8px; }
.sync:fullscreen { display: flex; flex-direction: column; justify-content: center; align-items: center; border: 0; border-radius: 0; background: var(--bg); }
.sync:fullscreen .sync__count, .sync:fullscreen .sync__now { font-size: clamp(4rem, 18vw, 12rem); }

/* flash safety note */
.sync__safety { color: var(--warn); max-width: 560px; margin: 0 auto 8px; }

/* explore / public collections */
.explore { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 18px; align-items: start; }
.explore__filters .card { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
@media (max-width: 860px) { .explore { grid-template-columns: 1fr; } .explore__filters .card { position: static; max-height: none; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-size: .88rem; cursor: pointer; background: var(--surface-2); }
.chip input { width: 18px; height: 18px; margin: 0; }
.chip.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.features-pick--compact { grid-template-columns: 1fr; gap: 10px; }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 10px 0 16px; }
.pub-watch { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.pub-watch h3 { margin: 0; font-size: 1.05rem; }
.pub-watch p { margin: 4px 0 0; }
.pub-watch__owner { margin-top: auto !important; padding-top: 8px; }

.sync__close { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.8rem; line-height: 1; cursor: pointer; z-index: 1001; }
.sync:fullscreen { position: relative; }

.sync--inline { margin: 12px 0 16px; box-shadow: none; background: var(--surface-2); }

.measure__countdown-toggle { display: flex; justify-content: center; margin: 4px 0 14px; }
.measure__now { margin-top: 18px; }
.sync__empty { color: var(--warn); margin: 0; }

/* =====================================================================
   VISUAL IDENTITY v2 — "instrument": silver dial, midnight blue, a touch of brass.
   Minute-track scale as the one recurring motif; quiet everywhere else.
   ===================================================================== */
@font-face { font-family: "Lora V"; src: url("fonts/lora.woff") format("woff"); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #e8ebed; --surface: #fafbfb; --surface-2: #f0f2f4; --ink: #121a23; --muted: #57616c; --line: #c9d0d6;
  --accent: #1c3557; --accent-ink: #ffffff; --accent-soft: #dde5ee; --brass: #9a7835; --brass-soft: #efe6d2;
  --radius: 6px; --shadow: none;
  --logo: "Lora V", Georgia, "Times New Roman", serif; /* serif only in the logo (self-hosted, no Google requests) */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1118; --surface: #121a23; --surface-2: #18222d; --ink: #e6ebef; --muted: #96a2ae; --line: #27333f;
    --accent: #a9c2e2; --accent-ink: #0b1118; --accent-soft: #1b2a3b; --brass: #cba966; --brass-soft: #2c2619;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1118; --surface: #121a23; --surface-2: #18222d; --ink: #e6ebef; --muted: #96a2ae; --line: #27333f;
  --accent: #a9c2e2; --accent-ink: #0b1118; --accent-soft: #1b2a3b; --brass: #cba966; --brass-soft: #2c2619;
}

h1 { font-size: clamp(1.75rem, 4.2vw, 2.4rem); }
h2 { font-size: 1.22rem; }
.stat__value { font-size: 1.9rem; }
.stat__label { text-transform: none; letter-spacing: 0; font-size: .85rem; font-weight: 500; }

/* top bar: flat, a brass hairline marks the active section */
.topbar { background: var(--surface); }
.nav__link { border-radius: 0; padding: 8px 8px 6px; font-size: .9rem; border-bottom: 2px solid transparent; }
.nav__link:hover { background: none; border-bottom-color: var(--line); }
.nav__link.is-active { background: none; color: var(--ink); border-bottom-color: var(--brass); }
.lang, .theme-toggle { border-radius: 4px; }

/* page heads */
.page__head { margin-bottom: 22px; }

/* surfaces: flat, hairline borders, smaller radius than before */
.card, .plan, .feature, .pub-watch, .sync, .stats--cards .stat { border-radius: var(--radius); box-shadow: none; }
.feature { padding: 20px 22px; }
.feature h2 { font-size: 1.15rem; margin-bottom: 6px; }
.feature:hover { border-color: var(--brass); }
.plan--featured { border: 1px solid var(--brass); box-shadow: inset 0 3px 0 var(--brass); }

/* buttons: squarer, like pushers */
.btn { border-radius: 4px; font-weight: 600; letter-spacing: .005em; }
.btn--huge { border-radius: 6px; }
.btn--ghost:hover { background: var(--accent-soft); }
.badge { border-radius: 3px; font-weight: 500; }
input, select, textarea { border-radius: 4px; }
.notice { border-radius: 4px; border-left-width: 2px; }
.demo-banner { font-size: .82rem; }

/* hero: the time inside a minute track; a brass hand steps round with the atomic seconds */
.hero { padding: 28px 0 24px; }
.clock__dial { position: relative; width: min(88vw, 440px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.clock__ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring__tick { stroke: var(--muted); stroke-opacity: .6; stroke-width: .95; }
.ring__tick--hour { stroke: var(--muted); stroke-opacity: 1; stroke-width: 1.1; }
.ring__tick--quarter { stroke: var(--brass); stroke-opacity: 1; stroke-width: 1.6; }
.ring__pip { transform-origin: 100px 100px; transition: transform .25s cubic-bezier(.3, 1.5, .6, 1); stroke: var(--brass); stroke-width: 1.1; }
@media (prefers-reduced-motion: reduce) { .ring__pip { transition: none; } }
.clock__time { position: relative; font-size: clamp(2.7rem, 14vw, 5.2rem); letter-spacing: -.02em; line-height: 1; }
.clock__date { margin-top: 14px; }
.clock__atomic { font-size: .9rem; }

/* countdown and scales */
.sync h2 { font-size: 1.15rem; }
.sync__count { font-size: clamp(2.6rem, 12vw, 3.8rem); }
.seg { border-radius: 4px; }
.seg button { min-height: 38px; }
.histo__bar { fill: var(--accent); opacity: .45; }
.histo__mark { stroke: var(--brass); }

/* checkboxes keep the white box, ticked in midnight blue */
input[type="checkbox"] { border-radius: 3px; border-color: #8995a2; }
.ticks li::before { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--brass); border-bottom: 2px solid var(--brass); transform: rotate(-45deg); top: 13px; left: 6px; }
.footer { border-top: 1px solid var(--line); margin-top: 24px; }

.logo { font-family: var(--logo); font-weight: 700; letter-spacing: .06em; }
.hero__tagline { font-size: clamp(1.05rem, 3.6vw, 1.3rem); font-weight: 500; letter-spacing: .01em; color: var(--muted); margin: 0 0 4px; }

/* ---------- photos ---------- */
.photos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photos--compact .photos__grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); margin-top: 8px; }
.photos__thumb, .photos__add { aspect-ratio: 1; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); padding: 0; cursor: pointer; }
.photos__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos__thumb:focus-visible, .photos__add:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.photos__add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); border-style: dashed; text-align: center; }
.photos__add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photos__add.is-busy { opacity: .6; cursor: progress; }
.photos__plus { font-size: 1.6rem; line-height: 1; }
.photos__meta { margin: 6px 0 0; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(8, 12, 17, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 4px; }
.lightbox__bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; color: #e6ebef; }
.lightbox__bar .btn--ghost { color: #e6ebef; border-color: rgba(230, 235, 239, .4); }
.two-col--photos { align-items: start; }

/* collection cards with a photo */
.watch-card--photo { padding-top: 0; overflow: hidden; }
.watch-card__photo { display: block; width: calc(100% + 36px); margin: 0 -18px 0; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-2); }

/* ---------- wear log ---------- */
.wear-card { margin-top: 16px; }
.wear__form { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: end; }
.wear__form .field { margin: 0; }
.wear__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; }
.wear__h { font-size: 1rem; margin: 0 0 8px; }
.list--compact .list__item { padding: 6px 0; }
.wear__bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wear__bar-head { display: flex; justify-content: space-between; gap: 8px; }
.wear__bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: 4px 0 2px; }
.wear__bar span { display: block; height: 100%; background: var(--brass); }
.wear-today p { margin: 0 0 8px; }
@media (max-width: 720px) {
  .wear__form { grid-template-columns: 1fr 1fr; }
  .wear__form .btn { grid-column: 1 / -1; }
  .wear__cols { grid-template-columns: 1fr; }
}

/* ---------- insurance export ---------- */
.insurance { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.insurance__head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 8px; }
.insurance__brand { font-family: var(--logo); font-weight: 700; letter-spacing: .06em; }
.insurance__head h2 { margin: 4px 0 0; }
.insurance__meta, .insurance__facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.insurance__meta dt, .insurance__facts dt { color: var(--muted); white-space: nowrap; }
.insurance__meta dd, .insurance__facts dd { margin: 0; }
.insurance__item { padding: 16px 0; border-bottom: 1px solid var(--line); break-inside: avoid; page-break-inside: avoid; }
.insurance__item h3 { margin: 0 0 10px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.insurance__pick { display: inline-flex; cursor: pointer; padding: 2px; }
.insurance__item--off { padding: 10px 0; }
.insurance__item--off h3 { margin: 0; color: var(--muted); font-weight: 500; }
.insurance__select { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.insurance__select span { margin-right: auto; }
.insurance__no { color: var(--muted); font-weight: 500; }
.insurance__body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: start; }
.insurance__body:not(:has(.insurance__photos)) { grid-template-columns: 1fr; }
.insurance__photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.insurance__photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); }
.insurance__foot { padding-top: 14px; }
@media (max-width: 640px) { .insurance { padding: 18px; } .insurance__body { grid-template-columns: 1fr; } .insurance__facts dt { white-space: normal; } .insurance__facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
@media print {
  .topbar, .footer, .demo-banner, .no-print, .ad, .page__head .card__actions, .notice { display: none !important; }
  body, .page { background: #fff !important; color: #000 !important; }
  .page { padding: 0 !important; max-width: none !important; }
  .page__head { display: none !important; }
  .insurance { border: 0; padding: 0; background: #fff; }
  .insurance__item--off { display: none !important; }
  .insurance__meta dt, .insurance__facts dt, .insurance__no { color: #444; }
  @page { margin: 14mm; }
}

/* install link in the footer */
.install { position: relative; }
.install__hint { position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%); width: min(260px, 80vw); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: .85rem; color: var(--ink); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); z-index: 5; }

/* ---------- watchmaker accuracy checks ---------- */
:root { --series-1: #2f63b0; --series-2: #b5761c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --series-1: #4f86d6; --series-2: #b5801f; } }
:root[data-theme="dark"] { --series-1: #4f86d6; --series-2: #b5801f; }
.pchart { margin: 12px 0; }
.pchart__legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .88rem; margin-bottom: 4px; }
.pchart__legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.swatch--1, .pchart__bar--1 { background: var(--series-1); fill: var(--series-1); }
.swatch--2, .pchart__bar--2 { background: var(--series-2); fill: var(--series-2); }
.pchart__bar:hover { opacity: .8; }
.chart__grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.pchart__line { fill: none; stroke: var(--series-1); stroke-width: 2; }
.pchart__dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.pchart__pos { font-size: 11px; }
.table--compact td, .table--compact th { padding: 6px 8px; }
.check-card .card__head h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.check-card .card__actions { display: flex; align-items: center; gap: 10px; }
.check-card__h { font-size: 1rem; margin: 18px 0 8px; }
.check-entry { display: grid; gap: 10px; }
.check-entry__row { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.check-entry__row .field { margin: 0; }
.check-entry__time { display: inline-flex; align-items: center; gap: 4px; }
.check-entry__time input { width: 3.4em; text-align: center; font-family: var(--mono); }
.check-entry__now { min-width: 120px; }
.tg-table input { width: 100%; min-width: 4em; max-width: 7em; }
.compare-card { border-color: var(--series-1); }
.report { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.report__head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 14px; }
.report__shop { font-weight: 700; font-size: 1.15rem; }
.report__meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.report__meta dt { color: var(--muted); }
.report__meta dd { margin: 0; }
.report h2 { margin: 0 0 6px; }
.report__section { padding: 14px 0; border-bottom: 1px solid var(--line); break-inside: avoid; page-break-inside: avoid; }
.report__section h3 { margin: 0 0 8px; font-size: 1.05rem; }
.report__notes { white-space: pre-wrap; margin: 8px 0 0; }
.report__foot { padding-top: 16px; }
.report__sign { margin-top: 40px; display: flex; justify-content: flex-end; }
.report__sign span { border-top: 1px solid var(--ink); padding-top: 4px; min-width: 220px; text-align: center; font-size: .85rem; color: var(--muted); }
@media (max-width: 640px) { .report { padding: 18px; } }
@media print {
  .report { border: 0; padding: 0; background: #fff; }
  .subnav { display: none !important; }
  :root { --series-1: #2f63b0; --series-2: #b5761c; --surface: #fff; --line: #c9d0d6; --muted: #444; --ink: #000; }
  .stat__value { font-size: 1.3rem !important; }
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table-scroll .table { min-width: 100%; }
