:root {
  color-scheme: light;
  --canvas: #f3f5f3;
  --paper: #fbfcfa;
  --ink: #17201e;
  --muted: #66716e;
  --line: #d5dbd7;
  --line-strong: #aeb8b3;
  --petrol: #075e59;
  --petrol-dark: #064944;
  --petrol-soft: #e0efeb;
  --signal: #1f7354;
  --warning: #8a5a12;
  --danger: #a03931;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--petrol) 42%, transparent); outline-offset: 2px; }

.site-header {
  min-height: 68px; padding: 9px max(22px, calc((100vw - 1400px) / 2));
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-logo { width: 148px; height: 40px; display: block; }
.brand-text { display: none; line-height: 1.1; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 550; }
.site-header nav { display: flex; align-items: center; gap: 3px; }
.nav-button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 680; }
.nav-button.active, .nav-button:hover { color: var(--ink); background: var(--canvas); }
.nav-button span { min-width: 20px; padding: 2px 5px; margin-left: 4px; border-radius: 9px; background: var(--petrol-soft); color: var(--petrol-dark); font-size: 10px; }

main { width: min(1400px, calc(100% - 44px)); margin: 0 auto; }
.intro { display: grid; grid-template-columns: minmax(320px, .72fr) minmax(590px, 1.28fr); gap: clamp(40px, 6vw, 84px); align-items: center; padding: 38px 0 34px; border-bottom: 1px solid var(--line-strong); }
.eyebrow { margin: 0; color: var(--petrol-dark); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.intro h1 { max-width: 650px; margin: 11px 0 13px; font-size: clamp(34px, 3.8vw, 53px); font-weight: 720; line-height: 1.02; letter-spacing: -.05em; }
.intro-copy > p:not(.eyebrow) { max-width: 610px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.profile-panel { padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); }
.profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 19px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.profile-heading > div { display: grid; gap: 3px; }
.profile-heading strong { font-size: 14px; }
.profile-heading small { color: var(--muted); font-size: 10px; }
.match-toggle { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 1px solid var(--petrol); border-radius: 5px; color: var(--petrol-dark); font-size: 11px; font-weight: 750; cursor: pointer; }
.match-toggle span { white-space: nowrap; }
.match-toggle input { width: 16px; height: 16px; accent-color: var(--petrol); }
.match-toggle.is-disabled { border-color: var(--line); color: var(--muted); opacity: .62; cursor: default; }
.filter-heading > div { display: flex; align-items: center; gap: 9px; }
.profile-panel > label, .field > label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 12px; font-weight: 720; }
.education-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.education-tab { min-height: 64px; padding: 11px 13px; border: 0; border-right: 1px solid var(--line); background: var(--paper); color: var(--ink); text-align: left; font-weight: 720; }
.education-tab:last-child { border-right: 0; }
.education-tab:hover { background: var(--canvas); }
.education-tab.active { background: var(--petrol); color: #fff; }
.education-tab small { display: block; margin-top: 5px; color: inherit; opacity: .74; font-size: 10px; }
.score-row { display: grid; grid-template-columns: .72fr 1.28fr; gap: 13px; align-items: end; margin-top: 19px; }
.field input, .field select, .results-header select { width: 100%; min-height: 43px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--paper); color: var(--ink); }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.token-input { min-height: 43px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 5px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--paper); }
.token-input input { flex: 1 1 120px; width: auto; min-width: 0; min-height: 31px; padding: 0 6px; border: 0; outline: 0; background: transparent; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.filter-chip { max-width: 100%; min-height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 7px; border: 1px solid var(--petrol); border-radius: 4px; background: var(--petrol-soft); color: var(--petrol-dark); font-size: 10px; font-weight: 760; }
.filter-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-chip b { font-size: 14px; line-height: 1; }
.checkbox-field { min-height: 66px; display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); cursor: pointer; }
.checkbox-field input { width: 17px; height: 17px; accent-color: var(--petrol); }
.checkbox-field strong, .checkbox-field small { display: block; }
.checkbox-field strong { font-size: 12px; }
.checkbox-field small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.profile-help { min-height: 46px; margin: 17px 0 0; padding: 12px 13px; border-left: 3px solid var(--petrol); background: var(--canvas); color: var(--muted); font-size: 11px; line-height: 1.5; }

