/* Rust Italia — site styles. No external resources (CSP: style-src 'self'). */
:root {
  color-scheme: dark light;
  --bg: #0f0f0e;
  --bg-2: #161614;
  --surface: #1c1c1a;
  --surface-2: #242421;
  --line: #2f2f2b;
  --fg: #ecebe6;
  --muted: #a3a197;
  --faint: #6f6d65;
  --accent: #e0592a;
  --accent-soft: rgba(224, 89, 42, .14);
  --ok: #3fae5a;
  --ok-soft: rgba(63, 174, 90, .15);
  --bad: #d9443a;
  --bad-soft: rgba(217, 68, 58, .15);
  --gold: #d8a53a;
  --silver: #a9b0b8;
  --bronze: #b87a4b;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px rgba(0, 0, 0, .25);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f4f0;
    --bg-2: #ecebe5;
    --surface: #ffffff;
    --surface-2: #f3f2ee;
    --line: #e1dfd8;
    --fg: #1b1b19;
    --muted: #5f5d56;
    --faint: #8d8b83;
    --accent: #c4471c;
    --accent-soft: rgba(196, 71, 28, .1);
    --ok: #23843c;
    --ok-soft: rgba(35, 132, 60, .1);
    --bad: #b8322a;
    --bad-soft: rgba(184, 50, 42, .1);
    --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .08em; font-size: .95rem; }
