/* Enigmerra player theme — "Cabinet of Curiosities" (dark academia), ported from the
   approved Lovable redesign. Warm ivory surfaces, espresso ink, oxblood actions, brass
   accents, high-contrast serif display. Class hooks match the existing views. */
:root {
    /* surfaces */
    --bg:            #faf5ea;   /* page ivory */
    --surface:       #fffaf0;   /* cards */
    --surface-2:     #f6eedd;   /* subtle wells */
    /* ink */
    --ink:           #3a2c22;   /* body text */
    --ink-deep:      #14100c;   /* headings */
    --muted:         #6b5744;   /* secondary text */
    --panel-dark:    #17110b;   /* always-dark panels (grid head, reasoning, decree) */
    --panel-ink:     #f0e6cf;
    /* actions & accents */
    --oxblood:       #a02532;
    --oxblood-dark:  #8a1e28;
    --oxblood-deep:  #500a12;
    --brass:         #c9a24a;
    --brass-dark:    #a07d2c;
    --candle:        #f3c266;
    --teal:          #2f6b62;   /* success / „rezolvat" */
    /* lines & depth */
    --border:        rgba(58, 44, 34, .16);
    --border-brass:  rgba(160, 125, 44, .40);
    --sh:            0 6px 24px rgba(58, 44, 34, .10);
    --sh-sm:         0 2px 8px rgba(58, 44, 34, .08);
    --r:   14px;
    --r-sm: 8px;
    /* type */
    --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
    --body:  'Source Serif 4', Georgia, serif;
    --sans:  'Inter', system-ui, sans-serif;
}
:root[data-theme="dark"] {
    --bg:            #14100c;
    --surface:       #1f1811;
    --surface-2:     #271e15;
    --ink:           #e6d9b8;
    --ink-deep:      #f4ead1;
    --muted:         #b8a67e;
    --panel-dark:    #271d12;
    --panel-ink:     #f0e6cf;
    --oxblood:       #b93a48;
    --oxblood-dark:  #a02532;
    --oxblood-deep:  #7a1e28;
    --brass:         #d4b062;
    --brass-dark:    #b8934a;
    --teal:          #6aa79a;
    --border:        rgba(230, 217, 184, .16);
    --border-brass:  rgba(212, 176, 98, .35);
    --sh:            0 6px 26px rgba(0, 0, 0, .5);
    --sh-sm:         0 2px 10px rgba(0, 0, 0, .4);
}

/* faint parchment texture over the ivory (light mode only) */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: url('kit/backgrounds/parchment.jpg') center / cover; opacity: .14; }
:root[data-theme="dark"] body::before { display: none; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--body);
    font-size: 100%;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
}
/* faint sky/paper wash behind the header/hero region */
body::before {
    content: ''; position: fixed; inset: 0 0 auto; height: 60vh; z-index: -2; pointer-events: none;
    background: radial-gradient(120% 80% at 50% -10%, rgba(201, 162, 74, .10), transparent 60%);
}
:root[data-theme="dark"] body::before { background: radial-gradient(120% 80% at 50% -10%, rgba(243, 194, 102, .08), transparent 60%); }
@media (min-width: 900px) { body { font-size: 112.5%; } }

a { color: var(--oxblood); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--oxblood-dark); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; color: var(--ink-deep); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: .3rem 0 .5rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

.small-caps, .eticheta { font-family: var(--sans); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 600; }
.muted { color: var(--muted); }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 2px; }

/* keyboard skip link */
.skip-link {
    position: absolute; left: .5rem; top: -3rem; z-index: 100;
    background: var(--oxblood); color: #fff; padding: .55rem 1rem; text-decoration: none;
    border-radius: var(--r-sm); transition: top .15s ease;
}
.skip-link:focus { top: .5rem; }
main.wrap:focus { outline: none; }

/* visually-hidden but accessible to screen readers */
.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;
}

/* ============================================================ icons (mask, brass) */
.ic {
    display: inline-block; width: 1.35em; height: 1.35em; vertical-align: -.28em; flex: none;
    background-color: var(--brass-dark);
    -webkit-mask: var(--m) no-repeat center / contain; mask: var(--m) no-repeat center / contain;
    -webkit-mask-mode: alpha; mask-mode: alpha;
}
.ic-quill{--m:url(ornaments/ic-quill.svg)} .ic-key{--m:url(ornaments/ic-key.svg)}
.ic-scroll{--m:url(ornaments/ic-scroll.svg)} .ic-candle{--m:url(ornaments/ic-candle.svg)}
.ic-magnifier{--m:url(ornaments/ic-magnifier.svg)} .ic-crown{--m:url(ornaments/ic-crown.svg)}
.ic-gavel{--m:url(ornaments/ic-gavel.svg)} .ic-chalice{--m:url(ornaments/ic-chalice.svg)}
.ic-mappin{--m:url(ornaments/ic-mappin.svg)} .ic-portrait{--m:url(ornaments/ic-portrait.svg)}
.ic-castle{--m:url(ornaments/ic-castle.svg)} .ic-book{--m:url(ornaments/ic-book.svg)}

