/* Build 358 — shared typography for desktop, tablet and phone.
   Overrides the overly broad Build 356 heading sizes without changing layout,
   navigation behaviour, chart rendering, or payment/report logic. */
:root {
  --al-body-font: 'Inter', Arial, sans-serif;
  --al-heading-font: 'Marcellus', 'Spectral', Georgia, serif;
  --al-body-size: 16px;
  --al-page-title: clamp(28px, 2.8vw, 36px);
  --al-section-title: clamp(23px, 2.1vw, 28px);
  --al-subtitle: clamp(19px, 1.5vw, 21px);
  --al-card-title: 21px;
  --al-brand-size: 22px;
}

@media screen {
  html { font-size: 16px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { font-family: var(--al-body-font); font-size: var(--al-body-size); line-height: 1.6; }

  /* A single, identical wordmark on every page, including compatibility. */
  html:root:root body:not(#altypography) header.service-header a.service-brand,
  html:root:root body:not(#altypography) header.service-header a.service-brand span {
    font-family: var(--al-heading-font) !important;
    font-size: var(--al-brand-size) !important;
    font-weight: 400 !important;
    font-style: normal !important;
    letter-spacing: .01em !important;
    line-height: 1.25 !important;
    text-transform: none !important;
  }
  header.service-header .service-nav { min-width: 0; }
  header.service-header .service-brand { min-width: 0; }

  /* Same hierarchy across home, chart, horoscope, compatibility, Panchang and articles. */
  html:root:root body:not(#ux356):not(.report-page) h1 {
    font-size: var(--al-page-title) !important;
    line-height: 1.22 !important;
  }
  html:root:root body:not(#ux356):not(.report-page) main h2,
  html:root:root body:not(#ux356):not(.report-page) section h2 {
    font-size: var(--al-section-title) !important;
    line-height: 1.3 !important;
  }
  html:root:root body:not(#ux356):not(.report-page) main h3,
  html:root:root body:not(#ux356):not(.report-page) section h3 {
    font-size: var(--al-subtitle) !important;
    line-height: 1.35 !important;
  }
  html:root:root body:not(.report-page) h4 { font-size: 18px !important; line-height: 1.4 !important; }

  /* The home cards are *card* headings, not full-size section headings. */
  html:root:root body:not(#ux356):not(.report-page) main .service-tile h2,
  html:root:root body:not(#ux356):not(.report-page) main .guide-card h3,
  html:root:root body:not(#ux356):not(.report-page) main .method-card h3 {
    font-size: var(--al-card-title) !important;
    line-height: 1.35 !important;
  }
  .service-tile p, .service-card p.desc { font-size: 15px !important; line-height: 1.6 !important; }
  .tile-button { font-family: var(--al-body-font) !important; font-size: 14px !important; line-height: 1.4 !important; }
  .free-label, .tile-label, .eyebrow, .compatibility-eyebrow, .m-eyebrow, .guides-eyebrow {
    font-size: 11px; line-height: 1.5;
  }

  /* Consistent introductory copy and step titles in the form-based journeys. */
  .home-intro p:not(.eyebrow), .page-hero p:not(.eyebrow),
  .compatibility-hero p:not(.compatibility-eyebrow),
  .guides-hero-description, .m-hero p:not(.m-eyebrow),
  .m-event-intro p:not(.m-eyebrow) {
    font-size: 16px !important;
    line-height: 1.65 !important;
  }
  html:root:root body:not(#ux356) .m-hero-lead,
  html:root:root body:not(#ux356) .hero-lead {
    font-size: 17px !important;
    line-height: 1.5 !important;
  }
  html:root:root body:not(#ux356):not(.report-page) .step-box h3,
  html:root:root body:not(#ux356):not(.report-page) .question-chooser h4 {
    font-size: 20px !important;
    line-height: 1.35 !important;
  }
  html:root:root body:not(#ux356):not(.report-page) .compatibility-person legend {
    font-size: 20px !important;
    line-height: 1.35 !important;
  }
  .form-section .step-box label, .compatibility-field label,
  .compatibility-shared > label:not(.compatibility-consent),
  #m-daily-form label, .m-field label {
    font-family: var(--al-body-font) !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
  }
  .form-section .step-box :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea),
  .compatibility-page :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea),
  .muhurat-page :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
    font-family: var(--al-body-font) !important;
    font-size: 16px !important; /* Keeps Safari from zooming into form fields. */
    line-height: 1.45 !important;
  }
  html:root:root body .btn, html:root:root body button.btn,
  html:root:root body .m-button, html:root:root body .compatibility-button,
  html:root:root body .prediction-primary-button {
    font-family: var(--al-body-font) !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
  }

  /* Keep concise heading hierarchy in the long-form private reports too. */
  body.report-page { font-size: 16px; }
  body.report-page #report-empty h1 { font-size: var(--al-page-title) !important; line-height: 1.25 !important; }
}

@media screen and (max-width: 650px) {
  :root {
    --al-page-title: 28px;
    --al-section-title: 23px;
    --al-subtitle: 19px;
    --al-card-title: 20px;
  }
  html:root:root body:not(#altypography) header.service-header a.service-brand,
  html:root:root body:not(#altypography) header.service-header a.service-brand span {
    font-size: var(--al-brand-size) !important; /* Exactly the desktop size. */
  }
  .service-tile p, .service-card p.desc { font-size: 16px !important; }
  .service-tile { min-width: 0; }
  html:root:root body:not(#ux356):not(.report-page) .step-box h3,
  html:root:root body:not(#ux356):not(.report-page) .question-chooser h4,
  html:root:root body:not(#ux356):not(.report-page) .compatibility-person legend {
    font-size: 19px !important;
  }
  /* Reduce crowding where the Muhurat event illustration shares a narrow column. */
  html:root:root body:not(#ux356):not(.report-page) .m-event-intro h2 {
    font-size: 23px !important;
  }
}

@media screen and (max-width: 350px) {
  :root { --al-brand-size: 20px; --al-page-title: 26px; }
  header.service-header .service-nav { column-gap: 6px; }
  .ux-menu-toggle { padding-inline: 10px; }
}

/* Build 360: service-page hero kicker was inheriting the 1.05rem
   paragraph size (16.8px). A 12px eyebrow is consistent and compact
   on phone and desktop, with tighter letter spacing on small screens. */
@media screen {
  html:root:root body:not(#ux357)[data-service-page] section.page-hero p.eyebrow {
    font-family: var(--al-body-font) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: .12em !important;
    line-height: 1.5 !important;
    text-transform: uppercase !important;
  }
}
@media screen and (max-width: 650px) {
  html:root:root body:not(#ux357)[data-service-page] section.page-hero p.eyebrow {
    letter-spacing: .09em !important;
  }
}


/* Build 362 — compact, readable controls across public birth-detail forms.
   All public pages load this shared stylesheet. Keep native input/select elements,
   values, validation, autofill and event handlers unchanged. */
@media screen and (max-width: 650px) {
  /* Text inside inputs and dropdowns should not look like a page heading.
     Match the birth-chart, prediction, weekly, compatibility, and Muhurat forms. */
  html:root:root body:not(#ux362) :is(
      .form-section .step-box,
      .compatibility-page .compatibility-form-section,
      .muhurat-page .m-main,
      .fc-field,
      .weekly-form,
      .compatibility-saved-controls
    ) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
    font-family: 'Inter', Arial, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
    letter-spacing: normal !important;
    min-width: 0;
  }
  /* Placeholder styling extends to smaller standalone public forms as well. */
  html:root:root body:not(#ux362) :is(input, textarea)::placeholder {
    font-family: 'Inter', Arial, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
    letter-spacing: normal !important;
  }
  /* Prevent month/day/year and hour/min/sec labels fighting with native arrows. */
  html:root:root body:not(#ux362) .form-section .step-box .dt-select-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  /* Month can be September/December, so give the *selected* value full width.
     Day and Year share the next row; time remains a balanced two-by-two grid. */
  html:root:root body:not(#ux362) .form-section .step-box .dt-select-row:has(> #dobMonth) > #dobMonth {
    grid-column: 1 / -1 !important;
  }
  html:root:root body:not(#ux362) .form-section .step-box .dt-select-row > select {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    height: 46px !important;
    padding: 9px 28px 9px 12px !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    text-overflow: ellipsis !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M2 3l5 5 5-5' fill='none' stroke='%23574B69' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 11px 8px !important;
  }
  /* Other selects can also contain long values (relationship stage, Muhurat). */
  html:root:root body:not(#ux362) :is(
      .compatibility-page .compatibility-shared select,
      .compatibility-page .compatibility-saved-controls select,
      .muhurat-page .m-main select,
      .fc-field select
    ) {
    max-width: 100% !important;
    min-width: 0 !important;
    padding-right: 26px !important;
    font-size: 15px !important;
  }
}


/* Production 368: the paid-reading desktop time fields need full labels.
   Keep the same native selects, option values and validation; only give them room. */
@media screen {
  html:root:root body[data-service-page] #ask .birth-panel .dt-select-row:has(> #tobHour) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  html:root:root body[data-service-page] #ask .birth-panel .dt-select-row:has(> #tobHour) > select {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}
