/* Page chrome and document layout.
 *
 * A page is a wall: courses of basalt and courses of limestone, full bleed, one
 * material per band. The dark courses carry the chrome and the machinery — the
 * header, the hero, the quote instrument, the footer. The pale courses carry
 * everything anybody has to read.
 *
 * Nothing is separated by a box unless the box is load-bearing. Cards appear
 * twice: the six fleet cards, uniform because the visitor is comparing them,
 * and the three pillars, which hold things that cannot be compared at all.
 */

/* — a course of stone. `.course` is dark; the default course is pale. — */
.course { background: var(--basalt); }

/* — skip link — */
.skip {
  position: absolute; left: var(--space-4); top: -60px; z-index: 90;
  background: var(--color-accent-ink); color: var(--color-on-accent);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius);
  font-size: var(--text-sm); text-decoration: none;
}
.skip:focus { top: var(--space-3); }
.skip { transition: top 0.15s var(--ease-out); }

/* — header — */
.hd {
  position: sticky; top: 0; z-index: 40;
  background: var(--color-bg);
}
.hd__bar {
  max-width: var(--container); margin: 0 auto;
  padding: var(--space-3) var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
}
.hd__mark {
  font-family: var(--font-mono); font-weight: 700;
  letter-spacing: 0.06em; font-size: var(--text-sm);
  text-decoration: none; color: var(--color-ink); white-space: nowrap;
}
.hd__r { color: var(--color-accent); }

.hd__right { display: flex; align-items: center; gap: var(--space-4); }
.hd__tel {
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--color-ink); text-decoration: none; white-space: nowrap;
}
.hd__tel:hover { color: var(--color-accent-ink); }

/* Language as two words, not two flags: a flag is a country and Italian is not
   confined to one. */
.lang { display: inline-flex; gap: var(--space-3); margin: 0; }
.lang__btn {
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--color-muted); text-decoration: none;
  transition: color var(--transition);
}
.lang__btn:hover { color: var(--color-ink); }
.lang__btn[aria-current="true"] { color: var(--color-ink); font-weight: 500; }

.hd__nav { border-top: 1px solid var(--color-rule); }
.hd__scroll {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; gap: var(--space-6);
  overflow-x: auto; scrollbar-width: none;
}
.hd__scroll::-webkit-scrollbar { display: none; }
.hd__scroll a {
  text-decoration: none; white-space: nowrap;
  font-size: var(--text-sm); color: var(--color-muted);
  padding: var(--space-3) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.hd__scroll a:hover { color: var(--color-ink); }
.hd__scroll a[aria-current="page"] { color: var(--color-ink); font-weight: 500; border-bottom-color: var(--color-accent); }

/* — the courses of the home page — */
.sec-hero { padding: 0; }
.sec-trust { padding: var(--space-7) 0; }
.sec-trust .trust { border-top: 0; }
/* the instrument's own course, on /preventivo/ */
.inst-band { padding: var(--space-8) 0 var(--space-9); }
.doc--after-band { padding-top: var(--space-9); }

/* — the shell — */
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* — a stacked section. One job each, 88px apart, and every other one may take
     the surface step to separate itself without drawing a box. — */
.sec { padding: var(--space-9) 0; border-top: 1px solid var(--color-rule); }
.sec:first-child { border-top: 0; }
/* A band supplies its own separation by being a different stone. */
.sec.on-basalt, .on-basalt .sec, .sec.on-basalt + .sec { border-top: 0; }
.sec__head { margin-bottom: var(--space-6); }
.sec__head h2 { margin: var(--space-2) 0 0; }
.sec__head .lead { margin-top: var(--space-3); }
.sec__more { margin-top: var(--space-6); }


/* — document pages —
     The closing padding matters: the last block on a document page runs into the
     dark footer course without it, and the two stones need a gap between them. */
.doc { max-width: var(--measure); padding: var(--space-8) 0 var(--space-9); }
.doc--wide { max-width: none; }
.doc--legal { max-width: 64ch; }
.doc__head { margin-bottom: var(--space-8); }
.doc__head h1 { margin: var(--space-3) 0 0; }
.doc__head .lead { margin-top: var(--space-4); }
.doc__s { margin-bottom: var(--space-8); max-width: var(--measure); }
.doc__s:last-child { margin-bottom: 0; }
.doc__s h2 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.doc__s h3 { margin: var(--space-5) 0 var(--space-2); }
.doc__cta { display: flex; gap: var(--space-3); flex-wrap: wrap; margin: var(--space-8) 0 0; }
.doc > *:last-child { margin-bottom: 0; }

.note {
  font-size: var(--text-sm); line-height: 1.6; color: var(--color-muted);
  border-left: 2px solid var(--color-accent); padding-left: var(--space-4);
  margin: var(--space-5) 0 0;
}
.fiction {
  font-size: var(--text-sm); line-height: 1.6; color: var(--color-ink);
  background: var(--color-accent-wash);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5); margin: var(--space-5) 0 0;
}
.addr { font-size: var(--text-sm); color: var(--color-muted); }
.addr a { color: var(--color-accent-ink); text-decoration: none; }
.addr a:hover { text-decoration: underline; }

