﻿/* 시험마감 — design system v2 (2026-09-23)
   References: Toss (type scale, whitespace, blue accent, soft cards), Linear (translucent sticky header, crisp labels),
   Notion Calendar (date-tile motif used for D-day tiles). Light + dark via tokens. */

:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --bg-soft: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #191f28;
  --ink-2: #333d4b;
  --muted: #6b7684;
  --faint: #8b95a1;
  --line: #e5e8eb;
  --line-strong: #d1d6db;
  --primary: #3182f6;
  --primary-strong: #1b64da;
  --primary-soft: #e8f3ff;
  --urgent: #f04452;
  --urgent-soft: #ffeeee;
  --ok: #03b26c;
  --ok-soft: #e5f8ef;
  --warn: #c77700;
  --warn-soft: #fff4dc;
  --header-bg: rgba(244, 246, 249, 0.78);
  --shadow-sm: 0 1px 2px rgba(0, 27, 55, 0.05);
  --shadow: 0 2px 6px rgba(0, 27, 55, 0.04), 0 12px 32px rgba(0, 27, 55, 0.06);
  --radius: 20px;
  --radius-sm: 12px;
  /* legacy aliases used by older markup */
  --navy: var(--ink);
  --paper: var(--bg);
  --blue: var(--primary);
  --blue-pale: var(--primary-soft);
  --green: var(--ok);
  --green-pale: var(--ok-soft);
  --yellow: #ffc342;
  --yellow-pale: var(--warn-soft);
  --shadow-legacy: var(--shadow);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1115;
    --bg-soft: #16191f;
    --surface: #1a1d23;
    --surface-2: #20242b;
    --ink: #f2f4f6;
    --ink-2: #d1d6db;
    --muted: #9ea7b3;
    --faint: #7d8793;
    --line: #2b3038;
    --line-strong: #3a414b;
    --primary: #4c95ff;
    --primary-strong: #7aaeff;
    --primary-soft: rgba(76, 149, 255, 0.14);
    --urgent: #ff6b76;
    --urgent-soft: rgba(255, 107, 118, 0.14);
    --ok: #2fd08c;
    --ok-soft: rgba(47, 208, 140, 0.14);
    --warn: #ffb938;
    --warn-soft: rgba(255, 185, 56, 0.14);
    --header-bg: rgba(15, 17, 21, 0.72);
    --shadow-sm: none;
    --shadow: 0 0 0 1px var(--line);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.65; letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-strong); }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -0.035em; line-height: 1.25; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
