/* yng4check-corp design (after the demo screens: warm off-white, white rounded cards, deep red accent, serif figures).
   No external fonts or CDNs (strict CSP): system Japanese fonts only. */
:root {
  --bg: #f7f2ef; --surface: #fff; --surface-2: #faf6f4; --soft: #f5ebe7; --line: #e8ddd8; --line-2: #f0e7e3;
  --text: #2a2321; --muted: #7b6e69; --faint: #a3958f;
  --accent: #b83a2d; --accent-hover: #9e3125; --accent-soft: #f7e6e2; --accent-ink: #fff;
  --teal: #2aa3b3; --teal-hover: #218c9a; --teal-soft: #e9f6f8;
  --ok: #1f8a4c; --ok-bg: #e4f5ea; --ok-line: #9fd8b3; --warn: #9a6400; --warn-bg: #fff4cc; --warn-line: #f0d27a;
  --bad: #c0392b; --bad-bg: #fde4e1; --info: #2f5fd0; --info-bg: #e8eefc; --purple: #7c3aed; --purple-bg: #f1e9ff;
  --radius: 16px; --radius-sm: 10px; --shadow: 0 1px 2px rgba(60, 30, 20, .04), 0 4px 16px rgba(60, 30, 20, .04);
  --sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  font-family: var(--sans); color: var(--text); -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); line-height: 1.65; font-size: 15px; min-height: 100dvh; }
