:root {
  color-scheme: light;
  --ink: #172235;
  --muted: #5e6a7a;
  --line: #dce3eb;
  --surface: #ffffff;
  --soft: #f4f7fa;
  --accent: #145ca8;
  --accent-dark: #0b437f;
  --success: #176b43;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(26, 48, 78, 0.09);
}

* { box-sizing: border-box; }
html { font-family: "Pretendard", "Noto Sans KR", system-ui, sans-serif; color: var(--ink); background: #f8fafc; }
body { margin: 0; min-width: 320px; line-height: 1.65; }
a { color: var(--accent); }
button, textarea, input { font: inherit; }
button { border: 1px solid #b7c3d1; border-radius: 10px; padding: .7rem 1rem; background: var(--surface); color: var(--ink); cursor: pointer; }
button:hover { border-color: var(--accent); }
button:disabled { cursor: wait; opacity: .65; }
button.primary { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 700; }
button.primary:hover { background: var(--accent-dark); }
:focus-visible { outline: 3px solid #f5b942; outline-offset: 3px; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 10; padding: .6rem 1rem; background: #fff; }
.skip-link:focus { top: 1rem; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 1080px; margin: 0 auto; padding: 1.1rem 1.25rem; }
.brand { color: var(--ink); font-size: 1.25rem; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
nav { display: flex; gap: .35rem; }
nav a { border-radius: 8px; padding: .45rem .7rem; color: var(--muted); text-decoration: none; }
nav a[aria-current="page"], nav a:hover { background: #e9f2fb; color: var(--accent-dark); }
nav a.feedback-nav { background: #fff2c7; color: #674900; font-weight: 750; }
nav a.feedback-nav:hover { background: #ffe79a; color: #493400; }
.page-shell { max-width: 960px; min-height: calc(100vh - 220px); margin: 0 auto; padding: 3rem 1.25rem 5rem; }
.hero { max-width: 720px; padding: 2.5rem 0 3rem; }
.eyebrow { margin: 0 0 .35rem; color: var(--accent); font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1, h2 { margin-top: 0; line-height: 1.25; letter-spacing: -.035em; }
h1 { margin-bottom: 1rem; font-size: clamp(2.1rem, 6vw, 3.8rem); }
.lead { color: var(--muted); font-size: 1.17rem; }
.exam-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.exam-card { display: block; border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.exam-card:hover { border-color: #95bce4; transform: translateY(-2px); }
.exam-card h2 { margin: .4rem 0 .7rem; }
.exam-card p { color: var(--muted); }
.card-kicker, .version, .page-version { color: var(--muted); font-size: .86rem; }
.card-action { color: var(--accent); font-weight: 750; }
.feedback-callout { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 2rem; border: 1px solid #efd57e; border-radius: 18px; padding: 1.4rem 1.6rem; background: #fffaf0; }
.feedback-callout h2, .feedback-callout p { margin-bottom: .35rem; }
.feedback-button { flex: 0 0 auto; border-radius: 10px; padding: .75rem 1rem; background: var(--accent); color: #fff; font-weight: 750; text-decoration: none; }
.feedback-button:hover { background: var(--accent-dark); }
.how-it-works { max-width: 760px; margin-top: 3rem; }
.notice, .status.error { color: var(--danger); }
.tool-heading { max-width: 720px; margin-bottom: 2rem; }
.tool-heading h1 { font-size: clamp(2rem, 5vw, 3rem); }
.tool-card { border: 1px solid var(--line); border-radius: 20px; padding: clamp(1rem, 3vw, 2rem); background: var(--surface); box-shadow: var(--shadow); }
.question-form > label, legend { font-weight: 750; }
.question-form > label span { color: var(--muted); font-size: .9rem; font-weight: 400; }
textarea { display: block; width: 100%; min-height: 11rem; margin: .55rem 0 1rem; resize: vertical; border: 1px solid #aebbc9; border-radius: 12px; padding: 1rem; color: var(--ink); background: #fff; }
textarea:focus { border-color: var(--accent); }
.form-meta { display: grid; grid-template-columns: 8rem minmax(0, 1fr); align-items: center; gap: 1rem; padding: .8rem 0; }
.range-row { display: flex; align-items: center; gap: .8rem; }
input[type="range"] { width: min(22rem, 100%); }
output { min-width: 2rem; font-weight: 800; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.status { min-height: 1.6rem; margin: 1rem 0 0; color: var(--success); }
.results { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 2rem; }
.result-heading { display: grid; grid-template-columns: 1fr minmax(18rem, auto); gap: 1rem; align-items: start; }
.code-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem; }
.code-box code { max-width: 100%; overflow-wrap: anywhere; border-radius: 9px; padding: .55rem .7rem; background: #eaf2fb; color: #123f70; font-weight: 800; }
.copy-status { min-width: 3.5rem; color: var(--success); font-size: .88rem; }
.candidate-groups { display: grid; gap: 1rem; margin-top: 1.5rem; }
fieldset { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
legend { padding: 0 .4rem; }
.choice-list { display: grid; gap: .45rem; max-height: 18rem; overflow: auto; }
.choice { display: flex; align-items: flex-start; gap: .6rem; border-radius: 9px; padding: .45rem .5rem; }
.choice:hover { background: var(--soft); }
.choice input { flex: 0 0 auto; margin-top: .4rem; }
.question-review { margin-top: 1.5rem; }
.question-review p { white-space: pre-wrap; overflow-wrap: anywhere; }
.page-version { margin: 1rem .2rem; }
footer { border-top: 1px solid var(--line); padding: 1.5rem; text-align: center; color: var(--muted); font-size: .9rem; }
footer p { margin: .25rem; }

@media (max-width: 700px) {
  .page-shell { padding-top: 1.5rem; }
  .exam-grid { grid-template-columns: 1fr; }
  .feedback-callout { align-items: flex-start; flex-direction: column; }
  .result-heading { grid-template-columns: 1fr; }
  .code-box { justify-content: flex-start; }
}

@media (max-width: 430px) {
  .site-header { align-items: flex-start; }
  nav { flex-direction: column; align-items: flex-end; }
  .form-meta { grid-template-columns: 1fr; gap: .25rem; }
  .actions button { flex: 1 1 calc(50% - .6rem); }
  .actions .primary { flex-basis: 100%; }
  .tool-card { border-radius: 14px; }
}