.brand img { width: 28px; height: 28px; flex: none; }
.brand span b { color: var(--accent); font-weight: 800; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 14px; border-radius: 99px; font-size: .92rem; font-weight: 600; transition: color .15s, background .15s; }
.nav a:hover { color: var(--fg); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--fg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

/* Layout */
main { flex: 1; padding: 40px 0 56px; }
.page-head { margin-bottom: 28px; }
.eyebrow { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 8px; }
h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.15; margin: 0; letter-spacing: -.01em; overflow-wrap: anywhere; }
h2 { font-size: 1.1rem; margin: 0; }
.lead { color: var(--muted); margin: 10px 0 0; max-width: 60ch; }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head a { color: var(--muted); font-size: .9rem; text-decoration: none; }
.section-head a:hover { color: var(--accent); }
.cols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 22px; }
.hero { padding: 28px; display: grid; gap: 24px; grid-template-columns: 1fr auto; align-items: center; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 220px at 0% 0%, var(--accent-soft), transparent 70%); pointer-events: none; }
.hero > * { position: relative; }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; } }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat { padding: 18px 20px; }
.stat .label { display: block; color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat .value { display: block; font-size: 1.85rem; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: 4px; line-height: 1.2; overflow-wrap: anywhere; }
.stat .value.sm { font-size: 1.15rem; }
.stat .sub { display: block; color: var(--faint); font-size: .8rem; margin-top: 4px; }
.link-card { display: block; text-decoration: none; transition: border-color .15s, transform .15s; }
.link-card:hover { border-color: var(--accent); transform: translateY(-1px); }

/* Status pill */
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; padding: 7px 14px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.ok::before { box-shadow: 0 0 0 0 currentColor; animation: pulse 2s infinite; }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Capacity meter */
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.meter > span { display: block; height: 100%; width: var(--w, 0%); background: var(--accent); border-radius: inherit; transition: width .4s; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .name { font-weight: 600; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: .85rem; white-space: nowrap; }
.empty { padding: 22px 20px; color: var(--faint); text-align: center; }

/* Kill feed */
.feed li { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; }
.feed .who { overflow-wrap: anywhere; }
.feed .who .x { color: var(--faint); margin: 0 6px; }
.feed .meta { color: var(--muted); font-size: .85rem; }
.feed .time { color: var(--faint); font-size: .82rem; font-variant-numeric: tabular-nums; grid-row: span 2; align-self: center; }
.tag { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; vertical-align: 1px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { padding: 12px 16px; text-align: left; border-top: 1px solid var(--line); white-space: nowrap; }
thead th { border-top: 0; color: var(--faint); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
tbody tr:hover { background: var(--surface-2); }
td.player { white-space: normal; overflow-wrap: anywhere; font-weight: 600; min-width: 140px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; font-weight: 800; font-size: .85rem; background: var(--surface-2); color: var(--muted); }
.rank.r1 { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); }
.rank.r2 { background: color-mix(in srgb, var(--silver) 20%, transparent); color: var(--silver); }
.rank.r3 { background: color-mix(in srgb, var(--bronze) 22%, transparent); color: var(--bronze); }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search { flex: 1; max-width: 320px; min-width: 180px; background: var(--bg-2); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: .92rem; }
.search::placeholder { color: var(--faint); }

/* Raid bars */
.bars li { display: grid; grid-template-columns: 4.5rem 1fr 4.5rem; align-items: center; gap: 14px; }
.bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; width: var(--w, 0%); min-width: 3px; background: var(--accent); border-radius: inherit; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--faint); font-size: .85rem; padding: 22px 0; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* 404 */
.notfound { text-align: center; padding: 56px 20px; }
.notfound .lead { margin-inline: auto; }
.notfound .code { font-size: 4rem; font-weight: 800; color: var(--accent); line-height: 1; }
.btn { display: inline-block; margin-top: 20px; padding: 10px 18px; border-radius: 10px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; }

/* ---- Charts: palette validated with the dataviz six checks (both modes) ---- */
:root {
  --c1: #d95926; --c2: #3987e5; --c3: #199e70; --c4: #c98500; --c-other: #6f6d65;
  --grid: #2a2a27; --axis: #3a3a36; --tick: #8d8b83;
}
@media (prefers-color-scheme: light) {
  :root { --c1: #eb6834; --c2: #2a78d6; --c3: #1baf7a; --c4: #eda100; --c-other: #a3a197; --grid: #ecebe6; --axis: #d6d4cc; --tick: #77756d; }
}
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: .9rem; font-weight: 600; color: var(--muted); background: transparent; border: 0; border-radius: 9px; padding: 7px 14px; cursor: pointer; }
.seg button:hover { color: var(--fg); background: var(--surface-2); }
.seg button[aria-pressed="true"] { color: var(--fg); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.seg.sm { border-radius: 10px; padding: 3px; }
.seg.sm button { font-size: .8rem; padding: 5px 10px; border-radius: 7px; }
.chart-card { padding: 18px 20px 14px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.note { margin: 4px 0 0; color: var(--faint); font-size: .8rem; }
.note:empty { display: none; }
.chart-host { min-height: 120px; }
.chart-host .table-wrap { max-height: 420px; overflow: auto; }
.chart { display: block; overflow: hidden; max-width: 100%; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--tick); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .vlabel { fill: var(--fg); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .blabel { fill: var(--muted); font-size: 12.5px; }
.chart .dtotal { fill: var(--fg); font-size: 26px; font-weight: 750; }
.chart .mark { transition: opacity .15s; }
.chart .mark.on { opacity: .75; }
.chart .slice { stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .hit:focus-visible { stroke: var(--accent); stroke-width: 2; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { stroke: none; opacity: .1; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.s1 { fill: var(--c1); } .chart .line.s1 { stroke: var(--c1); fill: none; }
.s2 { fill: var(--c2); } .s3 { fill: var(--c3); } .s4 { fill: var(--c4); } .s-other { fill: var(--c-other); }
.key.s1 { background: var(--c1); } .key.s2 { background: var(--c2); } .key.s3 { background: var(--c3); } .key.s4 { background: var(--c4); } .key.s-other { background: var(--c-other); }
.donut { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; padding: 6px 0; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 200px; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; font-size: .92rem; }
.key { width: 12px; height: 12px; border-radius: 3px; }
.tt { position: fixed; z-index: 20; pointer-events: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; box-shadow: var(--shadow); display: grid; gap: 2px; font-size: .85rem; max-width: 260px; }
.tt strong { font-size: 1rem; font-variant-numeric: tabular-nums; }
.tt span { color: var(--muted); overflow-wrap: anywhere; }
.tt[hidden] { display: none; }
.highlight { padding: 22px 24px; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--surface); }
.highlight h2 { font-size: 1.35rem; overflow-wrap: anywhere; }
.highlight .lead { margin-top: 6px; }
.pad-x { padding: 16px 20px 0; }
.raid-hero { padding: 20px 24px; }
.raid-hero h2 { font-size: 1rem; font-weight: 600; }

/* Leaderboard tabs + record cards (2026-10-17) */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: -8px 0 28px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tabs a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: .95rem; padding: 8px 14px; border-radius: 10px; }
.tabs a:hover { color: var(--fg); background: var(--surface-2); }
.tabs a[aria-current="page"] { color: var(--fg); background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.block-title { font-size: 1.15rem; margin: 0 0 14px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.block-title .faint { font-weight: 500; }
.rec-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.rec { padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rec-click { cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.rec-click:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); transform: translateY(-1px); }
.rec-click:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rec-head { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.rec-txt { min-width: 0; }
.rec-head h3 { margin: 0; font-size: 1rem; line-height: 1.25; }
.rec-head .note { margin: 3px 0 0; line-height: 1.35; }
.rec-icon { font-size: 1.5rem; line-height: 1; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); flex: none; }
/* Leader: name on one line (ellipsis, full name in title), value underneath — never pushed to a new line. */
.rec-top { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; min-width: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 18%, transparent), transparent); }
.rec-name { font-weight: 750; font-size: 1.05rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-value { font-weight: 600; color: var(--muted); font-size: .9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rec-list { margin: 0; padding: 0 0 0 24px; display: grid; gap: 5px; font-size: .9rem; color: var(--muted); }
.rec-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: baseline; }
.rec-li-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.rec-li-value { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--faint); font-size: .85rem; }
.rec-more { margin-top: auto; font-size: .8rem; font-weight: 700; color: var(--accent); }
.rec-empty { opacity: .7; }
.rec-free { margin: 0; color: var(--faint); font-size: .9rem; }
.cell-sub { display: block; font-weight: 400; font-size: .8rem; color: var(--faint); }
.cell-sub:empty { display: none; }
.tag.muted-tag { background: var(--surface-2); color: var(--muted); }

/* Drill-down board: fixed header + ONE scrolling body (chart, search, table). No nested flex
   scroll areas, so nothing can be squeezed and painted over its neighbours. */
body:has(dialog[open]) { overflow: hidden; }
.detail { width: min(760px, calc(100vw - 24px)); max-height: min(860px, calc(100dvh - 32px)); padding: 0; margin: auto;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--fg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45); overflow: hidden; }
.detail::backdrop { background: rgba(0, 0, 0, .6); }
.detail[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.detail-head { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.detail-head > div { min-width: 0; flex: 1; }
.detail-head h2 { margin: 0; font-size: 1.2rem; line-height: 1.25; overflow-wrap: anywhere; }
.detail-head .note { margin: 3px 0 0; }
.detail-close { flex: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--fg); font-size: 1.35rem; line-height: 1; cursor: pointer; }
.detail-close:hover, .detail-close:focus-visible { border-color: var(--accent); }
.detail-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.detail-chart { padding: 14px 18px 6px; }
.detail-tools { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.detail-table .board-table { table-layout: fixed; }
.detail-table .board-table th:first-child, .detail-table .board-table td:first-child { width: 64px; }
.detail-table .board-table th:last-child, .detail-table .board-table td:last-child { width: 34%; }
.detail-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); box-shadow: inset 0 -1px 0 var(--line); }
.detail-table td.player > span:first-child { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-table td { white-space: normal; }
@media (max-width: 520px) {
  .detail { width: 100vw; max-height: 100dvh; border-radius: 0; }
  .detail-table .board-table th:last-child, .detail-table .board-table td:last-child { width: 40%; }
}
/* Long names elsewhere (tables, feeds): wrap only at word boundaries, never mid-layout overflow. */
td.player { overflow-wrap: anywhere; }
.list .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Hall of fame layout: one rhythm for every section (2026-10-17) */
.page-toolbar { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.page-toolbar .faint { white-space: normal; font-size: .85rem; line-height: 1.4; flex: 1 1 260px; }
.page-toolbar .seg { background: var(--bg-2); }
.hof { margin-top: 56px; }
.page-toolbar + .hof { margin-top: 40px; }
.hof-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.hof-head h2 { margin: 0; font-size: clamp(1.2rem, 2.2vw, 1.45rem); letter-spacing: -.01em; }
.hof-head p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; max-width: 60ch; }
.badge-live { display: inline-flex; align-items: center; gap: 7px; font-size: .75rem; font-weight: 700; color: var(--ok);
  background: var(--ok-soft); padding: 5px 11px; border-radius: 99px; white-space: nowrap; }
.badge-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hof .rec-grid { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); align-items: stretch; }
.page-note { margin: 48px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: .85rem; line-height: 1.5; }
@media (max-width: 640px) {
  .hof { margin-top: 40px; }
  .hof-head { margin-bottom: 16px; }
}

/* ---- Shared page template (every page, "coerenza fra le pagine") ---- */
.page-head { margin-bottom: 24px; }
.page-toolbar { margin-bottom: 0; }
.toolbar-note { flex: 1 1 260px; color: var(--faint); font-size: .85rem; line-height: 1.4; }
.toolbar-status { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; white-space: nowrap; }
.toolbar-status .faint { font-size: .85rem; }
.kpis { margin: 24px 0 0; }
.hero + .kpis { margin-top: 20px; }
.stat .value[data-sm] { font-size: 1.15rem; }
.sec { margin-top: 48px; min-width: 0; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.sec-title { min-width: 0; flex: 1 1 280px; }
.sec-title h2 { margin: 0; font-size: clamp(1.15rem, 2vw, 1.35rem); letter-spacing: -.01em; }
.sec-title p { margin: 5px 0 0; color: var(--muted); font-size: .92rem; max-width: 70ch; }
.sec-title p:empty { display: none; }
.sec-head .seg { flex: none; }
.sec-row { display: grid; gap: 24px 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); margin-top: 48px; }
.sec-row > .sec { margin-top: 0; display: flex; flex-direction: column; }
.sec-row > .sec > .card { flex: 1; }
.sec .chart-card { padding: 18px 20px 14px; }
.sec .highlight h3 { margin: 0; font-size: 1.3rem; overflow-wrap: anywhere; }
.sec .rec-grid { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.page-note { margin: 56px 0 0; }
.page-note:empty { display: none; }
@media (max-width: 640px) {
  .sec, .sec-row { margin-top: 36px; }
  .toolbar-status { margin-left: 0; }
}

/* Sub-groups inside a section (e.g. Mestieri e imprese): text-only label, no rule lines, no counters.
   Grouping comes from spacing, so nothing stacks up with the section divider at any width. */
.hof-group + .hof-group { margin-top: 36px; }
.hof-group > h3 { margin: 0 0 14px; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); line-height: 1.3; }

/* Record boxes: every box of a grid row shares the same 4 rows (CSS subgrid), so leaders, lists and
   links line up exactly across a row whatever the text. Titles and descriptions stay on one line. */
.rec-head h3, .rec-head .note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-txt { flex: 1; }
.rec-more { align-self: end; min-height: 1.2em; }
.rec-empty .rec-list:empty, .rec-empty .rec-more:empty { display: block; }
@supports (grid-template-rows: subgrid) {
  .rec-grid { grid-auto-rows: auto; }
  .rec { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 10px; align-content: start; }
  .rec > * { min-width: 0; }
  .rec-top, .rec-free { align-self: start; }
  .rec-list { align-self: start; }
}

/* Raid history + clickable blocks */
.sec-link { color: var(--accent); font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.sec-link:hover { text-decoration: underline; }
.link-block { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.link-block:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); transform: translateY(-1px); }
.link-block:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.link-more { display: block; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--accent); font-weight: 700; font-size: .85rem; }
.check { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-weight: 800; font-size: .9rem; }
.check.yes { color: var(--ok); background: var(--ok-soft); }
.check.no { color: var(--bad); background: var(--bad-soft); }
.check-word { display: block; font-size: .72rem; font-weight: 700; color: var(--ok); margin-top: 2px; }
.nowrap { white-space: nowrap; }
.pct { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.pct-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; min-width: 50px; }
.pct-bar > span { display: block; height: 100%; width: var(--w, 0%); background: var(--accent); border-radius: inherit; }
.pct-num { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--muted); min-width: 34px; text-align: right; }
#history td.player { min-width: 160px; }

/* Raid table (preview + history): fixed columns, two-line party cells, centred checks. */
.raid-wrap { overflow-x: auto; }
.raid-table { table-layout: fixed; width: 100%; min-width: 1060px; border-collapse: separate; border-spacing: 0; }
.raid-table.compact { min-width: 720px; }
.raid-table th, .raid-table td { padding: 10px 12px; vertical-align: middle; white-space: nowrap; }
.raid-table tbody tr { height: 58px; }
.raid-table th { font-size: .72rem; }
.raid-table col.c-when { width: 96px; }
.raid-table col.c-check { width: 92px; }
.raid-table col.c-pct { width: 150px; }
.raid-table col.c-num { width: 78px; }
.raid-table col.c-expl { width: 15%; }
.raid-table th.c-check, .raid-table td.c-check { text-align: center; }
.raid-table th.c-num, .raid-table td.c-num { text-align: right; font-variant-numeric: tabular-nums; }
.raid-table td.c-when { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .88rem; }
.raid-table td.c-party, .raid-table td.c-expl { overflow: hidden; }
.party-name, .party-sub, .c-expl > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-name { font-weight: 700; }
.party-sub { font-size: .8rem; color: var(--faint); margin-top: 2px; }
.c-expl > span { color: var(--muted); font-size: .88rem; }
.raid-table .pct { display: flex; width: 100%; min-width: 0; }
.raid-table td.c-pct.is-yes .pct-bar > span { background: var(--ok); }
.raid-table td.c-pct.is-no .pct-num { color: var(--faint); }
/* keep "Quando" visible while scrolling sideways on small screens */
.raid-table th.c-when, .raid-table td.c-when { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: inset -1px 0 0 var(--line); }
.raid-table tbody tr:hover td.c-when { background: var(--surface-2); }
.link-block .raid-table tbody tr:hover { background: transparent; }
#online-card { cursor: pointer; }
#online-card.is-static { cursor: default; transform: none; }
.link-more:empty { display: none; }
/* Biggest raid: one clear sentence + labelled facts */
.big-raid { display: grid; gap: 10px; }
.big-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.big-head h3 { margin: 0; font-size: clamp(1.1rem, 2.2vw, 1.35rem); overflow-wrap: anywhere; }
.big-who { margin: 0; color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.facts { display: grid; gap: 10px 16px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 6px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.facts div { min-width: 0; }
.facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }

/* Raid table must never scroll sideways: fit the page on desktop, stack rows into cards below 900 px. */
.raid-wrap { overflow-x: visible; }
.raid-table, .raid-table.compact { min-width: 0; }
.raid-table th, .raid-table td { padding: 10px 10px; }
.raid-table col.c-when { width: 120px; }
.raid-table col.c-check { width: 74px; }
.raid-table col.c-pct { width: 118px; }
.raid-table col.c-num { width: 68px; }
.raid-table col.c-expl { width: 13%; }
.raid-table .pct-bar { min-width: 28px; }
.raid-table col.c-tier { width: 122px; }
.raid-table.compact col.c-check, .raid-table col.c-check { width: 84px; }
.raid-table th { white-space: normal; line-height: 1.2; }
@media (max-width: 900px) {
  .raid-table, .raid-table tbody, .raid-table tr, .raid-table td { display: block; width: 100%; }
  .raid-table colgroup, .raid-table thead { display: none; }
  .raid-table tbody tr { height: auto; padding: 12px 16px; border-top: 1px solid var(--line); display: grid;
    grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .raid-table tbody tr:first-child { border-top: 0; }
  .raid-table td { padding: 0; border: 0; white-space: normal; min-width: 0; }
  .raid-table td::before { content: attr(data-label); display: block; font-size: .68rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
  .raid-table td.c-when { grid-column: 1 / -1; position: static; box-shadow: none; background: none; color: var(--fg); font-weight: 700; }
  .raid-table td.c-when::before { display: none; }
  .raid-table td.c-party { grid-column: span 1; }
  .raid-table th.c-check, .raid-table td.c-check { text-align: left; }
  .raid-table td.c-num { text-align: left; }
  .raid-table td.c-expl { grid-column: 1 / -1; }
  .raid-table td.empty { grid-column: 1 / -1; text-align: center; }
  .raid-table td.empty::before { display: none; }
}
@media (max-width: 420px) {
  .raid-table tbody tr { grid-template-columns: 1fr; }
}

/* Home "Questo wipe": six player tiles, 2 x 3, same height as the online list */
.top-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 1; }
.top-tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; min-width: 0;
  transition: border-color .15s, transform .15s; }
.top-tile:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); transform: translateY(-1px); }
.top-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.top-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 1.35rem; background: var(--surface-2); }
.top-txt { display: grid; min-width: 0; gap: 2px; }
.top-txt .label { color: var(--muted); font-size: .8rem; font-weight: 600; }
.top-name { font-weight: 750; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-txt .sub { color: var(--faint); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.sec-row > .sec > .top-grid { flex: 1; }
@media (max-width: 480px) { .top-grid { grid-template-columns: 1fr; } }

/* Server name in the home hero: compact single-line title + feature chips */
.server-name { font-size: clamp(1.25rem, 2.6vw, 1.75rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hero > div:first-child { min-width: 0; }
.server-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.server-tags:empty { display: none; }
.chip { font-size: .75rem; font-weight: 700; letter-spacing: .02em; padding: 4px 10px; border-radius: 99px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }

/* Preview cards: first 5 rows, the whole card opens the full list */
[data-expand] tbody > tr:nth-child(n+6), [data-expand] ul > li:nth-child(n+6) { display: none; }
[data-expand].expandable { cursor: pointer; transition: border-color .15s, transform .15s; }
[data-expand].expandable:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); transform: translateY(-1px); }
[data-expand].expandable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-expand] .link-more:empty { display: none; }
.detail-copy > .table-wrap, .detail-copy > table { border: 0; }
.detail-copy tbody > tr[hidden], .detail-copy li[hidden] { display: none; }
.detail-copy .list { border: 0; border-radius: 0; }

/* Full-table panel: wider dialog; below 700 px rows become labelled cards (no sideways scroll) */
.detail.wide { width: min(1100px, calc(100vw - 24px)); }
.detail-copy table { width: 100%; }
.detail-copy td.player { overflow-wrap: anywhere; white-space: normal; }
@media (max-width: 700px) {
  .detail-copy table, .detail-copy tbody, .detail-copy tr, .detail-copy td { display: block; width: 100%; }
  .detail-copy thead { display: none; }
  .detail-copy tbody > tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 12px 16px; border-top: 1px solid var(--line); }
  .detail-copy td { padding: 0; border: 0; text-align: left !important; white-space: normal; }
  .detail-copy td::before { content: attr(data-label); display: block; font-size: .68rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--faint); }
  .detail-copy td:first-child { grid-column: 1 / -1; }
  .detail-copy td:first-child::before { display: none; }
}