a { color: var(--accent); }
img, svg { display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; background: var(--band, rgba(255, 255, 255, .92)); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.brand .co { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .svc { color: var(--muted); font-size: 13px; white-space: nowrap; }
.topbar .who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; white-space: nowrap; }
@media (max-width: 560px) { .brand .svc, .topbar .who .name { display: none; } .topbar { padding: 8px 12px; } }

/* ---------- layout */
.page { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
.page.wide { max-width: 1280px; }
.page.narrow { max-width: 440px; padding-top: 48px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- type */
h1, h2, h3 { margin: 0; line-height: 1.35; }
h1 { font-family: var(--serif); font-size: 26px; font-weight: 700; letter-spacing: .02em; }
h2 { font-family: var(--serif); font-size: 19px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.faint { color: var(--faint); font-size: 12px; }
.serif { font-family: var(--serif); }
.num { font-family: var(--serif); font-variant-numeric: tabular-nums; }
.section-title { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 18px; font-weight: 700; }
.section-title::before { content: ""; width: 4px; height: 20px; border-radius: 2px; background: var(--accent); }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent); }

/* ---------- surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.soft { background: var(--surface-2); }
.card.pad-lg { padding: 28px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .t { display: flex; gap: 12px; align-items: flex-start; }
.icon-box { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.icon-box.teal { background: var(--teal-soft); color: var(--teal); }
.note { background: var(--soft); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--muted); }
.note strong { color: var(--text); }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.outline { background: #fff; color: var(--accent); }
.btn.outline:hover { background: var(--accent-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); font-weight: 600; }
.btn.ghost:hover { background: var(--soft); color: var(--text); }
.btn.quiet { background: var(--surface-2); border-color: var(--line); color: var(--text); font-weight: 600; border-radius: 999px; }
.btn.quiet:hover { background: var(--soft); }
.btn.teal { background: var(--teal); border-color: var(--teal); }
.btn.teal:hover { background: var(--teal-hover); border-color: var(--teal-hover); }
.btn.teal-outline { background: var(--teal-soft); border: 2px solid var(--teal); color: var(--teal-hover); border-radius: 999px; }
.btn.sm { min-height: 34px; padding: 4px 12px; font-size: 13px; border-radius: 8px; }
.btn.xs { min-height: 28px; padding: 2px 10px; font-size: 12px; border-radius: 7px; }
.btn.block { width: 100%; }
.btn.hero { min-height: 64px; font-size: 18px; border-radius: 999px; width: 100%; }
.btn.danger { background: #fff; color: var(--bad); border-color: #f0b8b0; }
.btn.danger:hover { background: var(--bad-bg); }
.btn:disabled, .btn[aria-disabled=true] { opacity: .45; cursor: default; pointer-events: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #ecaaa0; outline-offset: 2px; }

/* ---------- forms */
label.f { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin: 12px 0 6px; }
input[type=email], input[type=password], input[type=text], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; background: #fff; color: var(--text); }
input::placeholder { color: var(--faint); }
.input-icon { position: relative; } .input-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); } .input-icon input { padding-left: 36px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.chips-select { display: flex; gap: 6px; flex-wrap: wrap; }
.chips-select label { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 14px; background: #fff; }
.chips-select input { position: absolute; opacity: 0; pointer-events: none; }
.chips-select input:checked + span { color: var(--accent); font-weight: 700; }
.chips-select label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 32px; }
.seg button[aria-pressed=true] { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.filters > * { flex: 0 1 auto; }
.filters input, .filters select { min-height: 38px; font-size: 14px; width: auto; }

/* ---------- messages / pills */
.msg { padding: 12px 14px; border-radius: 12px; background: var(--soft); font-size: 14px; }
.msg.ok { background: var(--ok-bg); color: var(--ok); } .msg.err { background: var(--bad-bg); color: var(--bad); }
.msg.warn { background: var(--warn-bg); color: var(--warn); } .msg.info { background: var(--info-bg); color: var(--info); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); white-space: nowrap; line-height: 1.7; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.info { background: var(--info-bg); color: var(--info); }
.pill.purple { background: var(--purple-bg); color: var(--purple); } .pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 11px; font-weight: 700; }
.count.hot { background: #e5483a; color: #fff; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 7px; border-radius: 6px; }

/* ---------- stat cards */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 18px; }
.stat .sub { color: var(--muted); font-size: 12px; }

/* ---------- tabs */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; background: var(--band, transparent); border-radius: var(--radius) var(--radius) 0 0; scrollbar-width: thin; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 14px 14px 12px; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; cursor: pointer; white-space: nowrap; flex: none; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs [aria-current=page], .tabs [aria-selected=true] { color: var(--accent); border-bottom-color: var(--accent); }
.panel-body { padding: 20px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px; flex-wrap: wrap; }

/* ---------- tables */
.table-wrap { overflow-x: auto; }
.table-wrap.boxed { border: 1px solid var(--line); border-radius: 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: #fdfaf9; }
table.t .r { text-align: right; }
table.t .stackv { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.table-foot { padding: 10px 20px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* ---------- drawer (detail panel) and dialog */
.drawer-back { position: fixed; inset: 0; background: rgba(40, 20, 15, .28); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: #fff; z-index: 41; display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(0, 0, 0, .12); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.drawer-body { overflow-y: auto; padding: 0 20px 32px; flex: 1; }
.kv { display: grid; grid-template-columns: auto 1fr; font-size: 14px; }
.kv > div { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.kv > div:nth-child(odd) { color: var(--muted); padding-right: 16px; }
.kv > div:nth-child(even) { text-align: right; font-weight: 600; }
.kv-title { font-size: 13px; font-weight: 700; color: var(--muted); margin: 20px 0 4px; }
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .2); }
dialog::backdrop { background: rgba(40, 20, 15, .3); }
dialog .d-head { padding: 18px 20px 0; } dialog .d-body { padding: 8px 20px 4px; } dialog .d-foot { padding: 16px 20px 20px; display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- home / check */
.hero-card { text-align: left; }
.hero-card h1 { font-size: 28px; }
.steps { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px 18px; }
.steps h3 { font-size: 14px; margin-bottom: 10px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.steps li .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; font-family: var(--serif); }
.week { display: flex; gap: 14px; align-items: center; }
.week .ring { width: 54px; height: 54px; flex: none; }
.disclaimer { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 12px; }
.disclaimer svg { flex: none; margin-top: 2px; }
.link-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.tile { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; }
.tile:hover { border-color: var(--accent); }
.tile svg { color: var(--accent); flex: none; }
#check-area { width: 100%; max-width: 460px; margin: 0 auto; }

/* ---------- compare & trends (after the demo result screen) */
.compare { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.compare .when { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.compare .when b { display: block; color: var(--text); font-weight: 600; font-size: 13px; }
.cmp-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row .now { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; } .cmp-row .now small { font-weight: 400; color: var(--muted); margin-left: 2px; }
.cmp-row .d { font-size: 13px; min-width: 58px; text-align: right; font-variant-numeric: tabular-nums; }
.cmp-row .d.up { color: var(--ok); } .cmp-row .d.down { color: var(--bad); } .cmp-row .d.same { color: var(--faint); }
.cmp-row .prev { color: var(--faint); font-size: 13px; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.trends { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (max-width: 560px) { .trends { grid-template-columns: 1fr; gap: 10px; } .trend { padding: 12px 12px 6px; } .bars { height: 120px; } .tabs .long { display: none; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; } .stat { padding: 12px; } .stat .icon-box { display: none; } .stat .value { font-size: 24px; } }
@media (min-width: 561px) { .tabs .short { display: none; } }
.trend { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 10px; }
.trend h3 { font-family: var(--serif); font-size: 15px; margin-bottom: 4px; }
.trend .unit { text-align: right; color: var(--faint); font-size: 11px; }
.bars { width: 100%; height: 150px; }
.bars text { font-family: var(--sans); }
.bars.line { height: 170px; }
@media (max-width: 560px) { .bars.line { height: 150px; } }

/* ---------- level distribution chips */
.dist { display: flex; gap: 10px; flex-wrap: wrap; }
.dist .pill { font-size: 13px; padding: 5px 14px; }

/* ---------- misc */
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #2a2321; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 60; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.weekbar { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; align-items: end; height: 120px; }
.weekbar .b { background: var(--accent-soft); border-radius: 6px 6px 0 0; position: relative; min-height: 2px; }
.weekbar .b.cur { background: var(--accent); }
.weekbar-l { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; font-size: 11px; color: var(--muted); text-align: center; margin-top: 4px; }
.health-bar { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; } .health-bar > span { display: block; height: 100%; background: var(--ok); }
.cmp-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
dialog.dlg { width: min(860px, calc(100vw - 32px)); }

/* Company branding (admin「ロゴと色」): step numbers, check start buttons, header logo. */
.steps li .n, .steps .n { background: var(--step-bg, var(--accent)); color: var(--step-ink, #fff); }
.btn.start:not(.outline) { background: var(--start-bg, var(--teal)); border-color: var(--start-bg, var(--teal)); color: var(--start-ink, #fff); }
.btn.start:not(.outline):hover { background: var(--start-hover, var(--teal-hover, var(--teal))); border-color: var(--start-hover, var(--teal-hover, var(--teal))); }
.btn.start.outline { border: 2px solid var(--start-bg, var(--accent)); color: var(--text); background: #fff; }
.brand .mark.logo { background: transparent; width: auto; min-width: 0; height: 32px; padding: 0; border-radius: 0; }
.brand .mark.logo img { display: block; height: 32px; width: auto; max-width: 160px; object-fit: contain; }
.swatch-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; margin-top: 10px; }
.swatch-row input[type=color] { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.brand-preview { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 14px; }
.logo-box { display: flex; align-items: center; justify-content: center; height: 72px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; margin-top: 10px; }
.logo-box img { max-height: 56px; max-width: 220px; object-fit: contain; }

/* 30-second check result (assets/result-view.js): one column on phones, two columns from 640px; warning items first. */
#check-area:has(.rv) { max-width: none; }
.rv { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.rv-hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.rv-eyebrow { font-size: 13px; color: var(--muted); }
.rv-hero-row { display: flex; align-items: baseline; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.rv-hero-num { font-family: var(--serif); font-size: 56px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.rv-hero-num small { font-family: var(--sans); font-size: 18px; font-weight: 500; color: var(--muted); }
.rv-note { margin-top: 12px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.rv-note b { color: var(--text); }
.rv-flag { background: var(--bad-bg); color: var(--bad); border: 1px solid #f3b9b2; border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; font-weight: 600; line-height: 1.6; }
.rv-sec { font-size: 13px; font-weight: 700; color: var(--muted); margin: 8px 0 10px; display: flex; align-items: center; gap: 8px; }
.rv-sec::before { content: ""; width: 16px; height: 1px; background: var(--muted); }
.rv-sec.bar { font-family: var(--serif); font-size: 18px; color: var(--text); }
.rv-sec.bar::before { width: 4px; height: 20px; background: var(--accent); border-radius: 2px; }
.rv-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .rv-grid { grid-template-columns: 1fr 1fr; } }
.rv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.rv-card.warning { background: #fde9e6; border: 1px solid #ee9d94; border-left: 7px solid #c7261b; }
.rv-card.caution { background: #fff5d6; border: 1px solid #e9c45c; border-left: 7px solid #d08a00; }
.rv-card.warning .rv-name, .rv-card.caution .rv-name { color: var(--text); font-weight: 700; }
.rv-card.warning .rv-ref, .rv-card.caution .rv-ref, .rv-card.warning .rv-sub, .rv-card.caution .rv-sub { color: #5f5450; }
.rv-card.warning .rv-chip, .rv-card.caution .rv-chip { background: rgba(255,255,255,.7); color: #5f5450; }
.rv-hero.warning { background: #fde9e6; border: 1px solid #ee9d94; border-left: 7px solid #c7261b; }
.rv-hero.caution { background: #fff5d6; border: 1px solid #e9c45c; border-left: 7px solid #d08a00; }
.rv-hero.warning .rv-note, .rv-hero.caution .rv-note { color: #5f5450; }
.rv-attn { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; line-height: 1.7; }
.rv-attn.warning { background: #fde9e6; color: #8f1a12; border: 1px solid #ee9d94; } .rv-attn.caution { background: #fff5d6; color: #6b4300; border: 1px solid #e9c45c; }
.rv-attn b { font-size: 15px; } .rv-attn a { color: inherit; font-weight: 700; }
/* 10-second result */
.qv-hero, .qv-sum { border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--line); background: var(--surface); }
.qv-hero.ok, .qv-sum.ok { background: #e7f5ec; border-color: #9fd8b3; border-left: 7px solid #1f8a4c; }
.qv-hero.warn, .qv-sum.warn { background: #fff5d6; border-color: #e9c45c; border-left: 7px solid #d08a00; }
.qv-hero.bad { background: #fde9e6; border-color: #ee9d94; border-left: 7px solid #c7261b; }
.qv-hero.na, .qv-sum.na { background: #eef0f1; border-color: #c9cfd2; border-left: 7px solid #7b868a; }
.qv-eyebrow { font-size: 13px; font-weight: 700; color: #4f4541; }
.qv-h { font-family: var(--serif); font-size: 26px; line-height: 1.35; margin: 6px 0 8px; }
.qv-hero.bad .qv-h { color: #a1170f; } .qv-hero.warn .qv-h { color: #7a4b00; } .qv-hero.ok .qv-h { color: #146c3a; }
.qv-sh { font-size: 19px; margin: 4px 0 6px; }
.qv-sum.warn .qv-sh { color: #7a4b00; } .qv-sum.ok .qv-sh { color: #146c3a; }
.qv-p { font-size: 14px; line-height: 1.75; margin: 6px 0; color: #3d3431; }
.qv-small { font-size: 13px; line-height: 1.7; margin: 8px 0 0; color: #4f4541; }
.qv-strong { font-weight: 700; font-size: 15px; line-height: 1.7; margin: 10px 0; }
.qv-ref { font-size: 12px; color: #5f5450; margin-top: 10px; }
.qv-box { background: rgba(255,255,255,.8); border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: 14px; }
.qv-fast { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.qv-fast li { display: flex; gap: 10px; line-height: 1.6; } .qv-fast b { flex: 0 0 auto; min-width: 2.6em; padding: 1px 8px; border-radius: 6px; background: #2a2321; color: #fff; text-align: center; font-size: 13px; height: fit-content; }
.qv-call { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 12px; background: #c7261b; color: #fff; font-size: 18px; font-weight: 800; text-decoration: none; }
.qv-list { margin: 6px 0; padding-left: 1.2em; font-size: 14px; line-height: 1.8; } .qv-list a { color: inherit; }
.qv-sum a { color: inherit; font-weight: 700; }
.qv-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.qv-dh { margin: 0; padding: 10px 16px; font-size: 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.qv-dh span { font-weight: 400; font-size: 12px; color: var(--muted); }
.qv-row { padding: 14px 16px; border-top: 1px solid var(--line); scroll-margin-top: 80px; } .qv-dh + .qv-row { border-top: 0; }
.qv-row.caution { background: #fff5d6; box-shadow: inset 7px 0 0 #d08a00; padding-left: 22px; }
.qv-row-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qv-n { font-weight: 700; font-size: 15px; } .qv-v { margin-left: auto; font-family: var(--serif); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.qv-v small { font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--muted); }
.qv-t { margin: 6px 0 0; font-size: 14px; line-height: 1.7; }
.qv-a { margin: 6px 0 0; font-size: 14px; line-height: 1.7; font-weight: 700; color: #6b4300; }
.qv-r { margin: 6px 0 0; font-size: 12px; color: #6b5f5b; }
.qv { display: flex; flex-direction: column; gap: 14px; }
.rv-name { font-size: 14px; color: var(--muted); }
.rv-val { font-family: var(--serif); font-size: 28px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rv-val small { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.rv-val.txt { font-size: 20px; }
.rv-sub { font-size: 12px; color: var(--muted); }
.rv-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rv-ref { margin-top: 8px; font-size: 12px; color: var(--faint); }
.rv-lv { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; padding: 3px 10px 3px 4px; border-radius: 999px; }
.rv-lv-i { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }
.rv-lv.good { background: #e3effb; color: #0b4f96; } .rv-lv.good .rv-lv-i { background: #0b5cad; }
.rv-lv.caution { background: #fff1d6; color: #7a4b00; } .rv-lv.caution .rv-lv-i { background: #b86e00; }
.rv-lv.warning { background: #fde7e5; color: #a1170f; } .rv-lv.warning .rv-lv-i { background: #c7261b; border-radius: 3px; }
.rv-lv.info { background: #eef0f1; color: #4b5559; } .rv-lv.info .rv-lv-i { background: #7b868a; }
.rv-chip { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.rv-status { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; }
.rv-lead { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0 0 10px; }
.rv-accs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.rv-acc { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.rv-acc.warning { border-color: #f0a29a; background: #fff6f5; } .rv-acc.caution { border-color: var(--warn-line); background: #fffcf0; }
.rv-acc.good { border-color: var(--ok-line); background: #f7fcf8; }
.rv-acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.rv-acc summary::-webkit-details-marker { display: none; }
.rv-acc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 2px; flex: none; }
.rv-acc[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.rv-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex: none; }
.rv-acc.warning .rv-dot { background: var(--bad); } .rv-acc.caution .rv-dot { background: #d9a300; } .rv-acc.good .rv-dot { background: var(--ok); } .rv-acc.info .rv-dot { background: var(--info); }
.rv-acc-n { font-weight: 700; flex: 1; min-width: 0; }
.rv-acc-lv { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); flex: none; }
.rv-acc.warning .rv-acc-lv { background: var(--bad-bg); color: var(--bad); } .rv-acc.caution .rv-acc-lv { background: var(--warn-bg); color: var(--warn); } .rv-acc.good .rv-acc-lv { background: var(--ok-bg); color: var(--ok); }
.rv-acc-v { font-size: 13px; color: var(--muted); flex: none; max-width: 40%; text-align: right; overflow-wrap: anywhere; }
.rv-acc-b { padding: 0 14px 14px; }
.rv-info { background: rgba(0, 0, 0, .04); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.rv-head { font-weight: 700; color: var(--bad); margin: 12px 0 2px; }
.rv-acc.caution .rv-head { color: var(--warn); }
.rv-txt { font-size: 14px; line-height: 1.7; margin: 8px 0 0; }
.rv-head + .rv-txt { margin-top: 0; }
.rv-rel-t { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 10px; }
.rv-rel { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rv-rel span { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid #f0a29a; color: var(--bad); background: #fff; }
.rv-acc.caution .rv-rel span { border-color: var(--warn-line); color: var(--warn); }
.rv-adv { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.7; background: #fff; }
.rv-adv b { display: block; font-size: 13px; color: var(--accent); margin-bottom: 2px; }
.rv-foot { font-size: 12px; color: var(--faint); line-height: 1.7; text-align: center; }
/* History insights (0.6.0): baseline, welcome back, recovery, season, memos */
.ins-eyebrow { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.ins-h { font-family: var(--serif); font-size: 21px; line-height: 1.4; margin: 4px 0 6px; }
.ins-p { font-size: 14px; line-height: 1.75; margin: 6px 0; }
.ins-small { font-size: 12.5px; line-height: 1.7; color: var(--muted); margin: 6px 0; }
.ins-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.ins-count { font-family: var(--sans); font-size: 16px; color: var(--accent); margin-left: 6px; }
.ins-dots { display: flex; gap: 8px; margin: 12px 0 8px; flex-wrap: wrap; }
.ins-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--faint); border: 2px dashed var(--line-2, #e6dad5); }
.ins-dot.on { background: #1f8a4c; color: #fff; border: 2px solid #1f8a4c; }
.ins-dot.next { border-color: #1f8a4c; color: #1f8a4c; }
.ins-base.done { border-left: 7px solid #1f8a4c; }
.ins-cel { display: flex; gap: 14px; align-items: center; border-radius: var(--radius); padding: 16px 18px; }
.ins-cel.welcome { background: #eef4fd; border: 1px solid #b9d0f0; } .ins-cel.recover { background: #e7f5ec; border: 1px solid #9fd8b3; }
.ins-cel-i { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; }
.ins-cel.welcome .ins-cel-i { background: #2f6fb8; } .ins-cel.recover .ins-cel-i { background: #1f8a4c; }
.ins-cel .ins-h { margin-top: 0; }
.cert { border-radius: 18px; padding: 10px; background: linear-gradient(135deg, #c9a24a, #f1dc9c 45%, #b8913c); box-shadow: 0 10px 30px rgba(120, 90, 30, .18); animation: cert-in .6s ease-out; }
.cert-in { border-radius: 12px; background: #fffbf0; border: 1px solid #e3cf95; outline: 1px solid #e3cf95; outline-offset: -8px; padding: 26px 22px 22px; text-align: center; }
.cert-eyebrow { font-size: 11px; letter-spacing: .25em; color: #9a7a2e; font-weight: 700; }
.cert-h { font-family: var(--serif); font-size: 26px; line-height: 1.45; margin: 10px 0 8px; color: #3b2f12; }
.cert-name { font-family: var(--serif); font-size: 18px; margin: 6px 0 14px; color: #3b2f12; border-bottom: 1px solid #e3cf95; display: inline-block; padding: 0 18px 4px; }
.cert-meta { display: flex; justify-content: center; gap: 28px; margin: 6px 0 14px; } .cert-meta span { display: block; font-size: 12px; color: #7a6a45; } .cert-meta b { font-size: 16px; color: #3b2f12; }
.cert-items { text-align: left; background: #fff; border: 1px solid #efe2bb; border-radius: 10px; padding: 8px 14px; margin: 0 auto 12px; max-width: 460px; }
.cert-items-h { font-size: 12px; font-weight: 700; color: #7a6a45; margin: 4px 0; }
.cert-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 7px 0; border-top: 1px solid #f3ead0; font-size: 14px; } .cert-row:first-of-type { border-top: 0; }
.cert-row b { font-family: var(--serif); font-size: 17px; text-align: right; } .cert-row b small { font-family: var(--sans); font-size: 11px; color: var(--muted); font-weight: 500; }
.cert-row .muted { grid-column: 1 / -1; font-size: 12px; }
.cert-foot { font-size: 13px; line-height: 1.7; color: #5a4d2e; margin: 8px 0 14px; }
@keyframes cert-in { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cert { animation: none; } }
.ins-season { border-left: 7px solid #2f6fb8; }
.ins-ly { margin-top: 10px; background: var(--surface-2); border-radius: 10px; padding: 8px 14px; } .ins-ly-h { font-size: 12px; font-weight: 700; color: var(--muted); margin: 4px 0; }
.tagset { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.tag { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line-2, #e6dad5); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
.tag.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.tag.sm { min-height: 0; padding: 2px 10px; font-size: 12px; cursor: default; }
.ins-recent { display: grid; gap: 6px; margin: 8px 0; font-size: 13px; } .ins-recent div { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .ins-recent div > span:first-child { min-width: 4.5em; color: var(--muted); }
.ins-eff summary { cursor: pointer; font-weight: 700; font-size: 14px; padding: 8px 0; }
.eff { border-top: 1px solid var(--line); padding: 8px 0; } .eff-h { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.eff-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; padding: 2px 0; } .eff-row b { font-family: var(--serif); font-size: 16px; } .eff-vs { color: var(--muted); margin-left: auto; }
.band-note { font-size: 11.5px; color: #146c3a; margin: 4px 0 0; }

/* Blood-pressure monitor readings after a 30 s check (0.7.0) */
#cuff:empty { display: none; }
.rv-grid.has-cuff { grid-auto-flow: row dense; }
.rv-cuff { grid-column: 1 / -1; min-width: 0; }
.rv-cuff .cuff, .rv-cuff .cuff-line { margin: 0; }
#cuff { margin: 12px 0; }
.cuff { border: 2px solid var(--line); background: var(--surface-2); padding: 18px; }
.cuff.done { background: var(--surface); }
.cuff-h { font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.cuff-note { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 0 10px; }
.cuff-small { color: var(--faint); font-size: 12px; line-height: 1.7; margin: 10px 0 0; }
.cuff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.cuff-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.cuff-in { display: flex; align-items: center; gap: 6px; }
.cuff-in input { width: 100%; min-width: 0; font-size: 22px; font-weight: 700; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); text-align: right; }
.cuff-in small { color: var(--faint); font-size: 12px; white-space: nowrap; }
.cuff-saved { font-size: 16px; margin: 4px 0 8px; }
.cuff-saved b { font-size: 26px; }
.cuff-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 10px 14px; margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.cuff-line > span:first-child { color: var(--muted); margin-right: 4px; }
.cuff-line b { font-size: 18px; }
@media (max-width: 640px) { .cuff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cuff-grid button { grid-column: 1 / -1; } }
.watch { margin: 0 20px 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.watch-list { margin: 6px 0 0; padding-left: 1.1em; line-height: 1.9; font-size: 13px; }
.btn.disabled { opacity: .5; pointer-events: none; }

/* End of a check (0.8.0): large button at the bottom; shared device shows the time left */
.end-bar { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 18px 0 8px; }
.end-bar .btn.hero { max-width: 560px; }
.left-time { margin: 0; text-align: center; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.left-time b { color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; }
