:root {
    --portal-bg: #f7f7f2;
    --portal-surface: #ffffff;
    --portal-soft: #f0f2eb;
    --portal-text: #18211c;
    --portal-muted: #657069;
    --portal-line: #dce2dc;
    --portal-brand: #2f6b55;
    --portal-brand-strong: #245442;
    --portal-accent: #b96f35;
    --portal-dark: #15201a;
    --portal-radius: 18px;
    --portal-radius-small: 12px;
    --portal-shadow: 0 12px 30px rgb(20 32 26 / 8%);
    --shell: 1180px;
    --text: 740px;
}

html {
    scroll-padding-top: 96px;
}

body {
    color: var(--portal-text);
    background: var(--portal-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.65;
}

body::before {
    display: none;
}

h1,
h2,
h3 {
    color: var(--portal-text);
    font-family: inherit;
    font-weight: 760;
    hyphens: manual;
    letter-spacing: -0.035em;
    overflow-wrap: normal;
}

h1 {
    max-width: 800px;
    margin-bottom: 1.1rem;
    font-size: clamp(2.75rem, 6vw, 4.25rem);
    line-height: 1.06;
}

h2 {
    margin-bottom: 1rem;
    font-size: clamp(2.1rem, 4vw, 3rem);
    line-height: 1.1;
}

h3 {
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
    line-height: 1.16;
}

a {
    text-decoration: none;
}

.shell {
    width: min(calc(100% - 2.5rem), var(--shell));
}

.section-pad {
    padding-block: clamp(4rem, 7vw, 5.5rem);
}

.eyebrow,
.kicker,
.card-kicker {
    display: inline-block;
    margin-bottom: 0.85rem;
    color: var(--portal-brand);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lead {
    max-width: 670px;
    color: #45534b;
    font-size: 1.28rem;
    line-height: 1.58;
}

.lead-small {
    max-width: 620px;
    color: var(--portal-muted);
    font-size: 1.08rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgb(247 247 242 / 94%);
    border-bottom: 1px solid rgb(220 226 220 / 90%);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 1.75rem;
}

.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--portal-text);
}

.portal-brand-name {
    font-size: 1.35rem;
    font-weight: 650;
    letter-spacing: -0.045em;
}

.portal-brand-name strong {
    color: var(--portal-brand-strong);
    font-weight: 850;
}

.portal-brand-descriptor {
    padding-left: 0.9rem;
    color: var(--portal-muted);
    border-left: 1px solid var(--portal-line);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

.main-nav a {
    padding: 0.5rem 0;
    color: #314038;
    border-bottom: 2px solid transparent;
    font-size: 0.9rem;
    font-weight: 700;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: var(--portal-brand-strong);
    border-color: var(--portal-brand);
}

.portal-hero {
    padding-top: clamp(3rem, 6vw, 4.5rem);
}

.portal-hero-grid,
.portal-planning-grid,
.portal-trust-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
    align-items: center;
    gap: clamp(2.5rem, 6vw, 4rem);
}

.portal-hero-copy h1 {
    max-width: 720px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2rem 0 1.45rem;
}

.portal-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 1.35rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 780;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.portal-button:hover {
    transform: translateY(-1px);
}

.portal-button-primary {
    color: #fff;
    background: var(--portal-brand);
}

.portal-button-primary:hover {
    background: var(--portal-brand-strong);
}

.portal-button-secondary {
    color: var(--portal-text);
    background: transparent;
    border-color: #aeb9b0;
}

.portal-button-secondary:hover {
    border-color: var(--portal-brand);
}

.portal-button-full {
    width: 100%;
    border-radius: var(--portal-radius-small);
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.1rem;
    color: var(--portal-muted);
    font-size: 0.84rem;
}

.portal-system-card,
.portal-tool-card {
    padding: clamp(1.45rem, 3vw, 2rem);
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
}

.portal-system-card {
    color: #eef5f1;
    background: var(--portal-dark);
    border-color: #2e4036;
}

