/* Account page (/account). Same palette as the app. */
:root {
  --bg: #0b0c0e; --panel: #131418; --panel-2: #1a1c21; --line: #262931;
  --text: #e9eaec; --muted: #8a8f99; --accent: #f5b301; --accent-ink: #1a1300;
  --ok: #4ade80; --warn: #f87171;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.warn { color: var(--warn); }
[hidden] { display: none !important; }

/* header */
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: 12px max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 16px; }
.brand svg { width: 24px; height: 24px; color: var(--accent); }
.spacer { flex: 1; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font: 600 14px/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { border-color: #3a3e48; background: #20232a; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #ffc21f; }
.btn.ghost { background: transparent; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; }

/* layout */
main { width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 16px 40px; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.loading { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--muted); padding: 80px 0; }
.spin { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; }
.card h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 17px; }
.card h2 svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.card h2 .count { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--muted); }
.card > p:first-of-type { margin-top: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.empty { color: var(--muted); margin: 6px 0; }

/* hero */
.hero { display: flex; align-items: center; gap: 16px; padding: 6px 2px 10px; flex-wrap: wrap; }
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #f5b301, #e07b00); color: var(--accent-ink); font-weight: 750; font-size: 13px;
}
.avatar.lg { width: 60px; height: 60px; font-size: 26px; }
.who { flex: 1; min-width: 0; }
.who h1 { margin: 0; font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who p { margin: 2px 0 0; }
.tier {
  padding: 5px 11px; border-radius: 999px; font: 750 12px/1 inherit; font-family: inherit; letter-spacing: .9px;
  color: var(--accent); background: rgba(245, 179, 1, .1); border: 1px solid rgba(245, 179, 1, .45);
}
.tier.free { color: var(--muted); background: transparent; border-color: var(--line); }

/* membership */
.plan-now h3 { margin: 0; font-size: 20px; }
.plan-now p { margin: 4px 0 0; }
.perks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; }
.perks li { display: flex; gap: 9px; align-items: flex-start; color: #d3d6dc; }
.perks svg { width: 17px; height: 17px; color: var(--accent); flex: none; margin-top: 2px; }
.perks.sm { font-size: 13.5px; margin: 10px 0 14px; }
.sub { margin: 22px 0 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.note { margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; background: rgba(245, 179, 1, .08); border: 1px solid rgba(245, 179, 1, .25); font-size: 13.5px; }
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.offer { display: flex; flex-direction: column; padding: 16px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel-2); }
.offer h4 { margin: 0; font-size: 15px; }
.offer .price { margin: 6px 0 0; font-size: 24px; font-weight: 700; }
.offer .price s { color: var(--muted); font-size: 16px; font-weight: 500; margin-right: 2px; }
.offer .price .muted { font-size: 14px; font-weight: 500; }
.offer > .muted.small { margin: 2px 0 0; }
.offer .row, .offer > .btn { margin-top: auto; }
.offer .row { display: flex; gap: 8px; }
.offer .row .btn { flex: 1; }

/* storage */
.usage-nums { margin-bottom: 8px; }
.usage-nums b { font-size: 18px; }
.bar { height: 8px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar.full span { background: var(--warn); }

/* rows */
.rows { list-style: none; margin: 4px 0 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.grow { flex: 1; min-width: 0; }
.rows small { display: block; color: var(--muted); font-size: 13px; margin-top: 1px; }
.pill { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; color: var(--ok); background: rgba(74, 222, 128, .1); }
.status { font-size: 13px; color: var(--muted); text-align: right; }
.status.ok { color: var(--ok); }

/* sign-in + code forms */
.signin { max-width: 440px; width: 100%; margin: 40px auto 0; }
.signin h1 { margin: 0 0 6px; font-size: 24px; }
.acct-form { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 4px; }
.acct-form input, .code-form input {
  height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font: inherit; outline: none;
}
.acct-form input:focus, .code-form input:focus { border-color: var(--accent); }
.acct-form .btn { height: 42px; }
.acct-code { text-align: center; font: 700 22px ui-monospace, Menlo, monospace !important; letter-spacing: 8px; }
.code-form { display: flex; gap: 8px; }
.code-form input { flex: 1; min-width: 0; font: 600 15px ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: 1px; }
.code-form .btn { height: 42px; }

/* footer + toast */
.foot {
  width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px;
}
.foot a { color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 11px; background: var(--text); color: #111;
  font-weight: 550; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); z-index: 20;
}

@media (max-width: 560px) {
  main { padding-top: 18px; }
  .card { padding: 18px 16px; border-radius: 14px; }
  .hero { gap: 12px; }
  .avatar.lg { width: 48px; height: 48px; font-size: 21px; }
  .who h1 { font-size: 18px; }
  .hero .btn { order: 5; }
}
@media (pointer: coarse) { input { font-size: 16px !important; } }

/* plan change */
.switch-box { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); }
.quote { margin-top: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(245, 179, 1, .4); background: rgba(245, 179, 1, .06); }
.quote p { margin: 0 0 8px; }
.quote .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn .spin { width: 14px; height: 14px; }

/* name */
.link-btn { background: none; border: 0; padding: 0; margin-left: 6px; color: var(--muted); font: 500 13px/1 inherit; font-family: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; vertical-align: middle; }
.link-btn:hover { color: var(--text); }
.name-edit { max-width: 420px; }
.name-edit input { height: 36px; font: 600 16px inherit; font-family: inherit; text-transform: none; letter-spacing: 0; }
.name-edit .btn { height: 36px; }
.name-card h2 { margin-bottom: 12px; }
.name-card .code-form input { font: 500 15px inherit; font-family: inherit; text-transform: none; letter-spacing: 0; }
.name-card p { margin: 10px 0 0; }
.name-card .link-btn { margin: 0; }

/* billing */
.loading.sm { padding: 8px 0; justify-content: flex-start; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 4px 0 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.btn.danger-text { color: var(--warn); }
.btn.danger-solid { background: var(--warn); border-color: var(--warn); color: #fff; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }

/* deep-linked section */
.card.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 2px rgba(245, 179, 1, .7); } to { box-shadow: 0 0 0 2px rgba(245, 179, 1, 0); } }
main > section { scroll-margin-top: 72px; }

/* profile photo */
.avatar.photo { object-fit: cover; display: block; background: var(--panel-2); }
.avatar-edit { position: relative; flex: none; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.avatar-edit:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.avatar-cam { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); opacity: .9; }
.avatar-cam svg { width: 13px; height: 13px; }
.avatar-edit:hover .avatar-cam { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 560px) { .avatar-cam { width: 20px; height: 20px; } }

/* ---- signed-in layout: sidebar + pages (like the admin page) ---- */
main:has(.acct-shell) { max-width: 1080px; padding-top: 22px; }
.acct-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.acct-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 14px; }
.me { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 4px 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.me .avatar-edit { grid-row: span 2; }
.me-text { min-width: 0; }
.me-text b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .tier { justify-self: start; font-size: 10.5px; padding: 3px 8px; }
.avatar.md { width: 48px; height: 48px; font-size: 20px; }
.acct-nav { display: flex; flex-direction: column; gap: 2px; }
.acct-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.acct-nav a svg { width: 18px; height: 18px; flex: none; }
.acct-nav a:hover { color: var(--text); background: var(--panel); }
.acct-nav a.on { color: var(--text); background: var(--panel); box-shadow: inset 2px 0 0 var(--accent); }
.acct-nav a.on svg { color: var(--accent); }
.side-out { align-self: flex-start; }
.acct-pages, .acct-side { min-width: 0; }
.mobile-out { display: none !important; align-self: flex-start; }
.page { display: flex; flex-direction: column; gap: 16px; }
.page[hidden] { display: none; }
.page-title { margin: 2px 0 0; font-size: 24px; letter-spacing: -.3px; }
.page > .btn { align-self: flex-start; }

/* overview tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; }
.tile:hover { border-color: #3a3e48; background: #16181d; }
.tile-label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.tile b { font-size: 18px; }
.tile small { color: var(--muted); font-size: 13px; }
.tile .tier { position: absolute; top: 14px; right: 14px; font-size: 10.5px; padding: 3px 8px; }
.tile .bar { margin-top: 8px; height: 6px; }
#profile .hero { padding: 0; }

@media (max-width: 820px) {
  .acct-shell { grid-template-columns: 1fr; gap: 14px; }
  .acct-side { position: static; }
  .acct-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 2px; scrollbar-width: none; }
  .acct-nav a { flex: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
  .acct-nav a.on { box-shadow: none; border-color: var(--accent); }
  .side-out { display: none; }
  .mobile-out { display: inline-flex !important; }
  .page-title { font-size: 20px; }
}
body:has(.acct-shell) .foot { max-width: 1080px; }

/* cloud storage page */
.usage-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.usage-big b { font-size: 28px; letter-spacing: -.5px; }
.usage-big .pct { margin-left: auto; font-weight: 700; color: var(--muted); }
.segbar { display: flex; height: 12px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.segbar span { display: block; height: 100%; min-width: 2px; }
.segbar span + span { box-shadow: -1px 0 0 var(--panel); }
.legend { list-style: none; margin: 12px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; }
.legend i, .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.cloud-kv { margin-top: 14px; }
.bar.thin { display: block; height: 4px; margin-top: 6px; border: 0; max-width: 260px; }
.rec-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.rec-tools input, .rec-tools select { height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; outline: none; }
.rec-tools input { flex: 1; min-width: 180px; }
.rec-tools input:focus, .rec-tools select:focus { border-color: var(--accent); }
.recs li { flex-wrap: wrap; }
.recs .dot { flex: none; width: 10px; height: 10px; margin: 0; border-radius: 50%; }
.recs .status { min-width: 70px; }
.rec-actions { display: flex; gap: 6px; }
.rec-confirm { flex-basis: 100%; }
.rec-confirm .quote { margin-top: 4px; }
.star { color: var(--accent); }
.past { margin-top: 10px; }
.past summary { cursor: pointer; color: var(--muted); font-size: 13px; }
@media (max-width: 560px) {
  .recs li { gap: 8px; }
  .rec-actions { flex-basis: 100%; padding-left: 18px; }
  .usage-big b { font-size: 24px; }
}
[data-cloud-page] { display: flex; flex-direction: column; gap: 16px; }

/* offline copy of the account */
.offline-note { padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(245, 179, 1, .4); background: rgba(245, 179, 1, .07); font-size: 14px; }
.acct-shell.offline .acct-pages button, .acct-shell.offline .acct-pages input, .acct-shell.offline .acct-pages select,
.acct-shell.offline .side-out, .acct-shell.offline .avatar-edit { pointer-events: none; opacity: .45; }
.acct-shell.offline .acct-pages a.btn { pointer-events: none; opacity: .45; }

/* on/off switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + span { background: rgba(245, 179, 1, .25); border-color: rgba(245, 179, 1, .6); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--accent); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.rows small.caption { font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-edit { display: grid; gap: 8px; }
.col-edit select, .col-edit textarea, .col-edit .text-input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.col-items { list-style: none; padding: 4px 0 0; margin: 0; font-size: 13.5px; }
.col-items li { display: flex; gap: 10px; align-items: baseline; padding: 2px 0; }
.rows.cols details summary { cursor: pointer; color: var(--muted); margin-top: 4px; }
.survey { border: 0; padding: 0; margin: 10px 0 12px; display: grid; gap: 4px; }
.survey legend { color: var(--muted); margin-bottom: 4px; padding: 0; }
.survey .opt { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.survey textarea { margin-top: 6px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.pro-keybox { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.pro-keybox code { flex: 1; min-width: 0; font: 600 14px ui-monospace, Menlo, monospace; word-break: break-all; }

/* Overlook Box: the install command, and inline commands in help text. */
pre.cmd { margin: 8px 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); overflow-x: auto; }
pre.cmd code, .card p code { font: 13px/1.5 ui-monospace, Menlo, monospace; }
.card p code { padding: 1px 5px; border-radius: 4px; background: var(--panel-2); }
.steps { margin: 8px 0 12px; padding-left: 20px; color: var(--muted); }
.steps li { margin: 4px 0; }
#pair-box details { margin-top: 14px; }
#pair-box summary { cursor: pointer; color: var(--muted); }
.setup-step { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.setup-step h3 { margin: 0 0 6px; font-size: 16px; }
.setup-step form { display: grid; gap: 10px; max-width: 420px; }
/* The in-car check (js/box-setup.js): a dot per item, coloured by verdict */
.car-check li { align-items: flex-start; }
.car-check .dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--muted); }
.car-check .dot.pass { background: var(--ok); } .car-check .dot.warn { background: var(--accent); } .car-check .dot.fail { background: var(--warn); }
.car-check .dot.info { background: transparent; border: 2px solid var(--accent); }
.setup-step select, .setup-step input { height: 42px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; }

