/* How Much Do I Need? — one stylesheet, no framework. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f3f7;
  --ink: #17202c;
  --ink-2: #4a5566;
  --ink-3: #647083;
  --line: #d9dee6;
  --line-strong: #7c8696;
  --accent: #1d4ed8;
  --accent-ink: #1e40af;
  --accent-soft: #e8efff;
  --on-accent: #ffffff;
  --result-bg: #eef4ff;
  --result-line: #c7d7fb;
  --ok: #166534;
  --error: #b42318;
  --error-soft: #fef1f0;
  --focus: #2563eb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --container: 1180px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --surface: #161d27;
    --surface-2: #1c2531;
    --ink: #e7ecf3;
    --ink-2: #b4bfcd;
    --ink-3: #93a0b2;
    --line: #2b3646;
    --line-strong: #66748a;
    --accent: #7aa2ff;
    --accent-ink: #a9c2ff;
    --accent-soft: #1b2944;
    --on-accent: #0b1220;
    --result-bg: #152238;
    --result-line: #2a3f66;
    --ok: #6fcf97;
    --error: #ff8a80;
    --error-soft: #3a1d1d;
    --focus: #9db9ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent-ink);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.75rem, 1.35rem + 2vw, 2.5rem);
}

h2 {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
}

h3 {
  font-size: 1.0625rem;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 720px) {
  :root {
    --gutter: 24px;
  }
}

/* ---------- Header and footer ---------- */

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--focus);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 8px;
}