.doc__s--wide { max-width: none; }

/* — two columns where the second one is genuinely secondary — */
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-8); align-items: start; }
.two h3 { margin-bottom: var(--space-4); }

/* — the home fleet preview: same frame six times, because the visitor is
     comparing them and a varied grid would only make that harder — */
.preview { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.pv { border: 1px solid var(--color-rule); border-radius: var(--radius); overflow: hidden; }
.pv__fig { background: var(--color-raised); padding: var(--space-4); color: var(--color-accent); aspect-ratio: 5 / 2; display: grid; place-items: center; }
.pv__n { margin: 0; padding: var(--space-4); display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); font-size: var(--text-sm); font-weight: 500; }
.pv__r { color: var(--color-accent-ink); font-size: var(--text-sm); }

.qa-list { border-top: 1px solid var(--color-rule); }

/* — the trust strip: the answers to "is this a real place", in the first
     screen, as a plain row rather than as three cards. — */
.trust {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--color-rule);
  border-bottom: 1px solid var(--color-rule);
}
.trust div { min-width: 0; }
.trust dt { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); margin-bottom: var(--space-2); }
.trust dd { margin: 0; font-size: var(--text-sm); line-height: 1.5; }
.trust dd a { color: var(--color-ink); text-decoration: none; }
.trust dd a:hover { color: var(--color-accent-ink); }
.trust b { font-weight: 500; }

/* — pillars: three things that are not comparable, so a card is honest here — */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.pillar { background: var(--color-raised); border: 1px solid var(--color-rule); border-radius: var(--radius); padding: var(--space-5); }
.pillar h3 { margin: var(--space-3) 0 var(--space-2); }
.pillar p { margin: 0; font-size: var(--text-sm); color: var(--color-muted); }
.pillar__n { font-family: var(--font-mono); font-size: var(--text-2xl); font-weight: 500; color: var(--color-accent); line-height: 1; }

/* — tables — */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--text-sm); margin: var(--space-4) 0; }
.tbl th, .tbl td { text-align: left; padding: var(--space-3) var(--space-4) var(--space-3) 0; border-bottom: 1px solid var(--color-rule); vertical-align: top; }
.tbl thead th { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); font-weight: 500; }
.tbl tbody th { font-weight: 500; }
.tbl td.mono { color: var(--color-muted); }
.tbl-scroll { overflow-x: auto; }
.tbl-scroll .tbl { min-width: 520px; }

