/* Pay Grade uses the same report typography and green palette as Econ Arcade. */
:root {
  --accent: #1F5F3A;
  --accent-soft: #E9F2EC;
  --ink: #1A1A1A;
  --muted: #666660;
  --rule: #D9D9D4;
  --band: #F4F4F1;
  --good: #1F7A3E;
  --good-bg: #E8F3EB;
  --amber: #92651D;
  --col: 680px;
}
body { border-top: 4px solid var(--accent); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.masthead { border-bottom: 1px solid var(--rule); align-items: center; padding-top: 19px; padding-bottom: 15px; }
.wordmark { font-family: 'Roboto Slab', Georgia, serif; font-size: 24px; font-weight: 500; line-height: 1.2; letter-spacing: -.2px; display: inline-flex; align-items: center; gap: 8px; }
.wordmark::before { content: ''; flex: none; width: 22px; height: 22px; border-radius: 5px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 18l5-6 4 3 7-8'/%3E%3C/svg%3E") center / 14px no-repeat; }
.report { padding-top: 22px; }
h1 { font-size: 24px; }
.report-meta { font-size: 12px; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; }
.report-head { margin-bottom: 12px; }
.report-question { font-size: 14px; margin-top: 15px; }
.mode-tabs { display: flex; gap: 6px; margin-top: 15px; }
.mode-tabs button { padding: 5px 12px; font-size: 13px; font-weight: 500; border: 1px solid var(--rule); border-radius: 3px; color: var(--muted); background: white; }
.mode-tabs button[aria-selected=true] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.round-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 0 12px; }
.eyebrow { font-size: 12px; font-weight: 500; color: var(--muted); margin: 0; }
.play-options { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.text-button { border: 0; background: none; padding: 0; color: var(--accent); font-size: 12px; text-underline-offset: 3px; }
.text-button:hover { text-decoration: underline; }
#practice-filter { font-size: 12px; color: var(--muted); }
#field-filter { border: 1px solid var(--rule); background: white; border-radius: 3px; font-size: 12px; padding: 3px; color: var(--ink); max-width: 110px; }

/* The package is the puzzle's clue, directly above the guess bar. */
.paystub { border-top: 2px solid var(--accent); margin-bottom: 20px; }
.stub-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--rule); padding: 11px 0; }
.stub-head h2 { font-size: 14px; font-weight: 600; margin: 0; }
.location { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.location svg { width: 13px; height: 13px; flex: none; }
.comp-lines { margin: 0; }
.comp-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--rule); padding: 9px 0; }
.comp-line dt { font-size: 14px; }
.comp-line dt small { display: inline; margin-left: 8px; font-size: 11px; color: var(--muted); }
.comp-line dd { margin: 0; white-space: nowrap; font-size: 15px; font-weight: 600; }
.comp-line.zero dd { color: #9A9A94; font-weight: 400; }
.total-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 0 9px; }
.total-row span { font-size: 14px; font-weight: 500; }
.total-row strong { font-size: 24px; font-weight: 600; color: var(--accent); }
.pay-bar { height: 5px; display: flex; gap: 2px; overflow: hidden; }
.pay-bar span { background: var(--accent); }
.pay-bar .bonus { opacity: .68; }
.pay-bar .rsus { opacity: .4; }
.pay-bar .options { opacity: .22; }
.stub-footer { color: var(--muted); font-size: 10.5px; margin: 7px 0 0; }

