/* One restrained, token-based interaction family for interests, plan and education. */
.portal-tool-page { background: var(--pn-surface-sage); color: var(--pn-text); padding-block: 28px 72px; }
.portal-tool-page > .container > .breadcrumbs { margin-bottom: 36px; }
.portal-tool-page [hidden] { display: none !important; }
.tool-layout { display: grid; grid-template-columns: minmax(17rem, .8fr) minmax(0, 1.6fr); align-items: start; gap: clamp(2rem, 4vw, 4rem); }
.tool-layout > *, .tool-card > *, .tool-history-list li > * { min-width: 0; }
.tool-intro h1 { font-size: clamp(1.8rem, 2.2vw, 2.4rem); line-height: 1.22; letter-spacing: -.035em; color: var(--pn-brand); margin: 0 0 22px; }
.tool-intro > p { margin: 0 0 18px; line-height: 1.65; }
.tool-intro .tool-intro-lead { font-size: 1.125rem; font-weight: 600; color: var(--pn-text); }
.tool-kicker { font-size: .8125rem; font-weight: 600; letter-spacing: .035em; color: var(--pn-primary); margin-bottom: 12px !important; }
.tool-meta, .tool-hint { color: var(--pn-text-muted); }
.tool-meta { font-size: .875rem; line-height: 1.55; }
.tool-hint { line-height: 1.65; margin: 0 0 24px; }
.tool-card { background: var(--pn-surface); border: 1px solid var(--pn-border-subtle); border-radius: var(--pn-radius-panel); padding: clamp(1.125rem, 2.5vw, 2.25rem); }
.tool-card p { line-height: 1.65; }
.tool-card > p { margin-block: 0 20px; }
.tool-step-title { color: var(--pn-brand); font-size: clamp(1.35rem, 1.8vw, 1.65rem); line-height: 1.35; letter-spacing: -.025em; margin: 0 0 12px; scroll-margin-top: 32px; }
.tool-card h3 { font-size: 1.0625rem; line-height: 1.5; letter-spacing: -.015em; margin: 0 0 12px; color: var(--pn-brand); }
.tool-progress { display: grid; gap: 10px; margin-bottom: 24px; }
.tool-progress progress { width: 100%; height: 4px; border: 0; border-radius: 0; overflow: hidden; color: var(--pn-primary); background: var(--pn-surface-soft); appearance: none; }
.tool-progress progress::-webkit-progress-bar { background: var(--pn-surface-soft); }
.tool-progress progress::-webkit-progress-value { background: var(--pn-primary); }
.tool-progress progress::-moz-progress-bar { background: var(--pn-primary); }
.tool-options { display: grid; gap: 12px; border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.tool-option-legend { font-size: .875rem; color: var(--pn-text-muted); padding: 0 0 14px; }
.tool-choice { display: flex; align-items: flex-start; gap: 14px; width: 100%; min-height: 56px; padding: 16px 18px; border: 1px solid var(--pn-border-control); border-radius: var(--pn-radius-control); background: var(--pn-surface); line-height: 1.6; cursor: pointer; color: var(--pn-text); transition: var(--pn-control-transition); }
.tool-choice input { width: 20px; height: 20px; margin: 3px 0 0; flex: 0 0 20px; accent-color: var(--pn-primary); cursor: pointer; }
.tool-choice > span { min-width: 0; overflow-wrap: anywhere; }
.tool-choice:hover { border-color: var(--pn-primary); }
.tool-choice:has(input:checked) { border-color: var(--pn-primary); background: var(--pn-surface-soft); box-shadow: inset 0 0 0 1px var(--pn-primary); }
.tool-choice:has(input:focus-visible) { outline: none; border-color: var(--pn-text); background: var(--pn-surface-soft); }
.tool-button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: var(--pn-control-min-size); border: 1px solid var(--pn-border-control); border-radius: var(--pn-radius-control); padding: 11px 18px; font: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.5; color: var(--pn-primary); background: var(--pn-surface); text-align: center; cursor: pointer; white-space: normal; overflow-wrap: anywhere; }
.tool-button:hover { border-color: var(--pn-primary); background: var(--pn-surface-soft); }
.tool-button--primary { background: var(--pn-primary); color: var(--pn-on-primary); border-color: var(--pn-primary); }
.tool-button--primary:hover { background: var(--pn-primary-hover); color: var(--pn-on-primary); border-color: var(--pn-primary-hover); }
.tool-button--quiet { border-color: transparent; background: transparent; padding-inline: 4px; text-align: left; justify-content: flex-start; }
.tool-button--quiet:hover { background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
.tool-button:disabled { cursor: not-allowed; border-color: var(--pn-border-subtle); color: var(--pn-disabled-text); background: var(--pn-disabled-bg); text-decoration: none; }
.tool-button:focus-visible, .tool-link:focus-visible, .tool-card input:focus-visible, .tool-card textarea:focus-visible, .tool-card summary:focus-visible, .tool-intro summary:focus-visible { outline: none; }
.tool-button:not(.tool-button--quiet):focus-visible, .tool-card :is(input,textarea):focus-visible { border-color: var(--pn-text); }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.tool-actions > .tool-button { flex: 1 1 11rem; }
.tool-actions > a { flex: 1 1 10rem; }
.tool-secondary-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 12px; }
.tool-foot-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--pn-border-subtle); }
.tool-link { color: var(--pn-primary); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; display: inline-flex; align-items: center; min-height: 44px; line-height: 1.5; }
.tool-link:hover { color: var(--pn-primary-hover); }
.tool-context-links { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 12px; }
.tool-side-card { background: var(--pn-surface); border: 1px solid var(--pn-border-subtle); border-radius: var(--pn-radius-control); padding: 20px; margin-block: 22px; }
.tool-side-card strong { color: var(--pn-brand); font-size: 1rem; line-height: 1.5; }
.tool-side-card p { margin-top: 10px; font-size: .9375rem; line-height: 1.6; }
.tool-method, .tool-question-navigation { margin-top: 24px; border-top: 1px solid var(--pn-border-subtle); padding-top: 10px; }
.tool-method summary, .tool-question-navigation summary, .tool-selected summary { cursor: pointer; font-weight: 600; font-size: .9375rem; min-height: 44px; padding-block: 10px; color: var(--pn-brand); }
.tool-method p, .tool-method li { font-size: .875rem; line-height: 1.65; margin-block: 10px; color: var(--pn-text-muted); }
.tool-method ul { padding-left: 20px; }
.tool-question-navigation > p { margin: 12px 0; }
.tool-question-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.tool-button--question { min-width: 0; min-height: 44px; padding: 8px 4px; border-color: var(--pn-border-subtle); color: var(--pn-text-muted); }
.tool-button--question[data-answered="true"] { background: var(--pn-surface-soft); border-color: var(--pn-primary); color: var(--pn-primary); }
.tool-button--question[aria-current] { box-shadow: inset 0 -3px 0 var(--pn-primary); }
.tool-live { font-size: .9375rem; color: var(--pn-info); line-height: 1.6; margin-block: 16px; }
.tool-live:empty { margin-block: 0; }
.tool-notice { border-left: 3px solid var(--pn-primary); background: var(--pn-surface-soft); padding: 16px 18px; margin-block: 20px; font-size: .9375rem; line-height: 1.65; }
.tool-notice p { margin-top: 8px; margin-bottom: 0; }
.tool-notice .tool-button, .tool-notice .tool-link { margin: 12px 12px 0 0; }
.tool-result-lead { font-size: 1.0625rem; color: var(--pn-brand); }
.tool-scores { margin-top: 28px; }
.tool-score { border-bottom: 1px solid var(--pn-border-subtle); padding-block: 20px; }
.tool-score:first-child { border-top: 1px solid var(--pn-border-subtle); }
.tool-score-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.tool-score-heading strong { color: var(--pn-primary); white-space: nowrap; }
.tool-score meter { appearance: none; width: 100%; height: 6px; display: block; border: 0; background: var(--pn-surface-soft); border-radius: 0; }
.tool-score meter::-webkit-meter-bar { border: 0; height: 6px; background: var(--pn-surface-soft); border-radius: 0; }
.tool-score meter::-webkit-meter-optimum-value { background: var(--pn-primary); border-radius: 0; }
.tool-score meter::-moz-meter-bar { background: var(--pn-primary); }
.tool-score p { margin: 10px 0 0; }
.tool-score .tool-link { margin-top: 4px; font-size: .9375rem; }
.tool-next-step { padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--pn-border-subtle); }
.tool-next-step > p { margin-block: 10px 20px; }
.tool-field { display: grid; gap: 8px; margin-top: 22px; }
.tool-field label { font-size: .9375rem; font-weight: 600; line-height: 1.55; }
.tool-field input, .tool-field textarea { width: 100%; min-width: 0; background: var(--pn-surface); color: var(--pn-text); font: inherit; font-size: 1rem; line-height: 1.6; border: 1px solid var(--pn-border-control); border-radius: var(--pn-radius-control); padding: 12px 14px; min-height: 48px; }
.tool-field textarea { min-height: 116px; resize: vertical; }
.tool-field input::placeholder, .tool-field textarea::placeholder { color: var(--pn-text-muted); opacity: 1; }
.tool-field .tool-meta { text-align: right; }
.tool-field + .tool-choice { margin-top: 16px; }
.tool-field + .tool-choice + p { margin-top: 16px; }
.tool-step-nav { margin-block: 24px; }
.tool-step-nav ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tool-button--step { width: 100%; border-color: var(--pn-border-subtle); padding: 12px; color: var(--pn-text); text-align: left; justify-content: flex-start; font-weight: 400; min-height: 52px; }
.tool-button--step[aria-current] { color: var(--pn-primary); background: var(--pn-surface-soft); border-color: var(--pn-primary); font-weight: 600; }
.tool-step-number { flex: 0 0 18px; font-variant-numeric: tabular-nums; }
.tool-step-name { flex: 1; }
.tool-step-state { color: var(--pn-text-muted); font-size: .6875rem; flex: 0 0 auto; font-weight: 400; }
.tool-step-nav > .tool-button { margin-top: 8px; }
.tool-summary-section { padding-block: 22px; border-bottom: 1px solid var(--pn-border-subtle); }
.tool-summary-section dl { margin: 0; }
.tool-summary-section dt { font-size: .875rem; font-weight: 600; color: var(--pn-text-muted); margin-top: 18px; }
.tool-summary-section dd { margin: 7px 0 0; line-height: 1.75; }
.tool-user-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.tool-empty-text { color: var(--pn-text-muted); font-size: .9375rem; }
.tool-history { margin-top: 28px; }
.tool-history h2 { font-size: 1.25rem; line-height: 1.4; margin-bottom: 10px; }
.tool-history-list { list-style: none; padding: 0; margin: 0; }
.tool-history-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 16px; border-top: 1px solid var(--pn-border-subtle); }
.tool-history-list strong { display: block; font-size: .9375rem; overflow-wrap: anywhere; }
.tool-history-list time { display: block; margin-top: 5px; }
.tool-history-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-history-actions .tool-button { font-size: .875rem; min-height: 44px; padding-block: 8px; }
.tool-selected { padding-top: 10px; }
.tool-condition-list { margin: 4px 0 0; }
.tool-condition-list dt { margin-top: 14px; font-size: .75rem; color: var(--pn-text-muted); }
.tool-condition-list dd { margin: 3px 0 0; font-size: .9375rem; line-height: 1.6; overflow-wrap: anywhere; }
.tool-admission-questions { padding-block: 12px 22px; border-bottom: 1px solid var(--pn-border-subtle); }
.tool-admission-questions ol { padding-left: 22px; margin: 10px 0 18px; }
.tool-admission-questions li { padding-left: 5px; margin-top: 12px; line-height: 1.65; }
.tool-list-heading { margin-top: 28px !important; }
.tool-institutions { margin-block: 20px; }
.tool-institution { padding-block: 20px; border-top: 1px solid var(--pn-border-subtle); }
.tool-institution > p { margin: 0 0 7px; }
.tool-institution h3 a { color: var(--pn-brand); }
.tool-institution h3 a:hover { color: var(--pn-primary); text-decoration: underline; text-underline-offset: 4px; }
.tool-institution .tool-context-links { font-size: .875rem; margin-top: 4px; }
.tool-print-only { display: none; }

