.olympiad-layout {
  max-width: 1440px;
  min-height: calc(100vh - 160px);
  margin: 0 auto;
}
.operations-menu { position: relative; flex: 0 0 auto; }
.operations-menu summary {
  cursor: pointer;
  padding: .55rem .8rem;
  border: 1px solid #b9ceca;
  border-radius: .5rem;
  color: #17433d;
  font-weight: 700;
}
.operations-panel {
  position: absolute;
  z-index: 10;
  right: 0;
  top: calc(100% + .5rem);
  width: min(360px, calc(100vw - 32px));
  max-height: 72vh;
  overflow: auto;
  padding: 1rem;
  border: 1px solid #b9ceca;
  border-radius: .75rem;
  background: white;
  box-shadow: 0 14px 36px #192d232a;
}
.operations-nav { display: grid; gap: 4px; }
.operations-nav button { text-align: left; }
.operations-nav .active { background: #def0e7; }
.olympiad-footer {
  padding: 1.5rem 1rem;
  border-top: 1px solid #dbe5df;
  text-align: center;
  font-size: .88rem;
  color: #3c5c53;
}
.oly-entry {
  width: min(100%, 1120px);
  margin-inline: auto;
  color: var(--oly-ink);
  line-height: 1.6;
}
.oly-paper .oly-answer, .oly-paper .oly-picker { display: inline-grid; margin: 0 .75rem .65rem 0; }
.oly-parent-offers { margin-top: 1rem; padding: 1rem; border: 1px solid var(--oly-line); border-radius: .75rem; }
.oly-parent-offers .oly-link { display: inline-block; margin-right: 1rem; }
.oly-feedback textarea { width: 100%; min-height: 5rem; font: inherit; }
.oly-entry [hidden] { display: none !important; }
.oly-hero {
  padding: clamp(1.4rem, 5vw, 4rem);
  border: 1px solid var(--oly-line);
  border-radius: 1.2rem;
  background: #e4f1ea;
}
.oly-share-welcome {
  margin: 0 0 1.15rem;
  padding: .8rem 1rem;
  border-left: .25rem solid var(--oly-green);
  border-radius: .4rem;
  background: #fff;
  color: var(--oly-ink);
  font-weight: 700;
}
.oly-eyebrow {
  margin: 0 0 .55rem;
  color: var(--oly-green);
  font-size: .88rem;
  font-weight: 800;
}
.oly-entry .oly-hero h1 {
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: 1.12;
  letter-spacing: -.065em;
  margin: 0 0 1rem;
  color: var(--oly-ink);
}
.oly-intro { max-width: 35rem; margin: 0 0 1.4rem; color: var(--oly-muted); }
.oly-actions, .oly-picker-row { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; }
.oly-entry .oly-button {
  font: inherit;
  font-weight: 750;
  min-height: 44px;
  padding: .55rem .95rem;
  border: 1px solid #79a399;
  border-radius: .5rem;
  background: #fff;
  color: var(--oly-green);
  cursor: pointer;
}
.oly-entry .oly-button.oly-primary { background: var(--oly-green); border-color: var(--oly-green); color: #fff; }
.oly-entry .oly-button:disabled { opacity: .65; cursor: default; }
.oly-entry :focus-visible, .operations-menu :focus-visible { outline: 3px solid #ad6316; outline-offset: 3px; }
.oly-roadmap { margin-top: 2.2rem; }
.oly-entry h2 { margin: 0 0 .85rem; line-height: 1.3; }
.oly-levels, .oly-labs, .oly-scores { list-style: none; margin: 0; padding: 0; }
.oly-levels { display: grid; gap: .8rem; }
.oly-level {
  border: 1px solid var(--oly-line);
  border-left: 4px solid #569785;
  border-radius: .7rem;
  background: #fff;
  padding: 1.1rem 1.25rem;
}
.oly-level-number {
  color: var(--oly-green);
  font-size: .88rem;
  font-weight: 800;
}
.oly-level h3, .oly-explanation h3 { margin: .15rem 0; }
.oly-level p { color: var(--oly-muted); margin: .25rem 0 .7rem; }
.oly-picker { width: min(100%, 22rem); }
.oly-picker select, .oly-answer input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: .45rem .65rem;
  margin-top: .25rem;
  border: 1px solid #79a399;
  border-radius: .45rem;
  background: #fff;
  color: var(--oly-ink);
  font: inherit;
}
.oly-entry .oly-link {
  display: inline-block;
  margin-right: .8rem;
  color: var(--oly-green);
  text-decoration: underline;
  text-underline-offset: .2em;
  font-weight: 750;
}
.oly-labs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.oly-labs li { border-radius: .45rem; background: #edf5f0; padding: .7rem; }
.oly-labs p { margin-bottom: 0; font-size: .9rem; }
.oly-panel {
  margin-top: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  border-radius: .8rem;
  border: 1px solid var(--oly-line);
  background: white;
}
.oly-form fieldset { border: 0; min-inline-size: 0; padding: 0; margin: 0 0 .8rem; }
.oly-prompt { font-weight: 700; margin-bottom: .65rem; white-space: pre-line; }
.oly-choice {
  display: flex;
  gap: .65rem;
  align-items: center;
  margin: .35rem 0;
  padding: .4rem .7rem;
  min-height: 44px;
  border: 1px solid var(--oly-line);
  border-radius: .45rem;
  cursor: pointer;
}
.oly-choice input { width: auto; margin: 0; accent-color: var(--oly-green); }
.oly-answer input { width: 8rem; }
.oly-feedback:empty, .oly-explanation:empty, .oly-hints:empty { display: none; }
.oly-feedback { margin: .65rem 0; color: var(--oly-green); font-weight: 700; }
.oly-form + .oly-button { margin-top: .7rem; }
.oly-explanation { padding: .85rem 1rem; border-radius: .5rem; background: #e4f1ea; margin-top: .8rem; }
.oly-explanation p { margin: .25rem 0 0; white-space: pre-line; }
.oly-chart {
  display: grid;
  grid-template-columns: minmax(120px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 1.2rem;
  max-width: 36rem;
  margin-bottom: 1rem;
}
.oly-chart svg { width: 100%; }
.oly-radar-grid { fill: none; stroke: #93b3a9; }
.oly-radar-area { fill: #0b806653; stroke: var(--oly-green); stroke-width: 2; }
.oly-radar-dot { fill: var(--oly-green); }
.oly-scores li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem; padding: .3rem 0; }
.oly-print-sheet { display: none; }
@media print {
  @page olympiad-a4 { size: A4; margin: 16mm; }
  body:has(> .oly-print-sheet) > :not(.oly-print-sheet) { display: none !important; }
  .oly-print-sheet { display: block; color: #000; page: olympiad-a4; }
  .oly-print-sheet section { break-inside: avoid; }
  .oly-print-sheet p { white-space: pre-line; }
  .oly-print-lines { min-height: 25mm; border-bottom: 1px solid #555; }
}
@media (max-width: 640px) {
  .oly-labs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oly-chart { grid-template-columns: 1fr; }
  .oly-chart svg { max-width: 170px; margin-inline: auto; }
  .oly-actions .oly-button { flex: 1 1 100%; }
}

.omr-review label { display: block; margin-block: .65rem; }
.omr-review input[type=file] { display: block; max-width: 100%; margin-top: .25rem; }
.omr-choice-row { display: flex; flex-wrap: wrap; gap: .3rem; margin: .6rem 0; border: 1px solid #c7d3d9; border-radius: .5rem; padding: .45rem; min-width: 0; }
.omr-review button { min-width: 44px; min-height: 44px; border: 1px solid #a5bac5; border-radius: .5rem; background: #fff; color: #17445c; font: inherit; padding: .35rem .6rem; cursor: pointer; }
.omr-review button[aria-pressed=true], .omr-review button[type=submit]:enabled { background: #17445c; border-color: #17445c; color: #fff; }
.omr-review button:disabled { opacity: .55; cursor: default; }

@font-face {
  font-family: "Pretendard Variable";
  src: url("/site/PretendardVariable.woff2") format("woff2");
  font-weight: 45 920;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/site/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  --oly-bg: #F6F8FC;
  --oly-surface: #FFFFFF;
  --oly-ink: #0F172A;
  --oly-ink-muted: #475569;
  --oly-primary: #1D4ED8;
  --oly-primary-hover: #1E40AF;
  --oly-primary-soft: #EFF6FF;
  --oly-mint: #0D9488;
  --oly-mint-soft: #F0FDFA;
  --oly-amber: #D97706;
  --oly-amber-soft: #FFFBEB;
  --oly-rose: #E11D48;
  --oly-rose-soft: #FFF1F2;
  --oly-border: #E2E8F0;
  --oly-radius-lg: 22px;
  --oly-radius-md: 14px;
  --oly-radius-pill: 999px;
  --oly-font: "Pretendard Variable", Pretendard, -apple-system, "Malgun Gothic", sans-serif;
  --oly-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
.oly-shell {
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
}
.oly-header, .olympiad-footer {
  background: var(--oly-surface);
  color: var(--oly-ink);
  font-family: var(--oly-font);
}
.oly-header {
  position: sticky;
  z-index: 12;
  top: 0;
  border-bottom: 1px solid var(--oly-border);
}
.oly-header-inner, .oly-header-actions, .oly-header-nav, .oly-footer-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.oly-header-inner { min-height: 64px; justify-content: space-between; }
.oly-header-nav a, .oly-brand, .oly-header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 49px;
  text-decoration: none;
}
.oly-header-nav a { padding-inline: 8px; font-size: .92rem; font-weight: 700; color: var(--oly-ink-muted); }
.oly-header-nav a:hover { color: var(--oly-primary); }
.oly-brand { gap: 8px; color: var(--oly-ink); font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.oly-brand svg { flex: none; }
.oly-brand-badge {
  padding: 4px 7px;
  color: var(--oly-primary-hover);
  background: var(--oly-primary-soft);
  border-radius: 6px;
  font: 700 .65rem/1.2 var(--oly-mono);
  letter-spacing: 0;
}
.oly-header-cta {
  padding-inline: 15px;
  color: white;
  background: var(--oly-primary);
  border-radius: var(--oly-radius-pill);
  font-size: .88rem;
  font-weight: 800;
  white-space: nowrap;
}
.oly-header-cta:hover, .oly-entry .oly-button.oly-primary:hover {
  color: white;
  background: var(--oly-primary-hover);
}
.oly-header .operations-menu summary {
  display: flex;
  align-items: center;
  min-height: 49px;
  padding: 6px 10px;
  border-color: var(--oly-border);
  border-radius: var(--oly-radius-md);
  background: white;
  color: var(--oly-ink-muted);
  font-size: .84rem;
  white-space: nowrap;
}
.oly-header summary::after { content: "⌄"; margin-inline-start: .35rem; }
.oly-header .operations-panel {
  z-index: 20;
  border-color: var(--oly-border);
  color: var(--oly-ink);
}
.oly-header .operations-panel :is(a, button, input) { min-height: 49px; }
.oly-header :focus-visible, .olympiad-footer :focus-visible {
  outline: 3px solid var(--oly-primary);
  outline-offset: 3px;
}
.olympiad-footer { padding-inline: 0; border-color: var(--oly-border); }
.oly-footer-inner { justify-content: space-between; text-align: left; flex-wrap: wrap; }
.oly-footer-inner p { margin: 0; color: var(--oly-ink-muted); }
body:has(.olympiad-layout) { background: var(--oly-bg); }
.olympiad-layout:has(.oly-entry) .main {
  padding: clamp(20px, 4vw, 52px) 16px 60px;
}
.oly-entry {
  --oly-green: var(--oly-primary);
  --oly-line: var(--oly-border);
  --oly-muted: var(--oly-ink-muted);
  width: min(100%, 1200px);
  font-family: var(--oly-font);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.oly-entry :is(section, .oly-level) { scroll-margin-top: 86px; }
.oly-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(26px, 4.2vw, 58px);
  border: 1px solid var(--oly-border);
  border-radius: var(--oly-radius-lg);
  background: var(--oly-surface);
}
.oly-eyebrow {
  display: inline-block;
  padding: 5px 10px;
  margin-bottom: 14px;
  background: var(--oly-primary-soft);
  border-radius: var(--oly-radius-pill);
}
.oly-entry .oly-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.16;
  letter-spacing: -.03em;
  font-weight: 800;
}
.oly-hero h1 span { display: block; color: var(--oly-primary); margin-top: 4px; }
.oly-domain-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 19px 0 0;
}
.oly-domain-chips li, .oly-gap-pin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--oly-radius-pill);
  font-size: .79rem;
  font-weight: 700;
  padding: 4px 9px;
}
.oly-domain-chips li { background: var(--oly-bg); color: var(--oly-ink-muted); border: 1px solid var(--oly-border); }
.oly-share-welcome { border-left-color: var(--oly-mint); background: var(--oly-mint-soft); }
.oly-showcase {
  padding: 12px;
  background: var(--oly-bg);
  border: 1px solid var(--oly-border);
  border-radius: var(--oly-radius-lg);
}
.oly-preview-report {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  align-items: center;
  gap: 8px;
  padding: 15px;
  background: var(--oly-primary-soft);
  border-radius: var(--oly-radius-md);
}
.oly-preview-label { margin: 0; color: var(--oly-ink-muted); font-size: .8rem; font-weight: 700; }
.oly-preview-copy strong { display: block; margin-block: 4px 8px; font-size: clamp(1rem, 1.9vw, 1.45rem); line-height: 1.2; }
.oly-gap-pin { color: #9F1239; background: var(--oly-rose-soft); }
.oly-gap-pin::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--oly-rose); }
.oly-preview-radar { display: block; width: 100%; max-height: 152px; }
.oly-preview-grid, .oly-pdf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.oly-preview-tile, .oly-pdf-card {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--oly-border);
  border-radius: var(--oly-radius-md);
  background: var(--oly-surface);
}
.oly-preview-tile > span { color: var(--oly-ink-muted); font-size: .78rem; }
.oly-preview-tile strong { font-size: .98rem; line-height: 1.3; }
.oly-preview-scan { align-content: end; background: var(--oly-mint-soft); }
.oly-preview-scan svg { color: #0F766E; margin-bottom: 5px; }
.oly-preview-scan strong { color: #115E59; font: 800 1.07rem var(--oly-mono); }
.oly-preview-scan small { font: 700 .7rem var(--oly-font); }
.oly-preview-sheet {
  --marker: linear-gradient(var(--oly-ink), var(--oly-ink));
  display: grid;
  gap: 1px;
  justify-items: center;
  min-width: 65px;
  padding: 6px 9px;
  margin-bottom: 4px;
  border: 1px solid #CBD5E1;
  border-radius: 3px;
  color: var(--oly-ink);
  background: var(--marker) left 3px top 3px / 4px 4px no-repeat,
    var(--marker) right 3px top 3px / 4px 4px no-repeat,
    var(--marker) left 3px bottom 3px / 4px 4px no-repeat,
    var(--marker) right 3px bottom 3px / 4px 4px no-repeat, white;
  font: 700 .49rem/1.05 var(--oly-mono);
}
.oly-entry .oly-button, .oly-entry .oly-link, .omr-review button, .omr-review input[type=file],
.oly-picker select, .oly-answer input, .oly-choice { min-height: 49px; }
.oly-entry .oly-button { border-color: #CBD5E1; border-radius: var(--oly-radius-md); }
.oly-entry .oly-button:not(.oly-primary):enabled:hover { background: var(--oly-primary-soft); }
.oly-entry .oly-link { display: inline-flex; align-items: center; margin-right: 0; }
.oly-entry :focus-visible { outline-color: var(--oly-primary); }
.oly-levels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.oly-level { min-width: 0; border: 1px solid var(--oly-border); border-top: 3px solid var(--oly-primary); border-radius: var(--oly-radius-md); }
.oly-level:nth-child(2) { border-top-color: var(--oly-mint); }
.oly-level:nth-child(3) { border-top-color: var(--oly-amber); }
.oly-level:nth-child(4) { border-top-color: var(--oly-ink); }
.oly-level-number, .oly-scores strong, .oly-form .oly-answer input { font-family: var(--oly-mono); font-variant-numeric: tabular-nums; }
.oly-level-number { display: inline-block; background: var(--oly-primary-soft); padding: 3px 8px; border-radius: var(--oly-radius-pill); }
.oly-levels .oly-labs { grid-template-columns: 1fr; }
.oly-labs li { background: var(--oly-bg); }
.oly-lab-menu summary {
  min-height: 49px;
  padding-block: 10px;
  color: var(--oly-primary);
  font-weight: 750;
  cursor: pointer;
}
.oly-omr-steps li:focus-within, .oly-pdf-card:focus-within { border-color: var(--oly-primary); }
.oly-omr-band, .oly-parent-offers {
  margin-top: 24px;
  padding: clamp(16px, 3vw, 32px);
  border: 1px solid #99F6E4;
  border-radius: var(--oly-radius-lg);
  background: var(--oly-mint-soft);
}
.oly-omr-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  padding: 0;
  counter-reset: omr-step;
}
.oly-omr-steps li {
  counter-increment: omr-step;
  padding: 12px;
  border-radius: var(--oly-radius-md);
  background: white;
  border: 1px solid #CCFBF1;
}
.oly-omr-steps li::before {
  content: counter(omr-step, decimal-leading-zero);
  margin-inline-end: 8px;
  color: #0F766E;
  font: 800 .8rem var(--oly-mono);
}
.oly-omr-steps p, .oly-pdf-card p { margin: 4px 0; color: var(--oly-ink-muted); }
.oly-omr-band .oly-link {
  padding-inline: 14px;
  border-radius: var(--oly-radius-md);
  background: var(--oly-primary);
  color: white;
  text-decoration: none;
}
.oly-panel { border-radius: var(--oly-radius-lg); }
.oly-pdf-card { background: var(--oly-primary-soft); border-color: #DBEAFE; padding: 16px; }
.oly-pdf-card:nth-child(2) { background: var(--oly-amber-soft); border-color: #FDE68A; }
.oly-pdf-card h3 { margin: 0; }
.oly-pdf-grid { margin-bottom: 8px; }
.oly-parent-offers .oly-link { display: inline-flex; }
.oly-explanation { background: var(--oly-primary-soft); }
.oly-hints { background: var(--oly-amber-soft); border-left: 3px solid var(--oly-amber); padding-block: 8px; }
.oly-radar-area { fill: #1D4ED82E; stroke: var(--oly-primary); }
.oly-radar-grid { stroke: #AFC6EC; }
.oly-picker select, .oly-answer input { border-color: #CBD5E1; }
.omr-review input[type=file]::file-selector-button { min-height: 49px; cursor: pointer; }
@media (min-width: 1051px) {
  .oly-level { position: relative; }
  .oly-level:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 28px;
    left: 100%;
    width: .8rem;
    border-top: 2px solid #CBD5E1;
  }
}
@media (max-width: 1050px) {
  .oly-header-nav { display: none; }
  .oly-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .oly-hero { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .oly-header-inner, .oly-header-actions { gap: 6px; }
  .oly-header .oly-brand {
    display: inline-grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-content: center;
    justify-items: start;
    gap: 2px 6px;
    font-size: .88rem;
    line-height: 1.05;
  }
  .oly-header .oly-brand-badge { padding: 2px 4px; font-size: .58rem; }
  .oly-header .oly-brand svg { grid-row: 1 / -1; width: 26px; height: 26px; }
  .oly-header .operations-menu summary, .oly-header-cta { padding-inline: 7px; font-size: .72rem; }
  .oly-header .operations-panel { position: fixed; top: 64px; right: 16px; }
  .oly-hero { padding: 16px; }
  .oly-hero h1 { margin-top: 0; }
  .oly-levels, .oly-omr-steps, .oly-pdf-grid { grid-template-columns: 1fr; }
  .oly-preview-report { padding: 10px; }
}
@media (max-width: 340px) {
  .oly-header .oly-brand { font-size: .78rem; }
  .oly-header .operations-menu summary, .oly-header-cta { padding-inline: 5px; }
}
@media (prefers-reduced-motion: no-preference) {
  .oly-share-welcome { animation: oly-welcome-in 250ms ease-out; }
  @keyframes oly-welcome-in { from { opacity: 0; transform: translateY(-6px); } }
}