main:focus {
  outline: none;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.site-nav ul {
  display: flex;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  padding: 6px 2px;
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.site-footer {
  margin-top: 64px;
  padding: 32px 0 40px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.9375rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.footer-links a {
  color: var(--ink-2);
}

.site-footer p {
  margin: 0 0 6px;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  filter: brightness(1.08);
}

.button--secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.button--secondary:hover {
  background: var(--surface-2);
  filter: none;
}

/* ---------- Home ---------- */

.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 40px 0 32px;
}

@media (min-width: 720px) {
  .hero {
    padding: 64px 0 48px;
  }
}

.hero-inner {
  max-width: 820px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
  margin-bottom: 12px;
}

.hero-lead {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: var(--ink-2);
  margin: 0 auto 28px;
  max-width: 40em;
}

.search {
  margin: 0 0 24px;
  text-align: left;
}

.search--big {
  max-width: 640px;
  margin: 0 auto;
}

.search-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.search--big .search-label {
  text-align: center;
}

.search-field {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px 10px 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
}

.search--big .search-field input {
  min-height: 56px;
  font-size: 1.125rem;
  box-shadow: var(--shadow);
}

.search-field input:focus-visible {
  outline-offset: 0;
  border-color: var(--focus);
}

.search-status {
  min-height: 1.6em;
  margin: 6px 0 0;
  color: var(--ink-3);
  font-size: 0.9375rem;
}

.search--big .search-status {
  text-align: center;
}

.section {
  margin-top: 40px;
}

.section-title {
  margin-bottom: 16px;
}

.calc-group {
  margin-bottom: 32px;
}

.calc-group-title {
  font-size: 1.125rem;
  margin-bottom: 2px;
}

.calc-group-blurb {
  color: var(--ink-3);
  margin-bottom: 12px;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.calc-card-link {
  display: flex;
  gap: 14px;
  height: 100%;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.12s ease;
}

.calc-card-link:hover {
  border-color: var(--accent);
}

.calc-card-link:hover .calc-card-title {
  text-decoration: underline;
}

.calc-card-icon,
.calc-header-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.calc-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.calc-card-title {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--accent-ink);
}

.calc-card-name {
  color: var(--ink-3);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.calc-card-desc {
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.no-results {
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-2);
}

.steps-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  list-style: none;
  counter-reset: step;
  padding: 0;
}

.steps-list li {
  counter-increment: step;
  position: relative;
  padding: 16px 16px 16px 60px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.steps-list strong {
  display: block;
}

.feature-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature-list p {
  margin: 0;
  color: var(--ink-2);
}

/* ---------- Content pages ---------- */

.page {
  padding-top: 16px;
}

.page--narrow {
  max-width: 800px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--ink-3);
}

.breadcrumb li + li::before {
  content: '›';
  margin-right: 4px;
  color: var(--ink-3);
}

.breadcrumb a {
  color: var(--ink-2);
}

.page-header {
  margin-bottom: 12px;
}

.lead {
  font-size: 1.0625rem;
  color: var(--ink-2);
  max-width: 48em;
}

.prose {
  max-width: 44em;
}

.prose h2 {
  margin-top: 1.6em;
}

.prose li {
  margin-bottom: 0.4em;
}

/* ---------- Calculator page ---------- */

.page-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 1100px) {
  .page-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.calc-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.calc-header h1 {
  margin: 0;
}

.calc-question {
  margin: 2px 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink-2);
}

.calc-panel {
  display: grid;
  gap: 0;
  margin: 20px 0 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

@media (min-width: 820px) {
  .calc-panel {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

.calc-inputs {
  padding: 20px var(--gutter);
}

@media (min-width: 820px) {
  .calc-inputs {
    padding: 24px;
    border-right: 1px solid var(--line);
  }
}

.calc-results {
  padding: 20px var(--gutter) 24px;
  background: var(--result-bg);
  border-top: 1px solid var(--result-line);
}

@media (min-width: 820px) {
  .calc-results {
    padding: 24px;
    border-top: 0;
  }
}

.results-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 12px;
}

/* Form */

.system-toggle,
.field-group {
  border: 0;
  margin: 0 0 20px;
  padding: 0;
  min-width: 0;
}

.system-toggle legend,
.field-group legend {
  padding: 0;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 1rem;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.segmented input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.segmented label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 600;
  background: var(--surface);
}

.segmented label + input + label,
.segmented input + label ~ label {
  border-left: 1px solid var(--line-strong);
}

.segmented input:checked + label {
  background: var(--accent);
  color: var(--on-accent);
}

.segmented input:focus-visible + label {
  /* Two rings so focus shows on both the selected (accent) and unselected (surface) segment */
  box-shadow: inset 0 0 0 3px var(--focus), inset 0 0 0 5px var(--surface);
}

.calc-form:not(.is-live) .form-actions {
  display: none;
}

::placeholder {
  color: var(--ink-3);
  opacity: 1;
}

.seg-hint {
  font-weight: 400;
  font-size: 0.8125rem;
  opacity: 0.85;
}

.field-grid {
  display: grid;
  gap: 14px 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
}

.field--wide,
.field--checkbox {
  grid-column: 1 / -1;
}

.field-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.optional {
  font-weight: 400;
  color: var(--ink-3);
}

.input-group {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.input,
.unit-select {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.input {
  width: 100%;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

select.input {
  padding-right: 8px;
}

.input-group .input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group:not(:has(.unit-select)):not(.has-suffix) .input {
  border-radius: var(--radius-sm);
}

.unit-select {
  flex: none;
  max-width: 50%;
  padding: 8px 6px;
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-2);
  font-weight: 500;
}

.input-suffix {
  display: grid;
  place-items: center;
  min-width: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-2);
  color: var(--ink-2);
  font-weight: 600;
}

.input:focus-visible,
.unit-select:focus-visible {
  outline-offset: 0;
  position: relative;
  z-index: 1;
}

.input[aria-invalid='true'] {
  border-color: var(--error);
  background: var(--error-soft);
}

.field-help {
  margin: 4px 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-3);
}

.field-error {
  margin: 4px 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--error);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

.check label {
  font-weight: 600;
  cursor: pointer;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding-top: 4px;
}

.form-note {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.875rem;
}

/* Result */

.result-headline {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--result-line);
}

.result-label {
  margin: 0;
  font-weight: 600;
  color: var(--ink-2);
}

.result-value {
  margin: 2px 0 6px;
  font-size: clamp(1.875rem, 1.5rem + 1.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.result-detail {
  margin: 0;
  color: var(--ink-2);
}

.result-section {
  margin-bottom: 16px;
}

.result-section h3 {
  font-size: 0.9375rem;
  margin-bottom: 6px;
}

.result-rows {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--result-line);
  border-radius: var(--radius-sm);
}

.result-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 16px;
  padding: 8px 12px;
}

.result-row + .result-row {
  border-top: 1px solid var(--line);
}

.result-row dt {
  color: var(--ink-2);
}

.result-row dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.result-row.is-strong dt,
.result-row.is-strong dd {
  color: var(--ink);
  font-weight: 700;
}

.result-working {
  margin: 0 0 12px;
  background: var(--surface);
  border: 1px solid var(--result-line);
  border-radius: var(--radius-sm);
}

.result-working summary {
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.result-working ol {
  margin: 0;
  padding: 0 12px 12px 36px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.result-working li + li {
  margin-top: 4px;
}

.result-notes {
  margin: 0;
  padding-left: 20px;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.result-notes li + li {
  margin-top: 4px;
}

.result-empty p {
  margin: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-weight: 600;
}

/* Explanatory content */

.calc-content {
  max-width: 48em;
}

.content-section {
  margin-bottom: 28px;
}

.content-section li {
  margin-bottom: 0.4em;
}

/* Sidebar */

.page-aside {
  display: grid;
  gap: 16px;
}

@media (min-width: 1100px) {
  .page-aside {
    padding-top: 8px;
  }
}

.aside-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.aside-card h2 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.aside-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.aside-card--quiet {
  background: transparent;
}

.aside-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aside-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 4px 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.aside-links a:hover span {
  text-decoration: underline;
  color: var(--accent-ink);
}

.icon--sm {
  width: 20px;
  height: 20px;
  color: var(--accent-ink);
}

/* ---------- Ads ---------- */
/* Slots stay hidden until the visitor's ad choice allows ads, and collapsed (no label, no height)
   until they scroll near the screen. See src/lib/ads.mjs. */

.ad-slot {
  margin: 24px 0;
  text-align: center;
}

.ad-slot--sidebar {
  margin: 0;
}

.ad-slot--pending {
  margin: 0;
}

.ad-slot--pending .ad-label {
  display: none;
}

.ad-label {
  margin: 0 0 4px;
  color: var(--ink-3);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ad-frame {
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.ad-frame iframe {
  display: block;
  max-width: 100%;
  border: 0;
}

.footer-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.ad-consent {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  padding: 10px 0;
  background: var(--surface);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -4px 16px rgb(0 0 0 / 0.08);
  font-size: 0.875rem;
}

.ad-consent-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.ad-consent p {
  flex: 1 1 320px;
  margin: 0;
  color: var(--ink-2);
}

.ad-consent-actions {
  display: flex;
  gap: 8px;
}

.button--small {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 0.875rem;
}

@media print {
  .ad-slot,
  .ad-consent {
    display: none !important;
  }
}

.calc-grid--compact {
  margin-bottom: 24px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .page-aside,
  .form-actions,
  .system-toggle,
  .breadcrumb {
    display: none;
  }

  .calc-panel {
    box-shadow: none;
  }
}

/* ---------- Extra areas, share, print ---------- */

.button--link {
  min-height: 40px;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.extra-areas {
  margin-top: 12px;
}

.calc-form:not(.is-live) .extra-areas {
  display: none;
}

.extra-area {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.extra-area-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.extra-area-title {
  font-weight: 700;
}

.form-status {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ok);
}

.form-status:empty {
  display: none;
}

.share-url {
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 400;
}

.print-summary {
  display: none;
}

@media print {
  .calc-inputs,
  .result-working,
  .result-notes,
  .result-section--exact,
  .calc-content,
  .lead,
  .calc-results .results-title {
    display: none !important;
  }

  .calc-panel {
    display: block;
    border: 0;
  }

  .calc-results {
    background: none;
    border: 0;
  }

  .print-summary {
    display: block;
    margin-top: 16px;
  }

  .print-items {
    list-style: none;
    padding: 0;
  }

  .print-items li {
    margin-bottom: 6px;
  }

  .print-inputs div {
    display: flex;
    gap: 8px;
  }

  .print-inputs dt::after {
    content: ':';
  }

  .print-inputs dd {
    margin: 0;
  }
}

.data-table {
  width: 100%;
  margin: 0 0 1em;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.data-table th,
.data-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table thead th {
  border-bottom: 2px solid var(--line-strong);
}

.calc-content {
  overflow-x: auto;
}

/* Never let a long dropdown option or table widen the page on small screens. */
@media (max-width: 1099px) {
  .page-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.field,
.field-grid,
.calc-inputs,
.calc-results {
  min-width: 0;
}

select.input {
  max-width: 100%;
  text-overflow: ellipsis;
}