.portal-card-label {
    display: flex;
    justify-content: space-between;
    padding-bottom: 1rem;
    color: #a7cdbb;
    border-bottom: 1px solid rgb(255 255 255 / 14%);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.portal-system-flow {
    display: grid;
    gap: 0;
}

.portal-system-flow > div {
    display: grid;
    grid-template-columns: 2.2rem 1fr;
    padding-block: 1rem;
    border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.portal-system-flow span {
    grid-row: 1 / span 2;
    color: #d78955;
    font-size: 0.72rem;
    font-weight: 800;
}

.portal-system-flow strong {
    font-size: 1.12rem;
}

.portal-system-flow small,
.portal-system-card > p {
    color: #bdc8c1;
}

.portal-system-card > p {
    margin: 1.2rem 0 0;
    font-size: 0.9rem;
}

.portal-section-soft {
    background: var(--portal-soft);
}

.portal-section-dark {
    color: #fff;
    background: var(--portal-dark);
}

.portal-section-head {
    max-width: 720px;
    margin-bottom: 2.3rem;
}

.portal-section-head > p:last-child {
    color: var(--portal-muted);
    font-size: 1.05rem;
}

.portal-section-head-dark h2 {
    color: #fff;
}

.portal-section-head-dark .eyebrow {
    color: #9ecab7;
}

.portal-section-head-dark > p:last-child {
    color: #bdc8c1;
}

.portal-topic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.portal-topic-card {
    min-height: 230px;
    padding: 1.45rem;
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-small);
    transition: box-shadow 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.portal-topic-card:hover {
    border-color: #b9c7bc;
    box-shadow: var(--portal-shadow);
    transform: translateY(-2px);
}

.portal-topic-card > span {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    margin-bottom: 2.25rem;
    color: var(--portal-brand);
    background: var(--portal-soft);
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 850;
}

.portal-topic-card p,
.portal-tool-card > p,
.portal-trust-grid > div > p {
    margin-bottom: 0;
    color: var(--portal-muted);
    font-size: 0.9rem;
}

.portal-step-list,
.portal-standards-list {
    display: grid;
    gap: 1rem;
    margin: 1.8rem 0 0;
    padding: 0;
    list-style: none;
}

.portal-step-list li,
.portal-standards-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.portal-step-list li > span,
.portal-standards-list li > span {
    display: grid;
    width: 2.15rem;
    height: 2.15rem;
    flex: none;
    place-items: center;
    color: var(--portal-brand);
    background: var(--portal-soft);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 850;
}

.portal-step-list small {
    display: block;
    margin-top: 0.15rem;
    color: var(--portal-muted);
}

.portal-tool-card h3 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.portal-tool-card dl {
    margin-block: 1.5rem;
}

.portal-tool-card dl > div {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 1rem;
    padding-block: 0.7rem;
    border-bottom: 1px solid var(--portal-line);
}

.portal-tool-card dt {
    color: var(--portal-muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.portal-tool-card dd {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
}

.portal-article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.portal-article-card {
    display: flex;
    min-height: 260px;
    flex-direction: column;
    padding: 1.55rem;
    background: #1e2c24;
    border: 1px solid #2e4036;
    border-radius: var(--portal-radius-small);
}

.portal-article-card > span {
    margin-bottom: 1.7rem;
    color: #a7cdbb;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.portal-article-card h3 {
    color: #fff;
}

.portal-article-card p {
    color: #bdc8c1;
    font-size: 0.9rem;
}

.portal-article-card a {
    margin-top: auto;
    color: #c9eadb;
    font-size: 0.9rem;
    font-weight: 780;
}

.portal-trust-grid {
    align-items: start;
}

.portal-text-link {
    display: inline-block;
    margin-top: 1.2rem;
    color: var(--portal-brand);
    font-weight: 800;
}

.portal-standards-list {
    margin-top: 0;
}

.portal-standards-list li {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--portal-line);
}

.portal-standards-list p {
    margin: 0.2rem 0 0;
    color: var(--portal-muted);
    font-size: 0.86rem;
}

.breadcrumbs {
    margin-bottom: 1.5rem;
    color: var(--portal-muted);
    font-size: 0.78rem;
}

.breadcrumbs li:not(:last-child)::after {
    color: var(--portal-accent);
}

.portal-article-shell {
    display: grid;
    grid-template-columns: minmax(0, var(--text)) 260px;
    align-items: start;
    gap: clamp(2.5rem, 6vw, 4.5rem);
    padding-top: clamp(2.5rem, 5vw, 4rem);
    padding-bottom: clamp(4rem, 7vw, 5.5rem);
}

.portal-article-main {
    min-width: 0;
}

.portal-article-main h1 {
    font-size: clamp(2.5rem, 5vw, 3.65rem);
}

.article-lead {
    color: #48564e;
    font-size: 1.2rem;
    line-height: 1.65;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
    padding-bottom: 1.5rem;
    color: var(--portal-muted);
    border-bottom: 1px solid var(--portal-line);
    font-size: 0.78rem;
}

.meta-row a {
    color: var(--portal-brand);
    font-weight: 700;
}

.answer-box {
    margin: 1.75rem 0;
    padding: 1.25rem 1.4rem;
    background: #edf4ef;
    border: 0;
    border-left: 4px solid var(--portal-brand);
    border-radius: 0 var(--portal-radius-small) var(--portal-radius-small) 0;
}

.answer-box ul {
    display: grid;
    gap: 0.45rem;
    margin: 0.65rem 0 0;
    padding-left: 1.2rem;
}

.portal-system-figure {
    margin: 2rem 0;
    padding: 1.4rem;
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-small);
}

.portal-system-figure figcaption {
    margin-bottom: 1rem;
    color: var(--portal-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-system-figure > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.portal-system-figure section {
    display: grid;
    grid-template-columns: 2rem 1fr;
    padding: 0.85rem;
    background: var(--portal-soft);
    border-radius: 10px;
}

.portal-system-figure section > span {
    grid-row: 1 / span 2;
    color: var(--portal-brand);
    font-size: 0.72rem;
    font-weight: 850;
}

.portal-system-figure section small {
    color: var(--portal-muted);
}

.portal-prose-section {
    scroll-margin-top: 96px;
}

.portal-prose-section h2,
.sources h2 {
    margin-top: 3.25rem;
    font-size: 1.9rem;
}

.portal-prose-section p {
    color: #37443e;
    font-size: 1.03rem;
    line-height: 1.78;
}

.callout,
.safety-note {
    margin: 2.2rem 0;
    padding: 1.2rem 1.35rem;
    color: var(--portal-text);
    background: #fff7ed;
    border: 1px solid #ead8c4;
    border-radius: var(--portal-radius-small);
}

.callout p,
.safety-note p {
    margin: 0.4rem 0 0;
    color: #5c4a38;
}

.sources {
    margin-top: 3.25rem;
    padding-top: 0;
    border-top: 1px solid var(--portal-line);
}

.sources ol {
    padding-left: 0;
}

.sources li {
    display: grid;
    grid-template-columns: 12rem 1fr;
    gap: 1rem;
    padding-block: 0.9rem;
    border-bottom: 1px solid var(--portal-line);
}

.sources li > span {
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.sources li a {
    color: var(--portal-brand);
    font-weight: 700;
}

.source-note {
    color: var(--portal-muted);
    font-size: 0.8rem;
}

.portal-content-list {
    margin: 1rem 0 0;
    padding-left: 1.25rem;
}

.portal-content-list li + li {
    margin-top: 0.55rem;
}

.portal-content-table-wrap {
    margin-top: 1.25rem;
    overflow-x: auto;
}

.portal-content-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

.portal-content-table th,
.portal-content-table td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--portal-line);
    text-align: left;
    vertical-align: top;
}

.portal-related {
    margin-top: 2.5rem;
}

.portal-tool-evidence {
    max-width: var(--text);
    padding-bottom: clamp(4rem, 7vw, 5.5rem);
}

.portal-related > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.portal-related a {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--portal-line);
}

.portal-related a:hover {
    border-color: var(--portal-brand);
}

.portal-related span {
    color: var(--portal-muted);
    font-size: 0.9rem;
}

.portal-formula-tool {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.65fr);
    gap: 1rem;
    margin: 2rem 0 2.75rem;
    padding: 1rem;
    background: var(--portal-soft);
    border: 1px solid var(--portal-line);
}

.portal-formula-inputs {
    padding: 1rem;
}

.portal-formula-inputs label {
    display: grid;
    grid-template-columns: 1fr 10rem;
    gap: 1rem;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--portal-line);
}

