/* CapDunk — shared component styles.
   Plain-CSS port of the former <style type="text/tailwindcss"> @apply block;
   Tailwind CDN still generates the utility classes used in markup. Keep the
   rule order below — it preserves the original @apply cascade (e.g. .nav-slide
   overrides .btn-tab's row layout). */

:root {
  --ps-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

/* Cards: flat on the canvas, hairline borders (terminal-table look) */
.card { background: #E9E2D1; border: 1px solid #E4E4E7; border-radius: 0; padding: 1.5rem; }
.field-label { display: block; font-family: var(--ps-mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: #71717A; margin-bottom: 0.5rem; }
.input-base {
  width: 100%; border-radius: 2px; background: #E9E2D1; border: 1px solid #D4D4D3;
  padding: 0.5rem 0.75rem; font-family: var(--ps-mono); font-size: 0.875rem; line-height: 1.25rem;
  color: #18181B; caret-color: #F35815; outline: 2px solid transparent; outline-offset: 2px;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
}
.input-base:focus { border-color: #5AA2FF; box-shadow: 0 0 0 1px rgba(90, 162, 255, 0.4); }
.input-affix { position: absolute; top: 50%; transform: translateY(-50%); font-family: var(--ps-mono); font-size: 0.75rem; line-height: 1rem; color: #A1A1AA; pointer-events: none; }
.btn-tab {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 2px;
  font-family: var(--ps-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  border-width: 1px; border-style: solid;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
}
.btn-chip {
  padding: 0.375rem 0.75rem; border-radius: 2px; font-family: var(--ps-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em; border-width: 1px; border-style: solid;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
}
.btn-pager {
  display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border-radius: 2px;
  font-family: var(--ps-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  border: 1px solid #D4D4D3; background: transparent; color: #52525B;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
}
.btn-pager:hover { border-color: #71717A; color: #18181B; }
.btn-pager:disabled { opacity: 0.3; cursor: not-allowed; }
/* Stat cells share hairlines via negative margins inside the grid */
.stat-card { padding: 1rem; background: #E9E2D1; border: 1px solid #E4E4E7; margin-right: -1px; margin-bottom: -1px; }
.stat-label { font-family: var(--ps-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: #71717A; }
.stat-value { margin-top: 0.375rem; font-family: var(--ps-mono); font-size: 1.5rem; line-height: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; color: #18181B; overflow: hidden; }
.badge { display: inline-flex; align-items: center; gap: 0.375rem; border-radius: 9999px; padding: 0.125rem 0.625rem; font-family: var(--ps-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; border-width: 1px; border-style: solid; }
.faq-q { font-size: 15px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 0.375rem; color: #18181B; }
.faq-a { font-size: 15px; line-height: 1.75rem; color: #52525B; }
.th { position: sticky; top: 0; z-index: 10; background: #E0D9C8; text-align: left; padding: 0.5rem 0.75rem; font-family: var(--ps-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: #71717A; border-bottom: 1px solid #E4E4E7; white-space: nowrap; }
.td { padding: 0.375rem 0.75rem; font-family: var(--ps-mono); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; color: #3F3F46; border-bottom: 1px solid #F4F4F5; }
/* Section titles: underlined bold mono, per the concept */
.section-title { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.125rem; line-height: 1.75rem; font-weight: 700; letter-spacing: -0.025em; border-bottom: 1px solid #D4D4D3; padding-bottom: 0.25rem; color: #18181B; }
.eyebrow { font-family: var(--ps-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.22em; color: #F35815; }
.nav-slide { min-height: 64px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.125rem; min-width: 220px; margin-right: -1px; }
/* Pills share hairlines via the -1px overlap: the NEXT pill's left border paints over
   this pill's right border. Raise the hovered/focused pill so its complete border —
   including the right edge — shows through. */
.nav-slide { position: relative; }
.nav-slide:hover, .nav-slide:focus-visible { z-index: 1; }
.nav-arrow {
  flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 2px; border: 1px solid #D4D4D3; color: #52525B;
  display: flex; align-items: center; justify-content: center;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
}
.nav-arrow:hover { border-color: #71717A; color: #18181B; }
.nav-arrow:disabled { opacity: 0.3; cursor: not-allowed; }
/* pills keep a 220px floor at every width — the strip scrolls instead of truncating */
/* Concept prose blocks: page heading (underlined), body copy (capped measure), link-buttons */
.page-h { display: inline-block; font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: -0.025em; padding-bottom: 0.25rem; border-bottom: 1px solid #D4D4D3; color: #18181B; }
.body-p { font-size: 15px; line-height: 1.75rem; color: #52525B; max-width: 72ch; }
.linklike { display: inline-block; text-align: left; font-size: 15px; line-height: 1.75rem; color: #1D4ED8; text-decoration-line: underline; text-underline-offset: 4px; text-decoration-color: rgba(161, 161, 170, 0.7); cursor: pointer; }
.linklike:hover { text-decoration-thickness: 2px; }
@media (min-width: 640px) { .page-h { font-size: 28px; } }

/* Affix padding must reliably beat the px-3 baked into .input-base */
.addon-l { padding-left: 1.75rem !important; }
.addon-r { padding-right: 2.25rem !important; }
.addon-r-2 { padding-right: 3rem !important; }
.addon-r-3 { padding-right: 3.75rem !important; }

/* Hide number-input spinners for a cleaner look */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* Hide horizontal scrollbar on the calculator nav strip */
.nav-track { scrollbar-width: none; -ms-overflow-style: none; }
.nav-track::-webkit-scrollbar { display: none; }

::selection { background: rgba(243, 88, 21, 0.28); }

/* Hero stat: orange stroke + subtle radial backlight */
.stat-hero { position: relative; overflow: hidden; border-color: rgba(243, 88, 21, 0.55) !important;
  background: radial-gradient(140px 90px at 100% 0%, rgba(243,88,21,0.10), transparent 70%), #E9E2D1 !important; }
.stat-hero::after { content: ""; position: absolute; top: 12px; right: 12px; width: 6px; height: 6px; border-radius: 9999px; background: #F35815; box-shadow: 0 0 10px rgba(243,88,21,0.8); }

/* Phones (<sm): the calculator strip leaves the header and pins to the bottom of
   the viewport as a swipe bar (header keeps no backdrop-filter below sm so the
   fixed positioning resolves against the viewport). */
@media (max-width: 639px) {
  /* nav-strip bottom bar */
  #nav-strip {
    position: fixed;
    left: 0; right: 0; bottom: 0; top: auto;
    z-index: 40;
    padding: 0.5rem 1rem calc(0.5rem + env(safe-area-inset-bottom));
    background: #E9E2D1;
    border-top: 1px solid #E4E4E7;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }
  #nav-strip .nav-arrow { display: none; }
  body { padding-bottom: calc(5.75rem + env(safe-area-inset-bottom)); }
}