/* ============================================================ header */
header.topbar { background: color-mix(in srgb, var(--surface) 88%, transparent); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(6px); }
header.topbar .inner { max-width: 1140px; margin: 0 auto; padding: .7rem 1.2rem; display: flex; gap: 1.2rem; align-items: center; }
header.topbar .brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
header.topbar .brand .crest { width: 2.7rem; height: 2.7rem; flex: none; object-fit: contain; }
header.topbar .brand .word { font-family: var(--serif); font-size: 1.5rem; color: var(--ink-deep); letter-spacing: 0; }
header.topbar nav { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
header.topbar nav a {
    font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
    font-size: .72rem; color: var(--muted); text-decoration: none; padding: .5rem .7rem;
    border-bottom: 2px solid transparent; white-space: nowrap;   /* never break inside a label */
}
header.topbar nav a:hover { color: var(--ink-deep); }
header.topbar nav a[aria-current="page"] { color: var(--ink-deep); border-bottom-color: var(--brass); }
header.topbar nav { margin: 0 auto; flex-wrap: nowrap; }
/* Below comfortable desktop the menu must stay on ONE line: tighten the tracking
   instead of wrapping to a second row, which reads as a broken header. */
@media (max-width: 1100px) and (min-width: 721px) {
    header.topbar nav a { letter-spacing: .04em; padding: .5rem .35rem; font-size: .68rem; }
}
/* On tablets there is no room left even tightened: let the row slide sideways
   rather than break. Under 720px the bottom bar takes over and this is hidden. */
@media (max-width: 900px) and (min-width: 721px) {
    header.topbar nav { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
    header.topbar nav::-webkit-scrollbar { display: none; }
}
.header-actions { display: flex; align-items: center; gap: .5rem; }
.nav-cta { white-space: nowrap; }
.theme-toggle {
    background: var(--surface); border: 1px solid var(--border-brass); color: var(--ink);
    border-radius: var(--r-sm); width: 2.5rem; height: 2.5rem; cursor: pointer; font-size: 1rem;
    display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s;
}
.theme-toggle:hover { border-color: var(--brass); }
.theme-toggle img { width: 1.25rem; height: 1.25rem; display: block; }
.theme-toggle .tg-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .tg-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .tg-moon { display: block; filter: invert(1) brightness(1.15); }

main.wrap { max-width: 1140px; margin: 2rem auto 5rem; padding: 0 1.2rem; }
.footer { border-top: 1px solid var(--border); color: var(--muted); text-align: center; padding: 2rem 1rem; font-family: var(--sans); font-size: .82rem; letter-spacing: .04em; }
.footer::before { content: ''; display: block; width: 120px; height: 1px; margin: 0 auto 1rem; background: var(--border-brass); }

/* ============================================================ flash */
.flash { padding: .7rem 1rem; margin: 1rem 0; border: 1px solid; border-radius: var(--r-sm); font-family: var(--sans); }
.flash-error { border-color: var(--oxblood); color: var(--oxblood-dark); background: color-mix(in srgb, var(--oxblood) 8%, var(--surface)); }
.flash-ok { border-color: var(--teal); color: var(--teal); background: color-mix(in srgb, var(--teal) 8%, var(--surface)); }

/* ============================================================ section labels (Inter caps + rule) */
.rubric, .case-clues > h2, .case-grid > h2, .case-verdict > h2, .hints > h2, .case-suspects > h2 {
    display: flex; align-items: center; gap: 1rem; margin: 2rem 0 1rem;
    font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .18em;
    font-size: .78rem; color: var(--brass-dark); line-height: 1;
}
.rubric::after, .case-clues > h2::after, .case-grid > h2::after,
.case-verdict > h2::after, .hints > h2::after, .case-suspects > h2::after {
    content: ''; flex: 1; height: 1px; background: var(--border-brass);
}
.rubric::before, .case-clues > h2::before { content: none; }
.band { font-family: var(--sans); text-transform: uppercase; letter-spacing: .16em; font-weight: 600; font-size: .78rem; color: var(--brass-dark); margin: 1.6rem 0 1rem; }

/* ============================================================ cards */
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 1.3rem 1.5rem; margin: 1.4rem 0; box-shadow: var(--sh); }
.card::before, .card::after { content: none; }   /* clean — no filigree corners */
.card.seal { border-left: 3px solid var(--oxblood); }
.card.warn { border-left: 3px solid var(--brass); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

.badge { display: inline-flex; align-items: center; font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: .18rem .6rem; border: 1px solid var(--border-brass); border-radius: 999px; color: var(--brass-dark); background: transparent; }
.badge[class*="tier-"] { color: var(--brass-dark); }

/* ============================================================ buttons */
button, .btn {
    font-family: var(--sans); font-weight: 600; font-size: .92rem; letter-spacing: .01em; cursor: pointer;
    border: 1px solid var(--ink-deep); border-radius: 999px; background: var(--ink-deep); color: var(--surface);
    padding: .62rem 1.4rem; text-decoration: none; display: inline-block; text-align: center;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); }
button.secondary, .btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--border-brass); }
button.secondary:hover, .btn.secondary:hover { border-color: var(--brass); }
button.seal-btn, .btn.seal-btn, .ribbon, .case-verdict button[type="submit"] {
    background: linear-gradient(180deg, var(--oxblood), var(--oxblood-dark)); color: #fff; border: 1px solid var(--oxblood-deep);
    border-radius: 999px; padding: .68rem 1.7rem; box-shadow: 0 4px 14px rgba(80, 10, 18, .25);
}
button.seal-btn:hover, .btn.seal-btn:hover, .ribbon:hover, .case-verdict button[type="submit"]:hover {
    background: linear-gradient(180deg, var(--oxblood-dark), var(--oxblood-deep)); color: #fff; transform: translateY(-1px);
}
button.danger { background: var(--oxblood); border-color: var(--oxblood-deep); color: #fff; }

/* ============================================================ forms */
form.stack label { display: block; margin: 1rem 0; font-family: var(--sans); font-weight: 600; font-size: .85rem; color: var(--muted); }
form.stack input, form.stack select, form.stack textarea {
    display: block; width: 100%; max-width: 460px; padding: .6rem .7rem; margin-top: .35rem;
    border: 1px solid var(--border-brass); border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
    font-family: var(--body); font-size: 1rem;
}
form.stack input:focus, form.stack select:focus, form.stack textarea:focus { border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 25%, transparent); outline: none; }

/* ============================================================ tables */
/* wide tables (cookie lists) scroll inside their own box instead of the page */
.table-scroll { overflow-x: auto; margin: 1rem 0; }
table.list { border-collapse: collapse; width: 100%; background: var(--surface); border-radius: var(--r); overflow: hidden; }
table.list th, table.list td { border-bottom: 1px solid var(--border); padding: .7rem .8rem; text-align: left; }
table.list th { font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--muted); background: var(--surface-2); }
table.list tr:last-child td { border-bottom: 0; }

/* ============================================================ case: header, two columns */
.case-header h1 { text-align: center; }
.case-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 2rem; align-items: start; margin-top: 1.4rem; }
.col-left, .col-right { min-width: 0; }
@media (max-width: 900px) { .case-cols { grid-template-columns: 1fr; gap: 1.2rem; } }

.case-intro { font-size: 1.1rem; color: var(--ink); line-height: 1.6; margin-top: 1rem; }
.case-intro::first-letter { float: left; font-family: var(--serif); font-size: 3.4rem; line-height: .8; color: var(--oxblood); margin: .1rem .5rem .05rem 0; }

/* suspect cards */
.suspect-card { display: flex; gap: 1rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: .8rem 1rem; margin: .8rem 0; box-shadow: var(--sh-sm); }
.suspect-portrait { width: 3.4rem; height: 4rem; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-2); box-shadow: 0 0 0 1px var(--surface), 0 0 0 2px var(--brass-dark); }
.suspect-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.suspect-name { display: block; font-family: var(--serif); font-size: 1.25rem; color: var(--ink-deep); line-height: 1.1; }
.suspect-desc { margin: .25rem 0 0; font-size: .92rem; color: var(--muted); line-height: 1.45; }
.medalion { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 2.1rem; flex: none; border-radius: 6px; overflow: hidden; background: var(--surface-2); box-shadow: 0 0 0 1px var(--brass-dark); font-family: var(--serif); color: var(--oxblood); }
.medalion img { width: 100%; height: 100%; object-fit: cover; }

/* clues — dossier slips */
.case-clues ol { list-style: none; counter-reset: indiciu; margin: 0; padding: 0; }
.case-clues li {
    counter-increment: indiciu; position: relative; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-sm); margin: .7rem 0; padding: .8rem 1rem .8rem 3.2rem; box-shadow: var(--sh-sm);
    font-size: .98rem;
}
.case-clues li::before {
    content: counter(indiciu); position: absolute; left: .7rem; top: 50%; transform: translateY(-50%);
    width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 1.5px solid var(--brass);
    color: var(--brass-dark); font-family: var(--serif); font-size: .95rem;
    display: flex; align-items: center; justify-content: center;
}
/* statements render like every other clue — any visual difference would fingerprint the culprit's lie */
.case-clues + .muted, .case-clues .muted { font-family: var(--sans); font-size: .85rem; }