.portal-formula-inputs label small {
    display: block;
    margin-top: 0.15rem;
    color: var(--portal-muted);
}

.portal-number-input {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    background: #fff;
    border: 1px solid var(--portal-line);
}

.portal-number-input input {
    min-width: 0;
    padding: 0.65rem;
    font: inherit;
    border: 0;
}

.portal-number-input em {
    padding-right: 0.65rem;
    color: var(--portal-muted);
    font-style: normal;
}

.portal-formula-result {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    color: #fff;
    background: var(--portal-dark);
}

.portal-formula-result > p {
    margin: 0.75rem 0;
}

.portal-formula-result > p:first-of-type strong {
    font-size: clamp(2.5rem, 7vw, 4.25rem);
}

.portal-formula-result em {
    margin-left: 0.4rem;
    font-style: normal;
}

.portal-formula-result code {
    display: block;
    margin: 0.75rem 0;
    padding: 0.75rem;
    color: inherit;
    white-space: normal;
    background: rgba(255, 255, 255, 0.1);
}

.portal-article-sidebar {
    padding-top: 6.75rem;
}

.sidebar-card {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 0.65rem;
    padding: 1.15rem;
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: 14px;
    font-size: 0.8rem;
}

.sidebar-card strong {
    margin-bottom: 0.4rem;
}

