/* Section styles for /prep. Relies on the site's css/styles.css tokens. */

.prep-page .page-hero {
  padding: 72px 0 80px;
}

/* Sit the disclaimer close under the hero on every /prep page. */
.prep-page main > .section {
  padding-top: 20px;
}

.prep-page .page-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.6rem);
}

.prep-nav {
  position: sticky;
  top: 82px;
  z-index: 15;
  background: var(--navy-800);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prep-nav-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px 14px;
}

.prep-nav-toggle {
  display: none;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.prep-nav-toggle-label {
  display: block;
  color: #fff;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.5;
}

.prep-nav-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 18px 28px;
  width: 100%;
}

.prep-nav-menu > a,
.prep-nav-group-links a {
  color: #d8e2ed;
  text-decoration: none;
  font-size: 0.92rem;
}

.prep-nav-menu > a {
  padding: 6px 0;
  white-space: nowrap;
}

.prep-nav-menu a:hover,
.prep-nav-menu a:focus-visible {
  color: #fff;
}

.prep-nav-menu a.is-current,
.prep-nav-menu a[aria-current="page"] {
  color: #fff;
  font-weight: 750;
  box-shadow: inset 0 -2px 0 var(--blue-400);
}

.prep-nav-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.prep-nav-label {
  color: var(--blue-400);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.prep-nav-group-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.prep-nav-group-links a {
  padding: 2px 0;
}

.prep-disclaimer {
  margin: 0 0 22px;
}

.prep-disclaimer p {
  margin: 0;
}

.prep-content {
  padding: 34px;
}

.prep-content a {
  color: #1458a8;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prep-content a:hover {
  color: var(--blue-500);
}

.prep-content h2 {
  margin: 1.8em 0 0.6em;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.prep-content h2:first-child {
  margin-top: 0;
}

.prep-content p,
.prep-content li {
  color: var(--ink-700);
}

.prep-content ul,
.prep-content ol {
  padding-left: 1.2em;
}

.prep-content li + li {
  margin-top: 0.35em;
}

.prep-content strong {
  color: var(--ink-900);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.1em 0 1.4em;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.prep-content table {
  width: 100%;
  min-width: 28rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prep-content th,
.prep-content td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prep-content th {
  background: var(--navy-900);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prep-content tbody tr:last-child td {
  border-bottom: 0;
}

.prep-content tbody tr:nth-child(even) {
  background: #f8fafc;
}

.prep-footer-inner {
  align-items: flex-start;
  padding-block: 32px;
  flex-wrap: wrap;
}

.prep-footer-official {
  flex: 1 1 16rem;
}

.prep-footer-label {
  margin: 0 0 8px;
  color: var(--blue-400);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.prep-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
}

.prep-footer-links a {
  color: #d8e2ed;
  text-decoration: none;
}

.prep-footer-links a:hover,
.prep-footer-links a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.prep-footer-links a[aria-current="page"] {
  color: #fff;
  font-weight: 750;
}

@media (max-width: 760px) {
  .prep-nav {
    top: 72px;
  }

  .prep-page .page-hero {
    padding: 48px 0 56px;
  }

  .prep-nav-inner {
    flex-direction: column;
    padding-block: 12px;
  }

  .prep-nav-toggle {
    display: block;
  }

  .prep-nav-menu {
    display: none;
    padding-top: 6px;
    flex-direction: column;
    gap: 16px;
  }

  .prep-nav-menu.is-open {
    display: flex;
  }

  /* The sticky panel sits under the 72px header. When the menu is open it is
     taller than a phone screen, so cap it to the visible height and let it
     scroll by itself; otherwise the lower links stay pinned off-screen. */
  /* Block layout for the stacked mobile groups. As a grid, WebKit could skip
     painting the group links' text inside the open panel. */
  .prep-nav-group {
    display: block;
  }

  .prep-nav-label {
    display: block;
    margin-bottom: 6px;
  }

  .prep-nav.is-menu-open {
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .prep-nav-menu > a,
  .prep-nav-group-links a {
    display: block;
    padding: 8px 0;
    white-space: normal;
  }

  .prep-nav-group-links {
    flex-direction: column;
    gap: 0;
  }

  .prep-content {
    padding: 22px 18px;
  }

  .prep-content table {
    min-width: 24rem;
  }
}

/* Last reviewed */
.prep-reviewed {
  margin: 18px 0 0;
  color: #c6d1de;
  font-size: 0.95rem;
}

.prep-reviewed strong {
  color: var(--blue-400);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-right: 8px;
}

/* Start here callout */
.prep-start-here {
  margin: 0 0 28px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue-500);
  border-radius: var(--radius-md);
  background: #eaf3ff;
}

.prep-start-here-home {
  padding: 24px 26px;
  box-shadow: 0 10px 30px rgba(19, 32, 51, 0.05);
}

.prep-start-here h2 {
  margin: 0 0 10px;
  color: var(--ink-900);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prep-start-here ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.prep-start-here li {
  margin: 0;
}

.prep-start-here a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: #1458a8;
  font-weight: 750;
  text-decoration: none;
}

.prep-start-here a:hover,
.prep-start-here a:focus-visible {
  background: #e9f2ff;
  text-decoration: underline;
}

/* Print button */
.prep-print-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 16px;
}

.prep-print-button {
  cursor: pointer;
  min-width: 7.5rem;
}

/* On-this-page TOC */
.prep-toc {
  margin: 0 0 28px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.prep-toc h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.prep-toc ul {
  margin: 0;
  padding-left: 1.15em;
}

.prep-toc li + li {
  margin-top: 0.3em;
}

/* Task list checkboxes */
.prep-content .task-list {
  list-style: none;
  padding-left: 0;
  margin: 0.8em 0 1.2em;
}

.prep-content .task-list-item {
  position: relative;
  margin: 0.55em 0;
  padding-left: 2.1rem;
  break-inside: avoid;
  page-break-inside: avoid;
}

.prep-content .task-list-item input[type="checkbox"] {
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  accent-color: var(--blue-500);
  cursor: pointer;
}

.prep-content .task-list-item > p {
  margin: 0;
}

/* Household calculator */
.prep-calc {
  margin: 0 0 28px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(19, 32, 51, 0.05);
}

.prep-calc h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.prep-calc-bands {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 12px;
}

.prep-calc-band,
.prep-calc-days {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--ink-700);
}

.prep-calc input[type="number"] {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  color: var(--ink-900);
}

.prep-calc fieldset {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.prep-calc legend {
  padding: 0 0 8px;
  font-weight: 800;
  color: var(--ink-900);
}

.prep-calc-days {
  max-width: 12rem;
  margin-bottom: 16px;
}

.prep-calc-button {
  border: 0;
  cursor: pointer;
}

.prep-calc-results {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.prep-calc-results ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.prep-calc-results li {
  padding: 4px 0;
  color: var(--ink-700);
}


/* Bug-out bag checklist */
.prep-bob {
  margin: 1.2rem 0 1.6rem;
}

.prep-bob-summary {
  margin: 0 0 1.4rem;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(19, 32, 51, 0.05);
}

.prep-bob-summary.is-over {
  border-color: #b45309;
  background: #fff7ed;
}

.prep-bob-summary-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) 1fr;
  gap: 1rem 1.5rem;
  align-items: start;
}

.prep-bob-limit,
.prep-bob-weight label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
}

.prep-bob-limit input,
.prep-bob-weight input {
  width: 100%;
  max-width: 10rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

.prep-bob-total {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.prep-bob-hint,
.prep-bob-remaining,
#bob-remaining,
.prep-bob-note,
.prep-bob-converted {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.95rem;
  font-weight: 400;
}

.prep-bob-hint {
  margin-top: 0.8rem;
}

.prep-bob-warning {
  margin: 0.5rem 0 0;
  font-weight: 700;
  color: #9a3412;
}

.prep-bob-actions {
  margin: 0.9rem 0 0;
}

.prep-bob-group {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.prep-bob-group legend {
  padding: 0 0.35rem;
  font-weight: 700;
}

.prep-bob-list {
  list-style: none;
  margin: 0.4rem 0 0.6rem;
  padding: 0;
}

.prep-bob-item {
  display: grid;
  grid-template-columns: 1fr minmax(9rem, 11rem);
  gap: 0.7rem 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  break-inside: avoid;
  page-break-inside: avoid;
}

.prep-bob-item:first-child {
  border-top: 0;
}

.prep-bob-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 600;
  cursor: pointer;
}

.prep-bob-check input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
  flex: none;
  accent-color: var(--blue-500);
  cursor: pointer;
}

.prep-bob-note {
  margin: 0.35rem 0 0 1.8rem;
}

.prep-bob-kind {
  display: inline-block;
  margin-left: 0.2rem;
  font-weight: 600;
}

.prep-bob-converted {
  margin-top: 0.3rem;
}

@media (max-width: 760px) {
  .prep-bob-summary-grid,
  .prep-bob-item {
    grid-template-columns: 1fr;
  }

  .prep-bob-limit input,
  .prep-bob-weight input {
    max-width: none;
  }

  .prep-bob-note {
    margin-left: 0;
  }
}


.prep-supply-calc .prep-calc-results {
  margin-top: 16px;
}

.prep-supply-calc caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 10px;
  font-weight: 650;
  color: var(--ink-700);
}

/* Print */
@media print {
  .site-header,
  .prep-nav,
  .prep-start-here,
  .prep-print-bar,
  .prep-print-button,
  .prep-calc:not(.prep-supply-calc),
  .prep-supply-calc-form,
  .prep-toc,
  .prep-bob-actions,
  .prep-bob-reset,
  .site-footer,
  .nav-toggle {
    display: none !important;
  }

  body,
  .section-light,
  .prep-page {
    background: #fff !important;
    color: #000;
  }

  .page-hero {
    background: none !important;
    color: #000;
    padding: 0 0 12px;
  }

  .page-hero .eyebrow,
  .prep-reviewed,
  .prep-reviewed strong,
  .page-hero p {
    color: #000 !important;
  }

  .prep-page .page-hero h1 {
    font-size: 1.8rem;
    color: #000;
  }

  .section {
    padding: 0;
  }

  .container,
  .container.narrow {
    width: 100%;
    max-width: none;
  }

  .prep-content,
  .notice,
  .prose,
  .side-panel {
    box-shadow: none;
    border: 0;
    background: #fff;
    padding: 0;
    border-radius: 0;
  }

  .prep-disclaimer {
    margin-bottom: 14px;
    border: 1px solid #bbb;
    background: #fff;
    color: #000;
  }

  .prep-content a {
    color: #000;
    text-decoration: underline;
  }

  .table-wrap {
    overflow: visible;
    border-color: #444;
  }

  .prep-content th {
    background: #eee;
    color: #000;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .prep-content .task-list-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .prep-bob-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .prep-content .task-list-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 0.9rem;
    height: 0.9rem;
    min-width: 0.9rem;
    border: 1.4pt solid #000;
    border-radius: 2px;
    background: #fff;
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

@media (max-width: 760px) {
  .prep-start-here ul {
    flex-direction: column;
  }

  .prep-start-here a {
    width: 100%;
  }

  .prep-print-bar {
    justify-content: stretch;
  }

  .prep-print-button {
    width: 100%;
  }
}

/* Standalone /prep header: brand only, links to /prep/. Three-letter MFP mark. */
.prep-page .prep-brand-mark {
  width: 56px;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

@media (max-width: 760px) {
  .prep-page .prep-brand-mark {
    width: 48px;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
  }

  .prep-page .brand-text strong {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
  }
}
