/* AsphaltForge Custom WordPress Theme Stylesheet (v1.6.1) */

.af-container {
  max-width: 1220px;
  width: 100%;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 640px) {
  .af-container {
    padding-left: 28px;
    padding-right: 28px;
  }
}

.af-container-narrow {
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 640px) {
  .af-container-narrow {
    padding-left: 28px;
    padding-right: 28px;
  }
}

.af-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.af-main {
  flex: 1 0 auto;
  min-width: 0;
}

/* Header */
.af-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 21, 22, 0.96);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.af-header.is-scrolled {
  background: rgba(14, 17, 18, 0.99);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.af-header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (min-width: 1024px) {
  .af-header-inner {
    height: 72px;
    gap: 24px;
  }
}

.af-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.af-brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #242626;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
}

.af-brand-text {
  font-family: var(--af-font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #ffffff;
}

.af-brand-text span {
  color: var(--af-yellow-500);
}

.af-nav-desktop {
  display: none;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  font-weight: 600;
  color: #d2d7d6;
}

.af-nav-desktop a,
.af-nav-desktop li a {
  display: inline-block;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.af-nav-desktop a:hover,
.af-nav-desktop li.current-menu-item a,
.af-nav-desktop li.current_page_item a {
  color: var(--af-yellow-500);
  border-bottom-color: var(--af-yellow-500);
}

.af-nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
}

@media (min-width: 1024px) {
  .af-nav-desktop {
    display: flex;
  }
}

.af-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.af-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  max-width: 100%;
  text-align: center;
  line-height: 1.25;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, border-color 0.15s ease;
}

@media (min-width: 640px) {
  .af-btn {
    padding: 12px 22px;
    white-space: nowrap;
  }
}

.af-btn-sm {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 8px;
}

.af-btn-yellow {
  background: var(--af-yellow-500);
  color: var(--af-charcoal-850);
}

.af-btn-yellow:hover {
  background: var(--af-yellow-400);
  transform: translateY(-1px);
}

.af-btn-dark {
  background: var(--af-charcoal-800);
  color: #ffffff;
}

.af-btn-dark:hover {
  background: #2a3032;
}

.af-btn-outline-light {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  font-weight: 700;
}

.af-btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
}

.af-btn-outline-dark {
  background: #ffffff;
  border-color: #cfd4d2;
  color: var(--af-charcoal-850);
  font-weight: 700;
}

.af-btn-outline-dark:hover {
  background: var(--af-surface-warm);
}

.af-hide-xs {
  display: none;
}

@media (min-width: 640px) {
  .af-hide-xs {
    display: inline-flex;
  }
}

.af-mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .af-mobile-toggle {
    display: none;
  }
}

.af-mobile-drawer {
  display: none;
  background: #151819;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 20px;
}

.af-mobile-drawer.is-open {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.af-mobile-drawer a {
  padding: 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #dce0df;
}

.af-mobile-drawer a:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Homepage Hero Section */
.af-hero {
  position: relative;
  background: var(--af-charcoal-850);
  color: #ffffff;
  overflow: hidden;
}

.af-hero-picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.af-hero-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.af-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 12, 13, 0.94) 0%, rgba(8, 12, 13, 0.8) 55%, rgba(8, 12, 13, 0.38) 100%);
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
}

.af-hero-grid {
  position: relative;
  z-index: 2;
  padding-top: 44px;
  padding-bottom: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.af-hero-grid > * {
  min-width: 0;
}

@media (min-width: 1024px) {
  .af-hero-grid {
    padding-top: 84px;
    padding-bottom: 84px;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.78fr);
    gap: 56px;
  }
}

.af-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--af-yellow-500);
  margin: 0 0 12px;
}

.af-eyebrow-amber {
  color: var(--af-amber-700);
}

.af-hero-title {
  font-family: var(--af-font-display);
  font-weight: 800;
  font-size: clamp(2.15rem, 6vw, 4rem);
  line-height: 1.07;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin: 0 0 18px;
  max-width: 700px;
}

.af-accent {
  font-style: normal;
  color: var(--af-yellow-500);
}

.af-accent-amber {
  font-style: normal;
  color: var(--af-amber-700);
}

.af-hero-lead {
  color: #dce1e0;
  font-size: 16px;
  line-height: 1.65;
  max-width: 560px;
  margin: 0;
}

