/* EICR hub — page chrome */
#eicr-calculators {
  scroll-margin-top: 6rem;
}

.eicr-hero {
  background: radial-gradient(120% 80% at 50% 0%, rgba(253, 199, 0, 0.14) 0%, transparent 55%),
    linear-gradient(165deg, #0c0c0e 0%, #17171c 45%, #0f1114 100%);
  border-bottom: 1px solid rgba(255, 215, 0, 0.12);
}

/* Main guide copy — white panel, black border, black / dark grey only */
.eicr-prose-panel {
  background: #fff;
  border: 2px solid #000;
  padding: 1.5rem 1.15rem 1.75rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .eicr-prose-panel {
    padding: 2rem 1.75rem 2.25rem;
  }
}

.eicr-prose h2 {
  font-family: var(--te-font-hd, ui-sans-serif, system-ui);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: #0a0a0a;
  margin: 2.25rem 0 0.75rem;
  letter-spacing: -0.02em;
}

.eicr-prose h2:first-child {
  margin-top: 0;
}

.eicr-prose p,
.eicr-prose li {
  color: #383838;
  line-height: 1.65;
  font-size: 1.02rem;
}

.eicr-prose ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
}

.eicr-prose li {
  margin-bottom: 0.45rem;
}

.eicr-prose strong {
  color: #0a0a0a;
  font-weight: 700;
}

.eicr-prose em {
  color: #383838;
  font-style: italic;
}

.eicr-prose abbr {
  color: #383838;
  text-decoration: underline dotted;
  text-underline-offset: 0.12em;
  cursor: help;
}

.eicr-prose a {
  color: #262626;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.eicr-prose a:hover {
  color: #0a0a0a;
}

.eicr-prose-callout {
  margin: 1.5rem 0 0;
  padding: 0.65rem 0 0.65rem 1rem;
  border-left: 4px solid #0a0a0a;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #383838;
}

.eicr-prose-callout strong {
  color: #0a0a0a;
}

.eicr-prose-callout a {
  color: #262626;
  font-weight: 700;
}

.eicr-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
  background: rgba(253, 199, 0, 0.2);
  border: 1px solid rgba(253, 199, 0, 0.45);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
}

/* ═══ Twin calculator “devices” — fixed size, no internal scroll ═══ */

.eicr-calc-device {
  background: linear-gradient(160deg, #25262c 0%, #141518 55%, #0e0f12 100%);
  border: 2px solid #2d2d33;
  border-radius: 0.75rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.45);
}

.eicr-calc-shell__tag {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.eicr-calc-shell__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
}