@media (max-width: 1000px) {
  .tool-layout { grid-template-columns: minmax(15rem, .8fr) minmax(0, 1.4fr); gap: 24px; }
  .tool-card { padding: 24px; }
  .tool-question-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tool-step-state { display: none; }
}
@media (max-width: 780px) {
  .portal-tool-page { padding-block: 22px 48px; }
  .portal-tool-page > .container > .breadcrumbs { margin-bottom: 28px; }
  .tool-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tool-intro h1 { max-width: 28ch; }
  .tool-intro > p { max-width: 65ch; }
  .tool-intro .tool-side-card { margin-block: 18px; }
  .tool-step-nav ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-step-nav { margin-bottom: 14px; }
  .tool-question-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .tool-card { padding: 24px; }
}
@media (max-width: 480px) {
  .tool-card { padding: 20px 16px; }
  .tool-intro h1 { font-size: 1.875rem; }
  .tool-choice { padding: 14px 12px; gap: 12px; }
  .tool-actions { gap: 10px; }
  .tool-actions > .tool-button, .tool-actions > a { flex-basis: 100%; }
  .tool-secondary-actions { align-items: flex-start; flex-direction: column; gap: 0; }
  .tool-question-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tool-step-nav ol { grid-template-columns: minmax(0, 1fr); }
  .tool-step-state { display: inline; }
  .tool-score-heading { align-items: flex-start; gap: 8px; }
  .tool-score-heading h3 { font-size: 1rem; }
}
@media (forced-colors: active) {
  .tool-choice:has(input:checked), .tool-button--step[aria-current], .tool-button--question[data-answered="true"] { outline: 2px solid Highlight; }
  .tool-progress progress, .tool-score meter { forced-color-adjust: auto; }
}
@media print {
  body:has([data-tool-page="plan"]) :is(.site-header, .site-footer, .back-to-top, .skip-link, dialog) { display: none !important; }
  [data-tool-page="plan"] { padding: 0 !important; min-height: 0; color: #000; background: #fff; }
  [data-tool-page="plan"] > .container { max-width: none; width: 100%; padding: 0; }
  [data-tool-page="plan"] .breadcrumbs, [data-tool-page="plan"] .tool-intro, [data-tool-page="plan"] .tool-workspace { display: none !important; }
  [data-tool-page="plan"] .tool-layout { display: block; }
  [data-tool-page="plan"] .tool-print-only { display: block; color: #000; font-size: 11pt; line-height: 1.5; }
  [data-tool-page="plan"] .tool-print-title { font-size: 22pt; line-height: 1.25; margin-bottom: 14pt; color: #000; }
  [data-tool-page="plan"] .tool-summary-section { padding-block: 12pt; border-color: #aaa; break-inside: avoid; }
  [data-tool-page="plan"] :is(.tool-summary-section h3, .tool-summary-section dt, .tool-empty-text, .tool-kicker) { color: #000; }
  [data-tool-page="plan"] .tool-summary-section dd { white-space: pre-wrap; overflow-wrap: anywhere; }
  @page { margin: 18mm; }
}
