/* Additions to the approved prototype stylesheet (styles.css, copied unchanged). */

/* Progressive enhancement: data-js is for script-only controls, data-nojs for fallbacks. */
html:not(.js) [data-js] { display: none !important; }
html.js [data-nojs] { display: none !important; }

.sample-banner { background: #fff3c4; color: #4a3b00; border-bottom: 1px solid #e3cd7b; font-size: .88rem; text-align: center; }
.sample-banner .wrap { padding-block: 8px; }
.sample-tag { font: 700 .66rem/1 "Courier New", monospace; letter-spacing: .08em; text-transform: uppercase; color: #6b5200; background: #fff3c4; border: 1px solid #e3cd7b; border-radius: 3px; padding: 2px 5px; }

/* Links that took over from prototype buttons. */
.skip { color: inherit; }
.filters { align-items: stretch; }
.filters button { background: none; }
.row-copy h3 a, .edit-grid h3 a, .lead-copy h2 a { font: inherit; letter-spacing: inherit; text-decoration: none; color: inherit; }
.row-copy h3 a:hover, .edit-grid h3 a:hover { color: var(--accent); }
.edit-grid h3 a:hover { text-decoration: underline; }
a.button, a.text-button { text-decoration: none; }
a.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.package-strip a { border: 1px solid #afc4b3; border-radius: 4px; background: #fbfdf7; font-size: .87rem; font-weight: 700; padding: 8px 12px; text-decoration: none; }
.package-strip a:hover { background: #eef6ea; }
.facility-link { text-decoration: none; }
.sidebar .text-button, .local-file .text-button { display: inline-block; }
.mobile-watch { text-decoration: none; }
.cover-tools .button { text-decoration: none; }

/* No-script fallback and enhanced states for the feed controls. */
.feed-controls { margin: 0; }
.apply-filter { min-height: 34px; padding: 5px 12px; }
.clear-filters { margin-left: 8px; }
.feed-status { padding-top: 10px; }
.feed-status:empty { display: none; }
.more-rows summary { list-style: none; cursor: pointer; margin-top: 13px; }
.more-rows summary::-webkit-details-marker { display: none; }
.follow-nojs { margin-top: 10px; }

/* Package checks show inline without script; with script they open in the drawer. */
.package-checks { margin: 18px 0 8px; display: grid; gap: 14px; }
.package-check { border: 1px solid #d0dbc7; border-radius: 4px; padding: 16px; background: #fff; }
.package-check h2 { font: 700 1.5rem/1.15 var(--serif); letter-spacing: -.03em; margin-bottom: 6px; }
.package-check p { color: var(--muted); line-height: 1.48; }
.package-check .pack-grid, .package-check .location-note, .package-check .drawer-actions { margin-top: 10px; }
.package-check .pack ul { padding-left: 16px; margin: 4px 0 0; }
html.js .package-checks { display: none; }

/* Cover without a photo of its own. */
.cover-photo-plain { background: #45213c; }

/* Images that illustrate rather than identify the package are labeled. */
.row-media-wrap { position: relative; display: block; width: 78px; }
.row-media-wrap .row-media { display: block; }
.illus-tag { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: .58rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #10251dcc; border-radius: 0 0 6px 6px; padding: 2px 0; }
.illus-note { display: block; margin-top: 3px; color: var(--muted); font-size: .72rem; }
.support-tile { width: 100%; aspect-ratio: 1; border-radius: 3px; background: #e0efe3; color: #22684f; display: grid; place-items: center; }
.support-tile [data-icon] { width: 32px; height: 32px; }

.record-facts dd { overflow-wrap: anywhere; }
.drawer-content .sample-tag { vertical-align: middle; }
.drawer-content .save-file { float: right; }

.narrow-page { max-width: 640px; padding-block: 40px 60px; }
.narrow-page h1 { font: 700 clamp(2rem, 5vw, 2.9rem)/1.05 var(--serif); letter-spacing: -.05em; margin-bottom: 12px; }
.narrow-page p { color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.narrow-page .dialog-form { margin-block: 16px 20px; }
.dialog-form input:not([type="radio"]) { width: 100%; border: 1px solid #c5dace; border-radius: 6px; padding: 9px 10px; background: white; }
.dialog-form { display: grid; gap: 6px; margin-top: 13px; }
.dialog-form label, .dialog-form legend { font-size: .86rem; font-weight: 760; }
.dialog-form .button { justify-self: start; margin-top: 4px; }
.dialog-form fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 8px; }
.dialog-form fieldset label { display: block; margin: 3px 0; font-weight: 640; }

@media (max-width: 480px) {
  .sample-banner { font-size: .8rem; }
}
.cover-sample { margin-left: 10px; background: transparent; color: #fff3c4; border-color: #fff3c4; }
@media (max-width: 950px) { .row-media-wrap { width: 69px; } }
@media (max-width: 540px) { .support-tile, .illus-note { display: none; } }
@media (max-width: 1050px) and (min-width: 731px) { .support-tile { display: none; } }

/* Full case, package and facility pages: the drawer design as a page. */
.page-main { padding-block: 22px 56px; }
.case-page { max-width: 780px; margin-inline: auto; padding: 0; background: transparent; }
.case-page h1 { font: 700 clamp(2.1rem, 5.5vw, 3.2rem)/1.05 var(--serif); letter-spacing: -.05em; margin: 12px 0 10px; }
.case-page h2 { font: 700 1.5rem/1.16 var(--serif); letter-spacing: -.02em; margin: 26px 0 7px; }
.case-page h3 { font: 700 1.2rem/1.16 var(--serif); margin: 16px 0 4px; }
.case-page .lede { font-size: 1.12rem; color: var(--ink); line-height: 1.5; }
.case-page .kind-note { font-size: .88rem; border-left: 3px solid #78ad94; padding-left: 10px; margin: 12px 0; }
.case-page .crumbs { margin-bottom: 8px; }
.kind-chip { font-weight: 800; font-size: .72rem; line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--green); border-radius: 4px; padding: 5px 7px; }
.case-figure { margin: 14px 0; }
.case-figure img { display: block; width: min(320px, 100%); border-radius: 6px; border: 1px solid var(--line); }
.case-figure figcaption { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.pack-label { font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin-right: 4px; }
.brand-block { margin-top: 6px; }
.brand-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.brand-switch .strip-link { border: 1px solid #afc4b3; border-radius: 4px; background: #fbfdf7; font-size: .87rem; font-weight: 700; padding: 8px 12px; text-decoration: none; color: var(--ink); }
.brand-switch .strip-link[aria-current="page"] { background: var(--green); color: #fff; border-color: var(--green); }
.dist-list { list-style: none; padding: 0; margin: 8px 0; border-top: 1px solid var(--line); }
.dist-row { display: grid; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.dist-row span { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.section-note, .speaker, .as-of { font-size: .86rem; color: var(--muted); }
.speaker { display: block; }
.as-of { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.case-page .timeline a { font-size: .85rem; margin-left: 4px; }
.fac-timeline li { margin-bottom: 6px; }
.fac-timeline li > span { display: block; }
.fac-links small { color: var(--muted); }
.case-page .record-facts dd a { color: var(--accent); }
@media (max-width: 540px) { .page-main { padding-block: 14px 40px; } .case-page .record-facts { grid-template-columns: 1fr; } }
/* Search and archive pages */
.list-page { padding-block: 28px 56px; max-width: 820px; }
.list-page h1 { font: 700 clamp(1.9rem, 4vw, 2.6rem)/1.1 var(--serif); letter-spacing: -.03em; margin: 6px 0 10px; }
.list-page .intro { color: #41594f; max-width: 62ch; margin-bottom: 18px; }
.search-form { display: grid; gap: 6px; margin: 14px 0 12px; }
.search-form label { font-size: .86rem; font-weight: 760; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; border: 1px solid #c5dace; border-radius: 6px; padding: 11px 12px; background: #fff; font-size: 1rem; }
.search-row .button { display: inline-flex; align-items: center; gap: 6px; }
.search-row .button [data-icon] { width: 16px; height: 16px; }
.result-count { color: #52665c; font-size: .88rem; font-weight: 650; margin: 8px 0; }
.result { border-top: 1px solid var(--line, #d7e3d9); padding: 16px 0; }
.result h3 { font: 700 1.3rem/1.2 var(--serif); letter-spacing: -.02em; margin: 8px 0 6px; }
.result h3 a { color: inherit; text-decoration: none; }
.result h3 a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.result p { color: #33463d; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.match-tag { font: 700 .7rem/1 "Courier New", monospace; color: #1b6243; background: #e4f7ec; border-radius: 3px; padding: 3px 6px; }
.empty-state { border: 1px dashed #afc4b3; border-radius: 6px; padding: 20px; background: #fbfdf7; margin: 14px 0; }
.empty-state h2 { font: 700 1.4rem/1.2 var(--serif); margin-bottom: 6px; }
.tip, .store-hits, .browse-links { color: #52665c; font-size: .9rem; margin-top: 16px; }
.browse-links { border-top: 1px solid var(--line, #d7e3d9); padding-top: 14px; margin-top: 28px; }
.list-page a:not(.button) { color: var(--accent); }
.index-list { list-style: none; padding: 0; columns: 2 240px; column-gap: 28px; }
.index-list li { padding: 7px 0; border-bottom: 1px solid var(--line, #d7e3d9); break-inside: avoid; }
.index-list small { color: #52665c; margin-left: 6px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.pager-note { color: #52665c; font-size: .88rem; }
.pager .button { text-decoration: none; }

/* Watchlist, saved files, corrections, about. */
.watch-page h1, .about-page h1 { font: 700 clamp(2rem, 5vw, 2.9rem)/1.05 var(--serif); letter-spacing: -.05em; margin: 6px 0 10px; }
.watch-page .lede { max-width: 62ch; color: var(--muted); line-height: 1.5; margin-bottom: 16px; }
.watch-form { display: grid; gap: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 16px; margin-bottom: 22px; }
.watch-form .field { display: grid; gap: 6px; max-width: 360px; }
.watch-form select { width: 100%; min-height: 40px; border: 1px solid #c5dace; border-radius: 6px; padding: 8px 10px; background: #fff; font: inherit; }
.store-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.store-fieldset legend { font-weight: 760; font-size: .88rem; padding: 0; margin-bottom: 4px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; }
.check-grid label { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: .94rem; cursor: pointer; }
.check-grid input { width: 20px; height: 20px; accent-color: var(--accent); }
.watch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.group-note { color: var(--muted); font-size: .9rem; line-height: 1.45; margin: 4px 0 8px; }
.watch-group { margin-top: 26px; }
.watch-group h2 { font: 700 1.55rem/1.15 var(--serif); letter-spacing: -.03em; display: flex; align-items: center; gap: 10px; }
.watch-group .count { font: 700 .78rem/1 "Courier New", monospace; background: var(--lime); color: var(--forest); border-radius: 999px; padding: 4px 8px; }
.watch-why { font-size: .9rem; color: var(--ink); margin-top: 6px; }
.watch-evidence { font-size: .84rem; color: var(--muted); margin-top: 4px; }
.watch-results .empty { margin: 14px 0; }
.report-link { border-top: 0; margin-top: 6px; padding-top: 0; }
.field-error { color: #8a1c1c; font-weight: 650; font-size: .88rem; }
.dialog-form textarea { width: 100%; border: 1px solid #c5dace; border-radius: 6px; padding: 9px 10px; background: #fff; font: inherit; line-height: 1.45; resize: vertical; }
.dialog-form .optional { font-weight: 500; color: var(--muted); }
.dialog-form label { margin-top: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.small-print { font-size: .86rem; }
.ref { font-size: 1.15rem; color: var(--ink) !important; }
.about-page h2 { font: 700 1.5rem/1.2 var(--serif); letter-spacing: -.03em; margin: 26px 0 6px; }
.about-page p, .about-page li { line-height: 1.55; color: var(--ink); }
.about-page ul { padding-left: 1.2em; margin: 8px 0; }
.about-page .lede { font-size: 1.12rem; }
.mobile-watch { font-weight: 760; }
@media (max-width: 730px) {
  .mobile-watch { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; border: 1px solid var(--accent); border-radius: 6px; color: var(--accent); }
  .watch-form { padding: 12px; }
  .nav-actions { gap: 6px; }
  .mobile-watch { padding: 0 8px; white-space: nowrap; }
  .nav-actions .nav-sub { padding-inline: 10px; white-space: nowrap; font-size: .83rem; }
  .nav-actions .nav-sub svg { display: none; }
}
/* Narrow phones: brand + Watchlist + search + Get alerts must fit without sideways scroll. */
@media (max-width: 430px) {
  .nav-layout { gap: 8px; }
  .brand { font-size: 1.12rem; letter-spacing: -.05em; }
  .brand-mark { width: 26px; height: 26px; margin-right: 6px; }
  .brand-mark svg { width: 17px; height: 17px; }
  .nav-actions { gap: 4px; }
  .mobile-watch { padding: 0 7px; min-height: 36px; }
  .nav-actions .nav-sub { padding-inline: 8px; min-height: 36px; }
}
/* Email sign-up and manage pages */
.dialog-form select { width: 100%; border: 1px solid #c5dace; border-radius: 6px; padding: 9px 10px; background: white; min-height: 42px; }
.dialog-form .check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 12px; }
.dialog-form .check-grid label { display: flex; align-items: center; gap: 6px; min-height: 36px; }
.dialog-form fieldset label { cursor: pointer; }
.narrow-page .field-help { font-size: .84rem; margin: 6px 0 0; }
.form-error { color: #8f1f2b; background: #fdecee; border: 1px solid #f0b8be; border-radius: 6px; padding: 9px 12px; font-weight: 650; }
.form-ok { color: #164438; background: #e8f5ea; border: 1px solid #b8dcc2; border-radius: 6px; padding: 9px 12px; font-weight: 650; }
.dialog-form input[type="checkbox"], .dialog-form input[type="radio"] { width: auto; flex: none; margin: 0; }
.dialog-form .check-grid label { justify-content: flex-start; text-align: left; }
/* A cover story with no photo from the notice uses the full width. */
.cover-story.cover-no-photo { grid-template-columns: 1fr; }
.cover-story.cover-no-photo h1 { max-width: 22ch; }
