/* Keep the calculator header aligned at desktop and compact screens. */
.process-step-description {
  display: none;
  margin-top: 7px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
  text-wrap: pretty;
}

.process-step {
  cursor: pointer;
}

.process-step:is(:hover, :focus-visible, .is-expanded) .process-step-description {
  display: block;
}

.process-step:focus-visible {
  border-radius: 12px;
  outline: 3px solid hsl(var(--secondary) / 0.55);
  outline-offset: 4px;
}

.process-steps {
  grid-template-columns: minmax(0, 1fr);
}

.process-timeline-connector {
  display: none;
}

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

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

@media (min-width: 1280px) {
  .process-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .process-timeline-connector {
    display: block;
  }
}

.faq-heading h2 {
  text-wrap: balance;
}

.faq-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgb(15 23 42 / 4%);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.faq-item:hover,
.faq-item[open] {
  border-color: hsl(var(--secondary) / 0.65);
  box-shadow: 0 8px 22px rgb(15 23 42 / 7%);
}

.faq-item summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 16px 18px;
  color: hsl(var(--primary));
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: hsl(var(--secondary) / 0.16);
  color: hsl(var(--primary));
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
  background: hsl(var(--secondary));
}

.faq-item summary:focus-visible {
  outline: 3px solid hsl(var(--secondary) / 0.65);
  outline-offset: -3px;
}

.faq-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: hsl(var(--secondary) / 0.16);
  color: hsl(var(--primary));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.faq-item > p {
  padding: 0 18px 18px 64px;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.faq-item > p a {
  color: #9a7410;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-disclaimer {
  max-width: 850px;
  margin-inline: auto;
}

@media (max-width: 480px) {
  .faq-section {
    padding-block: 56px;
  }

  .faq-item summary {
    grid-template-columns: 30px minmax(0, 1fr) 20px;
    gap: 9px;
    min-height: 64px;
    padding: 14px 12px;
    font-size: 14px;
  }

  .faq-number {
    width: 29px;
    height: 29px;
  }

  .faq-item > p {
    padding: 0 14px 16px 51px;
    font-size: 13px;
  }
}

@media (max-width: 767px) {
  .process-steps {
    gap: 14px;
  }

  .process-step {
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 12px rgb(15 23 42 / 4%);
  }

  .process-step-icon {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
  }

  .process-step-icon > svg {
    width: 22px;
    height: 22px;
  }

  .process-step-copy {
    min-width: 0;
    padding-top: 3px;
    text-align: left;
  }

  .process-step-copy h4 {
    font-size: 16px;
    line-height: 1.35;
  }

  .process-step-description {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.55;
  }
}

.home-header {
  background-color: #17243b;
  border-color: rgb(255 255 255 / 12%);
  color: #fff;
}

.home-header .home-brand {
  background: transparent;
}

.home-desktop-nav,
.home-nav-link {
  color: #f8fafc;
}

.home-nav-link {
  font-weight: 600;
}

.home-nav-link:hover,
.home-nav-link:focus-visible {
  color: hsl(var(--secondary));
}

.credentials-panel {
  min-width: 0;
  container-type: inline-size;
}

.credentials-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  align-items: start;
}

.credentials-grid > div {
  min-width: 0;
}

.credentials-grid dt,
.credentials-grid dd,
.credentials-panel p {
  overflow-wrap: anywhere;
}

.credentials-grid-wide {
  grid-column: 1 / -1;
}

.credentials-pdf-link {
  max-width: 100%;
  align-items: flex-start;
  line-height: 1.5;
  text-wrap: pretty;
}

.credentials-pdf-link svg {
  flex: 0 0 16px;
  margin-top: 2px;
}

@container (max-width: 420px) {
  .credentials-grid {
    gap: 14px;
  }
}

.calculator-catalog {
  display: grid;
  gap: 36px;
}

.calculator-group-title {
  margin-bottom: 16px;
  color: hsl(var(--secondary));
  font-family: var(--app-font-serif);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.calculator-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  align-items: stretch;
  gap: 18px;
}

.calculator-card {
  display: flex;
  min-width: 0;
  min-height: 205px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 24px 18px;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 18px;
  background: rgb(255 255 255 / 10%);
  color: white;
  text-align: center;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.calculator-card:hover,
.calculator-card:focus-visible {
  transform: translateY(-3px);
  border-color: hsl(var(--secondary) / 0.65);
  background: rgb(255 255 255 / 14%);
  box-shadow: 0 12px 24px rgb(0 0 0 / 16%);
  outline: none;
}

.calculator-card-icon {
  display: grid;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, hsl(var(--secondary)), #a87913);
  font-size: 32px;
  box-shadow: 0 5px 12px rgb(0 0 0 / 20%);
}

.calculator-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.calculator-card-description {
  color: var(--color-slate-400);
  font-size: 12px;
  line-height: 1.55;
}

.calc-textarea {
  min-height: 132px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.6;
}

.calculator-error {
  color: #fecaca;
  font-size: 13px;
  line-height: 1.5;
}

.calculator-header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.calculator-brand-link {
  grid-column: 1;
  display: flex;
  align-items: center;
}

.calculator-header-title {
  grid-column: 2;
  position: static;
  min-width: 0;
  text-align: center;
}

.calculator-home-link {
  grid-column: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  color: hsl(var(--secondary));
  font-size: 14px;
  font-weight: 700;
  transition: color 150ms ease;
}

.calculator-home-link:hover,
.calculator-home-link:focus-visible {
  color: white;
}

@media (max-width: 1023px) {
  .home-header-inner {
    height: auto;
    min-height: 72px;
    padding: 8px 12px;
    gap: 10px;
  }

  .home-desktop-nav,
  .home-desktop-cta {
    display: none !important;
  }

  .home-menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid hsl(var(--primary) / 0.2);
    border-radius: 10px;
    background: hsl(var(--primary));
    cursor: pointer;
  }

  .home-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: white;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .home-menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  .home-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .home-menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  .home-mobile-nav:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 16px 16px;
    border-top: 1px solid rgb(255 255 255 / 12%);
    background: #17243b;
    box-shadow: 0 12px 20px rgb(15 23 42 / 0.24);
  }

  .home-mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 8px;
    color: #f8fafc;
    font-size: 15px;
    font-weight: 600;
  }

  .home-mobile-nav a:hover,
  .home-mobile-nav a:focus-visible {
    background: rgb(255 255 255 / 9%);
    outline: none;
  }

  .home-mobile-nav a[href="calculator.html"] {
    background: hsl(var(--secondary));
    color: hsl(var(--primary));
    font-weight: 700;
  }

  .home-mobile-nav a[href="calculator.html"]:hover,
  .home-mobile-nav a[href="calculator.html"]:focus-visible {
    background: hsl(var(--secondary) / 0.9);
  }

  .home-mobile-nav a:last-child {
    margin-top: 4px;
    border: 1px solid hsl(var(--secondary) / 0.55);
    background: transparent;
    color: white;
    text-align: center;
  }

  .home-brand {
    padding: 6px 8px;
    border-radius: 10px;
  }

  .home-brand img {
    height: 32px;
    width: auto;
  }

  .home-brand span {
    font-size: 7px;
    letter-spacing: 0.07em;
  }

  .home-hero {
    padding-top: 112px;
    padding-bottom: 56px;
  }

  .home-hero > .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-hero-title {
    font-size: clamp(2.25rem, 10vw, 3rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .calculator-header-inner {
    grid-template-columns: minmax(0, 128px) minmax(0, 1fr) auto;
    padding: 10px 12px;
    gap: 8px;
  }

  .calculator-brand-link {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    width: 100%;
  }

  .calculator-brand-link > div,
  .calculator-brand-link > div > div {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .calculator-brand-link img {
    height: 30px;
    max-width: 100%;
  }

  .calculator-brand-link span {
    display: block;
    width: 100%;
    font-size: 6px;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-align: center;
    text-wrap: balance;
  }

  .calculator-header-title {
    grid-column: 2;
    grid-row: 1;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .calculator-home-link {
    grid-column: 3;
    grid-row: 1;
    font-size: 12px;
  }

  .calculator-header-title h1 {
    font-size: clamp(11px, 3.8vw, 15px);
    line-height: 1.15;
  }

  .calculator-header-title p {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .calculator-header-title p {
    display: none;
  }
}

@media (max-width: 360px) {
  .home-header-inner {
    padding-right: 10px;
    padding-left: 10px;
    gap: 8px;
  }

  .home-hero-title {
    font-size: 2.15rem;
  }
}

@media (min-width: 1024px) {
  .calculator-header-inner {
    position: relative;
  }

  .calculator-header-title {
    position: absolute;
    grid-column: auto;
    grid-row: auto;
    left: 50%;
    width: max-content;
    max-width: calc(100% - 320px);
    transform: translateX(-50%);
  }

  .home-menu-toggle,
  .home-mobile-nav {
    display: none !important;
  }

  .home-desktop-nav {
    flex-shrink: 0;
    gap: clamp(16px, 2vw, 30px);
    white-space: nowrap;
  }

  .home-desktop-cta {
    flex-shrink: 0;
    white-space: nowrap;
  }
}