/* One query, one action: click a suggestion or submit the highlighted match. */
.guess-form { display: flex; gap: 8px; align-items: stretch; }
.search-wrap { flex: 1; min-width: 0; position: relative; }
#job-search { width: 100%; height: 43px; padding: 9px 11px; font-size: 15px; background: white; border: 1px solid var(--ink); color: var(--ink); border-radius: 3px; }
#job-search::placeholder { color: #91918A; }
#job-search:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.btn { min-height: 40px; font-size: 14px; padding: 8px 16px; touch-action: manipulation; }
.btn:hover:not(:disabled) { background: #184C2E; }
.btn.secondary:hover:not(:disabled) { background: var(--accent-soft); }
#submit-guess { min-width: 78px; }
.suggestions { top: calc(100% + 3px); max-height: 284px; }
.suggestions li { padding: 9px 10px; display: flex; gap: 9px; align-items: center; border-bottom: 1px solid #EEEFEA; }
.suggestions li:last-child { border-bottom: 0; }
.suggestions li:hover, .suggestions li[aria-selected=true] { background: var(--accent-soft); }
.option-mark { width: 27px; height: 29px; flex: none; display: grid; place-items: center; background: var(--band); color: var(--accent); border-radius: 3px; font-size: 9px; font-weight: 600; }
.option-name { flex: 1; min-width: 0; }
.option-name strong { display: block; font-size: 13px; font-weight: 500; }
.option-name small { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.option-location { max-width: 115px; font-size: 10.5px; color: var(--muted); text-align: right; }
.suggestions .no-matches { cursor: default; color: var(--muted); font-size: 12px; }
.selection-note { color: var(--muted); font-size: 11.5px; margin: 7px 0 9px; min-height: 18px; }
.guess-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 11px; }
.guesses-left { margin: 0; font-size: 13px; }
.clues { margin: 0 0 12px; }
.clue { font-size: 12px; padding: 7px 10px; margin: 5px 0; border-left: 2px solid var(--accent); background: var(--accent-soft); }

/* Six compact, chronological rows, with direction and proximity in fixed columns. */
.history { margin-top: 13px; }
.guess-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.guess-table th { font-size: 11.5px; padding: 0 7px 5px; border-bottom: 1px solid var(--rule); text-align: center; }
.guess-table th:first-child { text-align: left; padding-left: 0; }
.guess-table th:nth-child(2) { width: 58px; }
.guess-table th:nth-child(3) { width: 76px; }
.guess-table th:nth-child(4) { width: 64px; }
.guess-table td { border: 0; background: var(--band); padding: 10px 8px; vertical-align: middle; }
.guess-table .guess-row td { border-top: 6px solid white; padding-bottom: 7px; }
.guess-table .guess-row td:first-child { border-radius: 3px 0 0 0; }
.guess-table .guess-row td:last-child { border-radius: 0 3px 0 0; }
.guess-table .feedback-row td { padding: 0 8px 11px 29px; border-radius: 0 0 3px 3px; }
.guess-table tr.correct td { background: var(--good-bg); }
.guess-number { float: left; width: 21px; color: #92928A; font-size: 12px; }
.guess-name > div { margin-left: 21px; }
.guess-name strong { display: block; font-size: 13px; line-height: 1.35; font-weight: 500; }
.guess-name small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.attributes { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; line-height: 1.4; font-weight: 500; }
.attribute { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid #D2D2CB; border-radius: 3px; background: #FFFFFF; color: #62625B; white-space: nowrap; }
.attribute.match { background: var(--good-bg); border-color: #BDD5C3; }
.attribute.near { background: #FFF4DD; border-color: #E3CFA8; }
.attribute.match, .match { color: var(--good); }
.attribute.near, .near { color: var(--amber); }
.level-cell, .pay-cell { text-align: center; font-size: 13px; white-space: nowrap; }
.fit { color: var(--accent); text-align: center; font-size: 14px; }
.fit strong { font-weight: 600; }
.fit-track { display: block; height: 3px; margin: 5px auto 0; max-width: 43px; background: #D8E1D8; overflow: hidden; border-radius: 2px; }
.fit-track > span { display: block; height: 100%; background: var(--accent); }
.guess-table .placeholder td { border-top: 5px solid white; height: 47px; color: #B0B0A9; font-size: 12px; padding-left: 9px; }
.feedback-key { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; color: var(--muted); margin: 6px 0 0; }
.feedback-key .near { margin: 0 5px; }

/* Results and ranking use the same plain report treatment. */
.result-box { margin-top: 23px; border-top: 2px solid var(--rule-strong); padding-top: 15px; }
.result-box h2 { font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.result-box p { font-size: 13px; color: var(--muted); margin: 4px 0; }
.result-box .result-company { font-size: 15px; color: var(--ink); }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.result-box .eyebrow { font-size: 11px; color: var(--accent); margin-bottom: 6px; }
.rank-intro { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.rank-intro h2 { font-size: 17px; font-weight: 600; margin: 3px 0 4px; }
.body-copy { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.rank-axis { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--rule-strong); color: var(--muted); font-size: 10px; }
.rank-list { position: relative; list-style: none; margin: 0 0 16px; padding: 8px 0; }
.rank-card { display: flex; align-items: center; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--rule); background: white; }
.rank-card[data-draggable=true] { cursor: grab; }
.rank-list.is-dragging { cursor: grabbing; user-select: none; }
.rank-card.dragging { opacity: .3; background: var(--accent-soft); }
body.rank-is-dragging, body.rank-is-dragging * { cursor: grabbing !important; user-select: none; }
.rank-drag-ghost { position: fixed; top: 0; left: 0; margin: 0; z-index: 10; pointer-events: none; opacity: .92; border: 1px solid var(--accent); border-radius: 4px; box-shadow: 0 8px 24px #163F2826; }
.rank-drop-marker { position: absolute; left: 0; right: 0; height: 3px; margin: 0; padding: 0; transform: translateY(-50%); background: var(--accent); border-radius: 2px; pointer-events: none; z-index: 11; box-shadow: 0 0 0 3px white; }
.rank-drop-marker::before { content: ''; position: absolute; left: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.rank-drop-marker span { position: absolute; right: 0; bottom: 6px; border: 1px solid white; border-radius: 3px; padding: 3px 8px; background: var(--accent); color: white; font-size: 12px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.rank-position { color: #92928A; width: 17px; flex: none; font-size: 13px; }
.company-mark { width: 34px; height: 36px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 600; border-radius: 3px; }
.rank-details { flex: 1; min-width: 0; }
.rank-details h3 { font-size: 14px; font-weight: 500; margin: 0; }
.rank-details > p { color: var(--muted); font-size: 12px; margin: 2px 0 4px; }
.rank-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; }
.rank-meta .location { font-size: 11px; }
.tag { font-size: 9px; color: var(--muted); border: 1px solid var(--rule); border-radius: 2px; padding: 0 4px; }
.rank-controls { display: flex; align-items: center; gap: 4px; }
.icon-button { min-width: 32px; min-height: 32px; padding: 3px; border: 1px solid var(--rule); border-radius: 3px; font-size: 17px; background: white; color: var(--ink); touch-action: manipulation; }
.icon-button:hover:not(:disabled) { background: var(--accent-soft); }
.grip { display: grid; place-items: center; min-width: 28px; min-height: 36px; font-size: 21px; color: #777; margin-left: 3px; touch-action: none; user-select: none; }
.rank-value { min-width: 88px; text-align: right; }
.rank-value strong { display: block; font-size: 20px; color: var(--accent); font-weight: 600; }
.rank-value small { font-size: 10.5px; color: var(--muted); }
.rank-verdict { width: fit-content; max-width: 100%; font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--amber); background: #FFF4DD; border-left: 3px solid var(--amber); border-radius: 3px; padding: 6px 9px; margin-top: 8px; }
.rank-verdict.correct { color: var(--good); background: var(--good-bg); border-color: var(--good); }
.rank-breakdown { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.rank-submit { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rank-submit small { font-size: 11px; color: var(--muted); }
.score-badge { font-size: 26px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.score-badge small { font-size: 16px; }
.foot-note { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 11px; margin-top: 27px; }
.foot-note .text-button { font-size: 11px; white-space: nowrap; }
.dialog { max-width: 570px; max-height: 85vh; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.dialog-head h2 { margin: 0; }
.dialog-head .icon-button { flex: none; }
.dialog h3 { font-size: 15px; margin: 18px 0 7px; }
.dialog p, .dialog li { font-size: 13px; color: var(--muted); }
.dialog a { color: var(--accent); }
.source-list li { margin: 12px 0; }
.source-list small { display: block; font-size: 11px; }
.stat-grid { grid-template-columns: 1fr 1fr; }
.stat { padding: 12px; background: var(--band); }
.stat strong { display: block; color: var(--accent); font-size: 24px; font-weight: 600; }
.stat span { font-size: 11px; color: var(--muted); }
.copy-fallback { width: 100%; margin-top: 12px; padding: 9px; border: 1px solid var(--rule); font-size: 12px; }
.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; }

@media (max-width: 520px) {
  .masthead { padding: 16px 16px 12px; gap: 8px; }
  .wordmark { font-size: 21px; gap: 6px; }
  .wordmark::before { width: 20px; height: 20px; }
  .nav { gap: 0; }
  .nav-link { font-size: 12px; padding: 4px 5px; }
  .report { padding-top: 18px; }
  .report-meta { font-size: 11px; }
  .report-question { font-size: 13px; }
  .round-toolbar { align-items: flex-start; }
  .round-toolbar .eyebrow { padding-top: 3px; font-size: 11px; white-space: nowrap; }
  .play-options { gap: 8px; }
  .play-options .text-button { font-size: 11px; }
  .stub-head h2 { font-size: 13px; }
  .stub-head .location { font-size: 11px; }
  .comp-line { padding: 8px 0; }
  .comp-line dt { font-size: 13px; }
  .comp-line dt small { display: block; margin: 1px 0 0; font-size: 10px; }
  .comp-line dd { font-size: 14px; }
  .total-row strong { font-size: 22px; }
  .stub-footer { font-size: 10px; }
  #job-search { font-size: 16px; }
  #submit-guess { min-width: 65px; padding: 8px 12px; }
  .suggestions { right: -73px; }
  .option-name strong { font-size: 12px; }
  .option-name small { font-size: 10px; }
  .option-location { max-width: 75px; font-size: 10px; }
  .selection-note { font-size: 10.5px; }
  .guess-table th { font-size: 10px; padding: 0 3px 5px; }
  .guess-table th:nth-child(2) { width: 42px; }
  .guess-table th:nth-child(3) { width: 59px; }
  .guess-table th:nth-child(4) { width: 47px; }
  .guess-table td { padding: 9px 4px; }
  .guess-name strong { font-size: 12px; overflow-wrap: anywhere; }
  .guess-name small { font-size: 10px; }
  .guess-number { width: 16px; font-size: 11px; }
  .guess-name > div { margin-left: 16px; }
  .guess-table .feedback-row td { padding: 0 8px 10px; }
  .attributes { gap: 5px; font-size: 12px; }
  .attribute { padding: 4px 7px; }
  .level-cell, .pay-cell { font-size: 11px; }
  .fit { font-size: 12px; }
  .fit-track { max-width: 33px; }
  .feedback-key { font-size: 9px; gap: 8px; flex-wrap: wrap; }
  .rank-card { gap: 8px; }
  .rank-position { width: 12px; }
  .company-mark { width: 28px; height: 30px; font-size: 9px; }
  .rank-details h3 { font-size: 13px; }
  .rank-controls { display: grid; grid-template-columns: 32px 28px; }
  .grip { grid-column: 2; grid-row: 1 / span 2; margin-left: 0; align-self: stretch; }
  .rank-card:has(.rank-value) { flex-wrap: wrap; }
  .rank-card:has(.rank-value) .rank-details { flex-basis: calc(100% - 56px); }
  .rank-value { padding-left: 56px; text-align: left; }
  .rank-value strong, .rank-value small { display: inline; }
  .rank-value small { margin-left: 5px; }
  .rank-submit { flex-wrap: wrap; }
  .foot-note { align-items: flex-start; font-size: 10px; }
  .foot-note .text-button { font-size: 10px; }
  .dialog-body { padding: 20px; }
}
@media (max-width: 360px) {
  .wordmark { font-size: 19px; }
  .nav-link { font-size: 11px; padding: 4px; }
  .wordmark::before { width: 17px; height: 17px; }
  .stub-head { flex-wrap: wrap; gap: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
  .guess-row { animation: print 180ms ease-out; }
}