/* Overlook Cache: how to install one (account → Overlook Cache) */
.install-cache summary { list-style: none; cursor: pointer; }
.install-cache summary::-webkit-details-marker { display: none; }
.install-cache summary h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.install-cache summary h2::after { content: '›'; margin-left: auto; color: var(--muted); transition: transform .15s; }
.install-cache details[open] summary h2::after { transform: rotate(90deg); }
.install-cache .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 24px; margin-top: 10px; }
.install-cache ul, .install-cache ol { padding-left: 18px; margin: 6px 0 0; }
.install-cache li { margin: 6px 0; }
.install-cache .sub { margin-top: 12px; }

/* The Cache cards are inside a wrapper (filled in by loadBoxes): space them like the page does. */
[data-boxes] { display: flex; flex-direction: column; gap: 16px; }

/* Overlook Cache: backup progress and the health history table */
.cache-progress { width: 100%; max-width: 260px; height: 8px; vertical-align: middle; accent-color: var(--accent, #f5b301); display: block; margin-bottom: 4px; }
.cache-sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cache-health { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; display: block; overflow-x: auto; }
.cache-health th, .cache-health td { padding: 4px 8px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); }
.cache-health th { color: var(--muted, #a5a9b2); font-weight: 600; }
.cache-health td.warn { color: #f0a020; font-weight: 600; }

.warn-text { color: #f0a020; }

/* Confirmations (accountCore.ask): a dialog in the site's style instead of the browser's own */
dialog.ask { max-width: min(420px, calc(100vw - 32px)); width: 100%; padding: 22px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.55); }
dialog.ask::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
dialog.ask h3 { margin: 0 0 8px; font-size: 17px; }
dialog.ask p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.45; }
dialog.ask .actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Log in / sign up: the Terms checkbox beside its text, and the link to the other page */
.acct-form .terms { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--muted); line-height: 1.45; cursor: pointer; }
.acct-form .terms input { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.acct-form .switch { width: 100%; margin: 4px 0 0; text-align: center; }
.retention-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.retention-grid label { display: grid; gap: 4px; }
.retention-grid select { width: 100%; }
/* Cache settings from anywhere (js/cache-remote.js). */
.cache-remote { margin: 10px 0 4px; }
.cache-remote summary { cursor: pointer; font-weight: 600; }
.cache-remote .form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-width: 520px; }
.cache-remote .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); }
.cache-remote .fl { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-top: 8px; }
.cache-remote .text-input, .cache-remote select { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; outline: none; }
.cache-remote .text-input { width: 100%; box-sizing: border-box; }
.cache-remote input[name="cap"] { max-width: 160px; }
.cache-remote select { padding-right: 8px; cursor: pointer; }
.cache-remote select[name="vin"] { width: 100%; }
.cache-remote .text-input:focus, .cache-remote select:focus { border-color: var(--accent); }
.cache-remote .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.cache-remote .opt { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; background: var(--bg); font-size: 14px; line-height: 1.35; }
.cache-remote .opt:has(input:checked) { border-color: rgba(245, 179, 1, .6); background: rgba(245, 179, 1, .06); }
.cache-remote .opt input { margin: 0; flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.cache-remote .form > .muted { margin: 0; }
.cache-remote .form > .opt { align-self: flex-start; }
.cache-remote .form .actions { margin-top: 6px; }
[data-cache-waiting] { display: flex; align-items: center; gap: 8px; }
[data-cache-waiting] .spin-sm { width: 12px; height: 12px; border: 2px solid var(--line, rgba(255,255,255,.15)); border-top-color: var(--accent, #f5b301); border-radius: 50%; animation: cache-spin .8s linear infinite; flex: none; }
@keyframes cache-spin { to { transform: rotate(360deg); } }

/* iOS Safari zooms into a field whose text is under 16px when it's tapped. On touch screens (and narrow
   windows) every text field, select and text box is at least 16px; the sign-in code boxes stay bigger. */
@media (pointer: coarse), (max-width: 860px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(.acct-code):not(.code-input), select, textarea { font-size: 16px !important; }
}
