/*
 * Decision Maker: the tool's own components, styled in the site's design language (10 Nov 2026, on the UltraCompress Pro
 * template, after the Employee ID Card Generator, whose shared block the first part of this file copies; it came from
 * SpinForge and EngCalc). Base: /libs/site-pages.css (tokens, Inter and Space Grotesk, buttons, theme toggle, focus rings)
 * and /libs/shared-nav.css (the site's header and footer). The second part is the original's components (the list of
 * decisions, the six tabs, the matrix, pros and cons, head to head, the wheel and the coin, the evidence table) on the
 * site's tokens. Light is the default; dark applies when <html> has no data-theme.
 * Assembled once from the Employee ID Card Generator's file and the original's style.css, then edited by hand: this file
 * is the source.
 */


/* ----- Tokens the tool adds ----- */
:root {
    --surface: #ffffff;
    --surface-2: #f3f4f8;
    --ring: rgba(139, 92, 246, 0.18);
    --app-max: 1600px;
    --radius-lg: 16px;
    --line: rgba(0, 0, 0, 0.1);
    --line-strong: rgba(0, 0, 0, 0.24);
    --ok: #166534;
    --ok-soft: rgba(22, 101, 52, 0.09);
    --bad: #b91c1c;
    --bad-soft: rgba(185, 28, 28, 0.08);
    --warn: #92400e;
    --warn-soft: rgba(217, 119, 6, 0.1);
}
:root:not([data-theme="light"]) {
    --surface: #14141f;
    --surface-2: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.26);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, 0.1);
    --bad: #f87171;
    --bad-soft: rgba(248, 113, 113, 0.1);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.1);
}

/* ----- Page: full width, the page provides the side space ----- */
.container.app-container { max-width: calc(var(--app-max) + 2 * var(--content-gutter)); margin-top: 16px; }
@media (min-width: 640px) { .container.app-container { margin-top: 24px; } }

/* ----- The site header is the first thing on the page and stays at the top ----- */
body { padding-top: 0; }
body > header { position: sticky; top: 0; z-index: 50; }
header .site-nav { position: relative; top: auto; }
.theme-toggle { top: 90px; }
@media (max-width: 639.98px) { .theme-toggle { top: 75px; } } /* the header is 81 px tall from 640 px, 65 px below */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ----- Hero ----- */
.app-hero { margin: 0 0 2rem; text-align: center; }
.app-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 1.25rem; font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--text-strong); }
.app-brand img { width: 44px; height: 44px; border-radius: 12px; display: block; }
.app-hero h1 { margin-bottom: 0.75rem; }
.app-tagline { color: var(--text-2); font-size: 1.125rem; line-height: 1.6; max-width: 46rem; margin: 0 auto; }

/* ----- Small helpers ----- */
main [hidden], .dialog [hidden] { display: none !important; } /* the script hides fields that carry their own display */
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--text-2); }
.small { font-size: 0.9rem; }
.block { display: block; }
.hint { color: var(--text-3); font-size: 0.8rem; font-weight: 400; line-height: 1.45; }
.err { color: var(--bad); font-size: 0.85rem; font-weight: 600; }
.err:empty { display: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link:hover { color: var(--link-hover); }
code { font-size: 0.85em; padding: 1px 6px; border-radius: 6px; background: var(--code-bg); color: var(--code-text); }
kbd { font-family: inherit; font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--chip-border); background: var(--chip); color: var(--text-strong); }

