/* On-Archive typography. Layout/brand colors remain in style.css; drawing UI remains in ink.css.
   All learning UI uses a single rem scale. Mobile primary controls retain readable type and 44px targets. */
:root {
  --font-ui: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
  --text-xs: .8125rem; --text-sm: .875rem; --text-md: .9375rem; --text-base: 1rem;
  --text-card: 1.0625rem; --text-section: 1.375rem; --text-page: 1.875rem;
  --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600; --weight-bold: 700;
  --leading-tight: 1.35; --leading-ui: 1.5; --leading-body: 1.75;
  --text-primary: var(--color-text-primary); --text-secondary: var(--color-text-secondary); --text-muted: var(--color-text-secondary);
}
html { font-size: 100%; }
body { font-family: var(--font-ui); font-size: var(--text-base); line-height: var(--leading-body); color: var(--text-primary); letter-spacing: normal; }
button,input,select,textarea { font-family: var(--font-ui); }
/* Preserve the existing wordmark treatment, independent of the learning UI. */
.brand { font-family: 'Noto Sans KR', Arial, sans-serif; }

h1,
.overview h1,
.directory-top h1,
#search-view h1,
.directory-top h2,
.board-heading h2 { font-size:var(--text-page);font-weight:var(--weight-bold);line-height:var(--leading-tight);letter-spacing:normal; }

.resource-intro h2,
.resource-empty h2,
.solution-selection h2,
.solution-subject-heading,
.calculus-solutions-empty h2,
.paired-archive-heading h2,
.paired-question-group>h3,
.archive h2,
.empty h2 { font-size:var(--text-section);font-weight:var(--weight-bold);line-height:1.45;letter-spacing:normal; }

.official-card h3,
.topic-grid h3,
.paired-archive-card strong,
.search-result strong,
.solution-page h3,
.calculus-solution-pair>h3,
.theme-pdf-card h3,
.board-list-top h3,
.board-comments>h3,
.board-form>h3,
.board-post-title { font-size:var(--text-card);font-weight:var(--weight-semibold);line-height:1.55;letter-spacing:normal; }

.directory-top p,
.board-heading p,
.board-body,
.board-announcement-contact,
.board-excerpt,
.resource-empty p,
.empty p,
.archive p,
.calculus-solutions-empty p,
.linked-question p,
#search-status { font-size:var(--text-md);font-weight:var(--weight-regular);line-height:var(--leading-body);letter-spacing:normal; }

.nav,
.tabs button,
.difficulty select,
.resource-tabs button,
.bridge-buttons button,
.question-nav button,
.practice-question-shell>.question-nav button,
.practice-pager button,
.solution-pager button,
.paired-group-nav button,
.submit,
.bookmark,
.record-buttons .submit,
.record-buttons .bookmark,
.search-submit,
.board-button,
.paired-month-tabs button,
.paired-study,
#calculus-solution-controls button,
.solution-jumps a,
.pdf-download,
.official-links a,
.archive-subjects button,
.archive-year button,
.search-examples button,
.empty button,
.open-ink-button,
.single-answer summary { font-size:var(--text-md);font-weight:var(--weight-semibold);line-height:var(--leading-ui);letter-spacing:normal; }

.difficulty,
.selection-heading p,
.tabs small,
.nav b,
.today>span,
.today small,
.today p,
.timer-label,
.tag,
.image-tip,
.problem-bottom,
header,
header strong,
.reset,
.rail-bottom p,
footer i,
footer>span:last-child,
.elective-bridge small,
.elective-bridge p,
.elective-bridge span,
.resource-intro p,
.answer-table p,
.answer-cells span,
.resource-empty small,
.solution-page span,
.topic-summary,
.topic-grid small,
.topic-grid span,
.official-card h3 small,
.official-card p,
.official-card h4,
.source-note,
.integrated-note,
.archive-subjects span,
.archive-year h3 span,
.archive-year button span,
.archive-disclosure,
.search-result span,
.search-examples span,
#search-help,
.paired-archive-card span,
.theme-pdf-card p,
.theme-pdf-card span,
.practice-pager span,
.question-nav,
.paired-group-nav span,
.board-meta,
.board-row-count,
.board-privacy,
.board-status,
.board-form-note,
.board-field>span,
.board-field small,
.board-photo-label,
.board-photo-warning,
.board-comment-limit,
.board-announcement-badge,
.board-photo-preview>span,
.board-photo-gallery>a,
.board-photo-preview .board-button,
.board-empty { font-size:var(--text-xs);font-weight:var(--weight-regular);line-height:1.65;letter-spacing:normal; }

