:root {
  --black: #151515;
  --yellow: #ffcd00;
  --paper: #ffffff;
  --canvas: #eef0f3;
  --muted: #60636a;
  --line: #d7d8db;
  --focus: #005ea8;
  --shadow: 0 14px 35px rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--black);
  background-color: var(--canvas);
  background-image: radial-gradient(#cdd0d5 1px, transparent 1px);
  background-size: 22px 22px;
  font-family: "Aptos", "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
button, a { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  background: #fff;
  color: #000;
  padding: .7rem 1rem;
  border: 2px solid #000;
}
.skip-link:focus { top: 1rem; }
.site-header { background: var(--black); color: #fff; border-bottom: 6px solid var(--yellow); box-shadow: 0 4px 18px rgba(0,0,0,.16); }
.header-inner { max-width: 1080px; margin: auto; padding: .62rem 1.15rem; display: flex; align-items: center; gap: .75rem; }
.brand-mark { width: 36px; height: 36px; position: relative; flex: 0 0 36px; }
.brand-mark span { position:absolute; width:25px; height:32px; border:2px solid #111; border-radius:4px; background:var(--yellow); box-shadow:0 0 0 1px rgba(255,255,255,.3); }
.brand-mark span:nth-child(1) { left:0; top:4px; transform:rotate(-8deg); }
.brand-mark span:nth-child(2) { left:5px; top:2px; transform:rotate(1deg); }
.brand-mark span:nth-child(3) { left:10px; top:4px; transform:rotate(8deg); }
.site-header h1 { font-size: clamp(1.15rem, 2.7vw, 1.55rem); margin: 0; line-height: 1.2; }
.eyebrow { margin: 0 0 .1rem; text-transform: uppercase; letter-spacing: .09em; font-size: .75rem; color: #ddd; font-weight: 700; }
.shell { max-width: 960px; margin: 0 auto; padding: .75rem 1rem 1.5rem; }
.view { min-height:0; background:rgba(244,244,245,.9); border:1px solid rgba(255,255,255,.75); padding:1rem 1.25rem; border-radius:16px; box-shadow:0 15px 42px rgba(23,28,36,.08); backdrop-filter:blur(4px); }
.intro-row, .result-heading-row, .shortlist-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; }
.step-label { margin: 0 0 .25rem; color: #555; font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
h2 { margin: 0 0 .35rem; font-size: clamp(1.6rem, 4vw, 2.25rem); line-height: 1.15; }
h3 { line-height: 1.25; }
.intro-row p:not(.step-label), .result-heading-row p, .shortlist-heading p { margin: 0; color: var(--muted); max-width: 720px; }
.intro-row .data-notice { margin-top:.7rem; padding:.65rem .75rem; max-width:760px; border-left:4px solid var(--yellow); background:#fff7d6; color:#333; font-size:.88rem; }
.progress-wrap { margin: .7rem 0 .55rem; }
.progress-meta { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; font-size: .85rem; font-weight: 700; color: #555; }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #ddd; }
.progress-bar { height: 100%; width: 0; background: var(--yellow); transition: width .25s ease; }
.deck-stage { position:relative; width:min(100%, 680px); margin:.6rem auto .65rem; padding:.45rem .6rem .65rem; isolation:isolate; }
.deck-stage::before, .deck-stage::after { content:""; position:absolute; inset:1rem 1.1rem .25rem; background:#fff; border:1px solid #d1d2d5; border-radius:10px; z-index:-1; }
.deck-stage::before { transform:translate(-7px, 8px); }
.deck-stage::after { transform:translate(7px, 4px); }
.sort-card {
  position: relative;
  width:100%;
  height:clamp(230px, 36vh, 300px);
  min-height:230px;
  padding:clamp(1.25rem, 4vw, 2rem);
  background:#fff;
  border:1px solid #c5c7ca;
  border-radius:10px;
  box-shadow:0 16px 36px rgba(0,0,0,.13);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#sort-card:focus { outline: none; }
.category-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .65rem; border-radius: 99px; background: var(--cat-soft); color:#202124; border:1px solid var(--cat); font-size: .78rem; font-weight: 800; }
.category-chip::before { content: ""; width: .55rem; height: .55rem; background: var(--cat); border-radius: 50%; }
.sort-card h3 { position:relative; z-index:1; max-width: 520px; margin: 0 auto .7rem; font-size:clamp(1.45rem, 3vw, 1.95rem); text-align:center; }
.card-description { max-width: 700px; margin: 0 auto; color: #4d5057; text-align: center; font-size: 1.05rem; }
.card-description { position:relative; z-index:1; max-width:540px; font-size:1rem; }
.decision-buttons { margin: .25rem auto 0; max-width:700px; display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.decision { position:relative; min-height:52px; border-radius:9px; border:2px solid var(--yellow); background:#fff; color:#111; font-weight:800; box-shadow:0 4px 0 #bbb; transition:transform .12s ease, background .12s ease, box-shadow .12s ease; }
.decision:hover { transform: translateY(-2px); background:#f4f4f4; }
.decision:active { transform:translateY(3px); background:#e3e3e3; box-shadow:0 2px 0 #aaa; }
.decision span { color:var(--yellow); font-size:1.25em; font-weight:900; margin-right:.3rem; text-shadow:0 1px 0 #6d5800; }
.decision.not, .decision.maybe, .decision.interested { background:#fff; color:#111; border-color:var(--yellow); box-shadow:0 4px 0 #bbb; }
.decision.not:hover, .decision.maybe:hover, .decision.interested:hover { background:#f4f4f4; }
.decision.not:active, .decision.maybe:active, .decision.interested:active { background:#e3e3e3; box-shadow:0 2px 0 #aaa; }
.decision.current-choice { background:#e8e8e8; box-shadow:0 0 0 3px #b8b8b8; }
.back-button, .text-button { border: 0; background: transparent; text-decoration: underline; color: #34373d; padding: .55rem .2rem; }
.back-button { display: block; margin: .55rem auto 0; }
.back-button:disabled { opacity: .4; cursor: default; }
.primary-button, .secondary-button { border-radius: 7px; padding: .72rem 1rem; min-height: 46px; font-weight: 800; }
.primary-button { border: 2px solid var(--black); background: var(--black); color: white; }
.primary-button:hover { background: #333; }
.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.secondary-button { border: 2px solid #333; background: #fff; color: #222; }
.pattern-panel { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin: 1.6rem 0 2rem; }
.pattern-row { --cat:#8095F2; --cat-soft:#E5EAFF; background:var(--cat-soft); border:1px solid var(--cat); border-left:7px solid var(--cat); border-radius:9px; padding:.85rem 1rem; }
.pattern-name { display: flex; justify-content: space-between; gap: 1rem; font-weight: 800; }
.pattern-row p { margin: .15rem 0 .55rem; color: #5a5d63; font-size: .9rem; }
.pattern-meter { height: 7px; border-radius: 99px; background: #e3e3e3; overflow: hidden; }
.pattern-meter span { display: block; height: 100%; background: var(--cat); }
.shortlist-heading { border-top: 1px solid #ccc; padding-top: 1.6rem; }
.shortlist-heading h3 { margin: 0 0 .25rem; font-size: 1.45rem; }
.count-pill { white-space: nowrap; background: #fff; border: 1px solid #aaa; border-radius: 99px; padding: .4rem .75rem; font-weight: 800; }
.filter-row { display: flex; gap: .5rem; overflow-x: auto; padding: 1.2rem 0 .8rem; }
.filter-button { white-space: nowrap; border: 1px solid #999; background: #fff; border-radius: 99px; padding: .45rem .8rem; font-weight: 700; }
.filter-button[aria-pressed="true"] { background:#e3e3e3; color:#111; border-color:#777; }
.candidate-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; }
.candidate-card { --cat:#475569; --cat-soft:#eef1f5; position: relative; background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--cat); border-radius: 10px; padding: 1rem; }
.candidate-card.selected { box-shadow: 0 0 0 3px var(--cat); }
.candidate-card h4 { font-size: 1.08rem; margin: .75rem 0 .45rem; line-height: 1.3; }
.candidate-card p { margin: 0 0 .75rem; color: #555; font-size: .92rem; }
.candidate-actions { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.details-button { border: 0; background: transparent; text-decoration: underline; padding: .35rem 0; }
.select-button { border: 1px solid #333; border-radius: 6px; background: #fff; padding: .45rem .65rem; font-weight: 800; }
.select-button[aria-pressed="true"] { background:var(--cat); color:#111; border-color:#222; }
.empty-state { text-align: center; background: #fff; padding: 2rem; border: 1px dashed #999; border-radius: 10px; }
.sticky-next { position: sticky; bottom: 0; z-index: 5; margin-top: 1.25rem; padding: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: rgba(255,255,255,.96); border: 1px solid #ccc; border-radius: 10px; box-shadow: 0 -5px 20px rgba(0,0,0,.08); }
.sticky-next p { margin: 0; color: #555; }
.result-patterns { margin: 1.5rem 0; padding: 1rem 1.15rem; background: #fff; border-left: 7px solid var(--yellow); box-shadow: 0 4px 18px rgba(0,0,0,.06); }
.result-patterns h3 { margin: 0 0 .35rem; }
.result-patterns p { margin: 0; color: #555; }
.result-cards { display: grid; gap: 1rem; }
.result-card { --cat:#475569; --cat-soft:#eef1f5; background:#fff; border: 1px solid var(--line); border-left: 8px solid var(--cat); border-radius: 10px; padding: 1.2rem; break-inside: avoid; }
.result-card h3 { margin: .75rem 0 1rem; font-size: 1.35rem; }
.result-card dl { display:grid; grid-template-columns: repeat(2, 1fr); gap: .75rem 1rem; margin:0; }
.result-card dl div { background: #f7f7f7; padding: .75rem; border-radius: 6px; }
.result-card dt { font-weight: 800; font-size: .84rem; text-transform: uppercase; letter-spacing: .03em; }
.result-card dd { margin: .2rem 0 0; }
.result-card a { color:#004b87; font-weight:800; }
.explore-next { margin-top:1.5rem; padding:1.2rem; background:#fff; border:1px solid #c9c9c9; border-top:6px solid var(--yellow); border-radius:10px; }
.explore-next h3 { margin:0 0 .35rem; }
.explore-next > p { margin:.25rem 0 1rem; color:#50535a; }
.resource-grid { display:grid; grid-template-columns:repeat(2, 1fr); gap:.7rem; }
.resource-grid a { display:flex; flex-direction:column; gap:.2rem; padding:.8rem; border:1px solid #bbb; border-radius:7px; background:#f7f7f7; color:#111; text-decoration:none; }
.resource-grid a:hover { background:#ededed; border-color:#777; }
.resource-grid span { color:#555; font-size:.9rem; line-height:1.35; }
.explore-next .accuracy-note { margin:1rem 0 0; padding:.75rem; background:#fff7d6; color:#333; border-left:4px solid var(--yellow); }
.action-panel { margin-top: 1.5rem; padding: 1.3rem; background: var(--yellow); border-radius: 10px; }
.action-panel h3, .action-panel p { margin: 0; }
.response-form { display:grid; grid-template-columns:repeat(3, 1fr); gap:.75rem; margin-top:0; padding:1rem; background:rgba(255,255,255,.72); border:1px solid rgba(0,0,0,.18); border-radius:8px; }
.form-field { display:flex; flex-direction:column; gap:.25rem; }
.form-field label { font-weight:800; font-size:.9rem; }
.form-field label span { font-weight:500; color:#555; }
.form-field input, .form-field select { width:100%; min-height:44px; padding:.55rem .65rem; border:1px solid #777; border-radius:6px; background:#fff; color:#111; }
.form-field input[readonly] { background:#e5e5e5; border-color:#999; color:#333; cursor:not-allowed; }
.course-lock-note { color:#444; font-size:.8rem; font-weight:700; }
.response-form .primary-button { grid-column:1 / -1; justify-self:start; }
.honeypot { position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }
.submission-secondary { margin-top:.75rem; }
.final-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.7rem; margin-top:1.5rem; padding-top:1.25rem; border-top:1px solid #bbb; }
.secondary-button:disabled { opacity:.48; cursor:not-allowed; }
.save-status { margin-top:.7rem !important; font-weight:800; }
.copy-status { margin-top: .6rem !important; font-weight: 800; }
.print-locked-message { display:none; }
.detail-dialog { --cat:#475569; --cat-soft:#eef1f5; width: min(680px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); border: 0; border-top: 8px solid var(--cat); border-radius: 12px; padding: 1.35rem; box-shadow: 0 20px 70px rgba(0,0,0,.3); }
.detail-dialog::backdrop { background: rgba(0,0,0,.58); }
.dialog-topline { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.close-button { width: 38px; height:38px; border:1px solid #aaa; border-radius:50%; background:#fff; font-size:1.5rem; line-height:1; }
.detail-dialog h2 { margin-top:1rem; }
.detail-list { display:grid; gap:.7rem; }
.detail-list div { background:#f4f4f4; padding:.75rem; border-radius:7px; }
.detail-list dt { font-weight:800; }
.detail-list dd { margin:.2rem 0 0; }
.experience-list { margin:.25rem 0 0; padding-left:1.15rem; }
.experience-list li + li { margin-top:.45rem; }
.resource-link { display:inline-block; margin-top:.8rem; color:#004b87; font-weight:800; }
.dialog-resources { display:flex; flex-wrap:wrap; gap:.25rem 1.25rem; }
.toast { position:fixed; left:50%; bottom:1.5rem; transform:translate(-50%, 130%); opacity:0; background:#111; color:#fff; padding:.7rem 1rem; border-radius:6px; transition:.2s ease; z-index:50; }
.toast.show { transform:translate(-50%, 0); opacity:1; }

@media (max-width: 700px) {
  .shell { padding:.55rem .55rem 1.5rem; }
  .intro-row, .result-heading-row, .shortlist-heading { display:block; }
  .intro-row .text-button, .result-heading-row .secondary-button { margin-top:.7rem; }
  .view { padding:.75rem .65rem; border-radius:12px; }
  .deck-stage { width:100%; padding:.4rem .3rem .65rem; margin:.55rem 0 .6rem; }
  .deck-stage::before, .deck-stage::after { inset:1rem .75rem .35rem; }
  .sort-card { height:clamp(220px,34vh,265px); min-height:220px; padding:1rem; }
  .decision-buttons { grid-template-columns:repeat(3,1fr); gap:.4rem; }
  .decision { min-height:48px; padding:.35rem; font-size:.88rem; }
  .pattern-panel, .candidate-grid, .resource-grid { grid-template-columns: 1fr; }
  .sticky-next { position: static; display:block; }
  .sticky-next .primary-button { width:100%; margin-top:.7rem; }
  .result-card dl { grid-template-columns: 1fr; }
  .response-form { grid-template-columns:1fr; }
  #saved-note { display:none; }
}

@media print {
  .site-header, #sort-view, #patterns-view, .action-panel, .final-actions { display:none !important; }
  body { background:#fff; font-size:11pt; }
  .shell { max-width:none; padding:0; }
  #results-view { display:block !important; }
  .result-card { box-shadow:none; }
  body:not(.print-unlocked) #results-view { display:none !important; }
  body:not(.print-unlocked) .print-locked-message { display:block !important; padding:2rem; }
}

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