/* ----- Buttons ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9999px; font-family: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1.2; padding: 12px 24px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .ico { width: 17px; height: 17px; }
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text-strong); border: 1px solid var(--surface-border); padding: 11px 23px; }
.btn-secondary:hover:not(:disabled) { border-color: var(--brand); color: var(--link); transform: translateY(-2px); }
.btn-danger { background: var(--surface); color: var(--danger); border: 1px solid rgba(185, 28, 28, 0.35); padding: 11px 23px; }
.btn-danger:hover:not(:disabled) { background: var(--danger-strong); color: #fff; border-color: transparent; transform: translateY(-2px); }
.btn-sm { font-size: 0.85rem; padding: 9px 16px; }
.btn-secondary.btn-sm, .btn-danger.btn-sm { padding: 8px 15px; }
.btn-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); flex-shrink: 0; padding: 0; font-family: inherit; transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.icon-btn:hover { border-color: var(--brand); color: var(--link); background: var(--surface); }
.icon-btn.del:hover { border-color: var(--danger); color: var(--danger); }
.icon-btn:focus-visible, .link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ----- Toolbar ----- */
.app-shell { margin: 0 0 3rem; scroll-margin-top: 90px; }
.app-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 0 0 1.25rem; }
.toolbar-left, .toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 10px; border-radius: 9999px; border: 1px solid var(--tint-brand-border); background: var(--tint-brand); min-width: 220px; max-width: 100%; }
.status-icon { font-size: 1.3rem; line-height: 1; }
.status-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.status-main { font-weight: 700; font-size: 0.85rem; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-sub { font-size: 0.72rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 9999px; background: var(--surface-2); max-width: 100%; }
.view-tab { padding: 8px 16px; border: 0; border-radius: 9999px; background: transparent; font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.view-tab:hover { color: var(--link); }
.view-tab.active { background: var(--gradient-brand); color: #fff; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.view-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.view[hidden] { display: none; }
.shell-hint { margin-top: 14px; }

/* ----- Fields ----- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.label { font-weight: 600; font-size: 0.85rem; color: var(--text-strong); }
.input, .select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 14px; background: var(--field); border: 1px solid var(--field-border); border-radius: 12px; font-family: inherit; font-size: 0.95rem; color: var(--text); outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.input::placeholder { color: var(--placeholder); }
.input[aria-invalid="true"] { border-color: var(--bad); }
textarea.input { resize: vertical; min-height: 84px; line-height: 1.5; }
input[type="time"].input { color-scheme: light; width: 9em; }
:root:not([data-theme="light"]) input[type="time"].input { color-scheme: dark; }
.select { width: auto; max-width: 100%; appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; cursor: pointer; }
.select option { color: #0a0a14; background: #fff; }
.num-input { width: 7.5em; }
.num-input.wide { width: 10em; }
.check-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 0.925rem; color: var(--text); padding: 4px 0; }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--surface); font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.seg button:hover { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.seg button[aria-checked="true"] { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--chip); font-family: inherit; font-size: 0.8rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.chip .ico { width: 15px; height: 15px; color: var(--link); }
.chip:hover { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ----- Windows ----- */
.dialog { margin: auto; border: 1px solid var(--surface-border); border-radius: 20px; padding: 0; width: min(520px, calc(100vw - 16px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); }
.dialog--narrow { width: min(420px, calc(100vw - 16px)); }
.dialog--wide { width: min(680px, calc(100vw - 16px)); }
.dialog::backdrop { background: rgba(10, 10, 20, 0.6); backdrop-filter: blur(6px); }
.dialog[open] { animation: pop 0.2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
.dialog-head { padding: 18px 20px; border-bottom: 1px solid var(--surface-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-title { margin: 0; font-size: 1.15rem; }
.dialog-close { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--chip-border); background: var(--chip); color: var(--text-strong); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: border-color 0.2s ease, color 0.2s ease; }
.dialog-close:hover { border-color: var(--brand); color: var(--link); }
.dialog-body { padding: 20px; overflow-y: auto; max-height: calc(100vh - 210px); display: flex; flex-direction: column; gap: 14px; }
.dialog-actions { padding: 14px 20px; border-top: 1px solid var(--surface-border); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.confirm-message { margin: 0; color: var(--text); }
.help-body h3 { margin: 6px 0 0; font-size: 1rem; }
.help-body p { margin: 0; color: var(--text-2); }

/* ----- Toasts ----- */
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { pointer-events: auto; background: #0a0a14; color: #fff; border: 1px solid rgba(255, 255, 255, 0.12); border-left: 4px solid var(--brand); border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); min-width: 260px; max-width: 420px; font-size: 0.875rem; font-weight: 500; overflow-wrap: anywhere; animation: slideIn 0.3s ease; transition: opacity 0.3s ease, transform 0.3s ease; }
.toast button { background: none; border: 0; padding: 0; color: #c4b5fd; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; white-space: nowrap; }
.toast.leaving { opacity: 0; transform: translateX(40px); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.toast.good { border-left-color: #4ade80; }
.toast.bad { border-left-color: #f87171; }

/* ----- Information sections ----- */
.info-section { margin: 0 0 2.5rem; }
.info-section h2 { font-size: 1.75rem; margin: 0 0 1.25rem; }
.info-section .info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 1rem 0 1.5rem; }
.info-stack { display: grid; gap: 12px; }
.info-card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: 16px; box-shadow: var(--surface-shadow); padding: 20px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--surface-hover-shadow); }
.info-card--small { padding: 16px; box-shadow: none; }
.info-card h3 { margin: 0 0 0.75rem; font-size: 1.15rem; }
.info-card p { color: var(--text-2); margin-bottom: 0.75rem; }
.info-card p:last-child { margin-bottom: 0; }
.step-card { position: relative; padding-top: 24px; }
.step-num { position: absolute; top: -16px; left: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--gradient-brand); color: #fff; font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 0.75rem; }
.step-head h3 { margin: 0; }
.step-emoji { font-size: 1.6rem; line-height: 1; }
.info-section details.info-card { padding: 0; }
.info-section details.info-card summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--text-strong); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.info-section details.info-card summary::-webkit-details-marker { display: none; }
.info-section details.info-card summary::after { content: '+'; color: var(--link); font-weight: 700; font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.info-section details.info-card[open] summary::after { content: '\2212'; }
.info-section details.info-card p { padding: 0 20px 16px; margin: 0; color: var(--text-2); }

/* ===== Decision Maker components ===== */

/* ----- The site's text rules (p, ul, li, headings) must not reach the tool: same weight as the site's, loaded later ----- */
:where(.app-shell) p, :where(.app-shell) ul, :where(.app-shell) li, :where(.dialog) p { margin: 0; line-height: 1.5; }
:where(.app-shell) ul { padding: 0; list-style: none; }
:where(.app-shell) h2, :where(.app-shell) h3, :where(.app-shell) h4 { margin: 0; line-height: 1.25; }
:root { --head: 81px; }
@media (max-width: 639.98px) { :root { --head: 65px; } }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.count { color: var(--text-3); font-weight: 500; font-size: 0.9em; }
.muted-h { color: var(--text-3); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.lead { color: var(--text-2); max-width: 46rem; }
.screen { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.panel { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.copy-scratch { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.copy-box { font-size: 0.85rem; word-break: break-all; }

/* ----- Cards: the site's white cards, one layer ----- */
.card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-lg); box-shadow: var(--surface-shadow); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card:empty { display: none; }
.card h3 { font-size: 1.1rem; color: var(--text-strong); }
.card.slim { padding: 14px 20px; }
.card.center { align-items: center; text-align: center; }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.card-head > div:first-child { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid-2.tight { gap: 14px; }
@media (min-width: 640px) { .grid-2.tight { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid-2 > * { min-width: 0; }

/* ----- Fields ----- */
.field > span:first-child { font-weight: 600; font-size: 0.85rem; color: var(--text-strong); }
input[type="date"].input { color-scheme: light; }
:root:not([data-theme="light"]) input[type="date"].input { color-scheme: dark; }
textarea.input { min-height: 72px; }
.input.big { min-height: 52px; font-size: 1.05rem; padding: 12px 16px; }
.seg button[aria-pressed="true"] { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.seg .ico { width: 15px; height: 15px; }
.check { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 0.9rem; cursor: pointer; min-height: 36px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; flex: none; }
.add-row { display: flex; gap: 8px; }
.add-row .input { flex: 1; }
.add-row .btn, .pc-add .btn { width: 44px; height: 44px; padding: 0; flex: none; }
.pc-add .btn { background: var(--surface); color: var(--text-strong); border: 1px solid var(--surface-border); width: 40px; height: 40px; }
.pc-add .btn:hover { border-color: var(--brand); color: var(--link); transform: translateY(-2px); }
.hint:empty { display: none; }
.scroll-hint { font-size: 0.8rem; color: var(--text-3); margin-top: -6px; }
.scroll-hint:empty { display: none; }
.x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); display: inline-grid; place-items: center; cursor: pointer; padding: 0; flex: none; transition: background 0.2s ease, color 0.2s ease; }
.x:hover { background: var(--bad-soft); color: var(--bad); }
.x:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.x .ico { width: 16px; height: 16px; }

/* ----- The list of decisions ----- */
.start-card { gap: 16px; }
.start-card h2 { font-size: 1.5rem; color: var(--text-strong); }
.new-form { display: flex; gap: 10px; flex-wrap: wrap; }
.new-form .input { flex: 1 1 260px; width: auto; }
.quick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.9rem; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.list-head h2 { font-size: 1.35rem; color: var(--text-strong); }
.list-head .select { width: auto; }
.decision-list { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.decision-list:empty { display: none; }
@media (min-width: 640px) { .decision-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .decision-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dcard { position: relative; background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-lg); box-shadow: var(--surface-shadow); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; min-width: 0; }
.dcard:hover { transform: translateY(-4px); box-shadow: var(--surface-hover-shadow); border-color: var(--brand); }
.dcard-open { display: flex; flex-direction: column; gap: 8px; width: 100%; height: 100%; text-align: left; padding: 16px 60px 16px 18px; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; border-radius: var(--radius-lg); }
.dcard-open:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.dcard .t { font-weight: 700; font-size: 1.02rem; color: var(--text-strong); overflow-wrap: anywhere; }
.dcard .choice { font-size: 0.9rem; color: var(--text-2); overflow-wrap: anywhere; }
.dcard .choice strong { color: var(--text-strong); }
.stars-txt { color: var(--warn); letter-spacing: 1px; }
.dcard .meta { color: var(--text-3); font-size: 0.8rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dcard .del { position: absolute; top: 10px; right: 10px; }
.pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; background: var(--surface-2); color: var(--text-2); }
.pill.open, .state-pill { background: var(--tint-brand); color: var(--link); }
.pill.decided, .state-pill.decided { background: var(--ok-soft); color: var(--ok); }
.pill.reviewed, .state-pill.reviewed { background: var(--warn-soft); color: var(--warn); }
.pill.due { background: var(--bad-soft); color: var(--bad); }
.empty { color: var(--text-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 28px; text-align: center; }
.empty.inline { padding: 20px; }
.empty .btn { margin-top: 12px; }
li.empty { grid-column: 1 / -1; }

/* ----- One decision: the title, the tabs ----- */
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.title-input { flex: 1 1 260px; min-width: 0; font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: clamp(1.35rem, 1rem + 1.5vw, 1.9rem); font-weight: 700; color: var(--text-strong); background: transparent; border: 1px solid transparent; border-radius: 12px; padding: 6px 10px; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.title-input::placeholder { color: var(--placeholder); }
.title-input:hover { border-color: var(--surface-border); }
.title-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.state-pill { font-size: 0.8rem; font-weight: 700; padding: 4px 12px; border-radius: 9999px; }
.view-tabs { overflow-x: auto; scrollbar-width: thin; align-self: flex-start; flex-wrap: nowrap; }
.view-tab { display: inline-flex; align-items: center; gap: 7px; position: relative; }
.view-tab .ico { width: 16px; height: 16px; }
.view-tab .done { position: absolute; top: 4px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.view-tab.active .done { background: #fff; }

/* ----- Frame ----- */
.advice { border-radius: 12px; padding: 12px 14px; background: var(--tint-brand); font-size: 0.925rem; display: flex; gap: 10px; align-items: flex-start; color: var(--text); }
.advice .ico { color: var(--link); margin-top: 2px; }
.advice:empty { display: none; }
.advice .link { font-weight: 700; }
.option-list { display: flex; flex-direction: column; gap: 8px; }
.option-list:empty { display: none; }
.option-list li { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border: 1px solid var(--surface-border); border-radius: 12px; background: var(--surface-2); }
.option-list li.dragging { opacity: 0.4; }
.option-list li.over { border-color: var(--brand); }
.option-list .grip { color: var(--text-3); cursor: grab; display: grid; place-items: center; }
.option-list .swatch { width: 10px; height: 28px; border-radius: 4px; flex: none; }
.option-list input { flex: 1; min-width: 0; border: 1px solid transparent; background: transparent; padding: 6px 8px; border-radius: 8px; font: inherit; color: var(--text); }
.option-list input:hover { border-color: var(--surface-border); }
.option-list input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); background: var(--field); }

/* ----- Weigh: the matrix ----- */
.matrix-wrap { overflow-x: auto; }
.matrix-wrap:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.matrix { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; font-size: 0.9rem; margin: 0; }
.matrix col.c-opt { width: 170px; }
.matrix col.c-total { width: 76px; }
.matrix th, .matrix td { padding: 8px; border: 0; border-bottom: 1px solid var(--surface-border); text-align: left; vertical-align: middle; background: none; color: var(--text); }
.matrix thead th { color: var(--text-3); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.matrix th.opt { font-weight: 700; color: var(--text-strong); overflow-wrap: anywhere; font-size: 0.9rem; }
.matrix th.opt .swatch { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.crit-cell { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.crit-name { display: flex; align-items: center; gap: 4px; }
.crit-name input { flex: 1; min-width: 0; border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 8px; font: inherit; font-weight: 700; font-size: 0.9rem; color: var(--text-strong); text-transform: none; letter-spacing: 0; }
.crit-name input:hover { border-color: var(--surface-border); }
.crit-name input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); background: var(--field); }
.weight { display: flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 0.8rem; color: var(--text-2); }
.weight input[type="range"], .score input[type="range"] { width: 100%; min-width: 60px; accent-color: var(--brand); }
.weight .wv, .score .sv { min-width: 1.6em; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-strong); }
.score { display: flex; align-items: center; gap: 6px; }
.matrix td.total { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.matrix tr.lead td.total { color: var(--link); }

/* ----- Rankings and verdicts (every tab) ----- */
.ranking { display: flex; flex-direction: column; gap: 10px; }
.rank-row { display: grid; grid-template-columns: 1.6em minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rank-row .n { color: var(--text-3); font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-row .bar { height: 34px; border-radius: 10px; background: var(--surface-2); position: relative; overflow: hidden; }
.rank-row .bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 10px; opacity: 0.35; transition: width 0.3s ease; } /* light enough that the name on it stays readable */
.rank-row .bar > b { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 12px; font-weight: 700; font-size: 0.9rem; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row .v { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 3em; text-align: right; color: var(--text-strong); }
.rank-row.winner .bar > b::after { content: " \2713"; color: var(--ok); }
.verdict { border-radius: 12px; padding: 12px 14px; font-size: 0.925rem; display: flex; gap: 10px; align-items: flex-start; color: var(--text); }
.verdict .ico { margin-top: 2px; }
.verdict strong { color: var(--text-strong); }
.verdict.good { background: var(--ok-soft); }
.verdict.good .ico { color: var(--ok); }
.verdict.warn { background: var(--warn-soft); }
.verdict.warn .ico { color: var(--warn); }
.verdict.info { background: var(--tint-brand); }
.verdict.info .ico { color: var(--link); }
.contrib { display: flex; flex-direction: column; gap: 8px; font-size: 0.875rem; }
.contrib .c-row { display: grid; grid-template-columns: minmax(90px, 180px) minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.contrib .c-row > span:first-child { overflow-wrap: anywhere; }
.contrib .c-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.contrib .c-bar > i { display: block; height: 100%; background: var(--gradient-brand); border-radius: 4px; }
.contrib .c-val { color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 3em; text-align: right; }

/* ----- Pros and cons ----- */
.pros-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.pros-grid:empty { display: none; }
@media (min-width: 760px) { .pros-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .pros-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pc-head h3 { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; min-width: 0; }
.pc-card .swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.net { font-weight: 800; font-variant-numeric: tabular-nums; padding: 2px 10px; border-radius: 9999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.net.pos { background: var(--ok-soft); color: var(--ok); }
.net.neg { background: var(--bad-soft); color: var(--bad); }
.pc-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pc-col { min-width: 0; }
.pc-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.pc-col.pro h4 { color: var(--ok); }
.pc-col.con h4 { color: var(--bad); }
.pc-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.pc-list:empty { display: none; }
.pc-list li { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 10px; background: var(--surface-2); }
.pc-list .txt { font-size: 0.9rem; overflow-wrap: anywhere; }
.pc-list .ctl { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pc-list .x { width: 28px; height: 28px; }
.dots { display: inline-flex; gap: 2px; }
.dot-btn { width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0; background: transparent; display: inline-grid; place-items: center; cursor: pointer; }
.dot-btn::before { content: ""; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--text-3); display: block; box-sizing: border-box; }
.pc-col.pro .dot-btn.on::before { background: var(--ok); border-color: var(--ok); }
.pc-col.con .dot-btn.on::before { background: var(--bad); border-color: var(--bad); }
.dot-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.pc-add { display: flex; gap: 6px; }
.pc-add .input { min-height: 40px; padding: 8px 12px; font-size: 0.875rem; }

/* ----- Head to head ----- */
.duel-progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.duel-progress > i { display: block; height: 100%; background: var(--gradient-brand); transition: width 0.25s ease; }
.duel-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; margin-top: 6px; }
.duel-opt { border: 2px solid var(--surface-border); background: var(--surface-2); border-radius: 16px; padding: 28px 18px; font: inherit; font-size: 1.15rem; font-weight: 700; color: var(--text-strong); text-align: center; min-height: 120px; display: grid; place-items: center; cursor: pointer; transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease; overflow-wrap: anywhere; }
.duel-opt:hover { border-color: var(--brand) !important; background: var(--tint-brand); transform: translateY(-2px); } /* the script sets a faint border colour inline */
.duel-opt:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.duel-opt .key { display: block; font-size: 0.75rem; color: var(--text-3); font-weight: 600; margin-top: 6px; }
.duel-pair .vs { align-self: center; color: var(--text-3); font-weight: 800; font-size: 0.9rem; }
.duel-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text-3); font-size: 0.85rem; margin-top: 8px; }
@media (max-width: 560px) { .duel-pair { grid-template-columns: minmax(0, 1fr); } .duel-pair .vs { justify-self: center; } }

/* ----- Spin and coin ----- */
.spin-layout { align-items: start; }
.rand-box { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.wheel-stage { position: relative; width: min(100%, 380px); aspect-ratio: 1; margin: 10px auto 0; }
.wheel-stage canvas { width: 100%; height: 100%; display: block; border-radius: 50%; box-shadow: var(--surface-hover-shadow); }
.pointer { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); z-index: 2; width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 28px solid var(--text-strong); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25)); }
.spin-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; width: 24%; aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--surface); background: var(--gradient-brand); color: #fff; font: inherit; font-weight: 800; font-size: clamp(0.85rem, 2.5vw, 1rem); text-transform: uppercase; letter-spacing: 0.04em; box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4); cursor: pointer; padding: 0; transition: transform 0.2s ease; }
.spin-btn:hover:not(:disabled) { transform: translate(-50%, -50%) scale(1.06); }
.spin-btn:disabled { cursor: wait; }
.spin-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.coin-stage { perspective: 900px; height: 220px; display: grid; place-items: center; width: 100%; }
.coin { position: relative; width: 180px; height: 180px; transform-style: preserve-3d; transition: transform 1.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.coin .face { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; backface-visibility: hidden; -webkit-backface-visibility: hidden; padding: 12px; text-align: center; overflow-wrap: anywhere; border: 6px solid rgba(0, 0, 0, 0.12); }
.coin .heads { background: linear-gradient(145deg, #ffd56b, #e0a51a); color: #4a3200; }
.coin .tails { background: linear-gradient(145deg, #d9dde8, #9aa3b8); color: #1f2433; transform: rotateY(180deg); }
.coin-labels { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 360px; }
.rand-result { min-height: 60px; }
.rand-result .big-res { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.75rem; font-weight: 800; color: var(--text-strong); overflow-wrap: anywhere; display: flex; align-items: center; gap: 12px; }
.res-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.gut { display: flex; flex-direction: column; gap: 10px; }
.gut-row { display: flex; gap: 8px; flex-wrap: wrap; }
.gut-btn { padding: 8px 16px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--surface); font-family: inherit; font-weight: 600; font-size: 0.875rem; color: var(--text-strong); cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.gut-btn:hover { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.gut-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.insight { font-size: 0.925rem; border-radius: 12px; padding: 12px 14px; background: var(--warn-soft); color: var(--text); }
.insight:empty { display: none; }
.history { display: flex; flex-direction: column; gap: 4px; font-size: 0.875rem; color: var(--text-2); max-height: 220px; overflow: auto; }
.history:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.history li { display: flex; justify-content: space-between; gap: 8px; }
.history b { color: var(--text-strong); font-weight: 700; overflow-wrap: anywhere; }

/* ----- Decide ----- */
.evidence { overflow-x: auto; }
.evidence:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.evidence table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.9rem; margin: 0; }
.evidence th, .evidence td { padding: 8px; border: 0; border-bottom: 1px solid var(--surface-border); text-align: left; background: none; color: var(--text); }
.evidence thead th { color: var(--text-3); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.evidence td.num { font-variant-numeric: tabular-nums; }
.evidence tr.lead td { font-weight: 800; color: var(--text-strong); }
.medal { display: inline-block; min-width: 1.8em; padding: 1px 6px; border-radius: 6px; font-size: 0.78rem; font-weight: 800; text-align: center; background: var(--surface-2); color: var(--text-2); }
.medal.m1 { background: var(--tint-brand); color: var(--link); }
.choice-grid { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice-btn { text-align: left; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--surface-border); background: var(--surface-2); font: inherit; font-weight: 600; color: var(--text-strong); display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; cursor: pointer; transition: border-color 0.2s ease, transform 0.2s ease; }
.choice-btn:hover { border-color: var(--brand); transform: translateY(-1px); }
.choice-btn[aria-pressed="true"] { border-color: var(--brand); background: var(--tint-brand); }
.choice-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice-btn .swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.choice-btn .lean { margin-left: auto; font-size: 0.75rem; color: var(--link); font-weight: 700; white-space: nowrap; }
.decided-box { display: flex; flex-direction: column; gap: 12px; }
.decided-box .big-choice { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--text-strong); overflow-wrap: anywhere; }
.stars { display: inline-flex; gap: 6px; }
.star { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--chip-border); background: var(--surface); font-size: 1.15rem; color: var(--text-3); cursor: pointer; padding: 0; display: inline-grid; place-items: center; font-family: inherit; }
.star.on { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.star:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.stars-shown { gap: 2px; vertical-align: middle; }
.stars-shown .star { width: 26px; height: 26px; font-size: 0.95rem; cursor: default; border-radius: 7px; }
.quote { border-left: 3px solid var(--line-strong); padding: 4px 12px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ----- Confetti over the page ----- */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ----- Phones ----- */
@media (max-width: 639px) {
    .app-hero { margin-bottom: 1.5rem; }
    .app-tagline { font-size: 1rem; }
    .app-toolbar { gap: 10px; }
    .toolbar-left, .toolbar-right { width: 100%; }
    .toolbar-right:empty { display: none; }
    .status-pill { min-width: 0; }
    .toolbar-left { flex-wrap: nowrap; }
    .toolbar-left > .btn { flex: none; }
    .status-pill { flex: 1 1 auto; }
    .toolbar-right .btn { flex: 1 1 auto; }
    .title-input { flex-basis: 100%; }
    .card { padding: 16px; }
    .card.slim { padding: 12px 16px; }
    .start-card h2 { font-size: 1.3rem; }
    .pc-cols { grid-template-columns: minmax(0, 1fr); }
    .weight { flex-wrap: wrap; }
    .weight .muted { flex-basis: 100%; } /* the word "Weight" above its slider: at 16 px it ran into the next column */
    .toasts { bottom: 16px; right: 16px; left: 16px; align-items: stretch; }
    .toast { min-width: 0; max-width: none; }
    .dialog-body, .dialog-head, .dialog-actions { padding-left: 16px; padding-right: 16px; }
    .info-section h2 { font-size: 1.4rem; }
    .info-section .info-grid, .info-three { grid-template-columns: 1fr; }
    .info-card { padding: 16px; }
    .step-num { left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .btn, .info-card, .dialog, .toast, .seg button, .dcard, .duel-opt, .choice-btn, .gut-btn, .chip, .spin-btn, .coin, .rank-row .bar > i, .duel-progress > i, .x { transition: none; animation: none; }
}

/* Phones: 16 px text, 44 px tap targets (AdSense audit H-04, 8 Oct 2026). The wheel itself is a drawing. */
@media (max-width: 639.98px) {
    main button, main select, main summary, main [role="button"],
    main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]) { min-height: 44px; }
    main .seg button, main .view-tab { min-height: 44px; }
    main .x, main .icon-btn, main .dot-btn, main .star { width: 44px; height: 44px; min-width: 44px; }
    main .pc-list .x { width: 44px; height: 44px; }
    main .stars-shown .star { width: 26px; height: 26px; min-width: 0; min-height: 0; }
    main .pc-add .btn { width: 44px; height: 44px; }
    main .check { min-height: 44px; }
    main .check input { width: 22px; height: 22px; }
    main :is(p, li, .hint, .label, .field > span, .status-main, .status-sub, .form-hint, .input, .select, kbd, .seg button, .chip,
        .gut-btn, .muted, .pill, .state-pill, .meta, .choice, .txt, .key, .duel-meta, .history, .contrib, .matrix, .evidence table,
        .medal, .lean, .view-tab, .advice, .verdict, .insight, .net, .count, .scroll-hint, .check, .muted-h, .weight, .rank-row .bar > b,
        .crit-name input, .option-list input, .pc-add .input, .c-val, .vs) { font-size: 1rem; }
    .dialog button, .dialog .btn, .dialog select, .dialog input:not([type="checkbox"]) { min-height: 44px; }
    .dialog .dialog-close { width: 44px; height: 44px; }
    .dialog :is(p, .hint, .label, .input) { font-size: 1rem; }
}
