/* Functional pages share the editorial visual language of the approved home. */
:root {
  --teal: var(--deep);
  --white: #fff;
  --surface: #f4f7f2;
  --field-border: #bfcfc7;
}

input, select, textarea { font: inherit; }
button, input, select, textarea { touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .55; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #2a958b;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.container { width: min(1240px, calc(100% - 112px)); margin-inline: auto; }
main:has(.page-head) { background: var(--paper); }
.page-head { padding: 52px 0 38px; }
.breadcrumb { color: #667c71; font-size: 12px; margin-bottom: 27px; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 4px; }
.page-head h1 { max-width: 920px; font-size: clamp(34px, 3.8vw, 52px); line-height: 1.16; }
.page-head > p { max-width: 800px; margin-top: 23px; font-size: 17px; line-height: 1.8; }
.page-body { padding-bottom: 86px; }
.page-body h3 { font-size: 22px; }
.page-body p { line-height: 1.8; }
.page-body > .notice:first-child { margin-top: 0; }
.page-body a:not(.btn):not(.tool-card):not(.text-link):hover { text-decoration: underline; text-underline-offset: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 17px;
  max-width: 100%; min-height: 49px; padding: 14px 21px;
  border: 1px solid var(--deep); border-radius: 5px;
  background: var(--deep); color: white; font-size: 14px; font-weight: 600;
  line-height: 1.5; text-align: center;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { background: #22575a; border-color: #22575a; transform: translateY(-1px); }
.btn.secondary { background: transparent; border-color: #b8cdc2; color: var(--deep); }
.btn.secondary:hover { background: #e9f1e5; border-color: #92b7a4; }
.btn.white { background: white; border-color: white; color: var(--deep); }
.btn:disabled:hover { transform: none; }
.arrow { font-size: 21px; font-weight: 400; line-height: 1; flex-shrink: 0; }
.icon {
  display: grid; place-items: center; width: 44px; height: 44px;
  background: #e8f0e4; border-radius: 8px; color: #355f51; flex-shrink: 0;
}
.icon svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 32px; }
.section-heading p { max-width: 660px; margin-top: 16px; }
.section-heading .eyebrow { margin-bottom: 12px; }

.tools-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 19px; }
.tool-card {
  position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 290px;
  padding: 27px; background: white; border: 1px solid var(--line); border-radius: 6px;
  overflow-wrap: anywhere; hyphens: auto; transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.tool-card:hover { border-color: #91b7a5; transform: translateY(-3px); }
.tool-card h3 { font-size: 20px; line-height: 1.35; margin: 22px 0 12px; letter-spacing: -.025em; }
.tool-card p { font-size: 14px; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 24px; margin-top: auto; font-size: 12px; font-weight: 600; }
.card-bottom .arrow { display: grid; place-items: center; border: 1px solid #c7d7cd; border-radius: 50%; width: 31px; height: 31px; font-size: 17px; }
.tool-card .tag { position: absolute; top: 35px; right: 20px; color: var(--deep); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.sub-tools { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; margin-top: 27px; color: #627b71; font-size: 13px; }
.sub-tools span { color: #448976; margin-right: 6px; }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.topic-card, .service-card { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 6px; padding: 28px; }
.topic-card { display: flex; flex-direction: column; align-items: flex-start; }
.topic-card h3, .service-card h3 { font-size: 22px; margin: 19px 0 13px; line-height: 1.35; }
.topic-card p, .service-card p { font-size: 14px; margin-bottom: 20px; }
.topic-card > .text-link { margin-top: auto; }
.service-card .text-link { font-size: 13px; }

.panel { min-width: 0; padding: 34px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.panel h2 { margin-bottom: 18px; font-size: clamp(24px, 2.1vw, 29px); line-height: 1.3; }
.panel h3 { margin-bottom: 15px; line-height: 1.35; }
.panel .eyebrow { margin-bottom: 17px; }
.panel > p + p { margin-top: 14px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: start; gap: 28px; }
.two-col > *, .field-row > *, .topic-grid > *, .stat-grid > * { min-width: 0; }
.notice { padding: 17px 20px; margin: 23px 0; border-left: 3px solid #699980; border-radius: 0 5px 5px 0; background: #eef4e9; color: #466050; font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.notice.warning { background: #f7f2e7; border-left-color: #ba9d64; color: #72603d; }
.field { display: flex; flex-direction: column; gap: 9px; margin-bottom: 23px; min-width: 0; }
.field label, .field legend { color: var(--ink); font-size: 14px; font-weight: 600; }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  min-width: 0; width: 100%; min-height: 49px; padding: 12px 14px;
  border: 1px solid var(--field-border); border-radius: 5px;
  background: #fff; color: var(--ink); font-size: 16px; line-height: 1.6;
}
.field textarea { resize: vertical; min-height: 118px; }
.field small { color: var(--muted); font-size: 12px; line-height: 1.65; }
.field input[type=range] { accent-color: var(--deep); padding-inline: 0; border: 0; }
.field input[type=file] { font-size: 13px; padding: 9px; }
.field input[type=file]::file-selector-button { padding: 10px 12px; margin-right: 12px; border: 0; border-radius: 3px; background: #e7efe3; color: var(--deep); cursor: pointer; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grade-select { display: flex; flex-wrap: wrap; gap: 10px; margin: 17px 0 30px; }
.grade-select button { width: 55px; min-height: 50px; border: 1px solid #b9cec1; border-radius: 5px; background: white; color: var(--deep); font-weight: 600; }
.grade-select button.selected { background: var(--deep); border-color: var(--deep); color: white; }
.grade-select button:hover:not(.selected) { background: #edf3e8; }
.result-big { margin: 18px 0; color: var(--deep); font: 600 clamp(35px, 3.4vw, 49px)/1.2 var(--heading); letter-spacing: -.045em; overflow-wrap: anywhere; }
.result-line { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.result-line > * { min-width: 0; overflow-wrap: anywhere; }
.result-line > strong { flex-shrink: 0; max-width: 65%; text-align: right; }
.result-line .btn, .result-line > .text-link { flex-shrink: 0; }
.source { color: #667d70; font-size: 12px; line-height: 1.7; margin-top: 25px; overflow-wrap: anywhere; }
.source a { text-decoration: underline; text-underline-offset: 3px; }
.mini { font-size: 13px; line-height: 1.7; }
.check-item { display: flex; align-items: flex-start; gap: 13px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.75; cursor: pointer; }
.check-item input { width: 20px; height: 20px; margin: 3px 0 0; flex: 0 0 20px; accent-color: var(--deep); }
.check-item:has(input:checked) { color: #567565; }
.progress-track { height: 6px; margin: 13px 0 23px; border-radius: 6px; background: #e5ede2; overflow: hidden; }
.progress-track > div { height: 100%; background: #548d75; transition: width .3s; }
.entry { border-top: 1px solid var(--line); padding: 20px 0; }
.entry p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.entry strong { font-size: 14px; }
.entry button { float: right; padding: 4px 0 7px 12px; border: 0; background: none; color: #885f4f; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.entry-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 21px; }
.entry-toolbar .btn { font-size: 13px; }
.page-body .empty { padding: 25px 0; font-size: 14px; }

.table-scroll { min-width: 0; max-width: 100%; overflow: auto; overscroll-behavior-inline: contain; }
.page-body table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.page-body th { background: #edf3e8; font-weight: 600; color: #375b4a; }
.page-body th, .page-body td { padding: 16px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
.page-body td small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.page-body tbody tr:hover td { background: #fafcf8; }
.page-body table .text-link { white-space: nowrap; }
.badge { display: inline-block; padding: 5px 10px; border: 1px solid #d5e5d7; border-radius: 4px; background: #ecf5e8; color: #365f45; font-size: 11px; line-height: 1.6; white-space: nowrap; }
.badge.pending { background: #f6f1e4; border-color: #e5dcc5; color: #7a6540; }
.dashboard { display: grid; grid-template-columns: 214px minmax(0, 1fr); align-items: start; gap: 28px; }
.dash-nav { display: flex; flex-direction: column; align-items: stretch; gap: 5px; padding: 13px; max-width: 100%; }
.dash-nav button { border: 0; border-radius: 4px; padding: 13px 12px; background: transparent; color: #62776b; text-align: left; font-size: 14px; line-height: 1.5; }
.dash-nav button:hover { background: #f0f5ed; color: var(--deep); }
.dash-nav button.active { background: #e3efdd; color: var(--deep); font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin-bottom: 26px; }
.stat { padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.stat small { color: var(--muted); font-size: 12px; }
.stat strong { display: block; margin-top: 14px; font: 600 clamp(26px, 2.6vw, 34px)/1.3 var(--heading); letter-spacing: -.045em; overflow-wrap: anywhere; }
.chart { display: flex; align-items: flex-end; gap: 13px; height: 155px; margin: 27px 0 32px; }
.chart > div { position: relative; flex: 1; min-height: 8px; min-width: 0; border-radius: 3px 3px 0 0; background: #93b8a2; }
.chart > div:nth-child(even) { background: var(--deep); }
.chart > div span { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); font-size: 10px; white-space: nowrap; color: #667e6e; }
.portal-user { align-items: center; }
.portal-user > * { overflow-wrap: anywhere; }
.portal-tabs { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.portal-tabs a { text-decoration: underline; text-underline-offset: 4px; }
.guided-steps { min-width: 0; max-width: 100%; padding-bottom: 5px; overscroll-behavior-inline: contain; }
.guided-steps button { min-height: 79px; flex: 0 0 160px; padding: 16px; border-radius: 5px; font-size: 13px; }
.guided-steps small { font-size: 11px; }
.answer-option { background: #fff; border-radius: 5px; padding: 18px; }
.answer-option:hover { border-color: #9cbca9; }
.answer-option:has(input:checked) { background: #edf5e8; border-color: #789e86; }
.answer-option input { margin: 3px 0 0; }
.answer-option strong { font-size: 15px; }
.answer-option small { font-size: 13px; line-height: 1.65; }
.guided-options legend { margin-bottom: 8px; }
.review-row > div { min-width: 0; }
.review-row .text-button { flex-shrink: 0; }
.text-button { text-underline-offset: 4px; }
.faq-item { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq-item summary { display: flex; justify-content: space-between; gap: 18px; list-style: none; font-size: 15px; font-weight: 600; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 23px; line-height: 1; color: #60816f; }
.faq-item[open] summary::after { content: '−'; }
.faq-item > p { margin-top: 16px; font-size: 14px; }

.long-copy { max-width: 880px; font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
.long-copy h2 { margin: 33px 0 15px; font-size: 26px; }
.long-copy > h2:first-child { margin-top: 0; }
.long-copy p { margin-bottom: 19px; }
.long-copy ul { padding-left: 23px; color: var(--muted); }
.long-copy li { margin-bottom: 12px; }
.long-copy a { color: var(--deep); text-decoration: underline; text-underline-offset: 4px; }
dialog { position: fixed; width: calc(100% - 36px); max-width: 550px; max-height: calc(100% - 48px); padding: 38px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); }
dialog::backdrop { background: #133e41a1; backdrop-filter: blur(4px); }
dialog h2 { margin-bottom: 17px; font-size: 27px; line-height: 1.3; }
dialog p { margin-bottom: 20px; font-size: 15px; line-height: 1.8; }
.modal-close { position: absolute; top: 6px; right: 10px; padding: 3px 10px; border: 0; background: none; color: #5e796c; font-size: 28px; }
.print-only { display: none; }

@media (max-width: 1150px) {
  .container { width: calc(100% - 64px); }
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-card { min-height: 265px; }
  .topic-grid { gap: 18px; }
  .topic-card, .service-card { padding: 24px; }
  .panel { padding: 27px; }
  .dashboard { grid-template-columns: 190px minmax(0, 1fr); gap: 21px; }
  .stat { padding: 20px 17px; }
}
@media (max-width: 900px) {
  .two-col { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .dashboard { grid-template-columns: minmax(0, 1fr); }
  .dash-nav { flex-direction: row; overflow: auto; padding: 10px; overscroll-behavior-inline: contain; }
  .dash-nav button { white-space: nowrap; flex-shrink: 0; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { padding-top: 40px; }
  .page-head > p { font-size: 16px; }
  .table-scroll table { min-width: 590px; }
  .panel .table-scroll { margin-inline: -6px; max-width: calc(100% + 12px); }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 40px); }
  .page-head { padding: 32px 0 28px; }
  .breadcrumb { margin-bottom: 22px; font-size: 11px; }
  .page-head h1 { font-size: 34px; }
  .page-head > p { font-size: 15px; line-height: 1.75; margin-top: 20px; }
  .page-body { padding-bottom: 56px; }
  .tools-grid { gap: 13px; }
  .tool-card { padding: 20px 17px; min-height: 306px; }
  .tool-card h3 { font-size: 18px; margin-top: 20px; }
  .tool-card p { font-size: 13px; }
  .tool-card .tag { top: 32px; right: 12px; font-size: 8px; letter-spacing: .4px; }
  .tool-card .icon { width: 35px; height: 35px; }
  .tool-card .icon svg { width: 21px; height: 21px; }
  .card-bottom { font-size: 11px; gap: 6px; }
  .card-bottom .arrow { width: 25px; height: 25px; font-size: 15px; }
  .panel { padding: 24px 20px; }
  .panel h2 { font-size: 25px; }
  .page-body h3 { font-size: 21px; }
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea { font-size: 16px; }
  .grade-select { gap: 8px; }
  .grade-select button { width: 48px; min-height: 48px; }
  .btn { padding: 13px 17px; font-size: 13px; }
  .notice { padding: 15px 16px; font-size: 13px; }
  .result-line { gap: 12px; font-size: 13px; }
  .result-line > strong { max-width: 100%; }
  .result-big { font-size: 39px; }
  .result-line > .btn { margin-block: 4px; }
  .stat-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 20px; }
  .stat { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 19px 20px; }
  .stat small { font-size: 13px; }
  .stat strong { margin: 0; font-size: 28px; }
  .topic-grid { grid-template-columns: minmax(0, 1fr); }
  .topic-card, .service-card { padding: 25px; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 18px; }
  .long-copy { font-size: 15px; }
  .long-copy h2 { font-size: 25px; }
  .chart { gap: 7px; }
  .chart > div span { font-size: 8px; transform: translateX(-50%) rotate(-35deg); }
  .guided-steps button { min-width: 150px; flex-basis: 150px; }
  .answer-option { padding: 16px 13px; gap: 11px; }
  .answer-option strong { font-size: 14px; }
  .answer-option small { font-size: 12px; }
  dialog { padding: 35px 24px 26px; }
}
@media (max-width: 359px) {
  .tools-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-card { min-height: 245px; }
  .grade-select button { width: 43px; }
  .page-head h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .tool-card, .progress-track > div { transition: none; }
}
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 42px; align-items: start; }
.auth-intro { padding: 26px 12px; }
.auth-aside { padding: 32px; background: #123e41; color: #edf5ef; border-radius: 22px; }
.auth-aside h3, .auth-aside a { color: #d4f3db; }
.auth-aside p, .auth-aside li { color: #d6e5df; }
.auth-aside ul { padding-left: 22px; margin: 26px 0; }
.auth-aside li { margin-bottom: 16px; }
.auth-tabs { display: flex; gap: 22px; border-bottom: 1px solid #d7e6df; padding-bottom: 16px; }
.auth-tabs [aria-pressed="true"] { color: #123e41; text-decoration: underline; text-underline-offset: 6px; }
.auth-intro h2 { font-size: clamp(28px, 3vw, 42px); line-height: 1.15; }
.auth-panel { background: #f5faf7; border: 1px solid #d7e6df; border-radius: 22px; padding: clamp(24px, 4vw, 42px); }
.auth-panel form { margin-top: 24px; }
.auth-panel .btn { width: 100%; }
.auth-panel .field { margin-bottom: 20px; }
.auth-panel .text-button { margin-top: 22px; }
.portal-filters { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; margin: 25px 0; }
.portal-user { gap: 12px; flex-wrap: wrap; }
.portal-user .text-button { margin-left: auto; }
.form-status { background: #e7f2e9; color: #174a3c; padding: 14px 18px; border-radius: 12px; margin-top: 18px; }
.form-status.error { color: #8c3328; background: #fff0ec; }
.file-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.entry p { white-space: pre-wrap; overflow-wrap: anywhere; }
.file-row strong { overflow-wrap: anywhere; }
.file-row > div { min-width: 0; }
.field input[type="file"] { width: 100%; font-size: 14px; }
@media (max-width: 700px) {
  .auth-shell, .portal-filters { grid-template-columns: 1fr; gap: 20px; }
  .auth-intro { padding: 0; }
  .portal-user .text-button { margin-left: 0; }
  .file-row { align-items: flex-start; flex-direction: column; }
}
@media print {
  header, footer, .concept-strip, .btn, .button, .entry-toolbar, .dash-nav, .guided-steps, .modal-close { display: none !important; }
  body, main:has(.page-head) { background: white; }
  .container { width: 100%; }
  .page-head { padding: 0 0 20px; }
  .page-head h1 { font-size: 30px; }
  .page-body { padding: 0; }
  .panel { border: 0; padding: 12px 0; }
  .two-col { display: block; }
  .table-scroll { overflow: visible; max-width: 100%; }
  .table-scroll table { min-width: 0; font-size: 10px; }
  .page-body th, .page-body td { padding: 8px 6px; }
  .print-only { display: block; }
  .check-item, .entry, .result-line { break-inside: avoid; }
}
