/* scholar-radar: service-only pieces, tokens from ds.css only (no raw colors, no shadows). Also served as /service.css for the Worker's SSR pages.
   Signature element: the deadline badge - an open scholarship's D-n is a filled accent pill (.badge.on) on every list, and the national
   scholarship countdown card (.nat-card) sits on top of the finder. */

.subnav { border-bottom: 1px solid var(--rule); background: var(--paper); }
.subnav ul { list-style: none; margin: 0 auto; padding: 0 var(--s5); max-width: var(--wrap); display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; }
.subnav a { display: flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s3); color: var(--text-2); font-size: var(--t-sm); font-weight: 600; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.subnav a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 47.99rem) { .subnav ul { padding: 0 var(--s3); } }

.sub-h { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--rule); font-size: var(--t-lg); }
.tool .chips { margin: 0 0 var(--s3); display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0; list-style: none; align-items: center; }
.chips-label { flex-basis: 100%; font-size: var(--t-sm); font-weight: 700; color: var(--text-2); }
.chips.links { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; }
.chips.links a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s3); border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: var(--t-sm); }
.sens { margin: var(--s4) 0; padding: var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--r2); }
.sens legend { font-weight: 700; padding: 0 var(--s2); }
.fields.two { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
fieldset.fields { border: 0; padding: 0; margin: 0 0 var(--s4); }
fieldset.fields legend { font-weight: 700; margin-bottom: var(--s2); }
.official { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); background: var(--fill); border-radius: var(--r1); color: var(--ink); }
.badges { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s4); }
.scroll { overflow-x: auto; max-width: 100%; }
.pre { white-space: pre-line; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* rows: list of notices / benefits */
.rows { list-style: none; margin: 0 0 var(--s4); padding: 0; border-top: 1px solid var(--rule); }
.rows > li { border-bottom: 1px solid var(--rule); }
.row-link { display: flex; gap: var(--s3); align-items: center; justify-content: space-between; min-height: 3.5rem; padding: var(--s3) 0; color: var(--ink); text-decoration: none; }
.row-link:hover b { color: var(--accent); }
.row-link > .badge, .badge { flex: none; white-space: nowrap; } /* "D-15" broke into "D-/15" at 360px */
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-main b { font-weight: 700; overflow-wrap: anywhere; }
.row-sub { color: var(--text-2); font-size: var(--t-sm); }
.row-sub.overlap { color: var(--accent); }
.bf-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.bf-row .row-link { flex: 1 1 16rem; }

/* summary card */
.summary .sum { list-style: none; margin: 0; padding: 0; }
.summary .sum > li { display: grid; grid-template-columns: 8rem minmax(0, 1fr) auto; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--rule); align-items: start; }
.summary .sum .k { font-weight: 700; color: var(--text-2); font-size: var(--t-sm); }
.summary details summary { cursor: pointer; display: inline-flex; min-height: 2rem; align-items: center; padding: 0 var(--s2); border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: var(--t-cap); font-weight: 700; list-style: none; }
.summary details summary::-webkit-details-marker { display: none; }
.summary details q { display: block; margin-top: var(--s2); font-size: var(--t-sm); color: var(--text-2); }
@media (max-width: 30rem) { .summary .sum > li { grid-template-columns: 1fr auto; } .summary .sum .v { grid-column: 1 / -1; } }
.panel.sub { margin-top: var(--s5); padding: var(--s5); }
.alt { margin-top: var(--s3); }
.home-about { margin-top: var(--s6); }

/* text buttons in rows (그만 받기, 삭제, 저장): ds.css button.quiet is the 20px icon-close style, which looked like a stray heading here */
.btn.quiet { flex: none; min-height: 2.75rem; padding: 0 var(--s4); border: 1px solid var(--rule); background: var(--surface); color: var(--text-2); font-size: var(--t-sm); font-weight: 600; }
.btn.quiet:hover { color: var(--ink); border-color: var(--line-strong); }
/* past steps on the follow form are disabled: fade the whole row, not only the box */
label:has(> input:disabled) { color: var(--text-3); cursor: not-allowed; }
input[type="checkbox"]:disabled { opacity: .45; }
/* PDF picker: the browser's grey "파일 선택" button replaced with the service button look */
input[type="file"] { width: 100%; font-size: var(--t-sm); color: var(--text-2); }
input[type="file"]::file-selector-button { margin-right: var(--s3); min-height: 2.75rem; padding: 0 var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r1); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
/* pricing: ds.css ".card span { display: block }" stretched the "이용 중" badge across the whole plan card */
.card .badge { display: inline-block; margin: 0 0 0 var(--s2); vertical-align: middle; color: var(--accent); }

/* Store app WebView (lib/gate.ts sets <html data-app="1">): no plan or price talk inside the store apps (Play payments policy).
   Pricing links and menu items are hidden; .not-in-app marks other plan upsell bits. */
html[data-app] a[href$="/pricing/"], html[data-app] li:has(> a[href$="/pricing/"]), html[data-app] .not-in-app { display: none; }

/* deadline pills: open = filled accent, others stay weak */
.badge.on { background: var(--accent); color: var(--on-accent); }
.nat-card { display: flex; flex-direction: column; gap: var(--s1); margin: 0 0 var(--s5); padding: var(--s4) var(--s5); border: 1px solid var(--accent); border-radius: var(--r2); background: var(--accent-weak); color: var(--ink); text-decoration: none; }
.nat-card b { color: var(--accent); font-size: var(--t-h2); line-height: 1.3; }
.nat-card span { color: var(--text-2); font-size: var(--t-sm); }
.nat-card:hover b { text-decoration: underline; }

/* finder */
.finder-fields { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); } /* 2x2 on desktop: at 3 columns "신입생(고3·재수 포함)" was clipped and 대학 종류 sat alone */
.finder-fields .wide { grid-column: 1 / -1; }
fieldset.aid { border: 0; padding: 0; margin: var(--s4) 0 var(--s3); }
fieldset.aid legend, .stack fieldset legend { font-weight: 700; margin-bottom: var(--s2); }
.stack fieldset { border: 0; padding: 0; margin: 0 0 var(--s3); }
.panel .chips { margin-bottom: var(--s3); }
.check { display: inline-flex; align-items: center; gap: var(--s2); min-height: 2.75rem; }
.result .lead { color: var(--text-2); font-weight: 600; }
.finder-row, .sv-row { display: flex; align-items: center; gap: var(--s2); }
.finder-row .row-link, .sv-row .row-link, .sv-row .row-main { flex: 1 1 auto; min-width: 0; }
.btn.save.on { border-color: var(--accent); color: var(--accent); }
.sv-tools { display: flex; gap: var(--s2); align-items: center; flex: none; }
.sv-tools select { min-height: 2.75rem; width: auto; }
.saved-note a { font-weight: 700; }
@media (max-width: 30rem) {
  .sv-row { flex-wrap: wrap; }
  .finder-row .btn.save { padding: 0 var(--s3); }
  .finder-row .row-link { gap: var(--s2); }
  .sv-tools { width: 100%; justify-content: flex-end; padding-bottom: var(--s3); }
}
.btn small { margin-left: var(--s1); font-weight: 400; }

/* scholarship page */
.big-date { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--t-h2); margin: 0 0 var(--s3); }
.amount { margin: 0 0 var(--s4); color: var(--text-2); }
.amount b { color: var(--ink); font-size: var(--t-h2); margin-left: var(--s1); }
.source a { color: inherit; }