.sidebar-card a {
    color: #536057;
}

.sidebar-card a:hover {
    color: var(--portal-brand);
}

.portal-next-step {
    padding-block: 3.5rem;
    background: var(--portal-soft);
}

.portal-next-step .shell {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 2rem;
}

.portal-next-step h2 {
    max-width: 760px;
    font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.portal-next-step p:not(.eyebrow) {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--portal-muted);
}

.tool-header,
.info-header,
.legal-header {
    padding-top: clamp(2.5rem, 5vw, 4rem);
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.tool-header-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
    align-items: end;
    gap: clamp(2rem, 5vw, 4rem);
}

.tool-header h1,
.info-header h1,
.legal-header h1 {
    max-width: 900px;
    font-family: inherit;
    font-size: clamp(2.5rem, 5vw, 3.65rem);
}

.update-line,
.legal-date {
    color: var(--portal-muted);
    font-size: 0.78rem;
}

.method-strip {
    margin-top: 2rem;
    overflow: hidden;
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-small);
}

.method-strip div {
    border-color: var(--portal-line);
}

.method-strip span {
    color: var(--portal-brand);
}

.calculator {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
    align-items: start;
    gap: 1rem;
    margin-bottom: 3rem;
    background: transparent;
    border: 0;
}

.calculator-workspace,
.result-board {
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius);
}

.calculator-workspace {
    padding: clamp(1.2rem, 3vw, 2rem);
}

.calculator-heading h2 {
    font-family: inherit;
}

.action,
.action-compact {
    border-radius: 999px;
    font-family: inherit;
}

.action-primary,
.action-inverse {
    color: #fff;
    background: var(--portal-brand);
}

.action-outline {
    color: var(--portal-brand);
    background: transparent;
    border-color: #aeb9b0;
}

.device-table input {
    background: #fff;
    border: 1px solid #cfd8d1;
    border-radius: 9px;
}

.reserve-control {
    background: var(--portal-soft);
    border: 0;
    border-radius: var(--portal-radius-small);
}

.result-board {
    position: sticky;
    top: 96px;
    color: #eef5f1;
    background: var(--portal-dark);
    border-color: #2e4036;
}

.result-board .result-value,
.result-board .result-secondary,
.result-board .formula,
.result-board .result-note {
    color: inherit;
}

.result-board-head,
.result-board .result-note,
.result-board .formula p {
    color: #bdc8c1;
}

.method-section {
    gap: clamp(2rem, 6vw, 4rem);
    padding-block: clamp(3.5rem, 6vw, 5rem);
    border-top: 1px solid var(--portal-line);
}

.assumption-list li {
    border-color: var(--portal-line);
}