/* ---- Raid tiers (2026-10-19): tentato < parziale < riuscito < totale ---- */
.t-tentato { --tier: var(--muted); }
.t-parziale { --tier: var(--gold); }
.t-riuscito { --tier: var(--accent); }
.t-totale { --tier: var(--bad); }
.tier { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 7px; border-radius: 99px; font-size: .78rem; font-weight: 800;
  letter-spacing: .02em; white-space: nowrap; color: var(--tier); background: color-mix(in srgb, var(--tier) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--tier) 40%, transparent); }
.tier-icon { font-size: .95rem; line-height: 1; }
.tier.t-totale { color: #fff; background: linear-gradient(135deg, var(--bad), color-mix(in srgb, var(--bad) 60%, #000));
  border-color: transparent; box-shadow: 0 0 14px color-mix(in srgb, var(--bad) 55%, transparent); animation: tier-glow 2.4s ease-in-out infinite; }
@keyframes tier-glow { 50% { box-shadow: 0 0 22px color-mix(in srgb, var(--bad) 80%, transparent); } }
/* table rows: coloured edge on the first cell, faint wash on total raids */
.raid-table tbody tr[class^="t-"] td.c-when { box-shadow: inset 4px 0 0 var(--tier), inset -1px 0 0 var(--line); }
.raid-table tbody tr.t-totale td { background: color-mix(in srgb, var(--bad) 7%, var(--surface)); }
.raid-table tbody tr.t-tentato td:not(.c-when):not(.c-tier) { opacity: .72; }
.raid-table td.c-when .party-name { font-weight: 600; font-variant-numeric: tabular-nums; }
.kills-num { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px; font-weight: 800;
  color: var(--bad); background: var(--bad-soft); }
