/* Styles for the payment page, messages and /admin, matching the website design:
   white ground, navy ink, Cormorant Garamond headings, Jost text, soft rounded shapes. */
:root { --ink: #0F1B33; --muted: #4A5874; --body: #2E3B57; --line: #C9CDD4; --hair: #DCDFE4; --panel: #F5F6F8; --accent: #B4532A;
  --serif: 'Cormorant Garamond', 'Noto Serif KR', 'Noto Serif SC', Georgia, serif;
  --sans: 'Jost', 'Noto Sans KR', 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #FFFFFF; color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
a { color: var(--ink); text-underline-offset: 4px; } a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.site-header, main, .site-footer { max-width: 1440px; margin: 0 auto; padding-left: clamp(16px, 5vw, 80px); padding-right: clamp(16px, 5vw, 80px); }
.site-header { padding-top: 28px; padding-bottom: 28px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; border-bottom: 1px solid var(--hair); }
.brand { text-decoration: none; font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: 0.02em; }
.back { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
main { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(72px, 10vw, 140px); min-height: 50vh; }
h1, h2 { font-family: var(--serif); font-weight: 300; line-height: 1.02; margin: 0 0 24px; }
h1 { font-size: clamp(48px, 7vw, 96px); } h2 { font-size: clamp(30px, 4vw, 44px); margin-top: 56px; }
.kicker { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.lead { font-size: 19px; font-weight: 300; color: var(--body); max-width: 640px; }
.muted { color: var(--muted); } .fine { font-size: 13px; color: var(--muted); line-height: 1.6; }
.narrow { max-width: 680px; }
.panel, .frame { border: 1px solid var(--hair); border-radius: 22px; background: var(--panel); padding: clamp(22px, 3vw, 36px); margin: 28px 0; }
.amount { font-family: var(--serif); font-weight: 300; font-size: clamp(56px, 9vw, 88px); line-height: 1; margin: 6px 0 0; }
.notice { padding: 18px 26px; border-radius: 18px; background: var(--panel); border: 1px solid var(--hair); margin: 24px 0; }
.notice.error { border: 2px solid var(--accent); background: #FFFFFF; }
.notice.preview { border-style: dashed; border-color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 15px 28px; border-radius: 999px; background: var(--accent); border: 1.5px solid var(--ink); color: #FFFFFF; font: 400 16px var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { color: #FFFFFF; filter: brightness(0.93); }
.btn.ghost { background: #FFFFFF; color: var(--ink); } .btn.ghost:hover { background: var(--panel); color: var(--ink); filter: none; }
.btn.small { min-height: 44px; padding: 8px 20px; font-size: 14px; }
.btn[disabled] { background: #C9CDD4; border-color: #9AA1AD; color: #2E3B57; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); margin-top: 20px; }
.field .hint { font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea { font: 400 16px var(--sans); color: var(--ink); background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; min-height: 52px; width: 100%; }
textarea { padding: 14px 16px; resize: vertical; line-height: 1.5; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; margin-top: 22px; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.site-footer { border-top: 1px solid var(--hair); padding-top: 24px; padding-bottom: 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 14px; }
.site-footer nav a { min-height: 44px; display: inline-flex; align-items: center; }
/* admin */
.admin h1 { font-size: clamp(40px, 5vw, 64px); }
.admin table { width: 100%; border-collapse: collapse; font-size: 15px; }
.admin th, .admin td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.admin th { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.tablebox { overflow-x: auto; border: 1px solid var(--hair); border-radius: 18px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin: 0 0 36px; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.pill { display: inline-block; padding: 3px 12px; border: 1px solid var(--ink); border-radius: 999px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.pill.accepted { background: var(--ink); color: #FFFFFF; } .pill.declined { color: var(--muted); border-color: var(--line); }
.copy { font: 14px ui-monospace, Menlo, Consolas, monospace !important; }
dl.record { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 12px 24px; margin: 0; }
dl.record dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
dl.record dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; } .row .field { flex: 1 1 180px; margin-top: 0; }
@media (max-width: 640px) { dl.record { grid-template-columns: 1fr; gap: 2px; } dl.record dd { margin-bottom: 12px; } }

/* application platform */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chip { display: inline-block; padding: 7px 16px; border: 1px solid var(--line, #C9CDD4); border-radius: 999px; font-size: 14px; text-decoration: none; color: var(--ink); background: #FFFFFF; }
.chip:hover, .chip.on { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.small { font-size: 13px; }
.pill.late { border-color: #A3261B; color: #A3261B; }
.pill.approved, .pill.offered { background: var(--panel); }
.pill.confirmed, .pill.paid { background: var(--ink); color: #FFFFFF; }
.pill.waitlist, .pill.withdrawn { color: var(--muted); border-color: var(--line, #C9CDD4); }
.admin h2 { margin-top: 48px; }
.admin textarea, .admin select, .admin input[type=text], .admin input[type=number], .admin input[type=date] { width: 100%; }
pre.mailbody { white-space: pre-wrap; font: 14px/1.5 var(--sans); background: var(--panel); border-radius: 12px; padding: 14px 16px; margin: 10px 0 0; max-width: 640px; }
.admin details summary { cursor: pointer; text-decoration: underline; }
.radios { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 8px; font-size: 15px; color: var(--ink); }
.radios label { display: flex; gap: 8px; align-items: center; min-height: 32px; }
.radios input { width: 20px; height: 20px; accent-color: var(--ink); }
fieldset.plain { border: 0; padding: 0; margin: 20px 0 0; } fieldset.plain legend { font-size: 14px; color: var(--muted); padding: 0; }
@media print { .site-header, .site-footer, .tabs, .chips, form { display: none !important; } }
.plainlist { list-style: none; padding: 0; margin: 16px 0; } .plainlist li { padding: 8px 0; border-bottom: 1px solid var(--hair); }
.pill.hold { border-style: dashed; text-transform: none; letter-spacing: 0; }

/* heat map */
.kpis, .heat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.kpi, .heatcard { border: 1px solid var(--hair); border-radius: 18px; padding: 20px 22px; background: #FFFFFF; }
.kpi .n, .heatcard .n { font-family: var(--serif); font-size: 40px; line-height: 1.1; color: var(--ink); } .kpi .n span, .heatcard .n span, .heatcard .r span { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.kpi .l, .heatcard .l { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 6px; } .heatcard .l { margin: 0 0 10px; }
.heatcard .r { font-size: 22px; font-weight: 500; margin: 8px 0; }
.heatcard.green { border-left: 0; background: #E7F3EA; border-color: #1E6B3A; } .heatcard.green .r { color: #1E6B3A; }
.heatcard.amber { background: #FBF1DC; border-color: #8A5A00; } .heatcard.amber .r { color: #7A4F00; }
.heatcard.red { background: #FBE7E4; border-color: #A3261B; } .heatcard.red .r { color: #A3261B; }
.pill.open { color: var(--muted); border-style: dashed; }
@media (max-width: 900px) { .kpis, .heat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* funding guide */
.split2 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: start; margin-top: 24px; }
.letter { white-space: pre-wrap; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; line-height: 1.55; color: #111; background: #FFFFFF; border: 1px solid var(--line); border-radius: 6px; padding: clamp(24px, 4vw, 48px); min-height: 400px; }
@media (max-width: 900px) { .split2 { grid-template-columns: minmax(0, 1fr); } }
@media print { body:has(.letter) * { visibility: hidden; } .letter, .letter * { visibility: visible !important; } .letter { position: absolute; left: 0; top: 0; width: 100%; border: 0; padding: 0; font-size: 12pt; } }

/* cost calculator and comparison page */
.calc table td.r { text-align: right; white-space: nowrap; width: 170px; } .calc input[type=number] { width: 130px; min-height: 44px; text-align: right; padding: 8px 12px; }
.calc tr.g th { background: var(--panel); font-weight: 500; } .calc tr.tot td { font-weight: 500; font-size: 18px; border-top: 1.5px solid var(--ink); } .calc output { font-variant-numeric: tabular-nums; }
.cmp table { min-width: 980px; } .cmp td, .cmp th { vertical-align: top; font-size: 14.5px; } .cmp tr.us td { background: var(--panel); }
@media (max-width: 640px) { .calc table td.r { width: 120px; } .calc input[type=number] { width: 104px; } .calc td { font-size: 14.5px; } }
.calc table, .cmp table { width: 100%; border-collapse: collapse; } .calc th, .cmp th { text-align: left; }
.calc td, .calc th, .cmp td, .cmp th { padding: 10px 16px; } .cmp tr + tr td { border-top: 1px solid var(--hair); }
.sources { margin-top: 28px; } .sources summary { cursor: pointer; font-weight: 500; min-height: 44px; display: flex; align-items: center; }

/* calmer headings and readable tables on the text pages (funding guide, calculator, comparison, private pages) */
h1 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.12; max-width: 22em; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
h2 { font-size: clamp(24px, 2.8vw, 34px); line-height: 1.18; margin-top: 48px; margin-bottom: 18px; text-wrap: balance; }
.lead { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; max-width: 46em; margin: 0 0 8px; }
main section > p, main section > ul { max-width: 62em; }
.fine { font-size: 14px; }
.tablebox table { width: 100%; border-collapse: collapse; }
.tablebox th, .tablebox td { text-align: left; vertical-align: top; padding: 12px 18px; line-height: 1.5; }
.tablebox th { font-weight: 500; background: var(--panel); }
.tablebox tr + tr td { border-top: 1px solid var(--hair); }
.plainlist li { padding: 12px 0; line-height: 1.6; }
@media (max-width: 640px) { .tablebox th, .tablebox td { padding: 10px 12px; font-size: 15px; } }

/* text pages shown inside the designed site frame */
main.textpage { max-width: 1440px; margin: 0 auto; padding: clamp(40px, 6vw, 88px) clamp(16px, 5vw, 80px) clamp(72px, 9vw, 120px); min-height: 40vh; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); }
main.textpage h1, main.textpage h2 { font-family: var(--serif); font-weight: 300; }
.cmp.day td.per { white-space: nowrap; min-width: 150px; } .cmp.day .bar { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--muted); opacity: .45; }
.cmp.day tr.us .bar { background: #B4532A; opacity: 1; } .cmp.day table { min-width: 860px; }
/* funding guide: sample note to friends (does not print with the grant letter) */
.notebox { white-space: pre-wrap; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; line-height: 1.6; color: #111; background: #FFFFFF; border: 1px solid var(--line); border-radius: 6px; padding: clamp(20px, 3vw, 36px); margin: 12px 0 8px; max-width: 760px; }
main.textpage h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 400; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; margin: 32px 0 8px; }
.cmp.day tr.nh td { background: #F2F3F5; } .cmp.day tr.nh .bar { background: #C9CDD4; opacity: 1; } .cmp .warn { color: #B4532A; font-weight: 700; } .cmp td a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