.eicr-calc-shell__hd h2 {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.eicr-calc-shell__bd {
  padding: 0.55rem 0.65rem 0.6rem;
}

.eicr-calc-shell__bd--fixed {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* LCD-style readout */
.eicr-calc-display {
  flex-shrink: 0;
  border-radius: 0.4rem;
  padding: 0.45rem 0.55rem;
  background: linear-gradient(180deg, #0d1012 0%, #050608 100%);
  border: 1px solid rgba(255, 215, 0, 0.22);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.65);
  text-align: right;
}

.eicr-calc-display--sm .eicr-calc-display__value {
  font-size: 1.15rem;
}

.eicr-calc-display__label {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(253, 224, 71, 0.4);
  text-align: left;
  margin-bottom: 0.1rem;
}

.eicr-calc-display__value {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 1.45rem;
  font-weight: 800;
  color: #fde047;
  line-height: 1.05;
  text-shadow: 0 0 12px rgba(253, 224, 71, 0.12);
}

.eicr-calc-readout {
  flex-shrink: 0;
  font-size: 0.58rem;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.1rem;
}

.eicr-calc-readout--muted {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.55rem;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eicr-calc-micro {
  margin: 0;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}

.eicr-toggle-pair--calc {
  border-radius: 0.4rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
}

.eicr-toggle-pair--calc button {
  flex: 1;
  padding: 0.4rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  background: #2c2e35;
  color: rgba(255, 255, 255, 0.55);
  transition: background 0.12s, color 0.12s;
}

.eicr-toggle-pair--calc button.is-on {
  background: linear-gradient(180deg, #fde047 0%, #eab308 100%);
  color: #111;
}

.eicr-calc-landlord-key {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #2a2c32;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.62rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.eicr-calc-landlord-key .eicr-calc-landlord-key__on {
  display: none;
}

.eicr-calc-landlord-key.is-on {
  border-color: rgba(253, 199, 0, 0.45);
  background: rgba(253, 199, 0, 0.12);
  color: #fde047;
}

.eicr-calc-landlord-key.is-on .eicr-calc-landlord-key__off {
  display: none;
}

.eicr-calc-landlord-key.is-on .eicr-calc-landlord-key__on {
  display: inline;
}

.eicr-calc-rowbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Board rows — fixed 4-slot stack, no scroll */
.eicr-pc-boards-fixed {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  height: 7.35rem;
  overflow: hidden;
}

.eicr-board-slot {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  height: 1.65rem;
  padding: 0 0.35rem;
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.eicr-board-slot__i {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.eicr-board-slot--empty {
  opacity: 0.35;
  pointer-events: none;
}

.eicr-board-slot--empty .eicr-board-slot__i {
  color: rgba(255, 255, 255, 0.2);
}

.eicr-key {
  width: 1.65rem;
  height: 1.65rem;
  min-width: 1.65rem;
  border-radius: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, #3a3c44 0%, #25262c 100%);
  color: #f5f5f5;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.06s ease, border-color 0.12s;
}

.eicr-key:active {
  transform: translateY(1px);
}

.eicr-key:hover {
  border-color: rgba(253, 199, 0, 0.45);
  color: #fde047;
}

.eicr-key--gold {
  background: linear-gradient(180deg, #fde047 0%, #ca8a04 100%);
  color: #111;
  border-color: rgba(0, 0, 0, 0.2);
}

.eicr-key--gold:hover {
  color: #000;
}

.eicr-key--sm {
  width: 1.55rem;
  height: 1.55rem;
  min-width: 1.55rem;
  font-size: 0.85rem;
}

.eicr-key--ghost {
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
  font-size: 0.65rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.eicr-key--ghost:hover {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.35);
}

.eicr-board-slot__count {
  min-width: 1.25rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.eicr-board-slot__spacer {
  flex: 1;
}

/* Preset keys — 2×2 */
.eicr-preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  flex-shrink: 0;
}

.eicr-preset-key {
  padding: 0.35rem 0.25rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #2c2e35;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.58rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}

.eicr-preset-key:hover {
  border-color: rgba(253, 199, 0, 0.45);
  color: #fde047;
}

.eicr-pc-disc-slot {
  flex-shrink: 0;
  min-height: 1.15rem;
  font-size: 0.55rem;
  font-weight: 700;
  color: #6ee7b7;
  line-height: 1.2;
  padding: 0.15rem 0.25rem;
  border-radius: 0.3rem;
  border: 1px solid transparent;
  opacity: 0;
  visibility: hidden;
}

.eicr-pc-disc-slot.is-visible {
  opacity: 1;
  visibility: visible;
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(16, 185, 129, 0.1);
}

/* Estimate: bedroom numpad */
.eicr-numpad {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.eicr-numpad__key {
  flex: 1;
  min-width: 0;
  height: 2rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #2c2e35;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.eicr-numpad__key:hover {
  border-color: rgba(253, 199, 0, 0.45);
  color: #fde047;
}

.eicr-numpad__key--on {
  border-color: rgba(253, 199, 0, 0.55);
  background: rgba(253, 199, 0, 0.15);
  color: #fde047;
}

.eicr-calc-select {
  width: 100%;
  flex-shrink: 0;
  padding: 0.4rem 0.5rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1f2026;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.eicr-calc-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.eicr-calc-actions__primary,
.eicr-calc-actions__secondary {
  flex: 1;
  text-align: center;
  padding: 0.45rem 0.35rem;
  border-radius: 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: filter 0.12s, background 0.12s;
}

.eicr-calc-actions__primary {
  background: linear-gradient(180deg, #fde047 0%, #eab308 100%);
  color: #111;
}

.eicr-calc-actions__primary:hover {
  filter: brightness(1.06);
}

.eicr-calc-actions__secondary {
  background: #2c2e35;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.eicr-calc-actions__secondary:hover {
  background: #363840;
}

/* Two-column layout is defined here (not Tailwind) so it works with the prebuilt bundle */
.eicr-calculators-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Side-by-side + fixed height from 900px (below old 1024px lg, many laptop windows qualify) */
@media (min-width: 900px) {
  .eicr-calculators-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .eicr-calculators-viewport {
    height: 27.5rem;
    max-height: 27.5rem;
  }

  .eicr-calculators-viewport .eicr-calculators-grid {
    height: 100%;
    align-items: stretch;
  }

  .eicr-calculators-viewport .eicr-calc-device {
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .eicr-calculators-viewport .eicr-calc-shell__bd--fixed {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
}