/* ladder: distribution bar + four level cards */
.tier-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-2); gap: 2px; margin-bottom: 16px; }
.tier-bar > span { width: var(--w); background: var(--tier); min-width: 6px; }
.tier-bar > .t-totale { background: linear-gradient(90deg, var(--bad), color-mix(in srgb, var(--bad) 60%, #000)); }
.tier-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tier-card { position: relative; display: grid; gap: 4px; align-content: start; padding: 16px 18px 16px; text-align: left; font: inherit; color: inherit;
  text-decoration: none; cursor: pointer; overflow: hidden; min-width: 0;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tier) 16%, transparent), transparent 65%), var(--surface);
  border-top: 3px solid var(--tier); transition: transform .15s, border-color .15s, box-shadow .15s; }
.tier-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px color-mix(in srgb, var(--tier) 22%, transparent); }
.tier-card:focus-visible { outline: 2px solid var(--tier); outline-offset: 2px; }
.tier-card[aria-pressed="true"] { border-color: var(--tier); box-shadow: 0 0 0 2px var(--tier), 0 10px 28px color-mix(in srgb, var(--tier) 28%, transparent); }
.tier-card[aria-pressed="false"] { opacity: .78; }
.tier-grid:not(:has([aria-pressed="true"])) .tier-card { opacity: 1; }
.tier-card-head { display: flex; justify-content: space-between; align-items: center; }
.tier-card-icon { font-size: 1.6rem; line-height: 1; }
.tier-step { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--tier); }
.tier-card-name { font-weight: 800; font-size: 1.02rem; margin-top: 6px; }
.tier-card-num { font-size: 2.1rem; font-weight: 800; line-height: 1.1; color: var(--tier); font-variant-numeric: tabular-nums; }
.tier-card-pct { color: var(--muted); font-size: .85rem; font-weight: 600; }
.tier-card-rule { color: var(--faint); font-size: .8rem; line-height: 1.35; margin-top: 4px; }
.tier-card.t-totale .tier-card-num { text-shadow: 0 0 18px color-mix(in srgb, var(--bad) 60%, transparent); }
.tier-card.t-totale::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--bad) 30%, transparent), transparent 70%); pointer-events: none; }
#big-result:empty { display: none; }
@media (max-width: 900px) {
  .raid-table tbody tr[class^="t-"] { box-shadow: inset 4px 0 0 var(--tier); }
  .raid-table tbody tr[class^="t-"] td.c-when { box-shadow: none; }
  .raid-table tbody tr.t-totale td { background: none; }
  .raid-table tbody tr.t-totale { background: color-mix(in srgb, var(--bad) 7%, var(--surface)); }
  .raid-table td.c-tier { grid-column: 1 / -1; }
  .check-word { display: inline; margin: 0 0 0 6px; }
}
/* "Quando" shows the full date + time on one line, never truncated */
.raid-table td.c-when .party-name, .raid-table td.c-when .party-sub { text-overflow: clip; overflow: visible; }