/* ============================================================ deduction grid — ledger */
.subgrid-wrap { overflow-x: auto; margin: 1rem 0; -webkit-overflow-scrolling: touch; border: 1px solid var(--border-brass); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-sm); }
table.subgrid { border-collapse: collapse; background: var(--surface); width: 100%; }
table.subgrid th, table.subgrid td { border: 1px solid var(--border); }
table.subgrid .corner { font-family: var(--sans); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; padding: .5rem .6rem; max-width: 9rem; color: var(--brass); background: var(--panel-dark); border-color: var(--panel-dark); }
table.subgrid .col-label { padding: .45rem .3rem; vertical-align: bottom; max-width: 3rem; text-align: center; background: var(--panel-dark); border-color: var(--panel-dark); color: var(--panel-ink); }
table.subgrid .col-label .medalion { margin: 0 auto .25rem; display: flex; box-shadow: 0 0 0 1px var(--brass); }
table.subgrid .col-label span:not(.medalion) { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--sans); font-size: .68rem; max-height: 7rem; display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #f0e6cf; }
table.subgrid .row-label { background: var(--surface-2); padding: .4rem .7rem; font-size: .85rem; text-align: right; max-width: 11rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--border-brass); }
table.subgrid .cell { width: 2.75rem; height: 2.75rem; min-width: 2.75rem; text-align: center; cursor: pointer; font-size: 1.35rem; user-select: none; }
table.subgrid .cell:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
table.subgrid .cell:hover, table.subgrid .cell:focus { background: color-mix(in srgb, var(--brass) 16%, var(--surface)); outline: none; }
table.subgrid .cell.no { color: var(--oxblood); font-weight: 700; }
table.subgrid .cell.yes { color: var(--teal); font-weight: 700; }
table.subgrid .cell.no, table.subgrid .cell.yes { animation: stamp .18s ease-out; }
@keyframes stamp { 0% { transform: scale(.5); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* ============================================================ hints */
.hints .hint-text { background: var(--surface-2); border-left: 3px solid var(--brass); border-radius: var(--r-sm); padding: .7rem 1rem; margin: .6rem 0; font-style: italic; }
.hint-btn { display: inline-flex; align-items: center; gap: .45rem; }
.hint-btn small { font-weight: 400; opacity: .8; }
.hint-locked { display: none; }
.hint-slot { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.hint-slot .hint-text { flex-basis: 100%; }
.hint-pay { background: var(--brass-dark); color: #fff; border: 1px solid var(--brass-dark); }
.hint-pay:hover { background: var(--brass); border-color: var(--brass); }
.hint-btn:disabled { opacity: .5; cursor: default; }
.hint-wallet { margin: 0 0 .8rem; }
.hint-err { color: var(--oxblood); font-size: .85rem; margin: .3rem 0 0; flex-basis: 100%; }

/* live score panel */
.score-panel { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border-brass); border-radius: var(--r); padding: .8rem 1.3rem; margin: 1.2rem 0; box-shadow: var(--sh-sm); }
.score-panel .score-lbl { font-family: var(--sans); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 600; color: var(--brass-dark); }
.score-panel .score-val { font-family: var(--serif); font-size: 1.9rem; color: var(--oxblood); line-height: 1; }
.score-panel .score-detail { font-family: var(--sans); font-size: .82rem; color: var(--muted); }

/* ============================================================ verdict */
.case-verdict { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 1rem 1.4rem 1.5rem; margin: 1.8rem 0; box-shadow: var(--sh-sm); }
.case-verdict form.stack { display: grid; gap: .5rem; }
.case-verdict form.stack label { display: grid; grid-template-columns: 1.5rem minmax(9rem, 12rem) 1fr; align-items: center; gap: .7rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; color: var(--muted); max-width: 660px; margin: .35rem 0; }
.case-verdict form.stack label::before { content: ''; width: 1.4rem; height: 1.4rem; background-color: var(--brass-dark); -webkit-mask: var(--vm, url(ornaments/ic-crown.svg)) no-repeat center / contain; mask: var(--vm, url(ornaments/ic-crown.svg)) no-repeat center / contain; }
.case-verdict form.stack label:nth-of-type(1)::before { --vm: url(ornaments/ic-gavel.svg); }
.case-verdict form.stack label:nth-of-type(2)::before { --vm: url(ornaments/ic-mappin.svg); }
.case-verdict form.stack label:nth-of-type(3)::before { --vm: url(ornaments/ic-chalice.svg); }
.case-verdict form.stack select { margin-top: 0; max-width: none; }
.case-verdict button[type="submit"] { margin-top: 1rem; justify-self: start; }
.attempts-left { font-weight: 600; }
.result-verdict { font-size: 1.1rem; }
.share-box { background: var(--surface-2); border: 1px dashed var(--border-brass); border-radius: var(--r-sm); padding: .8rem 1rem; font-family: var(--body); white-space: pre-wrap; }

/* ============================================================ case page (Lovable layout) */
.breadcrumb { font-family: var(--sans); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 600; color: var(--brass-dark); margin: 0 0 1rem; }
.case-hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 1.6rem 1.8rem; box-shadow: var(--sh-sm); margin-bottom: 1.6rem; }
.case-hero-pills { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .5rem; }
.case-hero-pills .pill { color: var(--brass-dark); border: 1px solid var(--border-brass); }
.case-hero-pills .crowns { color: var(--brass); letter-spacing: .1em; }
.case-hero h1 { text-align: left; margin: .2rem 0; font-size: clamp(2rem, 4.5vw, 3.2rem); }
.case-subtitle { color: var(--muted); font-size: 1.05rem; margin: .3rem 0 0; }
.case-cronica { color: var(--muted); font-size: 1.08rem; line-height: 1.55; margin: .5rem 0 0; }

.cronica { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 1.2rem 1.4rem; box-shadow: var(--sh-sm); }
.cronica .case-intro { margin: 0; border: 0; padding: 0; }

/* element galleries */
.element-gallery { display: grid; gap: .8rem; margin-bottom: .5rem; }
.element-gallery:not(.suspects) { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
/* suspects: 2 per row, wide horizontal cards (portrait + details beside it) */
.element-gallery.suspects { grid-template-columns: 1fr 1fr; gap: 1rem; }
.element-gallery.suspects .el-card.suspect { padding: 1rem; }
.element-gallery.suspects .el-portrait { width: 4rem; height: 4rem; }
@media (max-width: 640px) { .element-gallery.suspects { grid-template-columns: 1fr; } }
.el-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--sh-sm); overflow: hidden; }
.el-card.suspect { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem; }
.el-card .el-portrait { position: relative; width: 3rem; height: 3rem; flex: none; border-radius: 50%; box-shadow: 0 0 0 2px var(--brass-dark); }
.el-card .el-portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.el-badge { position: absolute; bottom: -7px; right: -7px; width: 2.1rem; height: 2.1rem; background: var(--surface); border: 1.5px solid var(--brass-dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-sm); }
.sym { display: block; }
.el-badge .sym { width: 1.5rem; height: 1.5rem; }
table.subgrid .hicon .sym { width: 1.7rem; height: 1.7rem; margin: 0 auto; }
:root[data-theme="dark"] .sym { filter: invert(1) brightness(1.15); }
.pic { display: block; object-fit: contain; }
.el-badge .pic { width: 1.7rem; height: 1.7rem; }
.murdle-grid .hicon .pic { width: 94%; height: 94%; margin: 0 auto; }
.el-card .el-imgwrap { position: relative; display: block; }
.el-badge.corner { position: absolute; top: 6px; right: 6px; bottom: auto; }
.navic { width: 1.4rem; height: 1.4rem; }
:root[data-theme="dark"] .navic { filter: invert(1) brightness(1.15); }
.el-card:not(.suspect) { display: flex; flex-direction: column; }
.el-card .el-img { display: block; height: 118px; background: var(--surface-2) center / contain no-repeat; border-bottom: 1px solid var(--border); }
.el-card .el-init { display: flex; align-items: center; justify-content: center; height: 82px; background: var(--surface-2); font-family: var(--serif); font-size: 1.5rem; color: var(--brass-dark); border-bottom: 1px solid var(--border); }
.el-card .el-name { font-family: var(--serif); color: var(--ink-deep); line-height: 1.15; }
.el-card.suspect .el-name { font-size: 1.1rem; }
.el-card:not(.suspect) .el-name { display: block; padding: .55rem .7rem .15rem; font-size: .95rem; }
.el-card .el-desc { margin: .25rem 0 0; font-size: .86rem; color: var(--muted); line-height: 1.42; }
.el-card .el-traits { margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .15rem .7rem; font-family: var(--sans); font-size: .66rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--brass-dark); line-height: 1.5; }
.el-traits .tr { display: inline-flex; align-items: center; gap: .28rem; }
.el-traits .tico { width: .85rem; height: .85rem; opacity: .8; flex: none; }
:root[data-theme="dark"] .el-traits .tico { filter: invert(1) brightness(1.2); }
.el-card:not(.suspect) .el-desc { padding: 0 .7rem .7rem; margin: 0; font-size: .82rem; }

/* deduction grids as titled cards */
.grids { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1rem 0 .5rem; }
.grid-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sh-sm); padding: .8rem .7rem; }
.grid-card-title { font-family: var(--sans); text-transform: uppercase; letter-spacing: .07em; font-size: .66rem; font-weight: 600; color: var(--brass-dark); text-align: center; margin-bottom: .5rem; }
.grid-help { font-family: var(--body); font-size: .95rem; margin: 0 0 .6rem; }
.grid-card .subgrid-wrap { border: 0; box-shadow: none; background: transparent; }
table.subgrid { margin: 0 auto; }
table.subgrid .hicon { width: 2.5rem; height: 2.5rem; padding: 2px; background: var(--surface-2); }
table.subgrid .hicon img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; }
table.subgrid .hicon abbr { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-family: var(--serif); color: var(--brass-dark); text-decoration: none; }
table.subgrid .corner { background: transparent; border-color: var(--border); color: var(--muted); text-align: center; font-family: var(--sans); font-size: 1rem; }