.selection-heading>div>span,
.answer-table h3,
.calculus-answer-row strong,
.rate-values>span { font-size:var(--text-card);font-weight:var(--weight-semibold);line-height:var(--leading-ui);letter-spacing:normal; }
/* Contrast follows information hierarchy rather than fading small text. */
.nav,.tabs button,.resource-tabs button { color: var(--text-secondary); }
.nav.active,.tabs button.selected,.resource-tabs button.active { color:var(--text-primary); font-weight:700; }
header,.tabs small,.nav b,.today>span,.today small,.today p,.difficulty,.timer-label,.selection-heading p,.image-tip,.problem-bottom,
.directory-top p,.resource-intro p,.topic-summary,.topic-grid small,.topic-grid span,.official-card p,.official-card h3 small,.official-card h4,
.source-note,.integrated-note,.archive-subjects span,.archive-year button span,.archive-disclosure,#search-help,.search-result span,
.board-heading p,.board-meta,.board-excerpt,.board-row-count,.board-privacy,.board-form-note,.board-field small,.board-empty,
.rail-bottom p,.reset,footer i,footer>span:last-child { color:var(--text-muted); }
.board-body,.board-announcement-contact,.board-privacy strong { color:var(--text-primary); }
.board-post-title { color:var(--color-text-primary); }
.board-detail h2 { font-size:var(--text-section);font-weight:700;line-height:1.5;letter-spacing:normal; }
.board-field input,.board-field textarea { font-size:var(--text-base);line-height:1.75; }
.board-field>span,.board-photo-label { font-weight:600; }
.board-list-top h3,.board-comments>h3,.board-form>h3 { margin-bottom:16px; }
.board-list-top h3 { margin-bottom:0; }
.board-moderation-note { font-size:var(--text-sm);color:var(--text-secondary); }
.board-button,.bridge-buttons button,.paired-month-tabs button,.paired-study,.search-submit,.official-links a,.solution-jumps a { min-height:44px; }
.board-announcement-badge { font-weight:600; }
.board-excerpt { margin-top:10px; }
.board-meta { margin:8px 0 12px; }
.board-body { max-width:75ch; }
/* Decorative captions stay subordinate, without removing existing copy. */
.eyebrow {font-size:var(--text-xs);font-weight:500;line-height:1.5;letter-spacing:normal;color:var(--text-muted);margin-bottom:8px;}
.elective-bridge small {font-size:var(--text-xs);color:var(--text-muted);}
.elective-bridge span {font-size:var(--text-md);font-weight:600;color:var(--color-primary);}
.nav-wrap {height:auto;min-height:70px;}
.nav-wrap nav {gap:32px;max-width:100%;align-items:stretch;}
.nav {padding:21px 0;min-height:64px;}
.nav b {font-weight:600;}
.search-box {height:auto;min-height:50px;padding:4px 8px 4px 16px;}
.search-box input,.search-box input::placeholder {font-size:var(--text-base);line-height:1.5;}
.search-box input::placeholder {color:var(--text-muted);}
.search-submit {padding:10px 18px;white-space:nowrap;}
.search-box kbd {font-size:var(--text-xs);}
.overview {padding:28px 0;}
.today {width:290px;min-width:0;column-gap:16px;}
.overview .today {max-width:290px;}
.today strong {font-family:var(--font-ui);font-size:1.875rem;font-weight:700;line-height:1.2;font-variant-numeric:tabular-nums;}
.today p {max-width:none;}
.timer {font-family:var(--font-ui);font-size:1.875rem;font-weight:600;line-height:1.3;letter-spacing:normal;font-variant-numeric:tabular-nums;}
.timer-label button {width:32px;height:32px;font-size:var(--text-xs);}
.tabs {gap:24px;flex-wrap:wrap;}
.tabs button {min-height:44px;}
.tabs small {margin-left:5px;}
.filter-pair {gap:12px 18px;align-items:center;}
.difficulty {display:flex;gap:8px;align-items:center;font-weight:500;}
.difficulty select {margin-left:0;min-height:42px;padding:8px 10px;max-width:220px;color:var(--text-primary);background:var(--color-surface);}
.toolbar {align-items:center;gap:18px;}
#question-index {gap:8px;max-height:212px;}
#question-index button {min-width:40px;height:40px;font-size:var(--text-sm);font-weight:500;line-height:1;}
#question-index button.current {font-weight:700;}
.tag {font-weight:500;color:var(--text-secondary);padding:5px 9px;}
.practice-pager span,.question-nav,.solution-pager span,.paired-group-nav span {font-size:var(--text-sm);font-variant-numeric:tabular-nums;}
.answer-cells strong,.calculus-answer-row>b {font-family:var(--font-ui);font-size:1.25rem;font-weight:600;}
.answer-cells span {color:var(--text-muted);}
.archive-year h3 {font-family:var(--font-ui);font-size:1.5rem;font-weight:600;line-height:1.4;letter-spacing:normal;}
.archive-year h3 span {font-family:inherit;display:block;margin-top:4px;}
.archive-year button {text-align:left;min-height:80px;}
.archive-year button span {display:block;margin-top:6px;}
.archive-subjects button {font-weight:600;}
.archive-subjects span {display:block;margin:6px 0 0;}
.solution-page h3 {line-height:1.6;}
.solution-page span {color:var(--text-muted);}
.solution-page-stage h3 {line-height:1.6;}
.resource-intro p,.official-card p,.search-result span {font-size:var(--text-sm);}
.source-note {font-size:var(--text-xs)!important;}
.accuracy-label {font-size:var(--text-sm);letter-spacing:normal;}
.accuracy-label small,.rate-sample,.rate-values a {font-size:var(--text-xs);}
.rate-values>span {font-size:var(--text-sm);}
footer>span:last-child {letter-spacing:normal;}
.rail-bottom {flex:1;}
.collection-banner-copy>span {font-size:clamp(13px,1.3vw,16px);letter-spacing:normal;font-weight:500;}
.collection-banner-copy strong {font-family:var(--font-ui);font-weight:700;letter-spacing:normal;}
.collection-banner-copy small {font-size:clamp(12px,1.2vw,14px);line-height:1.5;}
@media(max-width:800px) {
  .nav-wrap nav {gap:24px;justify-content:flex-start;}
  .toolbar {align-items:flex-start;}
  .filter-pair {justify-content:flex-start;}
  .today {width:245px;}
  .archive-subjects button {padding:18px 16px;}
}
@media(max-width:600px) {
  :root {--text-page:1.75rem;--text-section:1.3125rem;--text-card:1rem;}
  .site-top,.search-wrap {padding-inline:18px;}
  main,header {padding-inline:18px;}
  .nav-wrap {padding-inline:18px;min-height:60px;}
  .nav-wrap nav {gap:24px;overflow-x:auto;scrollbar-width:thin;}
  .nav {min-height:58px;padding:17px 0;font-size:var(--text-sm);}
  header {font-size:var(--text-xs);height:46px;}
  .search-box {gap:7px;}
  .search-box input,.search-box input::placeholder {font-size:1rem;}
  .overview {flex-wrap:wrap;gap:18px;padding:24px 0;}
  .overview .today {width:100%;max-width:none;}
  .today strong {font-size:1.625rem;}
  .today small {font-size:var(--text-xs);}
  .today p {max-width:none;}
  .toolbar {margin-top:14px;}
  .tabs {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 18px;}
  .tabs button {text-align:left;white-space:normal;min-height:46px;}
  .filter-pair {gap:12px;justify-content:flex-start;}
  .difficulty {flex:1;min-width:0;gap:8px;}
  .difficulty select {font-size:1rem;min-width:0;max-width:100%;flex:1;}
  .topic-filter,.variant-filter {flex-basis:100%;}
  .topic-filter select {width:auto;}
  #question-index button {min-width:42px;height:42px;}
  .practice-pager button {font-size:var(--text-sm);}
  .question-nav button {font-size:var(--text-sm);}
  .record-buttons .submit,.record-buttons .bookmark {font-size:var(--text-md);}
  .elective-bridge {padding:16px;}
  .bridge-buttons {gap:8px;}
  .bridge-buttons button {font-size:var(--text-sm);padding:10px 13px;}
  .archive-year {grid-template-columns:1fr;gap:14px;}
  .archive-year h3 {font-size:1.375rem;margin:0;}
  .archive-year h3 span {display:inline;margin-left:6px;}
  .archive-year>div {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .archive-year button {font-size:var(--text-sm);padding:14px;}
  .archive-subjects button {font-size:var(--text-md);}
  .board-heading {flex-wrap:wrap;gap:16px;}
  .board-heading h2 {margin:8px 0 14px;}
  .board-heading>.board-button {min-height:44px;}
  .board-detail {padding:22px 17px;}
  .board-post-title {font-size:var(--text-card);}
  .board-body {font-size:var(--text-md);}
  .board-meta,.board-privacy,.board-form-note,.board-field small {font-size:var(--text-xs);}
  .board-button {font-size:var(--text-sm);min-height:44px;}
  .board-photo-preview .board-button {font-size:var(--text-xs);}
  .paired-archive-card strong {font-size:var(--text-card);}
  .paired-archive-card span {font-size:var(--text-sm);}
  .collection-banner-copy {width:95%;}
  .collection-banner-copy strong {font-size:clamp(18px,4.5vw,26px);line-height:1.35;}
  .collection-banner-copy small {padding:5px 7px;}
  footer {gap:20px;}
  .rail-bottom {width:100%;flex-basis:100%;}
  footer>span:last-child {text-align:left;}
}
/* The existing crawlable question index shares type without inheriting the app layout. */
.catalog-index h1 {font-size:var(--text-page);font-weight:700;line-height:1.35;}
.catalog-index h2 {font-size:var(--text-section);font-weight:600;line-height:1.5;}
.catalog-index li {font-size:var(--text-md);line-height:1.75;}
.catalog-index small {font-size:var(--text-xs);color:var(--text-muted);}

/* Isolate the existing drawing workspace from the new global text metrics. */
body .sion-ink-dialog {font-family:'Noto Sans KR',Arial,sans-serif;font-size:14px;line-height:normal;letter-spacing:normal;}
