.nsw-shell { padding-bottom: 64px; }
.nsw-shell [id] { scroll-margin-top: 85px; }
.nsw-shell a:focus-visible, .nsw-shell button:focus-visible,
.nsw-shell input:focus-visible, .nsw-shell select:focus-visible { outline: 2px solid var(--br); outline-offset: 3px; }
.nsw-hero { padding: 18px 0 24px; max-width: 840px; }
.nsw-hero h1 { text-wrap: balance; }
.nsw-hero p { margin: 0 0 12px; }
.nsw-answer { padding: 16px 20px; border-left: 4px solid var(--br2); background: var(--card); border-radius: 0 12px 12px 0; }
.nsw-meta, .nsw-hint { color: var(--mu); font-size: .9rem; }
.nsw-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(16px, 3vw, 30px); box-shadow: var(--sh); }
.nsw-card h2:first-child, .nsw-card > form > h2:first-child { margin-top: 0; }
.nsw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.nsw-grid > *, .nsw-shell fieldset { min-width: 0; }
.nsw-shell fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0; }
.nsw-shell fieldset fieldset { border: 0; padding: 0; }
.nsw-shell legend { padding: 0 5px; font-weight: 700; }
.nsw-shell label { display: grid; gap: 5px; font-size: .9rem; font-weight: 620; align-content: start; }
.nsw-shell input:not([type="checkbox"]), .nsw-shell select { width: 100%; min-width: 0; min-height: 44px; font: inherit; }
.nsw-shell .nsw-check { display: flex; gap: 10px; align-items: center; margin: 16px 0; }
.nsw-shell .nsw-check input { width: 19px; height: 19px; accent-color: var(--br); }
.nsw-buyers, .nsw-scenarios { margin-top: 16px; }
.nsw-buyers > fieldset > label { margin-bottom: 12px; }
.nsw-shell fieldset.nsw-row { border-top: 1px solid var(--line); border-radius: 0; margin: 8px 0 12px; }
.nsw-shell .nsw-row legend { font-size: .88rem; }
.nsw-row .nsw-button { justify-self: start; align-self: end; }
.nsw-row label:nth-of-type(3) { grid-column: 1 / -1; }
.nsw-shell .nsw-button { border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--tx); padding: 9px 13px; font: inherit; font-weight: 630; cursor: pointer; text-align: center; }
.nsw-shell .nsw-button:hover { border-color: var(--br); }
.nsw-shell .nsw-button:disabled { opacity: .6; cursor: default; }
.nsw-shell .nsw-primary { background: #4338ca; border-color: #4338ca; color: white; }
.nsw-actions { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#planner-status:not(:empty) { margin: 12px 0 0; font-weight: 650; }
#sic-settings { margin-top: 16px; }
#planner-results { margin-top: 22px; }
.nsw-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.nsw-shell table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .92rem; }
.nsw-shell caption { padding: 10px; font-weight: 630; text-align: left; }
.nsw-shell th, .nsw-shell td { text-align: left; padding: 10px 13px; border-top: 1px solid var(--line); vertical-align: top; }
.nsw-shell thead { background: var(--bg2); }
.nsw-balance { background: var(--bg2); font-weight: 700; }
#planner-notes { display: grid; gap: 6px 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); padding-top: 16px; }
#planner-notes ul { padding-left: 20px; margin-top: 0; }
.nsw-prose { max-width: 800px; }
.nsw-prose :is(ul, ol) { padding-left: 23px; }
.nsw-prose li { margin-bottom: 6px; }
.nsw-prose h3 { margin-top: 20px; }
.nsw-related :is(h2, p) { margin-top: 0; }
.nsw-related { margin-top: 28px; }
@media (max-width: 740px) {
  .nsw-buyers, .nsw-scenarios { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .nsw-grid { grid-template-columns: minmax(0, 1fr); }
  .nsw-shell table { font-size: .82rem; }
  .nsw-shell th, .nsw-shell td { padding: 8px; }
}
.nsw-wide { grid-column: 1 / -1; }
.nsw-bar > a:not(.logo) { font-size: .88rem; line-height: 1.25; }
.nsw-bar > a:nth-child(2) { margin-left: auto; }