/* floating play controls: grid bottom-sheet + clues top drop-down */
.case-galleries { margin-top: .4rem; }

.play-bar { position: fixed; right: 1.1rem; bottom: 1.3rem; z-index: 90; display: flex; gap: .6rem; }
.playbtn { display: inline-flex; align-items: center; gap: .5rem; padding: .72rem 1.15rem; border-radius: 999px; font-family: var(--sans); font-weight: 600; font-size: .85rem; border: 1px solid var(--border-brass); background: var(--surface); color: var(--ink); box-shadow: var(--sh); cursor: pointer; }
.playbtn:hover { border-color: var(--brass); }
.playbtn.primary { background: var(--oxblood); color: #fff; border-color: var(--oxblood-dark); }
.playbtn.primary:hover { background: var(--oxblood-dark); }
.playbtn svg { width: 1.15rem; height: 1.15rem; flex: none; }
.playbtn .pill-count { font-size: .72rem; background: rgba(0,0,0,.12); border-radius: 999px; padding: .05rem .42rem; }
.playbtn.primary .pill-count { background: rgba(255,255,255,.22); }
@media (max-width: 720px) { .play-bar { bottom: 4.6rem; } }

.play-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(20,16,12,.42); animation: pb-fade .2s ease; }
@keyframes pb-fade { from { opacity: 0; } to { opacity: 1; } }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.3rem; border-bottom: 1px solid var(--border); font-family: var(--serif); font-size: 1.3rem; color: var(--ink-deep); background: var(--surface); flex: none; }
.panel-close { background: none; border: 0; font-size: 1.7rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 .3rem; }
.panel-close:hover { color: var(--oxblood); }

/* mărturii: drops from the top */
.clue-drop { position: fixed; top: 0; left: 0; right: 0; z-index: 80; max-height: 46vh; background: var(--surface); border-bottom: 2px solid var(--brass-dark); box-shadow: 0 14px 44px rgba(20,16,12,.4); border-radius: 0 0 16px 16px; display: flex; flex-direction: column; transform: translateY(-102%); transition: transform .3s ease; }
.clue-drop.open { transform: translateY(0); }
.clue-drop .panel-inner { display: flex; flex-direction: column; min-height: 0; }
.clue-drop .clue-list { overflow: auto; padding: .9rem 1.3rem 1.2rem; margin: 0; }
.clue-drop .clue-list li { margin: .5rem 0; }

/* grila + verdict: bottom sheet */
.grid-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; max-height: 82vh; background: var(--bg); border-top: 2px solid var(--brass-dark); box-shadow: 0 -14px 44px rgba(20,16,12,.45); border-radius: 16px 16px 0 0; display: flex; flex-direction: column; transform: translateY(102%); transition: transform .3s ease; }
.grid-sheet.open { transform: translateY(0); }
.grid-sheet .sheet-body { overflow: auto; padding: 1rem 1.3rem 4.5rem; }
.grid-sheet .case-verdict { max-width: 640px; }
.play-hint { margin: 1.3rem 0 .2rem; font-family: var(--sans); font-size: .85rem; color: var(--muted); text-align: center; }
.play-hint strong { color: var(--oxblood); }
.verdict-emblem { display: block; width: 132px; height: 132px; object-fit: contain; margin: .2rem auto .6rem; }
.book-list { list-style: none; padding: 0; margin: 1rem 0; }
.book-list li { border-left: 3px solid var(--brass); padding: .45rem 0 .45rem .9rem; margin-bottom: .6rem; }

/* editorial section: category tabs, pager, article-to-article navigation */
.cat-tabs, .pager { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0; align-items: center; }
.cat-tabs .pill.active, .pager .pill.active { background: var(--brass-dark); color: #fff; border-color: var(--brass-dark); }
.guide-nav { border-top: 1px solid var(--border); margin-top: 2.2rem; padding-top: 1rem; }
.guide-nav-links { display: flex; flex-wrap: wrap; gap: .8rem; }
.guide-nav-links a { flex: 1 1 16rem; display: block; text-decoration: none;
    border: 1px solid var(--border); border-radius: var(--r-sm); padding: .7rem .9rem; background: var(--surface); }
.guide-nav-links a:hover { border-color: var(--border-brass); }
.guide-nav-links a span { display: block; font-family: var(--sans); font-size: .7rem;
    letter-spacing: .1em; text-transform: uppercase; margin-bottom: .15rem; }
.guide-nav-links .next { text-align: right; }

/* hand-written editorial text: the case context (on the case page, before play)
   and the prose explainer (on the result page, after it) */
.case-editorial, .case-explainer { margin: 1.6rem 0; }
.case-editorial p, .case-explainer p { margin: 0 0 .85rem; line-height: 1.72; }
.case-editorial p:last-child, .case-explainer p:last-child { margin-bottom: 0; }
.case-explainer { padding: 1.3rem 1.5rem; }

/* ad zones (content pasted from admin). Set apart from the interface by a rule
   above and a labelled gutter, so a slot can never read as navigation or as a
   control of the game. No reserved height: an empty zone renders nothing. */
.ad-slot { display: block; margin: 2.5rem auto 1.5rem; max-width: 100%; text-align: center; overflow: hidden;
    border-top: 1px solid var(--border); padding-top: .75rem; }
.ad-slot .ad-label { display: block; font: 600 .62rem/1 var(--sans); letter-spacing: .12em;
    text-transform: uppercase; color: var(--muted); opacity: .65; margin-bottom: .4rem; }
.ad-slot :is(img, iframe, ins) { max-width: 100%; height: auto; }
.ad-footer { margin-bottom: .5rem; }

/* daily-login bonus ("Solda anchetatorului") */
.bonus-panel { background: var(--surface); border: 1px solid var(--border-brass); border-radius: var(--r);
    padding: 1.1rem 1.2rem; margin: 1.5rem 0; }
.bonus-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.bonus-total { font-family: var(--sans); font-weight: 700; color: var(--brass-dark); white-space: nowrap; }
.bonus-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
    gap: .5rem; padding: 0; margin: 0 0 1rem; }
.bonus-day { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .55rem .3rem;
    border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); text-align: center; }
.bonus-day .bd-num { font: 600 .6rem/1.1 var(--sans); text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.bonus-day .bd-amt { font: 700 1.05rem var(--serif); color: var(--ink); }
.bonus-day.done { opacity: .5; }
.bonus-day.done .bd-amt::after { content: ' ✓'; color: var(--teal); font-size: .85em; }
.bonus-day.today { border-color: var(--oxblood); box-shadow: 0 0 0 1px var(--oxblood); background: var(--surface); }
.bonus-day.today .bd-amt { color: var(--oxblood); }
.bonus-day.peak .bd-num::before { content: '★ '; color: var(--brass-dark); }
.bonus-day.peak .bd-amt { color: var(--brass-dark); }
.bonus-claim { font: 600 .9rem var(--sans); background: var(--oxblood); color: #fff; border: none;
    padding: .65rem 1.2rem; border-radius: var(--r-sm); cursor: pointer; }
.bonus-claim:hover { background: var(--oxblood-dark); }
.bonus-claimed { margin: 0; }

/* GDPR consent banner */
.consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60; max-width: 660px; margin: 0 auto;
    background: var(--panel-dark); color: var(--panel-ink); border: 1px solid var(--border-brass);
    border-radius: var(--r); box-shadow: var(--sh); padding: 1rem 1.15rem;
    display: flex; gap: .8rem 1.15rem; align-items: center; flex-wrap: wrap; }
