/* Daleel Dental: Daleel's artistic facts sheet, for dental composites. Square panels with heavy ink rules, label-style
   numerals in Alexandria, body in IBM Plex Sans Arabic. Verdicts are small coloured squares; the page takes the site's
   own colour, curing-light violet (--k-dent), through the same --kind tokens Daleel uses. */
:root {
  --paper: #EDF0EC;
  --panel: #FFFFFF;
  --soft: #F1F3EF;
  --soft-2: #E3E7E1;
  --ink: #0F110E;
  --ink-2: #474C45;
  --ink-3: #61675E;
  --on-ink: #FFFFFF;
  --accent: #0A8F5B;
  --accent-ink: #076B44;
  --focus: #0F110E;
  /* score bands: the square (graphic, 3:1 or more) and the word (text, 4.5:1 or more) */
  --s-excellent: #0A8F5B; --s-excellent-t: #076B44; --s-excellent-soft: #DDF0E6;
  --s-good: #6B8A14;      --s-good-t: #4F6610;      --s-good-soft: #EBF1D8;
  --s-poor: #C27200;      --s-poor-t: #8F5300;      --s-poor-soft: #FBEBD2;
  --s-bad: #E0402A;       --s-bad-t: #B3261E;       --s-bad-soft: #FBE0DB;
  --s-none: #7E847A;      --s-none-t: #474C45;      --s-none-soft: #F1F3EF;
  --ev-official: #2547A8; --ev-strong: #0B6B66; --ev-early: #7D4F00;
  --alert-bg: #FBE0DB; --alert-ink: #7E1A13;
  --note-bg: #E4EAF6; --note-ink: #1F3470;
  /* the site's colour: curing-light violet, with its page tint */
  --k-dent: #5B3CC4; --k-dent-ink: #44299E; --k-dent-paper: #ECE9F7; --k-dent-soft: #F4F2FB;
  --on-kind: #FFFFFF;
  --k-dent-cam: #B4A2FF;
  --fd: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0B0D0A; --panel: #151814; --soft: #1D211C; --soft-2: #282D27; --ink: #ECEFE9; --ink-2: #BFC5BB; --ink-3: #A1A89D; --on-ink: #0B0D0A;
    --accent: #2BC77F; --accent-ink: #5FD99E; --focus: #ECEFE9;
    --s-excellent: #2BC77F; --s-excellent-t: #5FD99E; --s-excellent-soft: #13301F;
    --s-good: #A8C94A; --s-good-t: #BCD873; --s-good-soft: #263016;
    --s-poor: #F2A53A; --s-poor-t: #F6BB66; --s-poor-soft: #3A2A12;
    --s-bad: #FF6B57; --s-bad-t: #FF8E7E; --s-bad-soft: #3F1A15;
    --s-none: #7C8478; --s-none-t: #BFC5BB; --s-none-soft: #1D211C;
    --ev-official: #93ADFF; --ev-strong: #53C6BB; --ev-early: #E1A93E;
    --alert-bg: #3F1A15; --alert-ink: #FFB8AE; --note-bg: #1C2335; --note-ink: #C2CFFF;
    --k-dent: #B4A2FF; --k-dent-ink: #D0C4FF; --k-dent-paper: #0E0B17; --k-dent-soft: #1B1728;
    --on-kind: #0B0D0A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0B0D0A; --panel: #151814; --soft: #1D211C; --soft-2: #282D27; --ink: #ECEFE9; --ink-2: #BFC5BB; --ink-3: #A1A89D; --on-ink: #0B0D0A;
  --accent: #2BC77F; --accent-ink: #5FD99E; --focus: #ECEFE9;
  --s-excellent: #2BC77F; --s-excellent-t: #5FD99E; --s-excellent-soft: #13301F;
  --s-good: #A8C94A; --s-good-t: #BCD873; --s-good-soft: #263016;
  --s-poor: #F2A53A; --s-poor-t: #F6BB66; --s-poor-soft: #3A2A12;
  --s-bad: #FF6B57; --s-bad-t: #FF8E7E; --s-bad-soft: #3F1A15;
  --s-none: #7C8478; --s-none-t: #BFC5BB; --s-none-soft: #1D211C;
  --ev-official: #93ADFF; --ev-strong: #53C6BB; --ev-early: #E1A93E;
  --alert-bg: #3F1A15; --alert-ink: #FFB8AE; --note-bg: #1C2335; --note-ink: #C2CFFF;
  --k-dent: #B4A2FF; --k-dent-ink: #D0C4FF; --k-dent-paper: #0E0B17; --k-dent-soft: #1B1728;
  --on-kind: #0B0D0A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; scroll-padding-bottom: 124px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--f); font-variant-numeric: tabular-nums; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--fd); line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.stack { display: grid; gap: 12px; }
.wrap { width: 100%; max-width: 560px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
[dir="rtl"] .flip { transform: scaleX(-1); }
.ico { display: inline-grid; place-items: center; flex: none; }
.ico svg { width: 100%; height: 100%; display: block; }

/* top bar: the app icon, the name and the tagline */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--paper); }
.topbar .wrap { display: flex; align-items: center; gap: 8px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 12px; margin: 0; margin-inline-end: auto; min-width: 0; font: inherit; }
/* the app icon keeps the rounded corners it has on the phone: the one radius besides the shutter and the spinner */
.logo .appicon { display: block; flex: none; width: 40px; height: 40px; border-radius: 8px; }
.logo span.name { font: 900 18px/1.2 var(--fd); }
.logo .words { display: grid; min-width: 0; }
.logo span.tag { font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.viewtitle { font: 700 18px/1.3 var(--fd); margin: 0; margin-inline-end: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn { flex: none; width: 44px; height: 44px; display: inline-grid; place-items: center; border: 2px solid var(--ink); background: var(--panel); cursor: pointer; color: var(--ink); transition: transform .12s ease-out, background-color .12s ease-out; }
.iconbtn:hover { background: var(--soft-2); }
.iconbtn:active { transform: translateY(1px); }
.iconbtn svg { width: 22px; height: 22px; }
.langbtn { flex: none; min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); background: var(--panel); font: 700 14px/1 var(--fd); cursor: pointer; color: var(--ink); transition: background-color .12s ease-out; }
.langbtn:hover { background: var(--soft-2); }

main.wrap { padding-block: 4px 112px; display: grid; gap: 16px; }

/* panels: square, ink-framed, like the facts box printed on a pack */
.sec { background: var(--panel); border: 3px solid var(--ink); padding: 16px; min-width: 0; }
.sec { display: grid; gap: 12px; }
.sec-h { font: 900 22px/1.15 var(--fd); }
.sec.flat { background: transparent; border: 0; padding: 0; }
.sec-head { display: grid; gap: 4px; padding-bottom: 8px; border-bottom: 6px solid var(--ink); }
.sec-head > div { display: grid; gap: 4px; min-width: 0; }
.sec-sub { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.lead { font-size: 17px; color: var(--ink-2); }
.hero h1 { font: 900 36px/1.1 var(--fd); }

/* the facts sheet: heavy rules divide parts, 2px rules divide rows */
.facts { background: var(--panel); border: 3px solid var(--ink); padding: 12px 16px 16px; min-width: 0; display: grid; }
.facts > * { min-width: 0; }
.ft { font: 900 36px/1.25 var(--fd); letter-spacing: -0.01em; }
.rx { height: 12px; background: var(--ink); margin-block: 12px 0; }
.rm { height: 5px; background: var(--ink); margin-block: 8px 0; }
.frow { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-top: 2px solid var(--ink); }
.rx + .frow, .rm + .frow, .frow.first { border-top: 0; }
.frow .k { font-weight: 700; }
.frow .v { margin-inline-start: auto; font: 700 16px/1.3 var(--fd); text-align: end; }
.frow.sub .k { font-weight: 400; padding-inline-start: 16px; }
.frow.head { font: 700 13px/1.3 var(--fd); padding-block: 6px 4px; }
/* what a composite is made of: long lists of names, so the value wraps beside its label in body type */
.crows .frow .k { flex: none; }
.crows .frow .v { min-width: 0; overflow-wrap: anywhere; font: 500 15px/1.45 var(--f); }
.frow.head .v { font: 700 13px/1.3 var(--fd); }
.foot-note { font-size: 13px; color: var(--ink-2); padding-top: 8px; border-top: 2px solid var(--ink); margin-top: 8px; }

/* home: the sheet tells what one photo gives you */
.home-facts .serving { display: flex; justify-content: space-between; gap: 12px; font: 700 17px/1.3 var(--fd); padding-top: 8px; }
.home-facts .lead { margin-top: 16px; }
.home-facts .scanbtn { margin-top: 14px; }
.scanbtn { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 12px 16px; border: 0; background: var(--kind, var(--ink)); color: var(--on-kind, var(--on-ink)); cursor: pointer; text-align: start; transition: transform .12s ease-out, background-color .12s ease-out; }
.scanbtn:hover { background: var(--kind-ink, var(--ink-2)); }
.scanbtn:active { transform: translateY(2px); }
.scanbtn .ico { width: 30px; height: 30px; }
.scanbtn b { display: block; font: 900 19px/1.25 var(--fd); }
.scanbtn small { display: block; font-size: 14px; }
.scanbtn:focus-visible { outline-offset: 3px; }

/* buttons: square, like printed boxes */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 16px; border: 2px solid var(--ink); background: var(--panel); color: var(--ink); font: 700 16px/1.2 var(--fd); cursor: pointer; text-decoration: none; transition: transform .12s ease-out, background-color .12s ease-out; }
.btn:hover { background: var(--soft-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--kind, var(--ink)); border-color: var(--kind, var(--ink)); color: var(--on-kind, var(--on-ink)); }
.btn.primary:hover { background: var(--kind-ink, var(--ink-2)); border-color: var(--kind-ink, var(--ink-2)); }
.btn.outline { background: transparent; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }
.btn .ico { width: 20px; height: 20px; }
.linkbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0; background: none; border: 0; font: 700 15px var(--fd); color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* forms: real fields keep their lines */
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0; min-width: 0; }
legend { font: 900 22px/1.15 var(--fd); padding: 0 0 8px; margin-bottom: 4px; width: 100%; border-bottom: 6px solid var(--ink); }
.field { display: grid; gap: 8px; min-width: 0; }
.field > label, .lbl { font: 700 14px/1.4 var(--fd); }
input[type="text"], input[type="search"], textarea { width: 100%; min-height: 48px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 0; background: var(--panel); color: var(--ink); font: 400 16px/1.4 var(--f); font-variant-numeric: tabular-nums; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--s-bad-t); border-width: 3px; }
input[type="text"]:focus, textarea:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
textarea { min-height: 104px; padding-block: 10px; resize: vertical; }
.err { color: var(--alert-ink); font-size: 14px; font-weight: 700; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2:has(> .opt) { gap: 0; border-top: 2px solid var(--ink); }
@media (max-width: 360px) { .grid2 { grid-template-columns: 1fr; } }

/* choices: rows of the sheet with a square box */
.opt { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; cursor: pointer; border-top: 2px solid var(--ink); }
fieldset > .opt:first-of-type, legend + .opt, legend + .switch { border-top: 0; }
.opt:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt b { font: 700 16px/1.35 var(--fd); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.opt small { grid-column: 1; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.opt .check { grid-column: 2; grid-row: 1 / span 2; width: 24px; height: 24px; border: 3px solid var(--ink); position: relative; }
.opt:has(input:checked) .check { background: var(--kind, var(--ink)); border-color: var(--kind, var(--ink)); }
.opt:has(input:checked) .check::after { content: ""; position: absolute; inset: 4px; background: var(--on-kind, var(--accent)); }
.opt.tile { padding: 12px 8px; }
.grid2 .opt { border-top: 0; border-bottom: 2px solid var(--ink); }
.grid2 .opt:nth-child(odd) { border-inline-end: 2px solid var(--ink); padding-inline-end: 10px; }
.grid2 .opt:nth-child(even) { padding-inline-start: 10px; }
.pill { font: 700 13px/1 var(--fd); padding: 4px 6px; background: var(--ink); color: var(--on-ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; background: var(--panel); border: 2px solid var(--ink); cursor: pointer; font: 700 15px/1.2 var(--fd); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip:has(input:checked) { background: var(--kind, var(--ink)); border-color: var(--kind, var(--ink)); color: var(--on-kind, var(--on-ink)); }
.chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.switch { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: center; padding: 10px 0; border-top: 2px solid var(--ink); cursor: pointer; }
.switch b { font: 700 16px/1.35 var(--fd); }
.switch small { color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.switch input { appearance: none; -webkit-appearance: none; grid-column: 2; grid-row: 1 / span 2; width: 56px; height: 30px; margin: 0; border: 3px solid var(--ink); background: var(--panel); position: relative; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: var(--ink); transition: transform .15s ease-out; }
.switch input:checked { background: var(--kind, var(--ink)); border-color: var(--kind, var(--ink)); }
.switch input:checked::after { transform: translateX(26px); background: var(--panel); }
[dir="rtl"] .switch input::after { left: auto; right: 3px; }
[dir="rtl"] .switch input:checked::after { transform: translateX(-26px); }
.switch:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch input:disabled { opacity: .45; cursor: not-allowed; }

/* the view the scores follow: three stops, official, research, early research */
.views { display: grid; gap: 8px; padding-top: 10px; }
.views .vh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font: 700 14px/1.3 var(--fd); }
.views .vh span { color: var(--ink-2); font-weight: 500; font-size: 13px; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid var(--ink); }
.seg label { position: relative; display: grid; place-items: center; min-height: 44px; padding: 6px 4px; font: 700 14px/1.15 var(--fd); text-align: center; cursor: pointer; }
.seg label + label { border-inline-start: 2px solid var(--ink); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:has(input:checked) { background: var(--ink); color: var(--on-ink); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; z-index: 1; }
.views .vd { font-size: 14px; color: var(--ink-2); }

/* status and messages */
.spin { flex: none; width: 18px; height: 18px; border: 3px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.note:not(.f-icon) { background: var(--note-bg); color: var(--note-ink); padding: 12px 16px; font-size: 15px; border-inline-start: 6px solid var(--note-ink); }
.alert { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; background: var(--alert-bg); color: var(--alert-ink); padding: 16px; border: 3px solid var(--alert-ink); }
.alert > .ico { width: 24px; height: 24px; grid-row: span 3; }
.alert b { font: 700 16px/1.4 var(--fd); }
.alert p { font-size: 15px; font-weight: 500; grid-column: 2; }
.alert > details { grid-column: 2; }
.alert.plain { display: block; }

/* product lists: rows of the sheet */
.plist { list-style: none; margin: 0; padding: 0; display: grid; }
.plist li + li { border-top: 2px solid var(--ink); }
.prow { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 12px; align-items: center; width: 100%; padding: 12px 0; background: none; border: 0; text-align: start; cursor: pointer; min-height: 60px; color: var(--ink); }
.prow:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prow b { font: 700 16px/1.35 var(--fd); min-width: 0; grid-column: 1; }
.prow small { color: var(--ink-2); font-size: 14px; grid-column: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .avatar { grid-column: 2; grid-row: 1 / span 2; font: 900 26px/1 var(--fd); }
.prow .chev { grid-column: 3; grid-row: 1 / span 2; width: 18px; height: 18px; color: var(--ink); }
.mini { display: flex; gap: 16px; grid-column: 2; grid-row: 1 / span 2; }
.mini > span:not(.sr-only) { display: inline-flex; align-items: center; gap: 8px; font: 900 22px/1 var(--fd); }
.mini > span:not(.sr-only)::before { content: ""; width: 12px; height: 12px; background: var(--band); }
.empty { padding: 10px 0; color: var(--ink-2); font-size: 15px; }

/* score bands */
.b-excellent { --band: var(--s-excellent); --band-t: var(--s-excellent-t); --band-soft: var(--s-excellent-soft); }
.b-good { --band: var(--s-good); --band-t: var(--s-good-t); --band-soft: var(--s-good-soft); }
.b-poor { --band: var(--s-poor); --band-t: var(--s-poor-t); --band-soft: var(--s-poor-soft); }
.b-bad { --band: var(--s-bad); --band-t: var(--s-bad-t); --band-soft: var(--s-bad-soft); }
.b-none { --band: var(--s-none); --band-t: var(--s-none-t); --band-soft: var(--s-none-soft); }

/* the result sheet */
.res-hero { gap: 0; }
.phead { display: grid; gap: 2px; padding-top: 6px; }
.phead .pname { font: 700 20px/1.3 var(--fd); color: var(--ink); }
.phead p { color: var(--ink-2); font-size: 15px; }
.scores { display: grid; }
.dial { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 12px; padding: 12px 0; }
.dial + .dial { border-top: 2px solid var(--ink); }
.dial .sq { width: 18px; height: 18px; background: var(--band); animation: pop .35s cubic-bezier(.2, .8, .2, 1) both; }
.dial .cap { font: 900 22px/1.15 var(--fd); }
.dial .num { grid-row: 1 / span 2; grid-column: 3; font: 900 64px/0.9 var(--fd); letter-spacing: -0.03em; }
.dial .num small { font: 700 15px/1 var(--fd); letter-spacing: 0; color: var(--ink-2); margin-inline-start: 2px; }
.dial .num.na { font-size: 40px; color: var(--ink-3); }
.dial .cap { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 380px) {
  .dial .num { font-size: 52px; }
  .dial .cap { font-size: 19px; }
}
.dial .band { grid-column: 2; font: 700 15px/1.3 var(--fd); color: var(--band-t); }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.verdict { font-size: 15px; line-height: 1.5; color: var(--ink-2); padding: 8px 0 2px; border-top: 2px solid var(--ink); }




/* findings */
.findings { list-style: none; margin: 0; padding: 0; display: grid; }
.finding { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 12px 0; border-top: 2px solid var(--ink); }
.findings > .finding:first-child { border-top: 0; padding-top: 4px; }
.f-icon { grid-row: 1 / span 6; width: 22px; height: 22px; display: grid; place-items: center; }
.f-icon.for { color: var(--s-excellent-t); }
.f-icon.against { color: var(--s-bad-t); }
.f-icon.note { color: var(--note-ink); }
.finding > :not(.f-icon) { grid-column: 2; min-width: 0; }
.f-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kind { font: 700 13px/1.2 var(--fd); color: var(--ink-2); }
.f-title { font: 700 16px/1.45 var(--fd); }
.f-detail { color: var(--ink-2); font-size: 15px; }
.ev { display: inline-flex; align-items: center; gap: 4px; font: 700 13px/1 var(--fd); white-space: nowrap; padding: 4px 0; }
.ev i { position: relative; flex: none; width: 10px; height: 10px; background: currentColor; overflow: hidden; }
.ev.official { color: var(--ev-official); }
.ev.strong { color: var(--ev-strong); }
.ev.emerging { color: var(--ev-early); }
.ev.emerging i { border: 2px solid currentColor; background: transparent; }
.ev.emerging i::after { content: ""; position: absolute; inset: 0 50% 0 0; background: currentColor; }
details.src summary { cursor: pointer; font: 700 14px/1.3 var(--fd); color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; min-height: 44px; display: flex; align-items: center; gap: 8px; width: fit-content; list-style: none; }
details.src summary::-webkit-details-marker { display: none; }
details.src summary::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 3px 3px 0; transform: rotate(-45deg); transition: transform .15s ease-out; }
[dir="rtl"] details.src summary::before { transform: rotate(135deg); }
details.src[open] summary::before { transform: rotate(45deg); }
.srcbody { display: grid; gap: 10px; padding: 10px 12px; background: var(--soft); border-inline-start: 4px solid var(--ink); }
.srcitem { display: grid; gap: 6px; }
.srcitem > p { font-size: 14px; color: var(--ink-2); }
details.src ol { margin: 0; padding-inline-start: 22px; font-size: 14px; color: var(--ink-2); display: grid; gap: 4px; }
details.src a { word-break: break-word; }

.q { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; gap: 6px; font: 700 13px/1.2 var(--fd); white-space: nowrap; color: var(--band-t); }
.q::before { content: ""; width: 10px; height: 10px; background: var(--band); }


/* the product list */
.slots { display: grid; list-style: none; margin: 0; padding: 0; }
.slot { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 2px solid var(--ink); }
.slot:first-child { border-top: 0; }
.slot .thumb { width: 56px; height: 56px; object-fit: cover; background: var(--soft); display: grid; place-items: center; color: var(--ink-3); border: 2px solid var(--ink); }
.slot .thumb svg { width: 26px; height: 26px; }
.slot b { font: 700 16px/1.35 var(--fd); }
.slot > .wide { grid-column: 1 / -1; }
.slot .btn { min-height: 44px; padding: 8px 14px; font-size: 15px; position: relative; }
.slot .btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.slot input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.nutform { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.nutform .field label { font-weight: 700; font-size: 14px; }

.howtext { display: grid; gap: 12px; font-size: 16px; }
.howtext ul { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; }
.howtext ul li::marker { content: "■  "; color: var(--accent); font-size: 12px; }
.weights { width: 100%; border-collapse: collapse; font-size: 15px; }
.weights th, .weights td { padding: 7px 4px; border-top: 2px solid var(--ink); text-align: start; vertical-align: top; }
.weights thead th { border-top: 0; font: 700 13px/1.3 var(--fd); color: var(--ink-2); }
.weights tbody tr:first-child th, .weights tbody tr:first-child td { border-top: 5px solid var(--ink); }
.weights td.num { text-align: end; font: 700 15px var(--fd); white-space: nowrap; }
.weights caption { text-align: start; font: 900 18px/1.2 var(--fd); padding-bottom: 8px; }
.srclist { list-style: none; margin: 0; padding: 0; display: grid; }
.srclist li { display: grid; gap: 2px; font-size: 15px; padding: 8px 0; border-top: 2px solid var(--ink); overflow-wrap: anywhere; }
.srclist li:first-child { border-top: 0; }
.srclist small { color: var(--ink-2); }

.foot { font-size: 13px; color: var(--ink-3); padding: 8px 2px 16px; display: grid; gap: 4px; }

/* bottom action bar on product pages */
.bottombar { position: fixed; inset: auto 0 0; z-index: 6; padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--paper); border-top: 3px solid var(--ink); }
.bottombar .btn { width: 100%; max-width: 528px; margin-inline: auto; display: flex; min-height: 54px; }

/* the camera: the live picture stays clear; each control carries its own small backing */
.scanner { position: fixed; inset: 0; z-index: 20; background: #000; color: #fff; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .top, .scanner .bottom { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
.scanner .bottom { grid-row: 3; flex-direction: column; align-items: stretch; padding-top: 12px; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: transparent; }
.scanner .round { width: 48px; height: 48px; border: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; cursor: pointer; padding: 12px; }
.scanner .round[aria-pressed="true"] { background: #fff; color: #000; }
.scanner .hint { justify-self: center; align-self: center; max-width: 100%; text-align: center; font: 700 15px/1.4 var(--fd); padding: 8px 12px; background: rgba(0, 0, 0, .5); }
.scanner .msg { align-self: center; text-align: center; font-size: 15px; padding: 8px 12px; background: rgba(0, 0, 0, .5); }
.ptabs { display: flex; gap: 8px; align-items: center; overflow-x: auto; flex: 1; min-width: 0; justify-content: safe center; }
.ptab { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; font: 900 17px/1 var(--fd); color: #fff; background: rgba(0, 0, 0, .5); border: 0; }
.ptab.on { background: #fff; color: #000; }
.ptab .spin { position: absolute; inset: -4px; width: auto; height: auto; border-width: 2px; border-radius: 0; }
.ptab.add { border: 2px solid #fff; background: rgba(0, 0, 0, .35); cursor: pointer; font-size: 24px; }
.ptab.add[disabled] { opacity: .4; cursor: not-allowed; }
.round-space { width: 48px; height: 48px; flex: none; }
.shots { display: flex; gap: 16px; justify-content: center; min-height: 0; }
.shots:empty { display: none; }
.shot { position: relative; width: 64px; height: 64px; outline: 2px solid #fff; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot .round.sm { position: absolute; top: -10px; inset-inline-end: -10px; width: 28px; height: 28px; padding: 4px; background: #000; outline: 2px solid #fff; }
.shot .round.sm::before { content: ""; position: absolute; inset: -8px; }
.shutterrow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.shutterrow .btn { min-height: 48px; padding: 8px 12px; font-size: 15px; position: relative; }
.shutterrow label.btn { background: rgba(0, 0, 0, .5); color: #fff; border-color: #fff; }
.shutterrow .btn.primary { background: #fff; color: #000; border-color: #fff; }
.shutterrow input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.shutterrow label.btn:focus-within, .scanner :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.shutter { width: 76px; height: 76px; border-radius: 999px; border: 4px solid #000; background: #fff; outline: 3px solid #fff; cursor: pointer; transition: transform .1s ease-out; }
.shutter:active { transform: scale(.94); }
.shutter[disabled] { opacity: .4; cursor: not-allowed; }
.scanner.flash::after { content: ""; position: absolute; inset: 0; z-index: 2; background: #fff; opacity: .7; pointer-events: none; }
.scanner.nocam .shutterrow { grid-template-columns: 1fr 1fr; }

/* a part of the sheet folded until tapped */
details.fold > summary { list-style: none; display: grid; grid-template-columns: 1fr 14px; gap: 12px; align-items: center; cursor: pointer; min-height: 44px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; width: 9px; height: 9px; border: solid var(--ink); border-width: 0 3px 3px 0; transform: rotate(45deg); transition: transform .15s ease-out; }
details.fold[open] > summary::after { transform: rotate(-135deg); }
.fold-t { display: grid; gap: 2px; min-width: 0; }
.fold-t h2 { font: 900 20px/1.2 var(--fd); margin: 0; }
.fold-t small { font-size: 14px; color: var(--ink-2); }
.fold-body { display: grid; gap: 12px; padding-top: 10px; margin-top: 10px; border-top: 6px solid var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .spin { animation: none; border-inline-end-color: currentColor; opacity: .6; }
  .dial .sq { animation: none; }
  .switch input::after, details.src summary::before, details.fold > summary::after { transition: none; }
}

/* how each view sees a contested topic: one row per view, the chosen one marked */
.topics { display: grid; }
details.topic { border-top: 2px solid var(--ink); }
details.topic:first-child { border-top: 0; }
details.topic > summary { list-style: none; display: grid; grid-template-columns: 1fr 12px; gap: 2px 12px; align-items: center; padding: 10px 0; cursor: pointer; min-height: 52px; }
details.topic > summary::-webkit-details-marker { display: none; }
details.topic > summary::after { content: ""; grid-column: 2; grid-row: 1 / span 2; width: 8px; height: 8px; border: solid var(--ink); border-width: 0 3px 3px 0; transform: rotate(45deg); transition: transform .15s ease-out; }
details.topic[open] > summary::after { transform: rotate(-135deg); }
details.topic > summary b { font: 700 16px/1.3 var(--fd); }
.vlist { list-style: none; margin: 0 0 12px; padding: 0; display: grid; border: 2px solid var(--ink); }
.vrow { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px; }
.vrow + .vrow { border-top: 2px solid var(--ink); }
.vrow.on { background: var(--soft); border-inline-start: 6px solid var(--ink); padding-inline-start: 4px; }
.vname { font: 900 14px/1.3 var(--fd); }
.vbody { display: grid; gap: 6px; min-width: 0; font-size: 15px; }

/* rows with a verdict: the checks panel and the fit-for-use row */
.srows { list-style: none; margin: 0; padding: 0; display: grid; }
.srow { padding: 10px 0; border-top: 2px solid var(--ink); display: grid; gap: 6px; }
.srows:first-of-type .srow:first-child { border-top: 0; }
.sline { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 12px; }
.sline .k { font: 700 17px/1.3 var(--fd); min-width: 0; }
.sline .v { font: 900 18px/1.2 var(--fd); }
.sline .q { grid-column: auto; grid-row: auto; }
.sform { font-size: 14px; color: var(--ink-2); }
.snotes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.snote { display: grid; grid-template-columns: 12px 1fr; gap: 12px; align-items: start; font-size: 15px; }
.snote > i { width: 10px; height: 10px; margin-top: 7px; background: var(--band); }
.snote p { line-height: 1.5; }
.snotes.wide { padding-top: 8px; gap: 10px; }

/* your checks: one row per check with its verdict */
.checks .srows .srow:first-child { border-top: 0; }
.checks .sline .v { display: none; }
.srows.use .srow:first-child { border-top: 2px solid var(--ink); }

.whybody { display: grid; gap: 12px; padding-bottom: 8px; }

/* ---------- kinds: the page takes the colour of the home tab, or of the product on screen ---------- */
body[data-kind="dental"] { --paper: var(--k-dent-paper); --soft: var(--k-dent-soft); --kind: var(--k-dent); --kind-ink: var(--k-dent-ink); }
body[data-tint="only"] { --kind: initial; --kind-ink: initial; }
body, body::before, .topbar { transition: background-color .3s ease-out; }
.kindhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; margin: -12px -16px 0; padding: 16px; background: var(--kind); color: var(--on-kind); }
.kindhead .ft { grid-column: 1; }
.kindhead .ico { grid-column: 2; grid-row: 1; width: 56px; height: 56px; }
.home-facts .kindhead .lead { grid-column: 1 / -1; margin-top: 0; color: inherit; }
/* what to photograph: a drawn pack with the part to photograph framed in the kind's colour */
.guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guide-t { font: 700 13px/1.3 var(--fd); padding-block: 12px 8px; }
.gstep { display: grid; gap: 8px; justify-items: center; align-content: start; text-align: center; padding: 12px 8px; border: 2px solid var(--ink); background: var(--panel); }
.gstep .gpic { display: block; width: 100%; max-width: 112px; color: var(--ink); }
.gstep .gpic svg { display: block; width: 100%; height: auto; }
.gstep .gpic .hl { stroke: var(--kind, var(--ink)); }
.gstep .gpic .hlf { fill: var(--kind, var(--ink)); opacity: .2; }
.scanner .gstep .gpic .hlf { opacity: .4; }
.gstep b { display: flex; align-items: center; gap: 8px; font: 700 14px/1.3 var(--fd); }
.gstep .n { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; background: var(--kind, var(--ink)); color: var(--on-kind, var(--on-ink)); font: 900 14px/1 var(--fd); }
.gstep .n .ico { width: 16px; height: 16px; }
.scanner .guide { grid-template-columns: minmax(0, 1fr); }
.scanner .gstep { padding: 8px; border-color: transparent; background: rgba(0, 0, 0, .55); color: #fff; }
.scanner .gstep .gpic { width: 64px; color: #fff; }
.scanner .gstep b { font-size: 13px; }
body[data-kind="dental"] .scanner { --kind: var(--k-dent-cam); }
.scanner .gstep { grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; text-align: start; gap: 12px; }
.scanner .gstep.on { border-color: var(--kind, #fff); }
.scanner .gstep .n { color: #000; }
@media (prefers-reduced-motion: reduce) {
  body, body::before, .topbar { transition: none; }
}

/* first launch: what Daleel is and isn't */
.agree-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.agree-list li { display: grid; grid-template-columns: 12px 1fr; gap: 12px; align-items: start; }
.agree-list li > i { width: 10px; height: 10px; margin-top: 8px; background: var(--kind, var(--ink)); }
.agree-check { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; padding-top: 12px; border-top: 2px solid var(--ink); font-weight: 700; cursor: pointer; }
.agree-check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--kind, var(--ink)); }
.about-links { list-style: none; margin: 0; padding: 0; display: grid; }
.about-links li { border-top: 2px solid var(--ink); }
.about-links a { display: flex; align-items: center; min-height: 44px; font: 700 16px/1.3 var(--fd); }
.foot a { color: var(--ink-3); }
/* privacy policy and terms */
.legal-bar { display: flex; justify-content: space-between; gap: 12px; min-height: 64px; align-items: center; }
.legal { display: grid; gap: 16px; padding-bottom: 32px; }
.legal h2 { font: 900 19px/1.3 var(--fd); margin-top: 8px; }
.legal p, .legal li { max-width: 68ch; }
.legal ul { margin: 0; padding-inline-start: 24px; display: grid; gap: 8px; }

/* the disclaimer under every result */
.disclaimer { display: grid; gap: 8px; padding: 16px; background: var(--alert-bg); color: var(--alert-ink); border: 3px solid var(--alert-ink); }
.disclaimer h2 { display: flex; align-items: center; gap: 8px; font: 900 19px/1.3 var(--fd); }
.disclaimer h2 .ico { width: 22px; height: 22px; }
.disclaimer p { font-size: 15px; }
.disclaimer a { color: inherit; font-weight: 700; }