.info-header-grid {
    grid-template-columns: 0.28fr minmax(0, 0.9fr);
    gap: clamp(2rem, 6vw, 5rem);
}

.info-body {
    padding-bottom: clamp(4rem, 7vw, 5.5rem);
}

.info-body > section,
.legal-section {
    grid-template-columns: 4rem minmax(0, var(--text));
    gap: clamp(1.5rem, 5vw, 3rem);
    padding-block: 2rem;
    border-color: var(--portal-line);
}

.info-body section h2,
.legal-section h2,
.editorial-profile h2 {
    font-family: inherit;
    font-size: clamp(1.65rem, 3vw, 2.15rem);
}

.info-body section p,
.legal-section p,
.legal-address,
.legal-data {
    color: #47534c;
    font-size: 1rem;
}

.section-index {
    color: var(--portal-brand);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 850;
}

.editorial-profile,
.info-callout {
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius);
}

.editorial-profile {
    padding: 1.5rem;
}

.info-callout {
    color: var(--portal-text);
}

.info-callout h2 {
    color: var(--portal-text);
}

.info-callout p:not(.kicker) {
    color: var(--portal-muted);
}

.legal-body {
    max-width: 900px;
}

.legal-data > div {
    border-color: var(--portal-line);
}

.site-footer {
    padding: 3.75rem 0 1.5rem;
    color: #d6ded8;
    background: #101812;
    border-top: 0;
}

.portal-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
}

.portal-brand-footer {
    color: #fff;
}

.portal-footer-brand p {
    max-width: 360px;
    margin: 1rem 0 0.35rem;
    color: #d6ded8;
}

.portal-footer-brand small {
    display: block;
    max-width: 420px;
    color: #9daaa1;
}

.footer-label {
    color: #fff;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-nav {
    gap: 0.55rem;
}

.footer-nav a,
.footer-privacy-button {
    color: #b8c4bc;
    font-size: 0.84rem;
}

.footer-nav a:hover,
.footer-privacy-button:hover {
    color: #fff;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.2rem;
    color: #829087;
    border-color: rgb(255 255 255 / 12%);
    font-family: inherit;
    font-size: 0.72rem;
}

.ad-unit {
    background: var(--portal-surface);
    border-color: var(--portal-line);
    border-radius: var(--portal-radius-small);
}

.portal-article-main .ad-unit {
    width: 100%;
    margin: 2.15rem 0;
}

.ad-unit--display {
    min-height: 250px;
}

.ad-unit--in-article {
    min-height: 180px;
}

@media (max-width: 980px) {
    .portal-topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-article-shell {
        grid-template-columns: minmax(0, var(--text));
        justify-content: center;
    }

    .portal-article-sidebar {
        display: none;
    }

    .portal-article-main {
        width: 100%;
    }
}

@media (max-width: 900px) {
    body {
        font-size: 16px;
    }

    .header-inner {
        min-height: 64px;
    }

    .portal-brand-descriptor,
    .main-nav a:last-child {
        display: none;
    }

    .portal-hero-grid,
    .portal-planning-grid,
    .portal-trust-grid,
    .tool-header-grid,
    .info-header-grid {
        grid-template-columns: 1fr;
        gap: 2.35rem;
    }

    .portal-article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calculator,
    .method-section {
        grid-template-columns: 1fr;
    }

    .result-board {
        position: static;
    }

    .portal-footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
}