@media (min-width: 640px) {
  .af-hero-lead {
    font-size: 17px;
  }
}

.af-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.af-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 22px;
  font-size: 12px;
  color: #cfd5d3;
  font-weight: 500;
}

.af-trust-row span b {
  color: var(--af-yellow-500);
  margin-right: 6px;
}

/* Quick Estimate Card */
.af-quick-card {
  background: rgba(250, 251, 249, 0.97);
  color: var(--af-charcoal-850);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
  max-width: 540px;
  width: 100%;
  min-width: 0;
}

@media (min-width: 640px) {
  .af-quick-card {
    padding: 24px;
    border-radius: 18px;
  }
}

.af-quick-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7e4;
}

.af-quick-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--af-yellow-500);
  color: var(--af-charcoal-850);
  display: grid;
  place-items: center;
  font-family: var(--af-font-display);
  font-weight: 800;
  font-size: 20px;
  flex-shrink: 0;
}

/* Responsive 2-col input grid: 1-col at 320px so inputs & unit labels never collide or overflow */
.af-field-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.af-field-grid-2 > * {
  min-width: 0;
}

@media (min-width: 400px) {
  .af-field-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.af-col-span-2 {
  grid-column: span 1;
}

@media (min-width: 400px) {
  .af-col-span-2 {
    grid-column: span 2;
  }
}

.af-field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  color: var(--af-charcoal-850);
  margin-bottom: 6px;
  gap: 4px 8px;
}

.af-field-unit {
  font-size: 11px;
  font-weight: 500;
  color: #58605f;
}

.af-input,
.af-select,
.af-textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  background: #ffffff;
  border: 1px solid #cfd4d2;
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--af-charcoal-850);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.af-input[aria-invalid="true"],
.af-select[aria-invalid="true"] {
  border-color: #dc2626;
  background: #fef2f2;
}

.af-textarea {
  min-height: 110px;
  resize: vertical;
}

.af-input:focus,
.af-select:focus,
.af-textarea:focus {
  border-color: #b08a05;
  box-shadow: 0 0 0 3px rgba(247, 206, 34, 0.35);
}

.af-quick-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--af-charcoal-800);
  color: #ffffff;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

/* Proof Strip */
.af-proof-strip {
  background: #1d2021;
  color: #e8e8e7;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.af-proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 480px) {
  .af-proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .af-proof-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.af-proof-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid #2b2f30;
}

@media (min-width: 1024px) {
  .af-proof-item {
    padding: 18px 14px;
    border-bottom: 0;
  }
}

.af-proof-item b {
  color: var(--af-yellow-500);
  font-family: var(--af-font-mono);
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Sections */
.af-section-warm {
  background: var(--af-surface-warm);
  padding: 48px 0;
}

.af-section-dark {
  background: #1a1d1e;
  color: #ffffff;
  padding: 48px 0;
}

.af-section-white {
  background: #ffffff;
  padding: 48px 0;
}

@media (min-width: 640px) {
  .af-section-warm,
  .af-section-dark,
  .af-section-white {
    padding: 84px 0;
  }
}

.af-section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: end;
  margin-bottom: 36px;
}

@media (min-width: 1024px) {
  .af-section-header {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.75fr);
    gap: 60px;
    margin-bottom: 44px;
  }
}

.af-h2 {
  font-family: var(--af-font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.09;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0;
}

.af-link-underline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
  border-bottom: 2px solid var(--af-yellow-500);
  padding-bottom: 4px;
}

/* Grids */
.af-cards-4,
.af-cards-2,
.af-cards-3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.af-cards-4 > *,
.af-cards-2 > *,
.af-cards-3 > * {
  min-width: 0;
}

@media (min-width: 640px) {
  .af-cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .af-cards-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .af-cards-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .af-cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

.af-calc-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 270px;
  padding: 22px;
  border-radius: 14px;
  border: 1px solid var(--af-border);
  background: #ffffff;
  color: var(--af-charcoal-850);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.af-calc-card:hover {
  transform: translateY(-4px);
  border-color: #c8b560;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.07);
}

.af-calc-card.is-featured {
  background: var(--af-charcoal-800);
  border-color: var(--af-charcoal-800);
  color: #ffffff;
}

.af-calc-card.is-featured:hover {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.af-symbol-box {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: #f7f7f4;
  border: 1px solid #e7e8e3;
  color: #9e7300;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
  margin: 18px 0;
}

/* Spotlight */
.af-spotlight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

@media (min-width: 1024px) {
  .af-spotlight-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 60px;
  }
}

.af-spotlight-img-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #272a2b;
}