.consent p { margin: 0; flex: 1 1 15rem; font-size: .9rem; line-height: 1.5; }
.consent-btns { display: flex; gap: .5rem; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.consent-btns button { font: 600 .8rem var(--sans); padding: .5rem 1.05rem; border-radius: var(--r-sm);
    cursor: pointer; border: 1px solid transparent; }
/* the affirmative choice is the solid one; .secondary below re-flattens the
   middle option ("statistics only") when all three buttons are shown */
.consent-btns button[data-consent="v2:11"], .consent-btns button[data-consent="v2:10"],
.consent-btns button[data-consent="granted"] { background: var(--oxblood); color: #fff; }
.consent-btns button.secondary { background: transparent; color: var(--panel-ink); border-color: var(--border-brass); }

/* profile: identity form + avatar picker */
.identity-form .id-field, .identity-form .id-lbl { display: block; font: 600 .78rem/1.4 var(--sans);
    letter-spacing: .06em; text-transform: uppercase; color: var(--brass-dark); }
.identity-form .id-lbl { margin: .3rem 0 .55rem; }
.identity-form input[type="text"] { display: block; width: 100%; max-width: 24rem; margin-top: .35rem;
    padding: .6rem .7rem; border: 1px solid var(--border-brass); border-radius: var(--r-sm);
    background: var(--surface-2); color: var(--ink); font: 400 1rem var(--body); text-transform: none; letter-spacing: 0; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.avatar-opt { position: relative; cursor: pointer; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
    border: 2px solid transparent; box-shadow: 0 0 0 1px var(--border-brass); }
.avatar-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.avatar-opt img, .avatar-opt .avatar-none { width: 100%; height: 100%; object-fit: cover; }
.avatar-opt .avatar-none { display: flex; align-items: center; justify-content: center;
    background: var(--surface-2); color: var(--oxblood); font: 700 1.9rem var(--serif); }
.avatar-opt:hover { border-color: var(--brass); }
.avatar-opt:has(input:checked) { border-color: var(--oxblood); box-shadow: 0 0 0 2px var(--oxblood); }

/* leaderboard: avatar beside the name */
.lb-who { display: inline-flex; align-items: center; gap: .5rem; }
.lb-avatar { width: 1.75rem; height: 1.75rem; border-radius: 50%; object-fit: cover; flex: none;
    box-shadow: 0 0 0 1px var(--border-brass); }
.lb-avatar.none { background: var(--surface-2); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .list { min-width: 100%; }
/* narrow phones: drop the secondary daily-board columns (Încercarea, Indicii) */
@media (max-width: 560px) {
    .daily-board th:nth-child(n+5), .daily-board td:nth-child(n+5) { display: none; }
}

/* desktop: panels are inline and always visible (grid + sticky clues) */
@media (min-width: 900px) {
    .play-bar, .play-backdrop, .play-hint { display: none; }
    .grid-sheet .panel-close, .clue-drop .panel-close { display: none; }
    .play-area { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; margin-top: 1.6rem; }
    .grid-sheet, .clue-drop {
        position: static; transform: none; max-height: none; z-index: auto; transition: none;
        background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sh-sm);
    }
    .grid-sheet { grid-column: 1; min-width: 0; }
    .grid-sheet .sheet-body { overflow: visible; padding: 1rem 1.3rem 1.6rem; }
    .clue-drop { grid-column: 2; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
    .clue-drop .clue-list { overflow: visible; }
    .grid-sheet .panel-head, .clue-drop .panel-head { border-radius: var(--r) var(--r) 0 0; font-size: 1.15rem; }
}

/* deduction staircase grid (single combined logic grid, Murdle-style) */
.deduction-full, .verdict-full { margin-top: 1.6rem; }
/* cells shrink to fit the container (no horizontal scroll); JS sets --cell from
   the real container width, --cols is set inline on the table */
/* no overflow wrapper: the JS sizes --cell so the table always fits (min 9px),
   and any overflow ancestor would break the sticky grid header below */
.murdle-wrap { margin: 1rem 0; padding-bottom: .3rem; }
.murdle-grid { --cell: 2rem; --grid-stick: 0px; table-layout: fixed; width: calc(var(--cell) * var(--cols, 10)); border-collapse: collapse; margin: 0 auto; }
/* the two header rows stay pinned while the body scrolls: inside the mobile
   bottom sheet the sheet-body is the scroll box (top 0); on desktop the page
   scrolls, so they pin just under the sticky topbar */
@media (min-width: 900px) { .murdle-grid { --grid-stick: 64px; } }
.murdle-grid thead tr:first-child { height: 1.6rem; }
.murdle-grid thead th, .murdle-grid thead .corner-x { position: sticky; z-index: 6; }
.murdle-grid thead tr:first-child .grp-col, .murdle-grid thead .corner-x { top: var(--grid-stick); background: var(--bg); }
.murdle-grid thead tr + tr .hicon { top: calc(var(--grid-stick) + 1.6rem); }
.murdle-grid col { width: var(--cell); }
.murdle-grid td, .murdle-grid th { padding: 0; overflow: hidden; }
.murdle-grid .corner-x { text-align: center; color: var(--muted); font-family: var(--sans); font-size: clamp(.6rem, 3cqw, 1.1rem); }
.murdle-grid .grp-col { font-family: var(--sans); text-transform: uppercase; letter-spacing: .03em; font-size: clamp(.42rem, 1.6cqw, .64rem); font-weight: 700; color: var(--brass-dark); text-align: center; padding: .3rem .1rem; border-bottom: 2px solid var(--brass-dark); white-space: nowrap; }
.murdle-grid .grp-row { border-right: 2px solid var(--brass-dark); }
.murdle-grid .grp-row span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--sans); text-transform: uppercase; letter-spacing: .03em; font-size: clamp(.42rem, 1.6cqw, .64rem); font-weight: 700; color: var(--brass-dark); white-space: nowrap; }
.murdle-grid .hicon { width: var(--cell); height: var(--cell); background: var(--surface-2); border: 1px solid var(--border); padding: 0; text-align: center; vertical-align: middle; }
.murdle-grid .hicon .sym { width: 94%; height: 94%; margin: 0 auto; }
.murdle-grid .cell { width: var(--cell); height: var(--cell); border: 1px solid var(--border-brass); background: var(--surface); cursor: pointer; text-align: center; font-size: calc(var(--cell) * .56); line-height: var(--cell); color: var(--oxblood); user-select: none; }
.murdle-grid .cell:hover { background: var(--surface-2); }
/* hover cross-highlight: the hovered cell's whole row + column and their header icons */
.murdle-grid td.cell.hl { background: color-mix(in srgb, var(--brass) 16%, var(--surface)); }
.murdle-grid td.cell.yes.hl { background: color-mix(in srgb, var(--teal) 22%, var(--surface)); }
.murdle-grid th.hicon.hl { background: color-mix(in srgb, var(--brass) 32%, var(--surface-2)); }
.murdle-grid .cell:focus-visible { outline: 2px solid var(--brass); outline-offset: -2px; }
.murdle-grid .cell.no { color: var(--muted); }
.murdle-grid .cell.yes { color: var(--teal); background: color-mix(in srgb, var(--teal) 13%, var(--surface)); }
/* strong boundaries between category groups (start of each column/row group) */
.murdle-grid .gcol { border-left: 2px solid var(--brass-dark); }
.murdle-grid tr.grow > :not(.void) { border-top: 2px solid var(--brass-dark); }
.murdle-grid .void { border: 0; background: transparent; }
.verdict-full .case-verdict { max-width: 640px; }

/* verdict card */
.case-verdict .verdict-rule { font-family: var(--sans); text-transform: uppercase; letter-spacing: .05em; font-size: .74rem; font-weight: 600; color: var(--oxblood); margin: 0 0 1.1rem; }
.verdict-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.verdict-form label { display: block; font-family: var(--sans); text-transform: uppercase; letter-spacing: .04em; font-size: .74rem; font-weight: 600; color: var(--muted); margin: 0; }
.verdict-form select { display: block; width: 100%; margin-top: .35rem; padding: .6rem .7rem; border: 1px solid var(--border-brass); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-family: var(--body); font-size: 1rem; }
.verdict-form select:focus { border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 25%, transparent); outline: none; }
.verdict-form button[type="submit"] { margin-top: 1.2rem; width: 100%; }
@media (max-width: 520px) { .verdict-grid { grid-template-columns: 1fr; } }

/* ============================================================ homepage hero */
.hero { text-align: center; padding: 2rem 1rem 1rem; }
.hero .crest-big { width: 116px; height: 116px; margin: 0 auto; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(58,44,34,.2)); }
.hero h1.brand-lockup { font-family: var(--serif); font-size: clamp(2.6rem, 7vw, 5rem); margin: .4rem 0 .2rem; color: var(--ink-deep); }
.hero h1.brand-lockup::after { content: none; }
.hero .tagline { font-family: var(--body); font-style: italic; font-size: 1.2rem; color: var(--muted); }
.hero-cta { text-align: center; margin: 1.6rem 0 2rem; display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.hero-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; margin: 1.6rem 0; }
.hero-features .feat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 1.4rem 1.2rem; box-shadow: var(--sh-sm); }
.hero-features .feat .ic, .hero-features .feat .glif { color: var(--brass); font-size: 1.9rem; display: block; margin-bottom: .5rem; width: 2rem; height: 2rem; }
.hero-features .feat h3 { color: var(--ink-deep); margin: .1rem 0 .4rem; }
.hero-features .feat { font-family: var(--body); color: var(--muted); }

