/* Paper (decision 203). Loaded with media="print" on every page built on base.html, after
   site.css and design.css. The colors are not here: anthracite.css re-points the --ap-* tokens
   to the paper values inside its own @media print block, so every rule that reads them turns
   light by itself. This sheet only hides what a printed page cannot use (navigation, buttons,
   forms, the share controls, the Studio band), opens what is folded (the questions), keeps
   pictures, rows and headings whole across pages, and shows the small print footer
   (partials/_print_foot.html). Reads only the --ap-* tokens, like the other sheets. */

@page { size: letter; margin: 0.6in 0.6in 0.7in; }

/* ---------------------------------------------------------------- the ground */
html, body { background: var(--ap-ground); color: var(--ap-text); }
body { font-size: 11pt; line-height: 1.45; }
.wrap { max-width: none; padding-left: 0; padding-right: 0; }
.section, .section--hero { padding-top: 0; padding-bottom: 22pt; gap: 12pt; }
.section + .section:not(.section--hero) { padding-top: 0; }
.band, .panel, .lead-hero, .jumpbar, .notice, .kind { background: transparent; }
.lead-hero--facts { box-shadow: none; clip-path: none; }
.panel { padding: 0; }

/* Links print as text. The few addresses worth keeping are written out by the page itself. */
a, a:visited { color: inherit; text-decoration: none; }
.addon__title a { border-bottom: 0; }

/* ---------------------------------------------------------------- what a page on paper cannot use */
.skip-link, .topbar, .mainnav, .mainbar__actions, .menu-toggle, .subnav, .jumpbar,
.site-footer, .crumbs, .btn, .actions, form, .inline-form, .copy-row, [data-copy-done],
.more-link, .pcard__more, .jump, .no-print, .notice[role="status"], .hp,
.studio-root, .studio-bar, .studio-fallback, .studio-loading {
  display: none !important;
}
.print-only { display: block !important; }
span.print-only { display: inline !important; }

/* The header: the mark and the name only, in line gray and ink. */
.site-header { background: transparent; border: 0; }
.mainbar { min-height: 0; padding: 0 0 14pt; margin-bottom: 18pt; border-bottom: 1px solid var(--ap-line); }
.brand { gap: 10px; }
.mark { width: 22px; height: 37px; }
.mark__top, .mark__body { fill: var(--ap-brand); }
.brand__name { font-size: 13pt; }

/* ---------------------------------------------------------------- type on paper */
.display, .h1, .h1--home { font-size: 26pt; max-width: none; }
.lead-hero .h1, .lead-hero--home .display { font-size: 26pt; }
.h2 { font-size: 17pt; }
.h2--small, .statement { font-size: 14pt; }
.h3, .pcard__title, .prj-card__title, .offer__name, .also__name { font-size: 12.5pt; }
.feature__title, .addon__title, .step__title, .nstep__title { font-size: 11pt; }
.lead, .lead-s, .post-body, .answer { font-size: 11pt; max-width: none; }
.small, .meta, .hint, .pic__cap, .eyebrow, .kv__row, .glance dt, .tile__k { font-size: 9.5pt; }
.glance dd, .tile__v, .fee__v { font-size: 14pt; }
.nstep__n, .kind__n, .step__n { font-size: 16pt; }
.eyebrow::before { border-top-width: 1px; }

/* Headings never end a page; rows, tables, figures and pictures are never split. */
h1, h2, h3, h4, .h1, .h2, .h3, .display, .statement, .eyebrow, .feature__title, .section-head, .section-head--row,
.group-title, .faq-group__title {
  break-after: avoid; page-break-after: avoid;
}
.section-head { break-inside: avoid; page-break-inside: avoid; }
p, li { orphans: 3; widows: 3; }
figure, .pic, img, table, tr, .kv__row, .glance__row, .hero-facts__row, .plain-list li, .ticks li,
.feature, .nstep, .offer, .kind, .addon, .qa, .prj-card, .pcard, .tile, .step, .checks, .notice {
  break-inside: avoid; page-break-inside: avoid;
}

/* ---------------------------------------------------------------- pictures */
.pics-ease .pic img[loading="lazy"] { opacity: 1 !important; transition: none; }
.pic img, .photo { max-height: 3.2in; background: transparent; outline: 0; }
.pic--natural img { width: auto; max-width: 100%; max-height: 4in; }
.lead-hero__media img, .lead-hero--pic .lead-hero__media img,
.lead-hero--home.lead-hero--pic .lead-hero__media img { height: auto; max-height: 4.2in; aspect-ratio: 3 / 2; }