.af-spotlight-img-wrap img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

@media (min-width: 640px) {
  .af-spotlight-img-wrap img {
    height: 380px;
  }
}

.af-spotlight-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  width: fit-content;
  max-width: calc(100% - 32px);
  background: var(--af-yellow-500);
  color: var(--af-charcoal-850);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.1px;
  padding: 8px 12px;
  border-radius: 6px;
}

/* Workspace Interactive Preview */
.af-workspace-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: #1c2022;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

@media (min-width: 1024px) {
  .af-workspace-shell {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}

.af-workspace-tabs {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.af-workspace-tab {
  width: 100%;
  min-height: 44px;
  text-align: left;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #343938;
  border-radius: 8px;
  background: transparent;
  color: #d4dad8;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.af-workspace-tab.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.af-workspace-stage-panel {
  padding: 14px;
  background: var(--af-charcoal-700);
  min-width: 0;
}

@media (min-width: 640px) {
  .af-workspace-stage-panel {
    padding: 18px;
  }
}

.af-workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: #121617;
  color: #c5cecc;
  padding: 12px 16px;
  border-radius: 10px 10px 0 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.af-workspace-body {
  background: #edf0ee;
  color: var(--af-charcoal-850);
  border-radius: 0 0 10px 10px;
  padding: 18px;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .af-workspace-body {
    padding: 24px;
  }
}

.af-bar-track {
  height: 10px;
  background: #dde1de;
  border-radius: 999px;
  overflow: hidden;
}

.af-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #d8a400, #f7ce22);
}

/* Inner Photographic Page Hero */
.af-page-hero {
  position: relative;
  background: #141819;
  color: #ffffff;
  padding: 44px 0 48px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 640px) {
  .af-page-hero {
    padding: 64px 0 68px;
  }
}

.af-page-hero.is-compact {
  padding: 36px 0 40px;
}

.af-page-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.af-page-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.af-page-hero.is-compact .af-page-hero-photo img {
  opacity: 0.24;
  object-position: center;
}

.af-page-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    98deg,
    rgba(11, 14, 15, 0.94) 0%,
    rgba(11, 14, 15, 0.82) 52%,
    rgba(11, 14, 15, 0.44) 100%
  );
  pointer-events: none;
}

.af-page-hero.is-compact .af-page-hero-scrim {
  background: linear-gradient(
    98deg,
    rgba(16, 19, 20, 0.96) 0%,
    rgba(16, 19, 20, 0.9) 65%,
    rgba(16, 19, 20, 0.78) 100%
  );
}

.af-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #c2cbc9;
  margin-bottom: 16px;
}

.af-breadcrumbs a:hover {
  color: var(--af-yellow-500);
}

/* Calculator Workspace Page (10 tabs responsive at 320px–1440px) */
.af-calc-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  background: #e6e8e3;
  border-radius: 12px;
  margin-bottom: 24px;
  max-width: 100%;
}

@media (min-width: 640px) {
  .af-calc-switcher {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.af-calc-switch-tab {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  color: #39403f;
  transition: background-color 0.15s ease, color 0.15s ease;
  word-break: break-word;
}

@media (min-width: 640px) {
  .af-calc-switch-tab {
    font-size: 12px;
    padding: 9px 10px;
  }
}

@media (min-width: 1024px) {
  .af-calc-switch-tab {
    font-size: 13px;
    padding: 10px 12px;
  }
}

.af-calc-switch-tab:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--af-charcoal-850);
}

.af-calc-switch-tab.is-active {
  background: var(--af-charcoal-800);
  color: var(--af-yellow-500);
}

.af-specialty-bar {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 640px) {
  .af-specialty-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .af-specialty-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.af-specialty-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--af-border);
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  color: var(--af-charcoal-850);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.af-specialty-link:hover {
  border-color: #c8b560;
  transform: translateY(-2px);
}

.af-calc-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.af-calc-workspace-grid > * {
  min-width: 0;
}

@media (min-width: 1024px) {
  .af-calc-workspace-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.85fr);
    gap: 24px;
  }
}

.af-panel {
  background: #ffffff;
  border: 1px solid var(--af-border);
  border-radius: 16px;
  padding: 18px;
  max-width: 100%;
  min-width: 0;
}

@media (min-width: 640px) {
  .af-panel {
    padding: 28px;
  }
}

.af-section-box {
  background: #f8f8f5;
  border: 1px solid #e3e5e0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.af-section-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.af-section-inputs > * {
  min-width: 0;
}

@media (min-width: 640px) {
  .af-section-inputs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.af-output-aside {
  background: #1d2223;
  color: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(21, 27, 27, 0.16);
  max-width: 100%;
  min-width: 0;
}

@media (min-width: 640px) {
  .af-output-aside {
    padding: 26px;
  }
}

@media (min-width: 1024px) {
  .af-output-aside {
    position: sticky;
    top: 92px;
  }
}

.af-primary-metric-value {
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 800;
  line-height: 1.08;
  color: #f7ce22;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}

.af-output-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 11px 0;
  border-bottom: 1px solid #33393a;
  font-size: 13px;
}

.af-output-row span {
  color: #bdc7c4;
}

.af-output-row b {
  color: #ffffff;
  font-family: var(--af-font-mono);
  text-align: right;
  margin-left: auto;
}

/* Segmented controls (Pricing & Margin/Markup) */
.af-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  background: #e5e7e2;
  padding: 5px;
  border-radius: 10px;
  max-width: 100%;
}

/* Pricing & Tables */
.af-notice-amber {
  background: var(--af-surface-tint);
  border: 1px solid #e4cf78;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 13px;
  color: #473802;
}

.af-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--af-border);
  border-radius: 12px;
  max-width: 100%;
}

.af-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.af-table th {
  background: var(--af-surface-warm);
  padding: 12px 14px;
  border-bottom: 1px solid var(--af-border);
  font-weight: 700;
}

.af-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eceee9;
}

/* Pagination for Guides & Blog Index */
.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.navigation.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--af-border);
  background: #ffffff;
  color: var(--af-charcoal-850);
  font-weight: 700;
  font-size: 13px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.navigation.pagination .page-numbers:hover {
  background: var(--af-surface-warm);
  border-color: #c8b560;
}

.navigation.pagination .page-numbers.current {
  background: var(--af-charcoal-800);
  border-color: var(--af-charcoal-800);
  color: var(--af-yellow-500);
}

/* Dedicated Print Sheets (Hidden in normal view, selectively printed via active instance + body class) */
.af-print-sheet {
  display: none;
  background: #ffffff;
  color: #161819;
  padding: 24px;
  border: 1px solid #cfd4d2;
  border-radius: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.af-print-parties-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
  font-size: 12px;
  color: #3d4443;
}

.af-print-parties-grid > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (min-width: 540px), print {
  .af-print-parties-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
  }
}

/* Footer */
.af-footer {
  background: var(--af-charcoal-950);
  color: #b9c1c0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 52px 0 28px;
}

.af-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

@media (min-width: 768px) {
  .af-footer-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 44px;
  }
}

.af-footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.af-footer-col a {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}

.af-footer-col a:hover {
  color: var(--af-yellow-500);
}

.af-footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #2d3233;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #98a19f;
}

/* Print Discipline (Multi-instance safe + clean page breaks) */
@page {
  margin: 0.55in;
}

@media print {
  .no-print,
  .af-header,
  .af-footer,
  .af-page-hero,
  .af-calc-switcher,
  .af-calc-workspace-grid,
  .af-seo-guide-block {
    display: none !important;
  }

  .af-print-sheet {
    display: none !important;
  }

  .af-print-sheet table,
  .af-print-sheet tr,
  .af-print-parties-grid,
  .af-print-parties-grid > div {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.af-printing-client .af-calc-root.af-print-active-instance [data-af-role="print-sheet-client"] {
    display: block !important;
    border: 0 !important;
    padding: 0 !important;
  }

  body.af-printing-internal .af-calc-root.af-print-active-instance [data-af-role="print-sheet-internal"] {
    display: block !important;
    border: 0 !important;
    padding: 0 !important;
  }

  /* Browser Ctrl+P fallback when no button triggered a print session */
  body:not(.af-printing-internal):not(.af-printing-client) .af-calc-root:first-of-type [data-af-role="print-sheet-client"] {
    display: block !important;
    border: 0 !important;
    padding: 0 !important;
  }
}
