/* Italia Centrale: warm-ivory business-report identity.
   Structure: masthead -> per section (briefing index, then stories) -> footer.
   No cards, no boxes: hairline rules between items only. */

:root {
  --ivory: #faf6f0;
  --ink: #221f1a;
  --ink-soft: #5d574d;
  --hairline: rgba(34, 31, 26, 0.17);
  --gold: #c9a961;

  --navy: #1e3a5f;
  --copper: #b5651d;
  --teal: #3d7068;

  /* Copper darkened just enough to reach AA (4.5:1) for small text on ivory. */
  --copper-ink: #9a5518;

  --font-head: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-logo: "Gloock", "Bodoni 72", "Didot", Georgia, serif;

  --gutter: max(1rem, env(safe-area-inset-left));
  --column: 44rem;
  --logo-green: #164a28;
  --logo-red: #9c1312;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-reading {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.sec-politica {
  --accent: var(--navy);
  --accent-ink: var(--navy);
}
.sec-business {
  --accent: var(--copper);
  --accent-ink: var(--copper-ink);
}
.sec-finanza {
  --accent: var(--teal);
  --accent-ink: var(--teal);
}

.wrap {
  width: 100%;
  max-width: var(--column);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------------ masthead */

.masthead {
  position: relative;
  padding: calc(2.25rem + env(safe-area-inset-top)) 0 0.5rem;
  isolation: isolate;
}

/* Fine-line paper texture, header only, fading out toward the content. */
.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(90, 64, 20, 0.045) 0 1px, transparent 1px 5px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.1 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}

.logo {
  margin: 0;
  display: flex;
  justify-content: center;
}

/* One logo unit is 1/1170 of the stage width, so the whole composition scales together.
   Word size, stretch and offsets were fitted to the ink boxes measured on logo.png
   (see tests/fit_masthead.py). */
.logo-stage {
  --stage: min(100vw - 2rem, 30rem);
  --u: calc(var(--stage) / 1170);
  position: relative;
  display: block;
  flex: none;
  width: var(--stage);
  height: calc(620 * var(--u));
  font-family: var(--font-logo);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.logo-ribbon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.logo-word {
  position: absolute;
  display: block;
  transform-origin: 0 0;
  letter-spacing: -0.035em;
  -webkit-text-stroke: calc(4 * var(--u)) currentColor;
  paint-order: stroke fill;
}

.logo-italia {
  left: calc(105 * var(--u));
  top: calc(-6 * var(--u));
  font-size: calc(395.3 * var(--u));
  transform: scaleX(0.962);
  color: var(--logo-green);
  background: linear-gradient(to bottom, #1c5a30 0%, #174b29 45%, #113a1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-centrale {
  letter-spacing: -0.075em;
  left: calc(421 * var(--u));
  top: calc(333 * var(--u));
  font-size: calc(311.6 * var(--u));
  transform: scaleX(0.669);
  color: var(--logo-red);
  background: linear-gradient(to bottom, #a31413 0%, #9c1211 55%, #930f0e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  margin: 1.4rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.intro {
  margin: 1.5rem auto 0;
  max-width: 34rem;
  font-family: var(--font-head);
  font-size: 1.16rem;
  line-height: 1.6;
  text-align: center;
  text-wrap: pretty;
  color: #2c2822;
}

.jump {
  margin: 1.9rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.6rem;
}

.jump a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent-ink);
}

.jump a span {
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 0;
  font-weight: 500;
}

.jump a:hover {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

/* --------------------------------------------------------------- gold accent */

/* Used only at section transitions: a hairline with a short heavier brass centre. */
.gold-rule {
  position: relative;
  height: 3px;
  margin: 2.6rem 0 0;
}

.gold-rule::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 1px;
  height: 1px;
  background: var(--gold);
  opacity: 0.75;
}

.gold-rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 3.2rem;
  height: 3px;
  margin-left: -1.6rem;
  background: var(--gold);
}

/* ------------------------------------------------------------------- section */

.section {
  padding-top: 2.4rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin: 0;
}

.section-num {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: lining-nums;
}

.section-title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.05rem, 1.55rem + 2.2vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--accent);
}

/* ------------------------------------------------------------ briefing index */

.brief {
  margin-top: 1.5rem;
}

.brief-label {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.brief-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.brief-list li {
  border-top: 1px solid var(--hairline);
}

.brief-list li:last-child {
  border-bottom: 1px solid var(--hairline);
}

.brief-list a {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  align-items: baseline;
  gap: 0.2rem;
  padding: 0.85rem 0;
  min-height: 3rem;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.brief-num {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: lining-nums tabular-nums;
}

.brief-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  text-wrap: pretty;
}

.brief-list a:hover .brief-title,
.brief-list a:focus-visible .brief-title {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* ------------------------------------------------------------------- stories */

.stories {
  margin-top: 2.6rem;
}

.story {
  padding: 1.9rem 0 2rem;
  border-top: 1px solid var(--hairline);
  scroll-margin-top: 0.75rem;
  cursor: pointer;
}

.story:first-child {
  border-top: 0;
  padding-top: 0.4rem;
}

.story:focus {
  outline: none;
}

.story-num {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  font-variant-numeric: lining-nums;
}

.story-title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.05rem);
  line-height: 1.14;
  letter-spacing: -0.008em;
  text-wrap: balance;
}

.byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.65rem;
  margin: 0.8rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.byline-place {
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
}

/* The vertical divider is drawn as a thin rule, not a glyph, so it never falls back to another font. */
.byline-bar {
  display: inline-block;
  width: 1px;
  height: 0.95em;
  background: currentColor;
  opacity: 0.45;
}

.story-media {
  margin: 1.2rem 0 0;
}

.story-img {
  width: 100%;
  height: auto;
  max-height: 26rem;
  object-fit: cover;
  background: #efe8dc;
}

.preview {
  margin: 1.15rem 0 0;
  font-size: 1.02rem;
  line-height: 1.66;
  color: #2e2a24;
  text-wrap: pretty;
}

/* Drop-cap on the first paragraph of every story and every full article. */
.dropcap {
  float: left;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 4.3em;
  line-height: 0.78;
  padding: 0.05em 0.09em 0 0;
  color: var(--accent);
}

.accent {
  font-weight: 600;
  color: var(--accent-ink);
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.55rem 0;
  min-height: 2.75rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.more:hover .more-text {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.more-arrow {
  font-size: 1rem;
  letter-spacing: 0;
  transition: transform 0.2s ease;
}

.more:hover .more-arrow {
  transform: translateX(3px);
}

.to-index {
  display: inline-block;
  margin: 0.4rem 0 0;
  padding: 0.6rem 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}

.to-index:hover {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

/* ------------------------------------------------------------------- footer */

.footer {
  padding: 0.4rem 0 calc(3rem + env(safe-area-inset-bottom));
  text-align: center;
}

.footer-name {
  margin: 2.2rem 0 0.25rem;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-mail {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-underline-offset: 0.25em;
}

.footer-mail:hover {
  color: var(--ink);
}

/* ------------------------------------------------------------------- reader */

.reader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--ivory);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.32s;
}

.reader.is-open {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
}

.reader-bar {
  flex: none;
  border-bottom: 1px solid var(--hairline);
  padding-top: env(safe-area-inset-top);
}

.reader-bar .wrap {
  display: flex;
  align-items: center;
  min-height: 3.25rem;
}

.reader-back {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding-right: 1rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.reader-back svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

.reader-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.reader-article {
  padding-top: 1.8rem;
  padding-bottom: calc(3.5rem + env(safe-area-inset-bottom));
}

.reader-title {
  margin: 0.9rem 0 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.7rem, 1.25rem + 2vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.reader-media {
  margin: 1.5rem 0 0;
}

.reader-img {
  width: 100%;
  height: auto;
}

.reader-body {
  margin-top: 1.6rem;
}

.reader-body p {
  margin: 0 0 1.15em;
  font-family: var(--font-head);
  font-size: 1.16rem;
  line-height: 1.68;
  color: #2a2620;
  text-wrap: pretty;
}

/* ------------------------------------------------------------------ desktop */

@media (min-width: 760px) {
  .masthead {
    padding-top: 3.2rem;
  }

  .logo-stage {
    --stage: 32rem;
  }

  .story {
    display: grid;
    grid-template-columns: 4.6rem minmax(0, 1fr);
    column-gap: 1.2rem;
    padding-block: 2.3rem 2.4rem;
  }

  .story-num {
    grid-row: 1 / span 6;
    margin: 0.1rem 0 0;
    font-size: 2.4rem;
    font-weight: 300;
    letter-spacing: 0;
    line-height: 1;
  }

  .story > :not(.story-num) {
    grid-column: 2;
  }

  .brief-list a {
    grid-template-columns: 3.4rem 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reader,
  .reader.is-open,
  .more-arrow {
    transition: none;
  }
}
