/* Preview-only shell: flush tab bar, skip setup, date banner, home Premium card. */
/* New utilities the patched nav classes need (not in the v14 Tailwind CSS). */
.h-\[calc\(4rem\+env\(safe-area-inset-bottom\,0px\)\)\] {
  height: calc(4rem + env(safe-area-inset-bottom, 0px));
}
.bottom-\[calc\(4rem\+env\(safe-area-inset-bottom\,0px\)\)\] {
  bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
}
.pb-\[env\(safe-area-inset-bottom\,0px\)\] {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Override the original 6rem/10rem lift so the first paint (and any unpatched markup) is flush. */
@media (max-width: 767px) {
  .h-\[calc\(6rem\+env\(safe-area-inset-bottom\,0px\)\)\] {
    height: calc(4rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  nav[aria-label="Sections"].bottom-\[calc\(6rem\+env\(safe-area-inset-bottom\,0px\)\)\],
  nav[aria-label="Secciones"].bottom-\[calc\(6rem\+env\(safe-area-inset-bottom\,0px\)\)\],
  nav[aria-label="Sections"].bottom-0,
  nav[aria-label="Secciones"].bottom-0 {
    bottom: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    background: #F4EBDA;
    box-sizing: content-box;
    min-height: 4rem;
    height: auto !important;
  }
  .bottom-\[calc\(10rem\+env\(safe-area-inset-bottom\,0px\)\)\],
  .bottom-\[calc\(4rem\+env\(safe-area-inset-bottom\,0px\)\)\] {
    bottom: calc(4rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  .h-\[calc\(4rem\+env\(safe-area-inset-bottom\,0px\)\)\] {
    height: calc(4rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  nav[aria-label="Sections"] ul,
  nav[aria-label="Secciones"] ul {
    height: 4rem;
  }
  nav[aria-label="Sections"] a,
  nav[aria-label="Secciones"] a,
  nav[aria-label="Sections"] button,
  nav[aria-label="Secciones"] button {
    height: 4rem !important;
    min-height: 4rem;
    padding-bottom: 0 !important;
    flex-direction: column !important;
    justify-content: center;
    gap: 2px !important;
    overflow: visible;
  }
  nav[aria-label="Sections"] span,
  nav[aria-label="Secciones"] span {
    line-height: 1.15;
    flex: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Screenshot / QA hook: html.cts-demo-safe pretends the iPhone home indicator is 34px. */
html.cts-demo-safe nav[aria-label="Sections"],
html.cts-demo-safe nav[aria-label="Secciones"] {
  padding-bottom: 34px !important;
}
html.cts-demo-safe .h-\[calc\(4rem\+env\(safe-area-inset-bottom\,0px\)\)\],
html.cts-demo-safe .h-\[calc\(6rem\+env\(safe-area-inset-bottom\,0px\)\)\] {
  height: calc(4rem + 34px) !important;
}
@media (max-width: 767px) {
  html.cts-demo-safe .bottom-\[calc\(4rem\+env\(safe-area-inset-bottom\,0px\)\)\],
  html.cts-demo-safe .bottom-\[calc\(10rem\+env\(safe-area-inset-bottom\,0px\)\)\] {
    bottom: calc(4rem + 34px) !important;
  }
}

/* Skip setup */
.cts-skip-wrap { margin-top: .85rem; text-align: center; }
.cts-skip-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .4rem .8rem; border: 0; background: none;
  color: #4B5320; font: inherit; font-weight: 700; font-size: .95rem;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.cts-skip-btn:focus-visible { outline: 3px solid #B8892B; outline-offset: 2px; border-radius: 8px; }
.cts-skip-hint { margin: .15rem 0 0; font-size: .8rem; color: #5A594E; line-height: 1.4; }

/* Date banner */
.cts-date-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .6rem 1rem; margin: 0 0 1rem; padding: .85rem 1rem;
  background: #F6E3C5; border: 1px solid #CDBFA6; border-radius: 16px;
  color: #14140F; font-size: .95rem; line-height: 1.4;
}
.cts-date-banner p { margin: 0; }
.cts-date-banner-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .9rem;
  border-radius: 999px; background: #4B5320; color: #fff; font-weight: 700;
  font-size: .85rem; text-decoration: none; white-space: nowrap;
}
.cts-date-banner-link:focus-visible { outline: 3px solid #B8892B; outline-offset: 2px; }

/* Home-screen Premium card */
a.cts-home-premium {
  display: block; margin: 0 0 1.1rem; padding: 1rem 1.1rem;
  background: #121410; color: #F4EBDA; border-radius: 16px; text-decoration: none;
}
a.cts-home-premium:focus-visible { outline: 3px solid #B8892B; outline-offset: 2px; }
.cts-home-premium-eye {
  margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: #F1D58A;
}
.cts-home-premium-title {
  margin: .35rem 0 .15rem; font-family: var(--font-source-serif, Georgia), serif;
  font-size: 1.25rem; font-weight: 600; color: #fff; line-height: 1.2;
}
.cts-home-premium-desc { margin: 0; font-size: .9rem; color: #E7E2CF; line-height: 1.4; }

/* iOS Add-to-Home-Screen hint (pwa.js). Bottom-docked so it doesn't cover headings or buttons. */
.cts-a2hs {
  position: fixed;
  left: 12px;
  right: 12px;
  /* Sit above the mobile tab bar (4rem + safe area) so Plan/Home stay tappable.
     z-index stays below the tab bar (40) in case of any overlap. */
  bottom: calc(4rem + 12px + env(safe-area-inset-bottom, 0px));
  z-index: 35;
  background: #F4EBDA;
  color: #14140F;
  border: 1px solid #CDBFA6;
  border-radius: 16px;
  padding: 12px 44px 12px 14px;
  font: 14px/1.4 system-ui, -apple-system, sans-serif;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.cts-a2hs-dismiss {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  font-size: 22px;
  color: #4B5320;
  cursor: pointer;
}

@media (min-width: 768px) {
  .cts-a2hs {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: calc(15rem + 12px);
  }
}
html.cts-demo-safe .cts-a2hs {
  bottom: calc(4rem + 12px + 34px);
}
@media (min-width: 768px) {
  html.cts-demo-safe .cts-a2hs {
    bottom: calc(12px + 34px);
  }
}


/* Printable binder companion card (preview). Home + onboarding only. */
.cts-binder-card {
  display: block;
  margin: 0 0 1.1rem;
  padding: 1rem 1.1rem 1.05rem;
  background: #F4EBDA;
  color: #14140F;
  border: 1px solid #CDBFA6;
  border-radius: 16px;
}
.cts-binder-eye {
  margin: 0;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #4B5320;
}
.cts-binder-title {
  margin: .35rem 0 .15rem;
  font-family: var(--font-source-serif, Georgia), serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #14140F;
  line-height: 1.2;
}
.cts-binder-desc {
  margin: 0 0 .85rem;
  font-size: .9rem;
  color: #3F3E38;
  line-height: 1.45;
}
.cts-binder-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; }
.cts-binder-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 12px;
  background: #4B5320;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
}
.cts-binder-btn:focus-visible { outline: 3px solid #B8892B; outline-offset: 2px; }
.cts-binder-btn:hover { background: #3C4219; }
.cts-binder-note { margin: 0; font-size: .8rem; color: #5A594E; }

/* PREVIEW-COPY-PATCH: longer tab labels ("Get started", "Job tools") */
@media (max-width: 767px) {
  nav[aria-label="Sections"] a > span,
  nav[aria-label="Secciones"] a > span {
    font-size: 11px;
    letter-spacing: -0.01em;
    white-space: nowrap;
    text-align: center;
  }
}
@media (max-width: 359px) {
  nav[aria-label="Sections"] a > span,
  nav[aria-label="Secciones"] a > span {
    font-size: 10px;
    white-space: normal;
    line-height: 1.05;
    overflow: visible;
    text-overflow: clip;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}
