:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #fff;
  --ink: #182840;
  --muted: #53647b;
  --line: #dce3ec;
  --blue: #215390;
  --navy: #132b43;
  --gold: #ffc56c;
  --radius: 16px;
  font: 100%/1.5 "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
body:has(dialog[open]) { overflow: hidden; }
body:has(.compare-tray:not([hidden])) { padding-bottom: 100px; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
a { color: var(--blue); text-underline-offset: 3px; }
button:disabled { cursor: default; }
:where(button, a, input, select, [tabindex]):focus-visible { outline: 3px solid #3973b7; outline-offset: 3px; }
h1, h2, h3, p, dl, dd { margin: 0; }
:where(h1,h2,h3) { line-height: 1.28; letter-spacing: -.04em; }
svg { display: block; width: 1.15em; height: 1.15em; flex-shrink: 0; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 5; top: 10px; left: 10px; background: white; padding: 8px 12px; }
.wrap { width: min(1184px, calc(100% - 64px)); margin-inline: auto; }
.topbar { background: white; border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 69px; display: flex; align-items: center; gap: clamp(22px, 5vw, 68px); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1.31rem; font-weight: 850; letter-spacing: -.06em; color: var(--ink); text-decoration: none; flex: none; }
.brand img { flex: none; }
.topbar nav { display: flex; align-self: stretch; gap: 24px; }
.nav-link { display: flex; gap: 6px; align-items: center; position: relative; padding: 0 2px; min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: .94rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.nav-link:hover, .nav-link.current { color: var(--ink); }
.nav-link.current::after { position: absolute; content: ""; height: 3px; border-radius: 4px 4px 0 0; background: var(--ink); bottom: -1px; inset-inline: 0; }
.nav-count { background: #e9eff7; color: var(--blue); border-radius: 20px; font-size: .75rem; padding: 1px 6px; }
.sample-label { margin-left: auto; background: #fff5e1; color: #724a12; border: 1px solid #f5e4c5; display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 6px; font-size: .8125rem; font-weight: 750; white-space: nowrap; }
.sample-label::before { width: 6px; height: 6px; border-radius: 50%; background: #ba6e11; content: ""; }

.hero { min-height: 248px; display: flex; align-items: center; position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(105deg, #10283f 10%, #1b3a59 100%); background-color: var(--navy); color: white; border-radius: 19px; margin-block: 32px; padding: 30px clamp(25px, 4.25vw, 54px); }
.hero-copy { z-index: 1; }
.hero .eyebrow { color: #ffd38b; font-size: .875rem; font-weight: 750; margin-bottom: 10px; letter-spacing: .02em; }
.hero h1 { font-size: clamp(1.94rem, 3.7vw, 2.8rem); font-weight: 850; line-height: 1.21; }
.hero p:last-child { color: #d6e1ef; font-size: .975rem; margin-top: 14px; }
.small-break { display: none; }
.hero-graphic { position: absolute; width: 54%; height: 100%; right: 0; top: 0; color: #9cc7fb; background-image: linear-gradient(#a2cbff12 1px, transparent 1px), linear-gradient(90deg,#a2cbff12 1px, transparent 1px); background-size: 31px 31px; mask-image: linear-gradient(90deg,transparent,black 25%); }
.orbit, .radar-cross, .radar-beam { position: absolute; left: 58%; top: 50%; transform: translate(-50%,-50%); }
.orbit { width: var(--r); aspect-ratio: 1; border-radius: 50%; border: 1px solid #9cc7fb4d; }
.orbit-outer { --r: 302px; }.orbit-middle { --r: 222px; }.orbit-inner { --r: 144px; }
.radar-cross { width: 286px; height: 1px; background: #8cb7ec33; }
.radar-cross::after { content: ""; position: absolute; height: 286px; width: 1px; left: 50%; top: 50%; transform: translateY(-50%); background: #8cb7ec33; }
.radar-beam { width: 302px; height: 302px; border-radius: 50%; background: conic-gradient(from 19deg, #98bfff05 0deg, #9ecaff36 51deg, transparent 52deg); }
.radar-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 5px #a0caff24; background: #9ec6f8; transform: translate(-50%,-50%); }
.dot-a { left: calc(58% - 120px); top: calc(50% + 93px); }
.dot-b { left: calc(58% + 74px); top: calc(50% - 82px); background: #ffd38b; box-shadow: 0 0 0 5px #ffd38b2b; }
.dot-c { left: calc(58% + 100px); top: calc(50% + 46px); width: 6px; height: 6px; }
.radar-doc { display: grid; align-content: center; gap: 6px; position: absolute; left: 58%; top: 50%; transform: translate(-50%,-50%) rotate(-9deg); width: 49px; height: 60px; border: 1px solid #c2dcfa89; border-radius: 8px; background: #34577e; padding: 10px; box-shadow: 0 0 0 9px #9fc8fd12; }
.radar-doc i { height: 2px; background: #d4e5f9; border-radius: 2px; }
.radar-doc i:first-child { width: 55%; background: #ffd38b; }.radar-doc i:last-child { width: 75%; }

.workspace { display: grid; grid-template-columns: clamp(245px, 26%, 291px) minmax(0, 1fr); align-items: start; gap: clamp(24px, 3.2vw, 40px); }
.profile-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 2px 4px #132b4306; }
.panel-title { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.panel-title h2 { font-size: 1.2rem; margin-bottom: 3px; }
.panel-title p { font-size: .875rem; color: var(--muted); }
.profile-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; color: #335c89; border-radius: 10px; background: #edf2f9; }
.profile-icon svg { width: 21px; height: 21px; }
.profile-panel label { display: block; margin: 14px 0 6px; font-size: .9rem; font-weight: 750; }
select { appearance: none; min-height: 44px; border: 1px solid #ced8e5; border-radius: 9px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' stroke='%2353647b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; padding: 7px 36px 7px 12px; }
select:hover, .search-field:hover { border-color: #8ca4bf; }
.profile-panel select { width: 100%; }
.profile-panel select:invalid { color: var(--muted); }
.primary, .secondary, .text-button, .icon-button, .compare-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; border-radius: 9px; font-weight: 750; }
.primary { color: #202e3d; background: var(--gold); border: 1px solid transparent; padding: 8px 14px; }
.primary:hover { background: #ffb851; }
.primary:disabled { background: #e5e9ef; color: #56637a; }
.search-button { margin-top: 20px; width: 100%; min-height: 47px; }
.profile-actions { display: flex; flex-wrap: wrap; justify-content: space-between; margin: 5px -7px 0; }
.text-button { background: none; border: 0; color: var(--blue); padding: 6px 8px; font-size: .875rem; }
.text-button:hover { background: #eef3fa; }
#reset-profile { color: var(--muted); }
.profile-help { border-top: 1px solid #e8edf4; padding-top: 11px; font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }

.results { scroll-margin-top: 16px; min-width: 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-head h2 { font-size: 1.6rem; }
#result-context { font-size: .9rem; color: var(--muted); margin-top: 5px; overflow-wrap: anywhere; }
.sort-label select { font-size: .875rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.categories { display: flex; gap: 4px; flex-wrap: wrap; max-width: 100%; }
.category-button { border: 1px solid transparent; padding: 6px 10px; min-height: 44px; border-radius: 8px; background: transparent; color: var(--muted); font-size: .89rem; font-weight: 750; white-space: nowrap; }
.category-button:hover { background: #e9eef6; }
.category-button[aria-pressed="true"] { background: var(--navy); color: white; }
.category-button span { margin-left: 5px; opacity: .85; font-size: .8rem; }
.search-field { display: flex; align-items: center; gap: 7px; min-width: min(100%, 210px); flex: 0 1 226px; min-height: 44px; border: 1px solid #ced8e5; border-radius: 9px; padding: 0 10px; background: white; color: var(--muted); }
.search-field:focus-within { outline: 3px solid #3973b7; outline-offset: 2px; }
.search-field input { width: 100%; min-width: 0; height: 42px; border: 0; background: none; padding: 0; letter-spacing: -.025em; outline: none; color: var(--ink); }
.search-field input::placeholder { color: var(--muted); font-size: .875rem; opacity: 1; }
.results-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block: 4px; font-size: .875rem; color: var(--muted); }
.results-meta strong { color: var(--ink); }
.check-control { display: flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.check-control input { width: 17px; height: 17px; margin: 0; accent-color: var(--navy); }
.notices { display: grid; gap: 13px; }
.notice { border: 1px solid var(--line); background: white; border-radius: var(--radius); padding: 16px 18px; min-width: 0; box-shadow: 0 2px 4px #132b4305; }
.notice:hover { border-color: #acbfd6; }
.notice-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.badge { color: #40577a; display: inline-flex; align-items: center; line-height: 1.35; border-radius: 5px; padding: 4px 7px; font-size: .8125rem; font-weight: 750; white-space: nowrap; }
.kind-government { color: #294f80; background: #e9f0fa; }.kind-support { color: #11614c; background: #e7f5ef; }.kind-procurement { color: #64407a; background: #f0eaf7; }
.deadline { color: #42566f; background: #eff2f6; }.deadline-soon { color: #8f4200; background: #fff1df; }
.notice-title { margin-top: 7px; font-size: 1.14rem; }
.notice-title button { display: block; border: 0; border-radius: 4px; background: none; padding: 3px 0; margin: 0; text-align: left; font-size: inherit; font-weight: 800; line-height: 1.34; letter-spacing: -.04em; overflow-wrap: anywhere; }
.notice-title button:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.summary { color: var(--muted); margin-top: 4px; line-height: 1.45; }
.notice-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.card-facts { display: flex; align-items: center; gap: 5px 13px; flex-wrap: wrap; font-size: .875rem; color: var(--muted); }
.card-facts span { display: inline-flex; align-items: center; gap: 5px; }
.card-facts span svg { color: #526f91; }
.card-facts .match-label { color: #12634c; font-weight: 700; }
.card-facts .match-label svg { color: inherit; }
.notice-actions { display: flex; align-items: center; gap: 4px; }
.compare-button { color: var(--blue); background: #f7f9fc; border: 1px solid #d4dfed; padding: 5px 10px; min-height: 44px; font-size: .875rem; }
.compare-button:hover, .secondary:hover { background: #e9f0fa; }
.compare-button[aria-pressed="true"], .secondary[aria-pressed="true"] { background: #e4f4ed; border-color: #b8ddcc; color: #125840; }
.empty-state { text-align: center; border: 1px dashed #aebfd4; border-radius: var(--radius); background: white; padding: 38px 16px; }
.empty-state h3 { margin-bottom: 9px; }
.empty-state p { color: var(--muted); }
.empty-state button { margin-top: 11px; }

.footer { color: var(--muted); border-top: 1px solid var(--line); padding: 22px 0 30px; margin-top: 36px; display: flex; align-items: center; justify-content: space-between; gap: 9px 20px; flex-wrap: wrap; font-size: .875rem; }
.footer strong { color: var(--ink); }.footer a { font-weight: 650; }
.compare-tray { position: fixed; z-index: 3; bottom: max(12px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(540px, calc(100% - 24px)); padding: 9px 12px; background: var(--navy); color: white; border: 1px solid #48647e; border-radius: 14px; box-shadow: 0 8px 28px #142b4654; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tray-info, .tray-actions { display: flex; align-items: center; gap: 8px; }
.tray-info svg { color: var(--gold); margin-inline: 4px 1px; }
.tray-info small { font-size: .8125rem; display: block; color: #cad7e8; }
.tray-actions .text-button { color: #e1ebf9; }
.tray-actions .text-button:hover { background: #294965; }

dialog { width: min(640px, calc(100% - 28px)); max-width: none; max-height: min(90vh, 820px); max-height: min(90dvh, 820px); color: var(--ink); background: white; border: 1px solid #c0cfe4; border-radius: 17px; box-shadow: 0 20px 80px #0b213b38; padding: 0; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #122741a8; }
.wide-dialog { width: min(930px, calc(100% - 28px)); }
.dialog-head, .dialog-foot { padding: 16px 21px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-head { border-bottom: 1px solid var(--line); align-items: flex-start; }
.dialog-head h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); }
.dialog-kicker { color: var(--blue); font-size: .875rem; font-weight: 800; margin-bottom: 3px; }
.icon-button { border: 1px solid var(--line); background: #f5f8fc; min-width: 44px; padding: 4px; }
.icon-button:hover { background: #e6edf7; }
.dialog-body { padding: 20px 21px; overflow: auto; }
.detail-sections { display: grid; gap: 18px; }
.detail-sections h3 { font-size: 1.03rem; margin-bottom: 8px; }
.detail-sections ul { margin: 6px 0 0; padding-left: 22px; }
.detail-sections li + li { margin-top: 5px; }
.detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; background: #f4f7fb; border-radius: 10px; padding: 4px 12px; }
.detail-facts > div { padding: 9px 0; overflow-wrap: anywhere; }
.detail-facts dt { color: var(--muted); font-size: .8125rem; margin-bottom: 2px; }
.detail-facts dd { font-weight: 650; }
.detail-match { background: #f1f5fa; padding: 11px 13px; border-radius: 9px; }
.detail-match.matched { color: #125840; background: #e8f6ef; }
.detail-match p + p { margin-top: 4px; }
.dialog-foot { border-top: 1px solid var(--line); }
.dialog-foot p { font-size: .875rem; color: var(--muted); }
.secondary { border: 1px solid #ccd9e9; color: var(--blue); background: #f5f8fc; padding: 7px 12px; white-space: nowrap; }
.compare-tip { color: var(--muted); font-size: .875rem; margin-bottom: 10px; }
.compare-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.compare-table { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; min-width: 550px; font-size: .9rem; }
.compare-table.three { min-width: 755px; }
.compare-table th, .compare-table td { border-bottom: 1px solid var(--line); padding: 10px 11px; vertical-align: top; text-align: left; overflow-wrap: anywhere; }
.compare-table :is(th,td) + :is(th,td) { border-left: 1px solid var(--line); }
.compare-table th:first-child { width: 88px; background: #f4f7fb; position: sticky; left: 0; }
.compare-table thead th { background: #f4f7fb; }
.compare-table tr:last-child > * { border-bottom: 0; }
.compare-table .text-button { margin-top: 2px; display: flex; }
.compare-selection { margin: 14px 0 0; padding-left: 20px; }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 36px); }
  .workspace { gap: 20px; }
  .search-field { flex: 1 1 210px; }
}
@media (max-width: 690px) {
  .wrap { width: calc(100% - 28px); }
  .topbar-inner { min-height: 62px; gap: 13px; }
  .topbar nav { gap: 10px; margin-left: auto; }
  .brand { font-size: 1.13rem; gap: 6px; }
  .brand img { width: 30px; height: 30px; }
  .nav-link { font-size: .84rem; }
  .sample-label { padding: 4px 6px; font-size: .75rem; gap: 4px; }
  .hero { margin-block: 16px; min-height: 203px; }
  .hero-graphic { width: 60%; right: -10%; opacity: .57; }
  .small-break { display: initial; }
  .workspace { grid-template-columns: 1fr; gap: 26px; }
  .profile-panel { padding: 16px; }
  .panel-title { margin-bottom: 11px; }
  .profile-panel label { margin-top: 9px; }
  .search-button { margin-top: 14px; }
  .section-head h2 { font-size: 1.4rem; }
  .toolbar { margin-top: 13px; }
  .search-field { flex-basis: 100%; }
  .notice { padding: 13px; }
  .summary { font-size: .95rem; }
  .dialog-head, .dialog-foot, .dialog-body { padding: 13px; }
}
@media (max-width: 360px) {
  .topbar-inner { gap: 8px; }
  .topbar nav { gap: 6px; }
  .sample-label::before { display: none; }
  .category-button { padding-inline: 7px; font-size: .84rem; }
  .category-button span { margin-left: 3px; }
  .detail-facts { grid-template-columns: minmax(0, 1fr); }
}