@media (max-width: 700px) {
    body {
        font-size: 16px;
    }

    .shell {
        width: min(calc(100% - 1.75rem), var(--shell));
    }

    h1,
    h2,
    h3,
    .tool-header h1,
    .info-header h1,
    .legal-header h1,
    .portal-article-main h1 {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    h1 {
        font-size: 2.5rem;
    }

    .header-inner {
        gap: 1rem;
    }

    .main-nav {
        gap: 0.9rem;
    }

    .main-nav a {
        font-size: 0.78rem;
    }

    .main-nav a:nth-child(n + 3) {
        display: none;
    }

    .button-row .portal-button {
        width: 100%;
    }

    .portal-topic-grid,
    .portal-article-grid,
    .portal-footer-grid,
    .portal-system-figure > div,
    .portal-next-step .shell,
    .portal-related > div,
    .portal-formula-tool {
        grid-template-columns: 1fr;
    }

    .portal-formula-inputs label {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .portal-topic-card {
        min-height: 0;
    }

    .portal-article-card {
        min-height: 225px;
    }

    .portal-next-step .portal-button {
        width: 100%;
    }

    .sources li {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .ad-unit--display,
    .ad-unit--in-article {
        min-height: 110px;
    }

    .method-strip {
        grid-template-columns: 1fr;
    }

    .method-strip div {
        border-right: 0;
        border-bottom: 1px solid var(--portal-line);
    }

    .method-strip div:last-child {
        border-bottom: 0;
    }

    .calculator-heading,
    .calculator-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .info-body > section,
    .legal-section,
    .editorial-profile {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .portal-footer-grid {
        gap: 2rem;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-button,
    .portal-topic-card {
        transition: none;
    }
}

/* Diagnose- und Entscheidungswerkzeuge */
.troubleshooting-shell {
    display: grid;
    grid-template-columns: minmax(0, var(--text)) minmax(13rem, 17rem);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
    padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.troubleshooting-main {
    min-width: 0;
}

.troubleshooting-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.7rem);
}

.troubleshooting-sidebar {
    padding-top: 6.5rem;
}

.troubleshooting-warning {
    margin: 1.75rem 0;
    padding: 1rem 1.15rem;
    background: #fff8ed;
    border: 1px solid #e8cda6;
    border-left: 4px solid var(--portal-accent);
    border-radius: var(--portal-radius-small);
}

.troubleshooting-warning strong {
    display: block;
    margin-bottom: 0.25rem;
}

.troubleshooting-warning p {
    margin: 0;
    color: #5d4a34;
}

.symptom-picker,
.quick-checks,
.diagnosis,
.troubleshooting-tools,
.runtime-scenarios,
.problem-solver {
    margin: 2.25rem 0;
    padding: clamp(1.1rem, 3vw, 1.6rem);
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius);
}

.symptom-picker h2,
.quick-checks h2,
.diagnosis h2,
.troubleshooting-tools h2,
.runtime-scenarios h2,
.problem-solver h2,
.troubleshooting-faq h2,
.troubleshooting-causes > h2 {
    font-size: clamp(1.65rem, 3vw, 2.2rem);
}

.symptom-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.symptom-options button,
.diagnosis-step button,
.diagnosis-reset {
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    color: var(--portal-brand-strong);
    background: #fff;
    border: 1px solid #aebbb2;
    border-radius: 10px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
}

.symptom-options button:hover,
.symptom-options button:focus-visible,
.symptom-options button[aria-pressed="true"],
.diagnosis-step button:hover,
.diagnosis-step button:focus-visible {
    color: #fff;
    background: var(--portal-brand);
    border-color: var(--portal-brand);
}

.symptom-responses > div {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--portal-soft);
    border-radius: var(--portal-radius-small);
}

.symptom-responses p {
    margin: 0.3rem 0 0.5rem;
}

.symptom-responses a {
    color: var(--portal-brand-strong);
    font-weight: 750;
}

.quick-checks ol {
    display: grid;
    gap: 0;
    padding: 0;
    list-style: none;
    counter-reset: quick-check;
}

.quick-checks li {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.8rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--portal-line);
    counter-increment: quick-check;
}

.quick-checks li:last-child {
    border-bottom: 0;
}

.quick-checks li::before {
    content: counter(quick-check);
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    color: #fff;
    background: var(--portal-brand);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
}

.quick-checks li strong,
.quick-checks li span {
    grid-column: 2;
}

.quick-checks li span {
    color: var(--portal-muted);
}

.diagnosis {
    background: var(--portal-soft);
}

.diagnosis > header > p:last-child {
    color: var(--portal-muted);
}

.diagnosis-steps {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.25rem;
}

.diagnosis-step {
    padding: 1.15rem;
    background: #fff;
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-small);
}

