:root {
  --violet: #9e52cd;
  --violet-dark: #7435a1;
  --violet-soft: #f3eafb;
  --ink: #17141b;
  --muted: #746e79;
  --line: #e7e1e9;
  --paper: #fbfafd;
  --white: #fff;
  --green: #237a55;
  --red: #b3435c;
  --shadow: 0 18px 50px rgba(54, 34, 68, .08);
  --radius: 18px;
  --font-body: "Avenir Next", Avenir, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Arial Narrow", "Avenir Next Condensed", "Roboto Condensed", "PingFang SC", sans-serif;
  --font-data: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font-body); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
:focus-visible { outline: 3px solid rgba(158, 82, 205, .35); outline-offset: 3px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand small { margin-top: 5px; color: var(--violet); font-family: var(--font-data); font-size: 9px; font-weight: 700; letter-spacing: .26em; }
.brand-mark { position: relative; display: inline-flex; align-items: flex-end; gap: 3px; width: 30px; height: 30px; padding: 6px; border: 1px solid rgba(158,82,205,.35); border-radius: 50%; }
.brand-mark i { display: block; width: 4px; border-radius: 5px; background: var(--violet); }
.brand-mark i:nth-child(1) { height: 7px; opacity: .5; }
.brand-mark i:nth-child(2) { height: 15px; }
.brand-mark i:nth-child(3) { height: 10px; opacity: .75; }

.eyebrow { margin: 0 0 10px; color: var(--violet-dark); font-family: var(--font-data); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.muted { color: var(--muted); }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 9px; padding: 10px 17px; border: 1px solid transparent; border-radius: 11px; background: none; font-weight: 700; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-1px); }
.button--primary { color: var(--white); background: var(--violet); box-shadow: 0 9px 22px rgba(158,82,205,.22); }
.button--primary:hover { box-shadow: 0 12px 28px rgba(158,82,205,.3); }
.button--quiet { border-color: var(--line); background: var(--white); }
.button--quiet:hover { border-color: #c9b7d4; }
.button--wide { width: 100%; }
.button--small { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.button--large { min-height: 54px; font-size: 15px; }
.button--large span { margin-left: auto; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.text-button { padding: 5px 0; border: 0; color: var(--muted); background: none; font-size: 13px; cursor: pointer; }
.text-button:hover, .text-link:hover { color: var(--violet-dark); }
.text-link { color: var(--violet-dark); font-size: 13px; font-weight: 700; }
.danger { color: var(--red); }
.back-link { display: block; margin-bottom: 24px; color: var(--muted); font-size: 13px; }

.flash-stack { display: grid; gap: 8px; margin-bottom: 18px; }
.flash { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 15px; border: 1px solid var(--line); border-left: 3px solid var(--violet); border-radius: 9px; background: var(--white); font-size: 14px; box-shadow: 0 8px 25px rgba(30,20,35,.05); }
.flash--success { border-left-color: var(--green); }
.flash--error { border-left-color: var(--red); }
.flash--warning { border-left-color: #d6972c; }
.flash button { border: 0; background: none; color: var(--muted); cursor: pointer; }
.form-errors { margin-bottom: 18px; padding: 13px 16px; border: 1px solid #f0c6d1; border-radius: 10px; color: #8b3047; background: #fff5f7; font-size: 13px; }
.form-errors ul { margin: 7px 0 0; padding-left: 18px; }

.stack-form { display: grid; gap: 20px; }
.stack-form > label, .mode-panel label { display: grid; gap: 8px; font-size: 13px; font-weight: 700; }
.stack-form label small, .mode-panel label small { color: var(--muted); font-size: 11px; font-weight: 500; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fdfcfe; transition: border-color .18s, box-shadow .18s;
}
input[type="text"], input[type="password"], input[type="number"], select { height: 47px; padding: 0 13px; }
textarea { min-height: 90px; padding: 12px 13px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(158,82,205,.11); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--violet); }
code, pre { font-family: var(--font-data); }

/* Login */
.login-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 1.08fr) minmax(430px, .92fr); background: var(--white); }
.login-story { position: relative; display: flex; min-height: 700px; flex-direction: column; overflow: hidden; padding: 50px clamp(45px, 6vw, 90px); color: var(--white); background: #201924; isolation: isolate; }
.login-story::before { position: absolute; z-index: -1; top: -20%; right: -30%; width: 80%; aspect-ratio: 1; border: 1px solid rgba(158,82,205,.18); border-radius: 50%; box-shadow: 0 0 100px rgba(158,82,205,.12), inset 0 0 100px rgba(158,82,205,.08); content: ""; }
.login-story .brand small { color: #d6a9f2; }
.login-story .brand-mark { border-color: rgba(255,255,255,.25); }
.story-copy { max-width: 690px; margin: auto 0 110px; }
.story-copy .eyebrow { color: #d7b2ec; }
.story-copy h1 { margin: 0 0 25px; font-family: var(--font-display); font-size: clamp(50px, 5.3vw, 82px); font-stretch: condensed; font-weight: 800; letter-spacing: -.045em; line-height: .98; }
.story-copy > p:last-child { max-width: 520px; color: #bcb3c2; font-size: 16px; }
.login-panel { display: grid; place-items: center; padding: 50px; background: var(--paper); }
.login-card { width: min(100%, 410px); }
.login-card h2 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.login-card > .muted { margin: 7px 0 28px; font-size: 14px; }
.check-row { display: flex !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.check-row input { width: 16px; height: 16px; }
.login-note { margin: 22px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.login-note code { color: var(--violet-dark); }
.axis-art { position: absolute; right: 5%; bottom: 45px; left: 8%; height: 110px; opacity: .85; }
.axis-line { position: absolute; right: 0; bottom: 0; left: 0; border-bottom: 1px solid rgba(255,255,255,.25); }
.axis-art > i { position: absolute; bottom: 1px; left: var(--x); width: 8%; height: var(--h); border-radius: 3px 3px 0 0; background: linear-gradient(to top, var(--violet), #c17ae8); }
.axis-art b { position: absolute; bottom: 0; left: var(--x); height: 100px; border-left: 1px dashed #d4a5ee; color: #d4a5ee; font-family: var(--font-data); font-size: 8px; font-weight: 500; letter-spacing: .1em; transform: translateX(-50%); writing-mode: vertical-rl; }

/* Admin shell */
.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 245px 1fr; }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 29px 21px 20px; border-right: 1px solid #2b2430; color: #f6f0f8; background: #1f1a22; }
.brand--sidebar { padding: 0 9px 31px; }
.brand--sidebar small { color: #c888ef; }
.brand--sidebar .brand-mark { border-color: rgba(255,255,255,.16); }
.side-nav { display: grid; gap: 6px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 9px; color: #a9a0ae; font-size: 14px; font-weight: 600; transition: .18s ease; }
.side-nav a > span { width: 18px; color: #83788a; font-family: var(--font-data); text-align: center; }
.side-nav a:hover { color: var(--white); background: rgba(255,255,255,.04); }
.side-nav a.active { color: var(--white); background: rgba(158,82,205,.18); }
.side-nav a.active > span { color: #cc91ef; }
.sidebar-foot { display: grid; gap: 15px; margin-top: auto; padding: 20px 10px 0; border-top: 1px solid rgba(255,255,255,.08); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.user-chip small { color: #817888; font-size: 9px; letter-spacing: .08em; }
.user-chip strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #e5c2f8; background: rgba(158,82,205,.24); font-weight: 800; }
.admin-main { min-width: 0; }
.admin-content { width: min(100%, 1440px); margin: 0 auto; padding: 40px clamp(25px, 4vw, 64px) 80px; }
.mobile-bar { display: none; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 31px; }
.page-heading h1 { margin: 0; font-family: var(--font-display); font-size: clamp(34px, 3vw, 47px); letter-spacing: -.04em; line-height: 1; }
.page-heading > div > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 5px 30px rgba(51,38,58,.035); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 25px 18px; }
.panel-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.panel-heading .eyebrow { margin-bottom: 4px; }

.metric-grid { display: grid; margin-bottom: 22px; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 14px; }
.metric { position: relative; min-height: 151px; overflow: hidden; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.metric p { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric strong { display: block; font-family: var(--font-data); font-size: 39px; letter-spacing: -.05em; line-height: 1.1; }
.metric > span { display: block; margin-top: 12px; color: #938b98; font-size: 11px; }
.metric--featured { color: var(--white); border-color: #893eb5; background: linear-gradient(135deg, #8f47bc, #aa5fd6); box-shadow: 0 16px 35px rgba(158,82,205,.19); }
.metric--featured p, .metric--featured > span { color: rgba(255,255,255,.72); }
.metric-orbit { position: absolute; right: -45px; bottom: -58px; width: 170px; height: 170px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; box-shadow: inset 0 0 0 22px rgba(255,255,255,.035), inset 0 0 0 50px rgba(255,255,255,.03); }
.dashboard-grid { display: grid; margin-bottom: 22px; grid-template-columns: minmax(0, 2.3fr) minmax(230px, .7fr); gap: 14px; }
.trend-panel { min-height: 355px; }
.legend { color: var(--muted); font-size: 11px; }
.legend i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--violet); }
.trend-chart { height: 255px; padding: 10px 24px 18px; }
.trend-chart svg { display: block; width: 100%; height: 205px; overflow: visible; }
.trend-chart .chart-labels { display: flex; justify-content: space-between; color: #a39ba8; font-family: var(--font-data); font-size: 9px; }
.pulse-panel { position: relative; min-height: 355px; overflow: hidden; padding: 25px; color: var(--white); background: #251e29; }
.pulse-panel .eyebrow { color: #c98bea; }
.pulse-panel h2 { margin: 38px 0 0; font-family: var(--font-data); font-size: 58px; letter-spacing: -.06em; }
.pulse-panel > p:nth-of-type(2) { max-width: 180px; margin: 0; color: #aba1af; font-size: 13px; }
.pulse-rings { position: absolute; right: -35px; bottom: -55px; width: 220px; aspect-ratio: 1; }
.pulse-rings i { position: absolute; inset: calc(var(--n, 0) * 19px); border: 1px solid rgba(199,132,237,.19); border-radius: 50%; }
.pulse-rings i:nth-child(2) { --n: 1; }.pulse-rings i:nth-child(3) { --n: 2; }
.pulse-rings b { position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; border: 3px solid #d38ff6; border-radius: 50%; box-shadow: 0 0 24px #bd64ee; }
.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 25px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #8d8591; background: #fbfafd; font-family: var(--font-data); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
td { padding: 15px 25px; border-bottom: 1px solid #f0ecf2; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
td strong, td small { display: block; }
td small { max-width: 360px; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 20px; color: #777078; background: #f1eef2; font-size: 10px; font-weight: 700; }
.status::before { width: 5px; height: 5px; border-radius: 50%; background: #a59fa7; content: ""; }
.status--live { color: var(--green); background: #ebf7f1; }
.status--live::before { background: #35a373; box-shadow: 0 0 0 3px rgba(53,163,115,.12); }
.icon-link { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--violet-dark); }
.empty-state { display: grid; place-items: center; padding: 55px 25px; text-align: center; }
.empty-state > span { color: #c498dd; font-size: 38px; }
.empty-state h3 { margin: 10px 0 3px; }
.empty-state p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }

.split-layout { display: grid; grid-template-columns: minmax(330px, .75fr) minmax(470px, 1.25fr); gap: 18px; align-items: start; }
.form-panel { padding-bottom: 25px; }
.form-panel .stack-form { padding: 0 25px; }
.count-badge { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: var(--violet-dark); background: var(--violet-soft); font-family: var(--font-data); font-size: 11px; }
.conference-list > article { display: grid; align-items: center; padding: 19px 24px; border-top: 1px solid var(--line); grid-template-columns: 48px minmax(0,1fr) auto; gap: 15px; }
.conference-monogram { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 12px; color: var(--violet-dark); background: var(--violet-soft); font-family: var(--font-data); font-size: 12px; font-weight: 800; }
.conference-copy { min-width: 0; }
.conference-copy h3 { margin: 0; font-family: var(--font-data); font-size: 14px; }
.conference-copy p { overflow: hidden; margin: 2px 0; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.conference-copy a { color: var(--violet-dark); font-size: 10px; font-weight: 700; }
.row-actions { display: flex; align-items: center; gap: 13px; }
.narrow-panel { max-width: 720px; padding: 27px; }
.form-grid-2 { display: grid; grid-template-columns: 1.5fr .5fr; gap: 15px; }
.toggle-list { display: grid; gap: 10px; }
.toggle-row { display: flex !important; align-items: center; gap: 13px !important; padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.toggle-row input { width: 18px; height: 18px; }
.toggle-row > span { display: flex; flex-direction: column; }
.toggle-row strong { font-size: 13px; }
.editor-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(270px,.55fr); gap: 18px; align-items: start; }
.editor-layout > .panel:first-child { padding: 26px; }
.guide-panel { padding: 25px; }
.guide-panel h2 { margin: 0 0 18px; font-size: 19px; }
.guide-panel pre { overflow-x: auto; padding: 15px; border-radius: 10px; color: #dcb8ef; background: #251e29; font-size: 10px; line-height: 1.8; }
.guide-panel > p:last-of-type { color: var(--muted); font-size: 12px; }
.guide-panel hr { margin: 25px 0; border: 0; border-top: 1px solid var(--line); }
.danger-zone { display: grid; gap: 12px; }
.danger-zone h3 { margin: 0; font-size: 14px; }
.form-card-grid { display: grid; grid-template-columns: repeat(3, minmax(250px,1fr)); gap: 16px; }
.form-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: transform .18s, box-shadow .18s; }
.form-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.form-card-top, .form-card-actions, .form-card-stats { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.year-stamp { color: var(--violet-dark); font-family: var(--font-data); font-size: 11px; font-weight: 800; }
.form-card h2 { margin: 24px 0 0; font-family: var(--font-display); font-size: 34px; letter-spacing: -.04em; }
.form-card > p { height: 38px; margin: 2px 0 16px; overflow: hidden; color: var(--muted); font-size: 11px; }
.field-tags { display: flex; min-height: 54px; flex-wrap: wrap; align-content: flex-start; gap: 6px; }
.field-tags span { padding: 4px 8px; border-radius: 6px; color: var(--violet-dark); background: var(--violet-soft); font-size: 9px; font-weight: 700; }
.form-card-stats { justify-content: flex-start; margin: 17px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.form-card-stats span { color: var(--muted); font-size: 10px; }
.form-card-stats strong { color: var(--ink); font-family: var(--font-data); }
.wide-empty { grid-column: 1/-1; }

/* Public score page */
.public-body { margin: 0; background: #f9f7fb; line-height: 1.35; }
.public-shell { width: 100%; margin: 0; }
.public-header { display: flex; height: 60px; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); }
.public-header .brand { gap: 9px; }
.public-header .brand-mark { width: 27px; height: 27px; }
.dblp-link { color: var(--muted); font-size: 12px; font-weight: 700; }
.public-shell > .flash-stack { margin: 0; }
.public-hero { position: relative; display: flex; min-height: 190px; align-items: center; justify-content: space-between; overflow: hidden; padding: 24px 18px; border-bottom: 1px solid var(--line); }
.public-hero::after { position: absolute; right: 14%; bottom: -105px; width: 220px; height: 220px; border: 1px solid rgba(158,82,205,.18); border-radius: 50%; box-shadow: inset 0 0 0 25px rgba(158,82,205,.025), inset 0 0 0 55px rgba(158,82,205,.025); content: ""; }
.public-hero h1 { margin: 0; font-family: var(--font-display); font-size: clamp(58px, 12vw, 96px); font-weight: 800; letter-spacing: -.07em; line-height: .82; }
.public-hero > div:first-child > p:last-child { max-width: 540px; margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.hero-count { z-index: 1; display: flex; min-width: 150px; flex-direction: column; text-align: right; }
.hero-count strong { font-family: var(--font-data); font-size: 34px; }
.hero-count span { color: var(--muted); font-size: 11px; }
.chart-section { padding: 8px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.section-heading .eyebrow, .submission-intro .eyebrow { margin-bottom: 3px; }
.section-heading h2, .submission-intro h2 { margin: 0; font-family: var(--font-display); font-size: 25px; letter-spacing: -.035em; line-height: 1.1; }
.distribution-note, .submission-intro > p:not(.eyebrow) { margin: 4px 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.histogram-stack { display: grid; gap: 6px; }
.histogram-card { padding: 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); }
.histogram-heading { display: flex; align-items: center; justify-content: space-between; }
.histogram-heading h3 { margin: 0; font-size: 14px; line-height: 1.2; }
.histogram-heading span { color: var(--muted); font-family: var(--font-data); font-size: 11px; }
.histogram { position: relative; min-height: 185px; margin-top: 7px; overflow: hidden; border-bottom: 1px solid #cfc7d2; }
.histogram::before { position: absolute; inset: 0 0 1px; background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), #eeeaf0 25%); content: ""; }
.histogram-plot { position: absolute; inset: 0 3px 39px; display: flex; align-items: flex-end; gap: 2px; }
.hist-bar-wrap { position: relative; z-index: 1; display: flex; height: 100%; min-width: 0; flex: 1; align-items: flex-end; justify-content: center; }
.hist-bar { width: 72%; min-height: 2px; border-radius: 2px 2px 0 0; background: linear-gradient(to top, var(--violet-dark), #b768e1); transition: height .6s cubic-bezier(.2,.8,.2,1); }
.hist-bar-wrap small { position: absolute; bottom: -34px; width: max-content; color: #665f69; font-family: var(--font-data); font-size: 9px; line-height: 1.05; text-align: center; white-space: nowrap; }
.hist-bar-wrap em { position: absolute; bottom: calc(var(--bar-height) + 3px); color: var(--ink); font-family: var(--font-data); font-size: 9px; font-style: normal; }
.percentile-list { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 7px; }
.percentile-list span { color: var(--muted); font-family: var(--font-data); font-size: 10px; }
.percentile-list strong { color: var(--ink); }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #827a86; font-size: 13px; }
.submission-section { display: grid; padding: 10px 8px 12px; grid-template-columns: minmax(220px,.62fr) minmax(360px,1.38fr); gap: 12px; align-items: start; }
.submission-intro { position: sticky; top: 8px; }
.submission-intro li { color: var(--muted); font-size: 13px; line-height: 1.35; }
.submission-intro ul { display: grid; gap: 3px; margin: 7px 0 0; padding: 7px 0 0 17px; border-top: 1px solid var(--line); }
.score-entry-form { display: grid; gap: 6px; }
.score-fieldset { margin: 0; padding: 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); }
.score-fieldset legend { display: flex; align-items: center; gap: 6px; padding: 0 4px; font-size: 14px; font-weight: 800; }
.score-fieldset legend span { color: var(--violet-dark); font-family: var(--font-data); font-size: 11px; }
.public-body .mode-panel label { gap: 4px; font-size: 13px; }
.public-body .mode-panel label small { font-size: 11px; line-height: 1.3; }
.public-body input[type="number"], .public-body textarea { border-radius: 5px; }
.public-body input[type="number"] { height: 38px; }
.public-body textarea { min-height: 62px; padding: 7px 9px; }
.public-body .button, .public-body .flash { border-radius: 5px; }
.public-body .button--large { min-height: 42px; padding: 7px 12px; }
.segmented { display: grid; margin-bottom: 6px; padding: 2px; border-radius: 5px; background: #f2eff4; grid-template-columns: 1fr 1fr; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 6px 8px; border-radius: 4px; color: var(--muted); font-size: 12px; line-height: 1.2; text-align: center; cursor: pointer; }
.segmented input:checked + span { color: var(--ink); background: var(--white); box-shadow: 0 3px 10px rgba(43,30,48,.08); font-weight: 700; }
.mode-panel.hidden { display: none; }
.score-range { display: flex; align-items: center; gap: 5px; color: var(--muted); font-family: var(--font-data); font-size: 9px; }
.score-range i { height: 2px; flex: 1; background: linear-gradient(to right, #dbc2e9, var(--violet)); }
.option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px,1fr)); gap: 4px; }
.option-grid label { position: relative; }
.option-grid input { position: absolute; opacity: 0; }
.option-grid span { display: flex; min-height: 50px; padding: 4px; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; line-height: 1.2; text-align: center; cursor: pointer; }
.option-grid strong { color: var(--ink); font-family: var(--font-data); font-size: 15px; }
.option-grid input:checked + span { border-color: var(--violet); color: var(--violet-dark); background: var(--violet-soft); box-shadow: 0 0 0 2px rgba(158,82,205,.1); }
.dev-note { margin: 0; padding: 6px 8px; border: 1px dashed #d3c3dc; border-radius: 5px; color: var(--muted); background: #fbf8fd; font-size: 11px; line-height: 1.3; }
.privacy-note { margin: 0; color: var(--muted); font-size: 11px; text-align: center; }
.score-entry-form .flash-stack { gap: 4px; margin: 0; }
.score-entry-form .flash { padding: 7px 9px; font-size: 12px; line-height: 1.3; }
.public-footer { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 16px 14px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--font-data); font-size: 11px; }
.public-footer span { color: var(--ink); font-weight: 800; }
.public-footer p { margin: 0; }

.error-body { display: grid; min-height: 100vh; place-items: center; background: var(--paper); }
.error-page { width: min(90%, 580px); padding: 70px 25px; text-align: center; }
.error-page .brand-mark { margin: 0 auto 30px; }
.error-page h1 { margin: 0; font-family: var(--font-display); font-size: 45px; letter-spacing: -.04em; }
.error-page > p:not(.eyebrow) { margin: 12px 0 25px; color: var(--muted); }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .form-card-grid { grid-template-columns: repeat(2, 1fr); }
  .login-layout { grid-template-columns: .9fr 1.1fr; }
  .story-copy h1 { font-size: 52px; }
}

@media (max-width: 800px) {
  .admin-shell { display: block; }
  .sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: 245px; transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 10px 0 40px rgba(0,0,0,.25); }
  .mobile-bar { position: sticky; z-index: 40; top: 0; display: flex; height: 58px; align-items: center; gap: 15px; padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(251,250,253,.92); backdrop-filter: blur(12px); font-size: 13px; font-weight: 800; }
  .menu-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
  .admin-content { padding: 27px 18px 60px; }
  .split-layout, .editor-layout { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .pulse-panel { min-height: 250px; }
  .login-layout { display: block; }
  .login-story { min-height: 420px; padding: 30px; }
  .story-copy { margin: auto 0 80px; }
  .story-copy h1 { font-size: 48px; }
  .login-panel { padding: 55px 25px; }
  .submission-section { grid-template-columns: 1fr; gap: 9px; }
  .submission-intro { position: static; }
  .submission-intro ul { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .button { width: 100%; }
  .metric-grid, .form-card-grid { grid-template-columns: 1fr; }
  .metric { min-height: 130px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .conference-list > article { grid-template-columns: 42px 1fr; }
  .row-actions { grid-column: 2; justify-content: flex-start; }
  .login-story { min-height: 390px; }
  .story-copy h1 { font-size: 39px; }
  .axis-art { height: 80px; }
  .public-shell { width: 100%; }
  .public-header { height: 56px; padding: 0 12px; }
  .dblp-link { font-size: 0; }
  .dblp-link::after { font-size: 17px; content: "↗"; }
  .public-hero { min-height: 170px; align-items: flex-start; flex-direction: column; justify-content: center; padding: 20px 14px; }
  .public-hero h1 { font-size: 58px; }
  .hero-count { margin-top: 16px; text-align: left; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading > p { text-align: left; }
  .chart-section { padding: 7px; }
  .submission-section { padding: 9px 7px 11px; }
  .histogram-card, .score-fieldset { padding: 8px; }
  .histogram { min-height: 180px; }
  .public-footer { padding: 14px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