/* — questions — */
.qa { border-bottom: 1px solid var(--color-rule); }
.qa summary {
  cursor: pointer; list-style: none; padding: var(--space-4) 0;
  font-size: var(--text-base); font-weight: 500;
  display: flex; gap: var(--space-4); align-items: baseline;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before { content: '+'; font-family: var(--font-mono); color: var(--color-accent-ink); flex: none; }
.qa[open] summary::before { content: '−'; }
.qa p { margin: 0 0 var(--space-4) var(--space-5); color: var(--color-muted); max-width: 62ch; }

/* — contact: form-less, two columns, real address on one side — */
.ct { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-6); }
.ct__card { border: 1px solid var(--color-rule); border-radius: var(--radius); padding: var(--space-5); }
.ct__big { font-size: var(--text-lg); margin: var(--space-2) 0 var(--space-3); word-break: break-word; }
.ct__big a { color: var(--color-accent-ink); text-decoration: none; }
.ct__big a:hover { text-decoration: underline; }
.ct__card p, .ct__desk p { font-size: var(--text-sm); color: var(--color-muted); }
.ct__desk h3 { margin-bottom: var(--space-2); }

/* — desks — */
.desks { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.desk { border-top: 2px solid var(--color-ink); padding-top: var(--space-4); }
.desk h3 { margin-bottom: var(--space-2); }
.desk p { font-size: var(--text-sm); color: var(--color-muted); margin: 0 0 var(--space-2); }

/* — 404 — */
.nf__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 var(--space-6); }
.nf__list a { font-size: var(--text-sm); color: var(--color-ink); text-decoration: none; display: block; padding: var(--space-3) 0; border-bottom: 1px solid var(--color-rule); }
.nf__list a:hover { color: var(--color-accent-ink); }

/* — footer — */
.ft { background: var(--basalt); margin-top: 0; }
.ft__grid { max-width: var(--container); margin: 0 auto; padding: var(--space-8) var(--gutter); display: grid; grid-template-columns: 1.1fr 2fr; gap: var(--space-8); }
.ft__mark { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.06em; font-size: var(--text-sm); margin: 0 0 var(--space-3); }
.ft__tag { font-size: var(--text-sm); color: var(--color-muted); max-width: 32ch; }
.ft__desk { font-size: var(--text-sm); margin: 0 0 var(--space-3); line-height: 1.5; }
.ft__desk .mono { font-size: var(--text-xs); color: var(--color-muted); }
.ft__reach { font-size: var(--text-sm); line-height: 1.8; }
.ft__reach a { color: var(--color-accent-ink); text-decoration: none; }
.ft__reach a:hover { text-decoration: underline; }
.ft__map { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.ft__h { margin: 0 0 var(--space-3); }
.ft__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.ft__list a { font-size: var(--text-sm); color: var(--color-muted); text-decoration: none; }
.ft__list a:hover { color: var(--color-ink); }
.ft__list a[aria-current="page"] { color: var(--color-ink); font-weight: 500; }
.ft__base {
  max-width: var(--container); margin: 0 auto;
  border-top: 1px solid var(--color-rule); padding: var(--space-4) var(--gutter) var(--space-6);
  display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
  font-size: var(--text-xs); color: var(--color-muted);
}
.ft__base a { color: var(--color-muted); }

@media (max-width: 900px) {
  :root { --gutter: var(--space-5); }
  .two { grid-template-columns: 1fr; gap: var(--space-6); }
  .preview { grid-template-columns: repeat(2, 1fr); }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .pillars, .desks { grid-template-columns: 1fr; }
  .ft__grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .sec { padding: var(--space-8) 0; }
}
/* A grid child keeps `min-width: auto`, so it refuses to shrink below its own
   content. The fare table declares `min-width: 520px`, so the column grew to 520
   and took the document with it: the whole page could be dragged sideways on a
   phone, and `.tbl-scroll`'s `overflow-x` never got the chance to engage. */
.two > * { min-width: 0; }

@media (max-width: 560px) {
  :root { --gutter: var(--space-4); }
  /* The bar is one row down to 561px. Below that the number and the two language
     links no longer fit beside the wordmark, so let them fall to a second line. */
  .hd__bar { flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
  .hd__right { flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
  .preview { grid-template-columns: 1fr; }
  .ft__map { grid-template-columns: repeat(2, 1fr); }
  .trust { grid-template-columns: 1fr; gap: var(--space-4); }
}