/* Wide grids become two or three columns at most on a letter page. */
.lead-hero, .lead-hero--pic, .lead-hero--home.lead-hero--pic, .lead-hero--facts {
  display: flex; flex-direction: column; gap: 12pt; padding-bottom: 18pt;
}
.lead-hero--pic .lead-hero__media { order: 0; }
.lead-hero__text, .lead-hero--pic .lead-hero__text, .lead-hero--home .lead-hero__head,
.lead-hero--home.lead-hero--pic .lead-hero__text, .lead-hero--facts .lead-hero__text,
.lead-hero__glance, .lead-hero--facts .lead-hero__glance,
.lead-hero:not(.lead-hero--pic) .lead-hero__text { padding: 0; gap: 10pt; max-width: none; }
.lead-hero--home .lead-hero__head { order: -1; }
.lead-hero__media .pic__cap { padding: 4pt 0 0; text-align: left; }
.showcase, .showcase--pic, .closing, .closing--pic, .duo, .project-body,
.showcase--how, .showcase--flip, .showcase--group, .lead-hero--facts {
  grid-template-columns: minmax(0, 1fr); gap: 14pt;
}
.showcase--how .showcase__media { position: static; }
.showcase:not(.showcase--pic) > .showcase__text { display: flex; flex-direction: column; gap: 12pt; }
.pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18pt 16pt; }
.pcard, .pcard--3, .pcard--4, .pcard--6 { grid-column: auto; gap: 8pt; }
.pcard .pic img { max-height: 2.2in; }
.prj-cards, .prj-cards.prj-cards--solo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18pt 16pt; }
.prj-cards--solo .prj-card { display: flex; }
.prj-card .pic img { max-height: 2.2in; }
/* Steps in rows that may run on to the next page (a grid is moved whole by Chromium when it does not fit). */
.nsteps, .nsteps--seven { display: flex; flex-wrap: wrap; gap: 14pt 16pt; }
.nsteps > li { flex: 0 0 calc((100% - 32pt) / 3); }
.features, .features--two, .showcase:not(.showcase--pic) .features, .grid--features, .kinds, .addons,
.grid--cards, .grid--tiles, .also__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12pt 16pt; }
.gallery-row { flex-direction: row; flex-wrap: wrap; gap: 10pt; }
.gallery-row .pic img { max-height: 2.4in; }
.gallery-grid, .gallery-grid--3, .gallery-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10pt; }
/* One portrait picture stays beside its few lines, as on a screen. */
.project-portrait { grid-template-columns: 2.8in minmax(0, 1fr); gap: 18pt; align-items: start; }
.project-portrait__media .pic { max-width: 2.8in; }
.project-portrait__media .pic img { max-height: 3.8in; }
.project-lead .pic img { max-height: 4.2in; }

/* The Studio picture beside its text, and the Studio itself, are for the screen. */
.studio-slot { display: none; }

/* ---------------------------------------------------------------- questions: every answer open */
details.qa::details-content { content-visibility: visible; display: block; }
.qa summary { min-height: 0; padding: 6pt 0 2pt; font-size: 11pt; }
.qa summary::before, .qa[open] summary::before { content: none; }
.qa__a { padding: 0 0 8pt; font-size: 10pt; max-width: none; }
.faq-group { display: block; padding: 12pt 0; }
.faq-group__title { margin-bottom: 6pt; }
.faq-group__title { font-size: 13pt; }

/* ---------------------------------------------------------------- tables and rows */
.kv__row { padding: 6pt 0; gap: 2pt 14pt; }
.kv__row dt { flex: 0 0 1.6in; }
.kv__row dd { flex: 1 1 3in; }
.table th, .table td { padding: 5pt 10pt 5pt 0; }

/* ---------------------------------------------------------------- the small footer line on every page */
.print-foot {
  display: block !important; margin-top: 22pt; padding-top: 8pt; border-top: 1px solid var(--ap-line);
  font-size: 8.5pt; line-height: 1.4; color: var(--ap-text-muted);
  break-inside: avoid; page-break-inside: avoid;
}
.print-foot__line { overflow-wrap: anywhere; }
.print-foot__private { margin-top: 2pt; }

/* ---------------------------------------------------------------- the saved design page and the shared view
   On paper: the name, "Your pergola design", the reference, the version and date, the picture,
   "What you designed", "Atlas will check", the versions, then the links (the share link written
   out) and the footer with the page's own address. Not the owner's photos (their yard): one line
   says how many were sent. Not the email form, the share switches or the site visit offer. */
.saved-head { padding-bottom: 14pt; gap: 6pt; }
.saved { display: flex; flex-direction: column; align-items: stretch; gap: 16pt; padding-bottom: 0; }
.saved__main { display: contents; }
.saved__picture { order: 1; }
.saved__side { order: 2; gap: 12pt; }
.saved__block--versions { order: 3; }
.saved__print-links { order: 4; }
.saved__block--links, .saved__visit, .saved__lost, .saved__photos, .saved__phone, #send { display: none !important; }
.design-picture { max-height: 4.6in; width: 100%; object-fit: contain; aspect-ratio: auto; background: transparent; }
.design-picture--none { border: 1px solid var(--ap-line); aspect-ratio: auto; min-height: 0; padding: 14pt; }
.saved__side .kv__row dt { flex-basis: 1.6in; }
.checks li, .versions li { font-size: 10pt; }
.versions a { display: none; }
.notice, .notice--panel { border: 1px solid var(--ap-line); border-left: 3px solid var(--ap-text); padding: 8pt 10pt; max-width: none; }
.gone-note { color: var(--ap-text-muted); }
.saved__print-links .kv__row dd { overflow-wrap: anywhere; }
.shared-about { order: 5; }