/* ---- Raid privacy (2026-10-20): rules, codename masks, feuds, period hint ---- */
.toolbar-hint { display: block; margin-top: 4px; color: var(--gold); font-weight: 600; }
.toolbar-hint[hidden] { display: none; }
/* Rules: icon / title / text on shared rows (subgrid), so every card of a row lines up */
.rules-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); grid-auto-rows: auto auto 1fr; }
.rule { display: grid; grid-row: span 3; grid-template-rows: subgrid; gap: 8px; padding: 16px; min-width: 0; text-decoration: none; }
.rule h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rule h3 { margin: 0; font-size: 1rem; }
.rule p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.rule code { font-family: var(--mono); font-size: .85em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; color: var(--fg); }
.rule-icon { font-size: 1.35rem; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); }
.rule-link { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--surface);
  transition: border-color .15s, transform .15s; }
.rule-link:hover { border-color: var(--accent); transform: translateY(-1px); }
.rule-link p { color: var(--fg); }
/* Mask cards: always 5 single-line rows so a row of cards stays aligned */
.mask { display: grid; grid-template-rows: auto auto auto auto auto; gap: 4px; padding: 16px; min-width: 0; }
.mask > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mask-icon { font-size: 1.35rem; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); margin-bottom: 4px; }
.mask-code { font-weight: 750; font-size: 1.05rem; }
.mask:not(.is-secret) .mask-code { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.mask-real { font-weight: 700; color: var(--accent); }
.mask.is-secret .mask-real { color: var(--faint); font-style: italic; font-weight: 600; letter-spacing: .04em; }
.mask-members { color: var(--muted); font-size: .88rem; }
.mask-stats { color: var(--faint); font-size: .8rem; font-variant-numeric: tabular-nums; }
#awards.top-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
div.top-tile:hover { transform: none; border-color: var(--line); }
/* Faide: versus rows. Left = who leads (accent), right = the challenger (blue), tug-of-war bar. */
:root { --vs-b: #3987e5; }
@media (prefers-color-scheme: light) { :root { --vs-b: #2a78d6; } }
.feud li.vs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 140px) minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px 20px; }
.vs-side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vs-side.b { justify-content: flex-end; text-align: right; }
.vs-name { font-weight: 750; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-n { flex: none; min-width: 2.6em; display: grid; justify-items: center; line-height: 1.1; padding: 4px 8px; border-radius: 8px; cursor: help; }
.vs-n b { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.vs-n small { font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.vs-side.a .vs-n { color: var(--accent); background: var(--accent-soft); }
.vs-side.b .vs-n { color: var(--vs-b); background: color-mix(in srgb, var(--vs-b) 14%, transparent); }
.vs-mid { display: grid; justify-items: center; gap: 4px; }
.vs-icon { font-size: 1rem; line-height: 1; }
.vs-bar { width: 100%; height: 6px; border-radius: 99px; background: var(--vs-b); overflow: hidden; display: block; }
.vs-bar > span { display: block; height: 100%; width: var(--w, 50%); background: var(--accent); border-right: 2px solid var(--surface); }
.vs-last { font-size: .72rem; color: var(--faint); white-space: nowrap; }
@media (max-width: 560px) { .feud li.vs { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); gap: 8px; padding: 12px 14px; } .vs-last { display: none; } }
/* Muro di ferro: shield with the raids held off + chips of who tried */
.wall-list li.wall { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px 20px; justify-content: stretch; }
.wall-shield { position: relative; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px 14px 22px 22px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--silver) 28%, transparent), var(--surface-2)); box-shadow: inset 0 0 0 1px var(--line); }
.wall-icon { font-size: 1.5rem; line-height: 1; opacity: .9; }
.wall-n { position: absolute; right: -6px; bottom: -6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center;
  font-size: .8rem; font-weight: 800; color: #fff; background: var(--ok); box-shadow: 0 0 0 3px var(--surface); font-variant-numeric: tabular-nums; }
.wall-txt { display: grid; gap: 3px; min-width: 0; }
.wall-name { font-weight: 750; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wall-sub { font-size: .78rem; color: var(--faint); }
.wall-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.wall-chip { font-size: .75rem; font-weight: 650; padding: 2px 9px; border-radius: 99px; color: var(--muted); background: var(--bad-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 30%, transparent); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ---- Regolamento + Guide (2026-10-20) ---- */
.site-footer a { color: inherit; text-decoration-color: var(--faint); }
.site-footer a:hover { color: var(--fg); }
/* Rulebook: numbered cards, icon + text */
.rulebook { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rule-item { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 16px; align-items: start; padding: 18px 20px; }
.rule-num { font-weight: 800; font-size: 1.4rem; line-height: 40px; min-width: 1.4em; color: var(--accent); font-variant-numeric: tabular-nums; }
.rule-body h2 { margin: 0 0 4px; font-size: 1.1rem; }
.rule-body p { margin: 0; color: var(--muted); line-height: 1.55; }
.rule-body .sec-link { display: inline-block; margin-top: 8px; }
code, kbd { font-family: var(--mono); font-size: .85em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--fg); }
kbd { box-shadow: inset 0 -2px 0 var(--line); }
/* Guide hub: same-size cards, icon / title / text on shared rows (subgrid) */
.guide-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); grid-auto-rows: auto auto 1fr; }
.guide-card { display: grid; grid-row: span 3; grid-template-rows: subgrid; gap: 8px; padding: 16px; text-decoration: none; min-width: 0;
  transition: border-color .15s, transform .15s; }
.guide-card:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); transform: translateY(-1px); }
.guide-card h3 { margin: 0; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }
/* Guide page */
.h1-icon { margin-right: .35em; }
.tldr { padding: 18px 22px; margin-bottom: 8px; border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--surface); }
.tldr h2 { margin: 0 0 8px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.tldr ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.prose { max-width: 75ch; line-height: 1.65; }
.prose p { margin: 0 0 12px; color: var(--fg); }
.prose a { color: var(--accent); }
.prose ul { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 8px; }
.prose ul.ticks li, .prose ul.crosses li { position: relative; padding-left: 28px; }
.prose ul.ticks li::before, .prose ul.crosses li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.prose ul.ticks li::before { content: "✓"; color: var(--ok); }
.prose ul.crosses li::before { content: "✗"; color: var(--bad); }
.prose ul.kit { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.prose ul.kit li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.prose ul.kit li span { font-size: 1.2rem; }
.prose ul.kit li b { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.callout { margin: 0 0 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.callout.tip { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: var(--ok-soft); }
.callout.warn { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: var(--bad-soft); }
.ok-text { color: var(--ok); }
.bad-text { color: var(--bad); }
.cmds { margin: 0 0 12px; display: grid; gap: 8px; }
.cmds div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; align-items: baseline; }
.cmds dt { font-family: var(--mono); font-weight: 700; color: var(--accent); }
.cmds dd { margin: 0; color: var(--muted); }
/* 24-hour raid clock */
/* hour labels sit under the bar: the bar reserves their space (margin-bottom) so nothing overlaps */
.clock { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; margin: 4px 0 30px; }
.clock .hr { height: 34px; border-radius: 4px; position: relative; }
.clock .hr.on { background: color-mix(in srgb, var(--ok) 70%, transparent); }
.clock .hr.off { background: color-mix(in srgb, var(--bad) 65%, transparent); }
.clock .hr i { position: absolute; left: 0; top: 38px; font-style: normal; font-size: .68rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.clock .hr:nth-child(odd) i { display: none; }
.prose .clock-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 16px; font-size: .85rem; color: var(--muted); }
.clock-legend .lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.clock-legend .lg.on::before { background: var(--ok); }
.clock-legend .lg.off::before { background: var(--bad); }
@media (max-width: 560px) { .clock .hr:nth-child(4n+3) i { display: none; } }
/* Previous / next guide */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; }
.pager a { display: grid; gap: 2px; padding: 14px 16px; text-decoration: none; min-width: 0; }
.pager a b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager a.next { text-align: right; }
.pager a:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
/* Step-by-step path (e.g. Esc -> Session -> External Website): numbered chips joined by arrows */
.steps { list-style: none; margin: 10px 0 12px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; }
.steps li { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 99px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: .92rem; color: var(--fg); }
.steps li + li { position: relative; margin-left: 22px; }
.steps li + li::before { content: "→"; position: absolute; left: -22px; width: 22px; text-align: center; color: var(--accent); font-weight: 800; }
.step-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: #fff; background: var(--accent); flex: none; }
.rule-body .steps { margin: 10px 0; }
.rule-body p + p { margin-top: 8px; }
