:root {
  color-scheme: light;
  --ink: #102c3c;
  --muted: #526a78;
  --line: #cbd9df;
  --soft: #eef5f6;
  --paper: #fffefa;
  --blue: #17658b;
  --blue-dark: #0c4867;
  --gold: #c58b2a;
  --focus: #8a4700;
  --shadow: 0 18px 50px rgba(16, 44, 60, .11);
  font-family: "IBM Plex Sans", "Avenir Next", Avenir, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; left: 1rem; top: -5rem; padding: .75rem 1rem; background: #fff; color: #000; border: 2px solid #000; }
.skip-link:focus { top: 1rem; }

.site-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem clamp(1rem, 4vw, 4rem); border-bottom: 1px solid var(--line); background: rgba(255,254,250,.96); }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--ink); font-weight: 700; text-decoration: none; }
.brand img { width: 52px; height: auto; object-fit: contain; }
.all-apps { font-weight: 650; text-underline-offset: .2rem; }

.shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(3rem, 7vw, 6.5rem) 0 5rem; }
.shell--entry { width: min(1040px, calc(100% - 2rem)); }
.eyebrow { margin: 0 0 .8rem; color: var(--blue); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.12; }
h1 { margin: 0; max-width: 820px; font-size: clamp(2.7rem, 7vw, 5.4rem); letter-spacing: -.04em; }
h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { margin: 0; font-size: 1.35rem; }
.lede { max-width: 700px; margin: 1.35rem 0 0; color: var(--muted); font-size: clamp(1.06rem, 2vw, 1.25rem); }
.claim-note { max-width: 760px; margin: 1rem 0 0; color: var(--muted); font-size: .92rem; }

.entry-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.entry-panel { padding: clamp(1.35rem, 4vw, 2.25rem); border: 1px solid var(--line); border-radius: 1rem; background: #fff; box-shadow: var(--shadow); }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin-bottom: 1.6rem; padding: .3rem; border-radius: .75rem; background: var(--soft); }
.mode-tab { min-height: 44px; padding: .6rem .8rem; border: 0; border-radius: .55rem; color: var(--muted); background: transparent; font-weight: 750; cursor: pointer; }
.mode-tab[aria-selected="true"] { color: var(--ink); background: #fff; box-shadow: 0 2px 8px rgba(16,44,60,.09); }
.field-label { display: block; margin-bottom: .5rem; font-weight: 750; }
.hint { margin: .55rem 0 0; color: var(--muted); font-size: .88rem; }
.code-input, .search-input, .cluster-select, .score-input { width: 100%; min-height: 48px; border: 1px solid #879da8; border-radius: .55rem; background: #fff; color: var(--ink); }
.code-input, .search-input { padding: .75rem .9rem; }
.code-input { letter-spacing: .08em; text-transform: uppercase; }
.score-groups { display: grid; gap: 1.25rem; max-height: 54vh; overflow: auto; padding: .15rem .45rem .15rem .15rem; }
.score-group { margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; }
.score-group legend { padding: 0 .4rem; font-weight: 800; }
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1rem; }
.score-field span { display: block; margin-bottom: .25rem; color: var(--muted); font-size: .82rem; }
.score-input { padding: .55rem .65rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.4rem; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: .72rem 1.2rem; border: 1px solid var(--blue-dark); border-radius: 999px; background: var(--blue-dark); color: #fff; font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { background: #07364e; }
.button--quiet { background: transparent; color: var(--blue-dark); }
.button--quiet:hover { background: var(--soft); }
.button[disabled] { cursor: wait; opacity: .68; }
.error { margin: 1rem 0 0; padding: .8rem 1rem; border-left: 4px solid #a73c2f; background: #fff0ed; color: #70271f; }
.privacy-card { margin-top: 2rem; padding: 1rem 1.1rem; border-left: 3px solid var(--gold); background: #fbf5e8; }
.privacy-card strong { display: block; margin-bottom: .25rem; }

.results-head { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 2rem; }
.results-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.filters { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(200px, .45fr); gap: 1rem; margin: 0 0 1.5rem; }
.filters label span { display: block; margin-bottom: .35rem; font-size: .84rem; font-weight: 750; }
.cluster-select { padding: .7rem .8rem; }
.results-count { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.explorer-grid { display: grid; grid-template-columns: minmax(290px, .72fr) minmax(0, 1.28fr); gap: 1.5rem; align-items: start; }
.career-list { display: grid; gap: .65rem; max-height: 70vh; overflow: auto; padding: .15rem .45rem .15rem .15rem; }
.career-card { width: 100%; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.career-card:hover { border-color: var(--blue); box-shadow: 0 6px 18px rgba(16,44,60,.08); }
.career-card[aria-current="true"] { border-color: var(--blue-dark); border-left-width: 5px; background: #f5fafb; }
.career-card__order { color: var(--blue); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.career-card h3 { margin-top: .28rem; font-family: inherit; font-size: 1.05rem; }
.career-card p { margin: .35rem 0 0; color: var(--muted); font-size: .86rem; }
.empty { padding: 2rem; border: 1px dashed #8aa4af; border-radius: .75rem; color: var(--muted); text-align: center; }

.detail { position: sticky; top: 1rem; min-height: 540px; padding: clamp(1.4rem, 4vw, 2.4rem); border: 1px solid var(--line); border-radius: 1rem; background: #fff; box-shadow: var(--shadow); }
.detail-topline { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .82rem; }
.detail h2 { margin-top: .8rem; }
.description { margin: 1rem 0 0; color: #314d5d; font-size: 1.02rem; }
.detail-section { margin-top: 1.8rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.detail-section h3 { font-family: inherit; font-size: 1rem; }
.detail-section p { margin: .55rem 0 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.chip { padding: .35rem .62rem; border: 1px solid #adc3cc; border-radius: 999px; background: var(--soft); color: #284b5e; font-size: .8rem; }
.test-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; margin-top: .8rem; }
.test-step { padding: .85rem; border-radius: .65rem; background: var(--soft); }
.test-step strong { display: block; color: var(--blue-dark); }
.test-step span { display: block; margin-top: .25rem; color: var(--muted); font-size: .82rem; }
.detail-nav { display: flex; justify-content: space-between; gap: .7rem; margin-top: 1.8rem; }
.detail-nav button { min-height: 44px; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--blue-dark); font-weight: 750; cursor: pointer; }
.detail-nav button:disabled { opacity: .45; cursor: default; }

@media (max-width: 860px) {
  .entry-layout, .explorer-grid { grid-template-columns: 1fr; }
  .entry-panel { max-width: 660px; }
  .detail { position: static; min-height: 0; }
  .career-list { max-height: 46vh; }
  .results-head { align-items: start; flex-direction: column; }
}

@media (max-width: 580px) {
  .brand span { display: none; }
  .shell { width: min(100% - 1.25rem, 1180px); padding-top: 2.7rem; }
  .entry-panel, .detail { padding: 1.1rem; }
  .score-grid, .filters, .test-steps { grid-template-columns: 1fr; }
  .button-row .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