/* ============================================================ illustrated case card */
.case-card { position: relative; color: var(--ink); overflow: hidden; border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sh); margin: 1.4rem 0; background: var(--surface); }
.case-card .scene { display: block; width: 100%; height: 260px; object-fit: cover; }
.case-card .body { padding: 1.4rem 1.6rem; }
.case-card .kicker { display: inline-flex; font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: var(--brass-dark); padding: .18rem .6rem; border: 1px solid var(--border-brass); border-radius: 999px; }
.case-card h2 { color: var(--ink-deep); margin: .6rem 0; }

/* ============================================================ result page */
.scroll-sheet { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 2rem 1.6rem; margin: 1.4rem 0; box-shadow: var(--sh); text-align: center; }
.scroll-sheet .seal-corner { display: none; }
.scroll-sheet h1 { color: var(--oxblood); }
.verdict-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; margin: 1.4rem 0; }
.verdict-cards .vc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 1rem; text-align: center; box-shadow: var(--sh-sm); }
.verdict-cards .vc .lbl { font-family: var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--brass-dark); font-size: .72rem; font-weight: 600; }
.verdict-cards .vc .val { font-family: var(--serif); font-size: 1.4rem; color: var(--ink-deep); margin: .2rem 0 .6rem; }
.verdict-cards .vc .slot { aspect-ratio: 3 / 4; border-radius: var(--r-sm); background: var(--surface-2) center / cover; border: 1px solid var(--border); }
.reasoning { background: var(--panel-dark); color: #ecdcb6; border-radius: var(--r); padding: 1.4rem 1.6rem; margin: 1.4rem 0; box-shadow: var(--sh); }
.reasoning .band { color: var(--candle); margin-top: 0; }
.reasoning ol { list-style: none; counter-reset: r; margin: 0; padding: 0; }
.reasoning li { counter-increment: r; position: relative; padding: .8rem 0 .8rem 3.2rem; border-bottom: 1px solid rgba(212, 176, 98, .2); }
.reasoning li:last-child { border-bottom: 0; }
.reasoning li::before { content: counter(r); position: absolute; left: 0; top: .8rem; width: 2rem; height: 2rem; border: 1.5px solid var(--candle); border-radius: 50%; color: var(--candle); font-family: var(--serif); display: flex; align-items: center; justify-content: center; }
.stat-band { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); margin: 1.4rem 0; box-shadow: var(--sh-sm); overflow: hidden; }
.stat-band .st { padding: 1.1rem; text-align: center; border-right: 1px solid var(--border); }
.stat-band .st:last-child { border-right: 0; }
.stat-band .st .lbl { display: block; font-family: var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--brass-dark); font-size: .72rem; font-weight: 600; }
.stat-band .st .val { font-family: var(--serif); font-size: 1.7rem; color: var(--ink-deep); }

/* ============================================================ profile */
/* ---- profile: eyebrow + tabs + rhythm + danger zone (Lovable redesign) ---- */
.page-eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: .16em;
                font-weight: 600; font-size: .78rem; color: var(--brass-dark); margin: 0 0 .1rem; }
.profile-tabs { display: flex; flex-wrap: wrap; gap: .15rem; margin: 1.6rem 0 2rem;
                border-bottom: 1px solid var(--border); }
.profile-tabs [role="tab"] {
    font: 600 .78rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .12em;
    background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
    color: var(--muted); padding: .7rem 1rem; margin: 0 0 -1px; cursor: pointer; box-shadow: none;
}
.profile-tabs [role="tab"]:hover { color: var(--ink); background: none; transform: none; }
.profile-tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brass); }
.tab-panel > .card:first-child { margin-top: 0; }
.tab-panel > .stat-grid:first-child { margin: 0 0 1.2rem; }

.rhythm-chart { display: flex; align-items: flex-end; gap: .6rem; height: 8.5rem; padding-top: 1.2rem; }
.rhythm-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%; justify-content: flex-end; }
.rhythm-bar { width: 100%; max-width: 3.2rem; border-radius: 4px 4px 0 0;
              background: linear-gradient(180deg, var(--brass), var(--brass-dark)); }