small { font-size: .8em; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; min-height: 64px; padding: 0 max(20px, calc((100% - 1120px) / 2));
  background: var(--header-bg); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 1.05rem; font-weight: 800; letter-spacing: -0.04em; text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-mark {
  position: relative; display: grid; width: 30px; height: 32px; place-items: center; padding-top: 5px;
  border-radius: 8px; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 800;
  box-shadow: inset 0 7px 0 rgba(0,0,0,.14);
}
.header-nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.header-nav::-webkit-scrollbar { display: none; }
.header-nav a { flex: 0 0 auto; padding: 7px 11px; border-radius: 9px; color: var(--ink-2); font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.scope-note { color: var(--muted); font-size: .85rem; }

main, footer { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
footer { margin-top: 64px; padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
footer p + p { margin-top: 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0; }
.footer-nav a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }

/* ---------- shared bits ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; color: var(--primary); font-size: .82rem; font-weight: 700; letter-spacing: 0; }
.section-lead, .landing-section > p, .lead { color: var(--muted); }
.source-note { margin-top: 20px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: .85rem; }
.source-note a { font-weight: 600; }
.countdown, .status-badge {
  display: inline-flex; align-items: center; flex: 0 0 auto; padding: 4px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.status-badge.open { background: var(--ok-soft); color: var(--ok); }
.status-badge.complete { background: var(--bg-soft); color: var(--faint); }
.countdown.urgent, [data-urgency="urgent"] .countdown { background: var(--urgent-soft); color: var(--urgent); }

.download-all, .empty-result button, .catalog-more, .landing-actions a, .landing-actions button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .15s;
}
.download-all:hover, .catalog-more:hover, .landing-actions a:hover, .landing-actions button:hover { background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary-strong); }
.landing-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.landing-actions a:first-child { background: var(--primary); color: #fff; }
.landing-actions a:first-child:hover { background: var(--primary-strong); color: #fff; }

/* ---------- home hero ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center;
  margin-top: 28px; padding: clamp(28px, 5vw, 56px); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.hero::before {
  position: absolute; inset: -40% -10% auto auto; width: 60%; aspect-ratio: 1; content: "";
  background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 16%, transparent), transparent);
  pointer-events: none;
}
.hero-copy { position: relative; }
.hero h1 em { color: var(--primary); font-style: normal; }
.hero-copy > p:not(.eyebrow) { max-width: 520px; margin-top: 16px; color: var(--muted); font-size: 1.05rem; }
.hero-search { position: relative; margin-top: 28px; max-width: 520px; }
.hero-search input {
  width: 100%; height: 58px; padding: 0 20px 0 50px; border: 2px solid var(--line); border-radius: 16px; outline: none;
  background: var(--surface-2); font-size: 1.05rem; font-weight: 600;
  transition: border-color .15s, background .15s;
}
.hero-search input:focus { border-color: var(--primary); background: var(--surface); }
.hero-search::before {
  position: absolute; top: 19px; left: 18px; width: 20px; height: 20px; content: "";
  background: var(--faint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.suggest { position: absolute; z-index: 5; top: 64px; left: 0; right: 0; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); max-height: 340px; overflow-y: auto; }
.suggest a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.suggest a:hover, .suggest a[aria-selected="true"] { background: var(--bg-soft); }
.suggest span { color: var(--faint); font-size: .82rem; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.hero-chips a { padding: 6px 12px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); font-size: .86rem; font-weight: 600; text-decoration: none; }
.hero-chips a:hover { background: var(--primary-soft); color: var(--primary); }

/* D-day tiles (Notion-Calendar-style date tile) */
.hero-board { position: relative; display: grid; gap: 10px; }
.hero-board > p { color: var(--muted); font-size: .85rem; font-weight: 700; }
.dday-tile { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; transition: transform .15s, border-color .15s; }
.dday-tile:hover { transform: translateY(-2px); border-color: var(--line-strong); color: var(--ink); }
.date-chip { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: center; line-height: 1; box-shadow: var(--shadow-sm); }
.date-chip b { padding: 5px 0 4px; background: var(--urgent); color: #fff; font-size: .68rem; font-weight: 700; }
.date-chip strong { padding: 7px 0 8px; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.04em; }
.dday-tile h3 { overflow: hidden; font-size: .98rem; text-overflow: ellipsis; white-space: nowrap; }
.dday-tile p { color: var(--muted); font-size: .82rem; }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 0; }
.hero-stats div { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.hero-stats dt { color: var(--muted); font-size: .84rem; font-weight: 600; }
.hero-stats dd { margin: 4px 0 0; color: var(--ink); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* ---------- home sections ---------- */
.quick-entry, .workspace, .catalog-section, .guide { margin-top: 56px; }
.quick-entry > div:first-child { margin-bottom: 20px; }
.workspace-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.quick-entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick-entry-grid a {
  display: flex; min-height: 118px; flex-direction: column; justify-content: space-between; gap: 10px; padding: 20px;
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.quick-entry-grid a:hover { transform: translateY(-3px); color: var(--ink); }
.quick-entry-grid strong { font-size: 1.05rem; letter-spacing: -0.03em; }
.quick-entry-grid span { color: var(--muted); font-size: .86rem; }
.popular-exams .quick-entry-grid a strong::after { content: " →"; color: var(--faint); }
.more-link { margin-top: 16px; }
.more-link a { font-weight: 700; text-decoration: none; }

.workspace, .catalog-section { padding: clamp(22px, 4vw, 40px); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.filters { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 10px; margin-top: 8px; }
.catalog-filters { grid-template-columns: 1.6fr 1fr; }
.filters label { display: flex; flex-direction: column; gap: 6px; }
.filters label > span { color: var(--muted); font-size: .8rem; font-weight: 600; }
.filters input, .filters select { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--surface-2); font-weight: 600; }
.filters input:focus, .filters select:focus { border-color: var(--primary); background: var(--surface); }
.result-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 20px 0 12px; color: var(--muted); font-size: .86rem; }
.result-meta strong { color: var(--ink); }
.deadline-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.exam-card { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.exam-agency { color: var(--muted); font-size: .8rem; font-weight: 600; }
.exam-title { margin-top: 6px; font-size: 1.15rem; }
.exam-note { margin-top: 6px; color: var(--muted); font-size: .88rem; }
.next-action { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--primary-soft); }
.next-label { color: var(--primary); font-size: .78rem; font-weight: 700; }
.next-date { color: var(--ink); font-size: .95rem; }
.timeline { margin: 14px 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 8px 0 8px 18px; border-left: 2px solid var(--line); font-size: .88rem; }
.timeline li::before { position: absolute; top: 15px; left: -6px; width: 10px; height: 10px; border: 2px solid var(--surface); border-radius: 50%; background: var(--line-strong); content: ""; }
.timeline li.current::before { background: var(--ok); }
.timeline li.next::before { background: var(--primary); }
.timeline time { color: var(--muted); font-weight: 600; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 16px; }
.official-link, .calendar-button, .share-button { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--bg-soft); color: var(--ink-2); font-size: .85rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.official-link { background: transparent; color: var(--primary); padding-left: 0; }
.calendar-button:hover, .share-button:hover { background: var(--line); }
.empty-result { padding: 48px 20px; text-align: center; }
.empty-result p { margin: 8px 0 16px; color: var(--muted); }

.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.catalog-card { display: flex; min-height: 150px; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.catalog-card h3 { margin: 10px 0 4px; font-size: 1rem; }
.catalog-card p { color: var(--muted); font-size: .82rem; }
.catalog-card a { margin-top: auto; padding-top: 14px; font-size: .86rem; font-weight: 700; text-decoration: none; }
.catalog-category { align-self: flex-start; padding: 3px 8px; border-radius: 6px; background: var(--bg-soft); color: var(--ink-2); font-size: .72rem; font-weight: 700; }
.catalog-more { display: flex; margin: 20px auto 0; min-width: 200px; }
.catalog-noscript { margin-top: 16px; text-align: center; }

.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.guide article { padding: 22px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.guide article > span { color: var(--primary); font-size: .8rem; font-weight: 800; }
.guide h3 { margin: 18px 0 6px; }
.guide p { color: var(--muted); font-size: .9rem; }

/* ---------- landing / info pages ---------- */
.landing-page { width: min(920px, calc(100% - 40px)); margin: 28px auto 0; }
.landing-hero { position: relative; padding: clamp(28px, 5vw, 52px); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.landing-hero::before { position: absolute; inset: -50% -20% auto auto; width: 55%; aspect-ratio: 1; content: ""; background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 14%, transparent), transparent); pointer-events: none; }
.landing-hero > * { position: relative; }
.landing-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.landing-hero > p:not(.eyebrow) { max-width: 640px; margin-top: 16px; color: var(--muted); }
.landing-section { margin-top: 16px; padding: clamp(22px, 4vw, 36px); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.landing-section h2 + * { margin-top: 16px; }
.landing-section h3 { margin-top: 20px; }
.schedule-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.schedule-table th, .schedule-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.schedule-table thead th { color: var(--muted); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.schedule-table tbody th { font-size: .9rem; white-space: nowrap; }
.schedule-table td { font-size: .9rem; }
.deadline-highlight { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-top: 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; }
.deadline-date { color: var(--primary); font-weight: 800; font-variant-numeric: tabular-nums; }
.deadline-highlight p { margin-top: 4px; color: var(--muted); font-size: .88rem; }
.info-page { width: min(760px, calc(100% - 40px)); margin: 28px auto 0; padding: clamp(28px, 5vw, 52px); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.info-page h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
.info-page h2 { margin-top: 36px; font-size: 1.3rem; }
.info-page p, .info-page li { color: var(--ink-2); }
.info-page p { margin-top: 12px; }
.info-page .lead { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }
.info-page .updated { color: var(--faint); font-size: .85rem; }
.source-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.source-list li { padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.source-list strong { display: block; color: var(--ink); }
.catalog-page { width: min(1040px, calc(100% - 40px)); }
.catalog-page-search { display: flex; flex-direction: column; gap: 6px; margin-top: 24px; color: var(--muted); font-size: .82rem; font-weight: 600; }
.catalog-page-search input { width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--surface-2); font-weight: 600; }
.catalog-page-search input:focus { border-color: var(--primary); }
.catalog-page-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.catalog-page-item a { display: flex; height: 100%; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; }
.catalog-page-item a:hover { border-color: var(--primary); }
.catalog-page-item strong { color: var(--ink); font-size: .95rem; }
.catalog-page-item span { color: var(--muted); font-size: .78rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .quick-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deadline-list { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  main, footer, .landing-page, .info-page, .catalog-page { width: calc(100% - 32px); }
  .site-header { padding: 0 16px; min-height: 56px; }
  .header-nav a { padding: 6px 8px; font-size: .84rem; }
  .hero, .landing-hero, .info-page { margin-top: 16px; border-radius: 22px; }
  .hero { padding: 24px 20px; gap: 28px; }
  .hero-stats div { padding: 14px 16px; }
  .dday-tile { grid-template-columns: 52px minmax(0, 1fr); gap: 4px 14px; }
  .dday-tile .date-chip { grid-row: span 2; }
  .dday-tile h3 { white-space: normal; }
  .dday-tile .countdown { justify-self: start; }
  .hero-stats dd { font-size: 1.3rem; }
  .quick-entry-grid, .catalog-grid, .catalog-page-list { grid-template-columns: 1fr; }
  .quick-entry-grid a { min-height: 0; }
  .filters, .catalog-filters { grid-template-columns: 1fr; }
  .workspace, .catalog-section { padding: 20px 16px; border-radius: 22px; }
  .deadline-highlight { grid-template-columns: 1fr; gap: 6px; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  .next-action { grid-template-columns: 1fr auto; }
  .next-label { grid-column: 1 / -1; }
}
@media (max-width: 700px) { .header-nav a:nth-child(n+3) { display: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }



