/* goldstraw.app guides, and the list of guides in the site footer.
   Loads after customer-tokens.css and welcome-v2.css, which set the header,
   footer, buttons, colours and type, so every page looks like the home page.
   Browsers can keep a stylesheet for hours, so a live stylesheet never changes
   in a way that would break a page: a breaking change gets a new file name. */

/* Article: the home page's 1080px column, with text held to about 65 characters a line. */
.guide { display: flow-root; padding-block: 40px 64px; padding-inline: max(var(--site-gutter), calc((100% - var(--site-width)) / 2)); }
.guide > * { max-width: 36rem; }
.guide > * + * { margin-top: 16px; }
.guide p, .guide li { line-height: 1.6; }
.guide li { text-wrap: pretty; }
.guide strong { color: var(--customer-green-deep); font-weight: 700; }

/* Title, standfirst and byline. Headings stay narrow enough that no word
   splits at 320px with 200% text. */
.guide-head h1 { font-size: min(calc(.875rem + 5vw), 2.875rem); font-weight: 700; line-height: 1.08; letter-spacing: -.03em; }
.guide-head .lead { max-width: none; }
@media (min-width: 600px) { .guide-head .keep { white-space: nowrap; } }
.guide-meta { margin-top: 16px; color: var(--customer-muted); font-size: .9375rem; }

/* "In short": the page in three lines. */
.guide .guide-summary { margin-top: 32px; padding: 20px 22px 22px; border-radius: 16px; background: var(--site-wash); }
.guide-summary h2 { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0; }
.guide-summary ul { margin: 8px 0 0; }

/* Body: section headings, lists and the odd sub-heading. */
.guide > h2 { margin-top: 48px; font-size: clamp(1.375rem, 1.2rem + .9vw, 1.75rem); font-weight: 700; letter-spacing: -.02em; }
.guide > h3 { margin-top: 28px; font-size: 1.1875rem; font-weight: 700; letter-spacing: -.01em; }
.guide > h2 + *, .guide > h3 + * { margin-top: 10px; }
.guide ul { margin: 0; padding-left: 1.25em; }
.guide ul > li { padding-left: .25em; }
.guide ul > li + li { margin-top: 8px; }
.guide ul > li::marker { color: var(--customer-green); }

/* Numbered habits use the home page's green step numbers (gold is for the tick only). */
.guide-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.guide-steps > li { position: relative; padding-left: 46px; counter-increment: step; }
.guide-steps > li + li { margin-top: 18px; }
.guide-steps > li::before { content: counter(step); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--customer-green); color: #fff; font-size: 1rem; font-weight: 700; line-height: 1; }

/* The real app, as on the home page, with a short caption. */
.guide .guide-shot { margin: 28px 0 0; }
.guide-shot-frame { display: flex; justify-content: center; padding: 28px 20px 0; overflow: hidden; border-radius: 20px; background: var(--site-panel); }
.guide-shot .phone { width: min(100%, 236px); }
.guide-shot figcaption { margin-top: 10px; color: var(--customer-muted); font-size: .9375rem; line-height: 1.5; }

/* Comparison table. On a phone each row becomes a short block, so nothing
   scrolls sideways; each answer starts with its column name. */
.guide-table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.45; }
.guide-table th, .guide-table td { padding: 12px 10px; border-bottom: 1px solid var(--site-line); text-align: left; vertical-align: top; }
.guide-table thead th { color: var(--customer-green-deep); font-weight: 700; }
.guide-table tbody th { color: var(--customer-green-deep); font-weight: 700; }
.guide-table tr > :first-child { padding-left: 0; }
.guide-table tr > :last-child { padding-right: 0; }
@media (max-width: 639px) {
  .guide-table, .guide-table tbody, .guide-table tr, .guide-table th, .guide-table td { display: block; }
  .guide-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .guide-table tbody tr { padding: 14px 0 16px; border-bottom: 1px solid var(--site-line); }
  .guide-table tbody tr:first-child { border-top: 1px solid var(--site-line); }
  .guide-table th, .guide-table td { padding: 0; border: 0; }
  .guide-table tbody th { margin-bottom: 6px; font-size: 1.0625rem; }
  .guide-table td { padding-block: 3px; }
  .guide-table td::before { content: attr(data-label) ": "; content: attr(data-label) ": " / ""; color: var(--customer-muted); }
}

/* A ready-made list (Christmas, the weekly shop): aisles on a white card, then
   two actions. Plain green dots, not boxes: nothing here can be ticked, and
   gold is for the app's tick only. */
.guide .guide-list { margin-top: 28px; padding: 20px 20px 22px; border: 1px solid var(--site-line); border-radius: 16px; background: var(--customer-card); }
.guide-list h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.guide-list > p { margin-top: 6px; color: var(--customer-muted); }
.guide-list h3 { margin-top: 22px; color: var(--customer-green-deep); font-size: 1.0625rem; font-weight: 700; letter-spacing: 0; }
.guide .guide-list ul { margin: 6px 0 0; padding: 0; list-style: none; columns: 2 13rem; column-gap: 28px; }
.guide .guide-list li { position: relative; padding: 4px 0 4px 20px; break-inside: avoid; line-height: 1.45; }
.guide .guide-list ul > li + li { margin-top: 0; }
.guide-list li::before { content: ""; position: absolute; top: calc(4px + .725em - 3.5px); left: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--customer-green); }
.guide-list-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.guide-list-actions .button { flex: 1 1 13rem; }
.guide-list-actions .button-quiet { border: 2px solid var(--customer-green); background: transparent; color: var(--customer-green); font: inherit; font-size: 1.0625rem; font-weight: 700; cursor: pointer; }
.guide-list-actions .button-quiet:hover { background: var(--customer-soft-green); color: var(--customer-green-deep); }
.guide-list-actions .button[hidden] { display: none; }
.guide-list-status:empty { display: none; }
.guide-list-status { margin-top: 12px; color: var(--customer-green-deep); font-weight: 600; }
.guide .guide-list .guide-list-note { margin-top: 12px; font-size: .9375rem; }

/* Christmas dinner amounts: "How many are eating?" appears once the page's
   script can rewrite the list; without it the list for six stands as it is.
   The line under it says the number and the turkey, and is read out on change. */
.guide-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; }
.guide-picker[hidden] { display: none; }
.guide-picker label { color: var(--customer-green-deep); font-weight: 700; }
.guide-picker select { min-width: 9rem; min-height: 48px; padding: 0 12px; border: 2px solid var(--customer-green); border-radius: 12px; background: var(--customer-card); color: var(--customer-ink); font: inherit; font-size: 1.0625rem; font-weight: 700; cursor: pointer; }
.guide-picker select:focus-visible { outline: 3px solid var(--customer-green-deep); outline-offset: 2px; }
.guide .guide-list > [data-guest-line] { margin-top: 12px; color: var(--customer-ink); font-weight: 600; }
.guide .guide-list .guide-list-sample { margin-top: 4px; font-size: .9375rem; }
.guide-list-sample a { display: inline-block; padding-block: 12px; }

/* Questions, in the home page's style. */
.guide .guide-faq { margin-top: 48px; }
.guide-faq h2 { font-size: clamp(1.375rem, 1.2rem + .9vw, 1.75rem); font-weight: 700; letter-spacing: -.02em; }
.guide-faq .faq-list { margin-top: 20px; gap: 24px; }

/* Try Goldstraw: the home page's button and the line under it. */
.guide .guide-cta { margin-top: 48px; padding: 28px 24px 30px; border-radius: 20px; background: var(--site-panel); }
.guide-cta h2 { font-size: min(calc(1rem + 2.5vw), 2rem); font-weight: 700; letter-spacing: -.025em; }
.guide-cta > p { margin-top: 8px; }
.guide-cta .hero-actions { margin-top: 20px; }
.guide-cta .hero-note { text-wrap: balance; }
.guide-cta .hero-note + .hero-note { margin-top: -6px; }

/* Sources, as small print after the article. */
.guide .guide-sources { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--site-line); color: var(--customer-muted); font-size: .9375rem; }
.guide-sources h2 { color: var(--customer-ink); font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.guide-sources ul { margin-top: 8px; }
.guide-sources li { line-height: 1.5; }
.guide-sources ul > li::marker { color: var(--customer-muted); }

/* Footer list of guides, on every page that links them. */
.site-footer .footer-guides { display: block; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--site-line); }
.footer-guides h2 { color: var(--customer-ink); font-size: .9375rem; font-weight: 700; letter-spacing: 0; line-height: 1.5; }
.footer-guides ul { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; padding: 0; list-style: none; }
/* Guide links sit lighter than the legal links: the regular weight, not a half-weight (Brand Book v2). */
.site-footer .footer-guides a { font-weight: 400; }
.site-footer .footer-guides a[aria-current="page"] { color: var(--customer-ink); text-decoration: none; }

@media (min-width: 640px) {
  .guide .guide-summary { padding: 22px 28px 24px; }
  .guide .guide-cta { padding: 36px 40px 40px; }
  .guide > .guide-table { max-width: 48rem; }
}
@media (min-width: 900px) {
  .guide { padding-block: 56px 88px; }
}
/* Wide screens: the real app sits beside the title, as on the home page,
   and the text keeps one column. Phones see it in the Goldstraw section. */
@media (min-width: 1024px) {
  .guide { display: grid; grid-template-columns: minmax(0, 36rem) 320px; column-gap: 64px; justify-content: space-between; align-items: start; }
  .guide > * { grid-column: 1; }
  .guide > .guide-shot { grid-column: 2; grid-row: 1 / span 2; max-width: none; margin: 6px 0 0; }
  .guide-shot .phone { width: 240px; }
  .guide > .guide-table { grid-column: 1 / -1; max-width: 52rem; }
}

/* "Print the list" (guide-print-v1.js): a page with that button prints its
   list alone, black on white, with a ring to tick on paper. The header,
   footer, buttons, pictures and the rest of the article stay on screen.
   The amounts page prints the list for the number of people chosen, as the
   line above it says. */
@media print {
  body:has([data-print-list]) { background: #fff; }
  body:has([data-print-list]) :is(.skip-link, .site-header, .site-footer) { display: none; }
  .guide:has([data-print-list]) { display: block; padding: 0; }
  .guide:has([data-print-list]) > * { max-width: none; }
  .guide:has([data-print-list]) > :not(.guide-head, .guide-list),
  .guide:has([data-print-list]) .guide-head > :not(h1),
  .guide-list:has([data-print-list]) :is(.guide-picker, .guide-list-actions, .guide-list-status, .guide-list-note, .guide-list-sample) { display: none; }
  .guide:has([data-print-list]) .guide-head h1 { color: #000; font-size: 20pt; }
  .guide .guide-list:has([data-print-list]) { margin-top: 10pt; padding: 0; border: 0; border-radius: 0; background: none; }
  .guide-list:has([data-print-list]) :is(h2, h3, p, li) { color: #000; }
  .guide-list:has([data-print-list]) h2 { font-size: 14pt; }
  .guide-list:has([data-print-list]) h3 { margin-top: 14pt; font-size: 12pt; break-after: avoid; }
  .guide-list:has([data-print-list]) li { font-size: 11pt; }
  .guide-list:has([data-print-list]) li::before { border: 1pt solid #000; background: none; }
}