.rhythm-n { font-family: var(--sans); font-size: .75rem; color: var(--brass-dark); min-height: 1em; }
.rhythm-day { font-family: var(--sans); font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.brass-rule { border: 0; border-top: 1px solid var(--border-brass); margin: 1.6rem 0; }
.band.band-danger { color: var(--oxblood); }
.danger-actions { display: grid; gap: 1.2rem; }
.danger-actions form { margin: 0; }
.delete-form input[type="text"] { display: block; width: 100%; max-width: 16rem; margin-top: .35rem; }
.danger-btn { color: var(--oxblood); border-color: var(--oxblood); }
.danger-btn:hover { background: var(--oxblood); color: var(--surface); }

.profile-hero { display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: center; }
.medallion-lg { position: relative; width: 140px; height: 168px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border-radius: 16px; box-shadow: 0 0 0 1px var(--surface), 0 0 0 3px var(--brass-dark), var(--sh-sm); overflow: hidden; }
.medallion-lg img { width: 100%; height: 100%; object-fit: cover; }
.medallion-lg .crown-top { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 2.2rem; height: 2.2rem; background-color: var(--brass); -webkit-mask: url(ornaments/ic-crown.svg) no-repeat center / contain; mask: url(ornaments/ic-crown.svg) no-repeat center / contain; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.2rem; }
.stat-grid .card { text-align: center; margin: 0; }
.stat-grid .card h3 { color: var(--brass-dark); font-family: var(--sans); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; margin: 0 0 .4rem; }
.achv-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.achv-list li { display: flex; gap: .8rem; align-items: center; padding: .7rem; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.achv-seal { width: 2.4rem; height: 2.4rem; flex: none; border-radius: 50%; background: radial-gradient(circle at 38% 30%, var(--oxblood), var(--oxblood-deep)); box-shadow: var(--sh-sm); }
.achv-list li.locked { opacity: .5; }
.achv-list li.locked .achv-seal { background: var(--surface-2); box-shadow: 0 0 0 1px var(--border-brass); }
.achv-badge { width: 2.8rem; height: 2.8rem; flex: none; object-fit: contain; }
.achv-list li.locked .achv-badge { filter: grayscale(1); }

/* ============================================================ leaderboard */
.decree table.list th { background: var(--panel-dark); color: var(--candle); }
tr.loc-1 td { background: color-mix(in srgb, var(--brass) 12%, var(--surface)); }
.medalie { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; font-family: var(--serif); font-size: .95rem; border: 1.5px solid var(--brass-dark); color: var(--ink); background: var(--surface-2); }
.medalie.loc-1 { background: radial-gradient(circle at 38% 30%, #e7c877, var(--brass)); color: #3a2a10; border-color: var(--brass-dark); }
.medalie.loc-2 { background: radial-gradient(circle at 38% 30%, #eee, #c3c6ca); color: #333; border-color: #9a9da2; }
.medalie.loc-3 { background: radial-gradient(circle at 38% 30%, #d79a6a, #a5673c); color: #2a1508; border-color: #7a4a28; }

/* ============================================================ archive grid */
.arch-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 1.6rem; }
.dif-pill { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--sans); font-size: .8rem; font-weight: 600; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--border-brass); border-radius: 999px; padding: .45rem .95rem; }
.dif-pill:hover { border-color: var(--brass); }
.dif-pill.active { background: var(--oxblood); border-color: var(--oxblood); color: #fff; }
.dif-pill .crowns { color: var(--brass); font-size: .72rem; letter-spacing: -1px; }
.dif-pill.active .crowns { color: var(--candle); }
.dif-pill .c { font-size: .72rem; opacity: .65; }

.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin: 1.6rem 0; }
.arch-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sh-sm); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.arch-card:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.arch-card .slot { height: 150px; background: var(--surface-2) center / cover; border-bottom: 1px solid var(--border); }
.arch-card .body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.arch-card h3 { margin: 0; font-size: 1.25rem; }
.arch-card h3 a { color: var(--ink-deep); text-decoration: none; }
.arch-card h3 a:hover { color: var(--oxblood); }
.crowns { color: var(--brass); letter-spacing: .12em; font-size: .95rem; }
.crowns .off { color: var(--border-brass); }
.pill { align-self: flex-start; font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; padding: .18rem .7rem; border: 1px solid; border-radius: 999px; }
.pill.solved { color: var(--teal); border-color: var(--teal); }
.pill.unsolved { color: var(--oxblood); border-color: var(--oxblood); }
.pill.untried { color: var(--brass-dark); border-color: var(--border-brass); }
.pill.type { color: var(--brass-dark); border-color: var(--border-brass); }
.pill.progress { color: var(--brass-dark); border-color: var(--brass); background: rgba(201,162,74,.14); }
.arch-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.arch-card .crowns { margin: 0; }

/* pagination */
.pagination { display: flex; gap: .4rem; justify-content: center; margin: 2.4rem 0; flex-wrap: wrap; }
.pagination a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.4rem; height: 2.4rem; padding: 0 .5rem; border: 1px solid var(--border-brass); border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-family: var(--sans); font-weight: 600; }
.pagination a:hover { border-color: var(--brass); }
.pagination a.active { background: var(--brass); border-color: var(--brass-dark); color: #3a2a10; }

/* nav login/profile as a bordered button */
.header-actions .nav-cta { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; text-decoration: none; border: 1px solid var(--border-brass); border-radius: var(--r-sm); color: var(--ink); padding: .55rem .95rem; }
.header-actions .nav-cta:has(.nav-avatar) { padding: .3rem .85rem .3rem .35rem; }
.header-actions .nav-cta:hover { border-color: var(--brass); color: var(--ink-deep); }
.nav-logout-form { margin: 0; }
.nav-logout { display: inline-flex; align-items: center; justify-content: center; width: 2.35rem; height: 2.35rem;
              background: none; border: 1px solid var(--border-brass); border-radius: var(--r-sm);
              cursor: pointer; padding: 0; box-shadow: none; }
.nav-logout:hover { border-color: var(--oxblood); background: none; transform: none; }
.nav-logout .navic { width: 18px; height: 18px; }
.nav-avatar { width: 1.7rem; height: 1.7rem; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--border-brass); }

/* clues — dossier slips */
.clue-list { list-style: none; counter-reset: indiciu; margin: 0; padding: 0; }
.clue-list li { counter-increment: indiciu; position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); margin: .7rem 0; padding: .8rem 1rem .8rem 3.2rem; box-shadow: var(--sh-sm); font-size: .98rem; }
.clue-list li::before { content: counter(indiciu); position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 1.5px solid var(--brass); color: var(--brass-dark); font-family: var(--serif); font-size: .95rem; display: flex; align-items: center; justify-content: center; }
/* .clue-statement intentionally unstyled — see .case-clues note: no visual tell on testimonies */

/* home: cronica label, roman feature badges, daily preview card */
.hero .cronica { font-family: var(--sans); text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; font-weight: 600; color: var(--brass-dark); margin: 0 0 .3rem; }
.hero-features .feat .num { display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border: 1.5px solid var(--brass); border-radius: 50%; color: var(--brass-dark); font-family: var(--serif); font-size: 1.05rem; margin-bottom: .6rem; }
.daily-card { display: grid; grid-template-columns: minmax(0, 44%) 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh); margin: 1rem 0 2rem; }
.daily-scene { background: var(--surface-2) center / cover; min-height: 300px; }
.daily-body { padding: 1.6rem 1.8rem; display: flex; flex-direction: column; gap: .7rem; }
.daily-top { display: flex; align-items: center; gap: .8rem; }
.daily-body .kicker { font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; color: var(--brass-dark); border: 1px solid var(--border-brass); border-radius: 999px; padding: .2rem .7rem; }
.daily-top .crowns { color: var(--brass); letter-spacing: .1em; margin: 0; }
.daily-body h2 { margin: .2rem 0; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.daily-intro { color: var(--muted); font-size: 1.02rem; line-height: 1.55; margin: 0; }
.daily-stats { display: flex; gap: 1rem; margin: .5rem 0; }
.daily-stats > div { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.daily-stats .lbl { font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .64rem; color: var(--brass-dark); }
.daily-stats .num { font-family: var(--serif); font-size: 1.5rem; color: var(--ink-deep); line-height: 1.1; }
.daily-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: .4rem; }
@media (max-width: 720px) { .daily-card { grid-template-columns: 1fr; } .daily-scene { min-height: 200px; } }

/* ============================================================ manuscript date */
.data-manuscris { font-family: var(--sans); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--brass-dark); text-align: center; font-weight: 600; }
.data-manuscris::before { content: none; }

/* ============================================================ rank blazon */
.blazon { width: 2.2rem; height: 2.2rem; object-fit: contain; vertical-align: -.7rem; margin-right: .45rem; }
.blazon-mare { width: 68px; height: 78px; }

/* ============================================================ verdict seal-drop + unroll */
.seal-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--ink-deep) 45%, transparent); }
.seal-overlay img { width: 130px; height: 130px; animation: seal-drop .6s ease-out forwards; filter: drop-shadow(0 10px 20px rgba(0,0,0,.4)); }
@keyframes seal-drop { 0% { transform: translateY(-70vh) scale(1.6) rotate(-14deg); opacity: .4; } 75% { transform: translateY(0) scale(.94) rotate(2deg); opacity: 1; } 100% { transform: translateY(0) scale(1) rotate(0); opacity: 1; } }
.reveal-scroll { animation: unroll .6s ease-out; transform-origin: top; }
@keyframes unroll { 0% { opacity: 0; transform: translateY(-8px); } 100% { opacity: 1; transform: translateY(0); } }

/* ============================================================ mobile bottom nav */
.bottomnav { display: none; }
@media (max-width: 720px) {
    .bottomnav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border-brass); box-shadow: 0 -4px 16px rgba(58,44,34,.12); }
    .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .5rem 0 .6rem; text-decoration: none; color: var(--muted); font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .62rem; }
    .bottomnav a .ic { color: var(--brass-dark); width: 1.4rem; height: 1.4rem; }
    .bottomnav a[aria-current="page"], .bottomnav a.active { color: var(--ink-deep); }
    .bottomnav a[aria-current="page"] .ic { color: var(--oxblood); }
    main.wrap { margin-bottom: 4.5rem; }
    header.topbar nav { display: none; }
}

/* ============================================================ reduced motion & narrow */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    table.subgrid .cell.no, table.subgrid .cell.yes { animation: none; }
    button, .btn { transition: none; }
    button:hover, .btn:hover, .arch-card:hover { transform: none; }
    .seal-overlay { display: none; }
    .reveal-scroll { animation: none; }
}
@media (max-width: 640px) {
    table.subgrid .row-label { max-width: 7rem; }
    .profile-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .case-verdict form.stack label { grid-template-columns: 1.4rem 1fr; }
    .case-verdict form.stack select { grid-column: 1 / -1; }
}

