.layers-page { color: #20352d; background: #f1f0ea; }
.layers-page .page-shell { width: min(1120px, calc(100% - 28px)); }
.layers-page .brand { display: inline-flex; align-items: center; gap: 8px; }
.layers-page .brand-symbol, .layers-page .brand-symbol svg { display: block; width: 32px; height: 32px; flex: 0 0 32px; }
.layers-main { padding-top: 4px; }
.layers-crumb { margin: 0 0 12px; font-size: .88rem; color: #52665a; }
.layers-hero { padding: 18px 0 22px; border-top: 4px solid #20352d; }
.layers-hero h1 { max-width: 26ch; margin: 0 0 10px; font-size: clamp(1.9rem, 4vw, 3.15rem); line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; }
.layers-hero p { max-width: 66ch; margin: 0; color: #496352; font-size: 1.03rem; line-height: 1.55; }
.layers-workspace { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; gap: 22px; }
.layers-result, #layers-form { min-width: 0; padding: 24px; }
.layers-result { background: #e8eee5; border: 1px solid #b4c7b5; border-top: 5px solid #315f42; }
#layers-form { background: #fffefa; border: 1px solid #cbd5cb; }
.layers-page h2 { margin: 0 0 12px; font-size: 1.4rem; line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
.layers-page h3 { margin: 0 0 6px; font-size: 1.05rem; }
.layers-example-note, .layers-scope, #layers-status, #layers-copy-status { color: #52665a; font-size: .86rem; line-height: 1.5; }
.layers-total { padding: 14px 0; border-top: 1px solid #aec5af; border-bottom: 1px solid #aec5af; }
.layers-total span, .layers-total small { display: block; color: #49604d; line-height: 1.45; }
.layers-total strong { display: block; margin: 5px 0; font-size: clamp(1.8rem, 4vw, 2.35rem); line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.layers-table-wrap { max-width: 100%; overflow-x: auto; margin: 12px 0; }
.layers-table { width: 100%; border-collapse: collapse; font-size: .84rem; font-variant-numeric: tabular-nums; }
.layers-table caption { padding: 4px 0 10px; text-align: left; color: #52665a; line-height: 1.45; }
.layers-table :is(th, td) { padding: 9px 5px; border-bottom: 1px solid #b4c7b5; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.layers-table th { color: #344a3b; font-size: .78rem; }
.layers-table td:last-child, .layers-table th:last-child { text-align: right; }
.layers-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 14px; border: 1px solid #728e78; border-radius: 3px; background: #fffefa; color: #20352d; font: inherit; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.layers-button:hover { background: #dae4d5; }
.layers-primary { background: #20352d; color: #fffefa; border-color: #20352d; }
.layers-primary:hover { background: #315f42; }
.layers-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.layers-fields label, .layer-card label { display: flex; flex-direction: column; min-width: 0; font-size: .9rem; font-weight: 700; }
.layers-fields small, .layer-card small { margin-top: 5px; color: #596d60; font-size: .78rem; font-weight: 450; line-height: 1.4; }
.layers-page :is(input, select) { width: 100%; min-width: 0; min-height: 46px; margin-top: 6px; padding: 8px 10px; border: 1px solid #92ac9a; border-radius: 3px; background: #fff; color: #20352d; font: inherit; font-variant-numeric: tabular-nums; }
.layers-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid #cad5cc; }
.layers-section-head p { margin: 0; color: #596d60; font-size: .82rem; line-height: 1.4; }
.layers-rows { display: grid; gap: 10px; }
.layer-card { min-width: 0; padding: 13px; border: 1px solid #cbd5cb; background: #fbfcf8; }
.layer-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.layer-card-head strong { font-size: .92rem; }
.layer-card-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .75fr); gap: 10px; }
.layer-remove { min-height: 40px; padding: 6px 10px; font-size: .82rem; }
.layers-error { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid #963d27; background: #fff2ed; color: #752e1d; font-size: .88rem; line-height: 1.45; }
.layers-formula { margin: 16px 0 0; padding-top: 13px; border-top: 1px solid #cad5cc; color: #52665a; font-size: .84rem; line-height: 1.5; }
.layers-actions { margin: 13px 0 0; }
.layers-figure { margin: 30px 0; }
.layers-figure img { display: block; width: 100%; height: auto; background: #fffefa; border: 1px solid #c5d1c5; }
.layers-figure figcaption { margin-top: 8px; color: #52665a; font-size: .85rem; line-height: 1.5; }
.layers-section { max-width: 78ch; margin: 32px 0; }
.layers-section p { margin: 10px 0; line-height: 1.65; }
.layers-source { padding-top: 10px; border-top: 1px solid #cbd5cb; font-size: .88rem; }
.layers-faq details { padding: 13px 0; border-top: 1px solid #c1d0c0; }
.layers-faq summary { cursor: pointer; font-weight: 750; line-height: 1.5; }
.layers-related { display: flex; flex-wrap: wrap; gap: 12px 22px; padding: 20px 0; border-top: 1px solid #b9cbbd; }
.layers-related a { color: #194d39; font-weight: 700; text-underline-offset: 3px; }
.layers-skip { position: absolute; left: 12px; top: -80px; z-index: 1000; min-height: 44px; padding: 12px 16px; color: #fff; background: #20352d; text-decoration: none; }
.layers-skip:focus { top: 12px; }
.layers-page :is(a, button, input, select, summary, textarea):focus-visible { outline: 3px solid #af6e2f; outline-offset: 3px; }
.layers-page [hidden] { display: none !important; }
@media (max-width: 760px) {
  .layers-page .site-header { padding: 16px 0; }
  .layers-workspace { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .layers-result, #layers-form { padding: 18px; }
  .layers-hero { padding: 16px 0 18px; }
  .layers-page h2 { font-size: 1.25rem; }
  .layers-section { margin: 26px 0; }
}
@media (max-width: 560px) { .layers-page .site-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .layers-table-wrap { overflow: visible; }
  .layers-table, .layers-table tbody { display: block; }
  .layers-table caption { display: block; width: 100%; box-sizing: border-box; }
  .layers-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .layers-table tbody { display: grid; gap: 8px; }
  .layers-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); border: 1px solid #b4c7b5; background: #f5f7f1; }
  .layers-table :is(th, td) { min-width: 0; padding: 8px 9px; border: 0; text-align: left; }
  .layers-table th[scope="row"] { grid-column: 1 / -1; padding-bottom: 4px; }
  .layers-table th[scope="row"] small { display: block; margin-top: 3px; font-weight: 450; }
  .layers-table td { display: flex; flex-direction: column; gap: 3px; }
  .layers-table td::before { color: #52665a; content: attr(data-label); font-size: .68rem; font-weight: 750; }
  .layers-table td:last-child { text-align: left; }
}
@media (max-width: 380px) {
  .layers-page .page-shell { width: min(1120px, calc(100% - 22px)); }
  .layers-fields, .layer-card-grid { grid-template-columns: minmax(0, 1fr); }
  .layers-section-head { align-items: flex-start; flex-direction: column; }
  .layers-section-head .layers-button { width: 100%; }
  .layers-table { font-size: .78rem; }
}
@media print { .layers-page .site-header, .layers-page .site-footer, .layers-hero, #layers-form, .layers-figure, .layers-section, .layers-related, .layers-copy { display: none; } .layers-workspace { display: block; } .layers-result { background: white; border: 0; } }