.workspace { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; padding: 34px 0 82px; }
.filters { align-self: start; position: sticky; top: 96px; padding-right: 30px; border-right: 1px solid var(--line); }
.filter-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.filter-heading > div { margin: 0; }
.filter-heading h2 { margin: 0; font-size: 15px; }
.filter-heading button, [data-reset] { padding: 4px; border: 0; background: transparent; color: var(--petrol-dark); font-size: 11px; font-weight: 750; }
.filters .field + .field { margin-top: 17px; }
.results { min-width: 0; }
.results-header { min-height: 50px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line-strong); }
.results-header p { margin: 0 0 4px; font-size: 16px; }
.results-header span { color: var(--muted); font-size: 11px; }
.results-header label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.results-header select { width: auto; min-width: 170px; min-height: 36px; font-size: 11px; }
.source-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.listing-list { display: grid; }
.listing-row { display: grid; grid-template-columns: minmax(0, 1fr) 154px; border-bottom: 1px solid var(--line); transition: background-color 140ms ease; }
.listing-row:hover { background: color-mix(in srgb, var(--paper) 62%, transparent); }
.listing-main { min-width: 0; padding: 24px 20px 24px 0; }
.listing-heading { display: flex; justify-content: space-between; gap: 18px; }
.institution { display: flex; align-items: center; gap: 7px; margin: 0 0 7px; color: var(--muted); font-size: 10px; font-weight: 650; }
.listing-row h2 { max-width: 850px; margin: 0; font-size: 19px; font-weight: 720; line-height: 1.25; letter-spacing: -.025em; }
.save-button, .close-button { flex: 0 0 auto; height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 720; }
.save-button.is-saved { border-color: var(--petrol); background: var(--petrol-soft); color: var(--petrol-dark); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.tags span { padding: 5px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 10px; font-weight: 650; }
.tags .match-tag { border-color: var(--signal); background: var(--petrol-soft); color: var(--petrol-dark); }
.quick-facts { display: grid; grid-template-columns: 1fr .6fr 1fr; gap: 16px; margin: 18px 0 0; }
dt { margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
dd { margin: 0; font-size: 11px; font-weight: 650; }
.listing-action { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 18px; padding: 24px 0 24px 18px; border-left: 1px solid var(--line); }
.deadline { color: var(--warning); font-size: 10px; font-weight: 780; text-align: right; }
.detail-button, .primary-link, .secondary-button { min-height: 40px; display: grid; place-items: center; padding: 0 13px; border: 1px solid transparent; border-radius: 5px; font-size: 11px; font-weight: 750; text-decoration: none; }
.detail-button, .primary-link { background: var(--petrol); color: #fff; }
.secondary-button { border-color: var(--line-strong); background: transparent; color: var(--ink); }
.skeleton-list { display: grid; }
.skeleton-card { height: 180px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.skeleton-card span { display: block; width: 70%; height: 13px; margin-bottom: 15px; background: var(--line); animation: pulse 1.4s ease-in-out infinite; }
.skeleton-card span:first-child { width: 28%; } .skeleton-card span:nth-child(2) { width: 52%; height: 22px; }
@keyframes pulse { 50% { opacity: .38; } }
.empty-state { padding: 80px 24px; text-align: center; }
.empty-code { color: var(--petrol-dark); font: 700 11px ui-monospace, monospace; text-transform: uppercase; }
.empty-state h2 { margin: 8px 0; font-size: 24px; }
.empty-state p { color: var(--muted); }
.empty-state button { min-height: 40px; margin-top: 8px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--paper); color: var(--ink); }

.drawer-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(7, 14, 12, .62); }
.detail-drawer { position: fixed; inset: 0 0 0 auto; z-index: 21; width: min(690px, 95vw); display: grid; grid-template-rows: auto 1fr auto; background: var(--paper); box-shadow: -18px 0 55px rgba(0, 0, 0, .2); }
.drawer-header { display: flex; justify-content: space-between; gap: 24px; padding: 25px 30px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 0; font-size: 25px; line-height: 1.15; letter-spacing: -.03em; }
.drawer-content { overflow-y: auto; padding: 26px 30px 42px; }
.drawer-content section { margin-top: 29px; }
.drawer-content h3 { margin: 0 0 12px; font-size: 14px; }
.drawer-content section > p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.fit-summary { padding: 17px 19px; border-left: 3px solid var(--signal); background: var(--petrol-soft); color: var(--petrol-dark); }
.fit-summary > * { display: block; }
.fit-label { margin-bottom: 7px; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.fit-summary p { margin: 6px 0 0; font-size: 11px; }
.detail-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 24px; margin: 0; padding: 18px; border: 1px solid var(--line); }
.certificate-box { border-top: 1px solid var(--line); }
.certificate-box p { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--petrol-dark); font-size: 12px; font-weight: 680; }
.summary-list { display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.summary-list li { padding: 12px 2px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 12px; line-height: 1.65; }
.requirement-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: requirement; }
.requirement-list li { counter-increment: requirement; display: grid; grid-template-columns: 24px 1fr; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.requirement-list li::before { content: counter(requirement, decimal-leading-zero); color: var(--petrol-dark); font: 700 10px ui-monospace, monospace; }
.source-note { margin-top: 30px; padding-top: 17px; border-top: 1px solid var(--line-strong); }
.source-note strong { font-size: 11px; }
.source-note p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.drawer-footer { display: grid; grid-template-columns: 1fr 1.25fr; gap: 9px; padding: 17px 30px; border-top: 1px solid var(--line); background: var(--paper); }
footer { width: min(1400px, calc(100% - 44px)); margin: 0 auto; padding: 25px 0 38px; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line-strong); color: var(--muted); font-size: 10px; }
footer span { color: var(--ink); font-weight: 750; } footer p { margin: 0; }

@media (max-width: 960px) {
  .intro { grid-template-columns: 1fr; gap: 34px; align-items: start; }
  .profile-panel { padding: 20px; }
  .workspace { grid-template-columns: 1fr; }
  .filters { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 0 0 28px; border: 0; border-bottom: 1px solid var(--line-strong); }
  .filter-heading { grid-column: 1 / -1; margin: 0; }
  .filters .field + .field { margin-top: 0; }
}

@media (max-width: 680px) {
  main, footer { width: min(100% - 28px, 1400px); }
  .site-header { padding-inline: 14px; }
  .brand-logo { width: 42px; height: 42px; object-fit: cover; object-position: left center; }
  .nav-button { padding-inline: 8px; font-size: 11px; }
  .intro { padding: 34px 0 30px; }
  .intro h1 { font-size: 40px; }
  .profile-heading { align-items: flex-start; flex-direction: column; }
  .education-tabs, .score-row, .filters { grid-template-columns: 1fr; }
  .education-tab { border-right: 0; border-bottom: 1px solid var(--line); }
  .education-tab:last-child { border-bottom: 0; }
  .filter-heading { grid-column: auto; }
  .results-header { align-items: flex-end; }
  .results-header label { display: block; }
  .results-header select { display: block; min-width: 135px; margin-top: 5px; }
  .listing-row { grid-template-columns: 1fr; }
  .listing-main { padding-right: 0; }
  .listing-heading { align-items: flex-start; }
  .listing-row h2 { font-size: 20px; }
  .quick-facts { grid-template-columns: 1fr 1fr; }
  .quick-facts div:last-child { grid-column: 1 / -1; }
  .listing-action { flex-direction: row; align-items: center; padding: 13px 0; border-left: 0; }
  .deadline { text-align: left; }
  .detail-button { min-width: 135px; }
  .drawer-header, .drawer-content { padding-inline: 20px; }
  .drawer-footer { padding: 13px 20px; grid-template-columns: 1fr; }
  .detail-facts { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