/* ---- Istoric (/istoric) ---- */
.hist-sort { display:flex; gap:.6rem; align-items:baseline; flex-wrap:wrap; margin:.4rem 0 1rem; }
.hist-sort a { text-decoration:none; color:var(--brass-dark); padding:.1rem .3rem; border-bottom:2px solid transparent; }
.hist-sort a.active { color:var(--ink); border-bottom-color:var(--brass); font-weight:600; }
.hist-list { display:flex; flex-direction:column; gap:.5rem; }
.hist-row { background:var(--surface); border:1px solid rgba(58,44,34,.14); border-radius:.5rem; }
.hist-row > summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:.6rem;
    flex-wrap:wrap; padding:.7rem .9rem; }
.hist-row > summary::-webkit-details-marker { display:none; }
.hist-row > summary::after { content:"▾"; margin-left:auto; color:var(--brass-dark); transition:transform .15s; }
.hist-row[open] > summary::after { transform:rotate(180deg); }
.hist-title { font-family:var(--serif); font-size:1.1rem; color:var(--ink); text-decoration:none; }
.hist-title:hover { text-decoration:underline; }
.hist-meta { font-size:.85rem; }
.hist-detail { margin:0 .9rem .8rem; }
.hist-row.is-progress { border-color: var(--brass); }
.hist-resume { display:flex; align-items:center; gap:.9rem; flex-wrap:wrap; margin:0 .9rem .8rem; padding:.7rem .9rem;
    background: rgba(201,162,74,.08); border-radius:.4rem; }
.hist-resume p { margin:0; }
@media (max-width:640px) { .hist-meta { flex-basis:100%; } }

/* ---- Resume strip (home) ---- */
.resume-strip { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap;
    margin:1.2rem 0; padding:.9rem 1.1rem; background:rgba(201,162,74,.1);
    border:1px solid var(--brass); border-radius:.6rem; }
.resume-strip p { margin:0; }
.resume-strip .btn { margin:0; }

/* ---- Language switcher (header) ---- */
.lang-switch { display:inline-flex; align-items:center; padding:.35rem .6rem; margin-right:.2rem;
    font-family:var(--sans); font-weight:600; font-size:.85rem; letter-spacing:.03em;
    color:var(--brass-dark); text-decoration:none; border:1px solid var(--border-brass); border-radius:.4rem; }
.lang-switch:hover { color:var(--ink); border-color:var(--brass); }

/* legal links row in the footer */
.footer-legal { margin-top: .35rem; font-size: .82rem; opacity: .8; }
.footer-legal a { color: inherit; }

/* social login buttons */
.social-login { margin-top: .9rem; }
.or-line { text-align: center; border-top: 1px solid var(--rule, #d8cba8); margin: 1rem 0 .8rem; }
.or-line span { position: relative; top: -.75rem; background: var(--surface, #fffaf0); padding: 0 .6rem; font-size: .8rem; color: var(--muted, #8a7a5c); }
.btn.social { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; margin: .4rem 0; }
.social-mark { display: inline-flex; width: 1.3rem; height: 1.3rem; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; font-family: Arial, sans-serif; }
.social-google  { background: #fff; color: #3c4043; border: 1px solid #dadce0; }
.social-google .social-mark { color: #4285f4; }
.social-facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.social-facebook .social-mark { background: #fff; color: #1877f2; }

/* Realm sub-line of the home hero lockup — "Enigmerra: Regatul Coroanei" */
.brand-lockup .realm-line {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: .30em;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--brass-dark);
    margin-top: .4rem;
}

/* Realm chip on case cards and the case page */
.pill.realm { background: rgba(201, 162, 74, .16); color: var(--brass-dark); }
.case-realm { margin: .2rem 0 0; }

/* Share row on the result page: copy button + external network links */
.share-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; align-items: center; }
.share-row .ribbon { margin: 0; }
a.share-net { text-decoration: none; display: inline-flex; align-items: center;
    background: var(--surface-2); color: var(--ink); border: 1.5px solid var(--border-brass); }
a.share-net:hover { background: var(--surface); border-color: var(--brass-dark); }

/* grid reset: subtle, right-aligned under the table, oxblood on hover (destructive) */
.grid-reset-row { text-align: right; margin: .3rem 0 0; }
#grid-reset { font-family: var(--sans); font-size: .82rem; padding: .35rem .8rem; cursor: pointer;
    background: var(--surface-2); color: var(--muted); border: 1.5px solid var(--border); border-radius: var(--r-sm); }
#grid-reset:hover { color: var(--oxblood); border-color: var(--oxblood); }

/* ── Case chronicles (/caz/{lume}/{slug}/cronica) ───────────────────────────
   Long-form public retelling of a solved case. Text-first: no component here
   depends on JavaScript, so the whole page is readable (and crawlable) raw. */
.chronicle-cast { list-style: none; padding: 0; margin: .6rem 0 1.6rem;
    display: grid; gap: .8rem; }
.chronicle-cast > li { display: flex; gap: .9rem; align-items: flex-start;
    background: var(--surface-2); border: 1.5px solid var(--border);
    border-radius: var(--r-sm); padding: .8rem .9rem; }
.chronicle-cast img { flex: 0 0 auto; width: 96px; height: 96px; object-fit: cover;
    border-radius: var(--r-sm); border: 1.5px solid var(--border-brass); }
.chronicle-cast h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.chronicle-cast p { margin: 0 0 .25rem; }

.chronicle-clues { margin: .6rem 0 1.6rem; padding-left: 1.4rem; }
.chronicle-clues li { margin-bottom: .5rem; }

/* The solution sits in the markup for crawlers but stays folded for readers —
   a spoiler guard, not cloaking: <details> content is fully indexable. */
.chronicle-solution { margin: 1.4rem 0; }
.chronicle-solution > summary { cursor: pointer; font-family: var(--sans);
    font-size: .95rem; padding: .2rem 0; }
.chronicle-solution > summary:hover { color: var(--oxblood); }
.chronicle-solution[open] > summary { margin-bottom: .8rem;
    border-bottom: 1px solid var(--border); padding-bottom: .6rem; }
.chronicle-verdict { font-weight: 600; color: var(--oxblood); }

@media (max-width: 560px) {
    .chronicle-cast > li { flex-direction: column; }
    .chronicle-cast img { width: 100%; height: 160px; }
}

/* Chronicle link on archive cards — quiet, so it never competes with "play" */
.arch-chronicle { margin: .45rem 0 0; }
.arch-chronicle a { font-family: var(--sans); font-size: .78rem; letter-spacing: .02em;
    color: var(--brass-dark); text-decoration: none; }
.arch-chronicle a:hover { color: var(--oxblood); text-decoration: underline; }

/* Front-page prose: the editorial body that makes the home page read as a
   publication rather than a launcher. Measure capped for comfortable reading;
   the surrounding cards keep their full width. */
.home-prose { margin: 2rem 0; }
.home-prose > p { max-width: 68ch; margin: 0 0 .9rem; }
.home-prose > p:last-child { margin-bottom: 0; }
.home-prose .btn { margin-top: .4rem; }

/* Newest guides and articles, surfaced on the home page */
/* Two columns, so the four newest pieces sit as a balanced 2x2 instead of
   leaving a lone card on a second row at desktop widths. */
.home-articles { list-style: none; margin: 1.1rem 0 1.4rem; padding: 0;
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 640px) { .home-articles { grid-template-columns: 1fr; } }
.home-articles > li { background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r); padding: 1rem 1.1rem; box-shadow: var(--sh-sm); }
.home-articles > li > a { font-family: var(--serif); font-size: 1.05rem;
    color: var(--ink-deep); text-decoration: none; display: block; }
.home-articles > li > a:hover { color: var(--oxblood); text-decoration: underline; }
.home-articles > li > p { margin: .45rem 0 0; font-size: .9rem; }