.diagnosis-step > span {
    color: var(--portal-brand);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.diagnosis-step h3 {
    margin-top: 0.35rem;
}

.diagnosis-step p {
    color: var(--portal-muted);
}

.diagnosis-step > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.diagnosis-step.is-answered {
    border-color: #aac6b8;
}

.diagnosis-result {
    margin-top: 1rem;
    padding: 1rem;
    color: #fff;
    background: var(--portal-dark);
    border-radius: var(--portal-radius-small);
    font-weight: 650;
}

.diagnosis-reset {
    margin-top: 1rem;
    color: var(--portal-muted);
    background: transparent;
    border-color: transparent;
}

.troubleshooting-causes {
    margin-top: 3rem;
}

.troubleshooting-causes > section {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--portal-line);
}

.troubleshooting-causes > section h3 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.troubleshooting-causes > section p,
.troubleshooting-causes > section li {
    color: #46534b;
}

.troubleshooting-tools > div,
.problem-solver nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.troubleshooting-tools a,
.problem-solver a {
    display: grid;
    gap: 0.3rem;
    min-height: 112px;
    padding: 1rem;
    color: var(--portal-text);
    background: var(--portal-soft);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-small);
}

.troubleshooting-tools a:hover,
.problem-solver a:hover {
    border-color: var(--portal-brand);
}

.troubleshooting-tools span,
.problem-solver span,
.problem-solver > div > p:last-child {
    color: var(--portal-muted);
    font-size: 0.9rem;
}

.troubleshooting-faq {
    margin: 3rem 0;
}

.troubleshooting-faq details {
    padding: 1rem 0;
    border-bottom: 1px solid var(--portal-line);
}

.troubleshooting-faq summary {
    min-height: 44px;
    font-weight: 750;
    cursor: pointer;
}

.troubleshooting-faq details p {
    max-width: 680px;
    color: var(--portal-muted);
}

.problem-solver {
    margin-top: 3rem;
    background: var(--portal-dark);
    border-color: var(--portal-dark);
}

.problem-solver h2,
.problem-solver > div > p:last-child {
    color: #fff;
}

.problem-solver a {
    color: #fff;
    background: rgb(255 255 255 / 7%);
    border-color: rgb(255 255 255 / 14%);
}

.problem-solver a span {
    color: #bdc8c1;
}

.portal-select-input select {
    width: 100%;
    min-height: 46px;
    padding: 0.65rem;
    background: #fff;
    border: 1px solid var(--portal-line);
    border-radius: 0;
    font: inherit;
}

.runtime-breakdown {
    display: grid;
    gap: 0.45rem;
    margin: 0.75rem 0 1rem;
}

.runtime-breakdown div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgb(255 255 255 / 16%);
}

.runtime-breakdown dt {
    color: #bdc8c1;
}

.runtime-breakdown dd {
    margin: 0;
    font-weight: 700;
}

.result-board [data-runtime-link] {
    margin-top: 1rem;
}

.runtime-scenarios > p {
    color: var(--portal-muted);
}

.runtime-table-wrap {
    overflow-x: auto;
}

.runtime-scenarios table {
    width: 100%;
    border-collapse: collapse;
}

.runtime-scenarios th,
.runtime-scenarios td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--portal-line);
    text-align: left;
}

.runtime-scenarios td {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ad-unit--ad-after-answer,
.ad-unit--ad-after-tool,
.ad-unit--ad-end-content {
    min-height: 250px;
}

.ad-unit--ad-mid-content {
    min-height: 180px;
}

@media (max-width: 980px) {
    .troubleshooting-shell {
        grid-template-columns: minmax(0, var(--text));
        justify-content: center;
    }

    .troubleshooting-sidebar {
        display: none;
    }
}

@media (max-width: 700px) {
    .symptom-options,
    .troubleshooting-tools > div,
    .problem-solver nav {
        grid-template-columns: 1fr;
    }

    .symptom-options button,
    .diagnosis-step button {
        width: 100%;
    }

    .diagnosis-step > div {
        display: grid;
        grid-template-columns: 1fr;
    }

    .runtime-scenarios th,
    .runtime-scenarios td {
        padding-inline: 0.55rem;
    }

    .ad-unit--ad-after-answer,
    .ad-unit--ad-mid-content,
    .ad-unit--ad-after-tool,
    .ad-unit--ad-end-content {
        min-height: 110px;
    }
}
