/* home.css — Beyond, edizione "giornale" (FT/Reuters/Economist). Tipografica, niente immagini. */
:root {
  --paper: #f8f6f0;
  --ink: #111111;
  --muted: #666666;
  --rule: #dddddd;
  --accent: #1a4b84;
  --up: #1c7d3f;
  --down: #b3261e;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --maxw: 1180px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.serif { font-family: var(--serif); }

/* ---------- Top bar ---------- */
.topbar {
  border-bottom: 1px solid var(--rule);
  font-size: 12.5px;
  color: var(--muted);
  min-height: 41px; /* riserva spazio: nav.js riempie la barra dopo il load (no CLS) */
}
.topbar__in { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.topbar__date { letter-spacing: 0.01em; }
.topbar__mid { font-family: var(--serif); font-style: italic; color: var(--ink); }
.topbar__right { display: flex; align-items: center; gap: 16px; }
.topbar__right a { color: var(--muted); }
.topbar__right a:hover { color: var(--ink); }
.btn-sub {
  background: var(--accent); color: #fff; padding: 6px 14px; font-weight: 600; font-size: 12.5px;
}
.btn-sub:hover { background: #143a66; }
/* area account nella barra (nav.js) */
.nav-auth { display: inline-flex; align-items: center; gap: 14px; }
.nav-acct { color: var(--ink) !important; font-weight: 600; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-logout { color: var(--muted); }
.nav-lang { background: transparent; border: 1px solid var(--rule); color: var(--muted); font: 500 12px var(--sans); padding: 3px 5px; border-radius: 3px; cursor: pointer; margin-left: 6px; }
.nav-lang:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Masthead ---------- */
.masthead { text-align: center; padding: 22px 0 14px; }
.masthead h1 {
  font-family: var(--serif);
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: clamp(48px, 9vw, 104px);
  line-height: 1;
}
.masthead a { display: inline-block; }
.masthead__tag { display: block; font-family: var(--sans); font-size: 12.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

/* ---------- Nav ---------- */
.nav {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.nav__in {
  display: flex; align-items: center; justify-content: center; gap: 30px;
  height: 46px; font-size: 14px; font-weight: 500;
}
.nav__in a { color: var(--ink); }
.nav__in a:hover { color: var(--accent); }
.nav__in .nav__more { color: var(--muted); }
.nav__in .nav__terminal { margin-left: auto; color: var(--accent); font-weight: 600; }

/* ---------- Manifesto (about the project) ---------- */
/* Manifesto — banda blu editoriale (sfondo navy, testo bianco, accenti ambra) */
.manifesto { background: linear-gradient(180deg, #14375f 0%, #0e2c4e 100%); }
.manifesto .wrap { max-width: var(--maxw); text-align: center; padding: 42px 24px 46px; }
.manifesto__lead { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 30px; color: #fff; margin-bottom: 4px; }
.manifesto__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; text-align: left; margin-top: 18px; }
.manifesto__cols .manifesto__txt { margin-top: 0; }
.manifesto__txt { color: rgba(255, 255, 255, 0.9); font-size: 16px; line-height: 1.65; margin-top: 12px; }
.manifesto__txt b { font-weight: 700; color: #f0a868; }
.manifesto__txt em { color: #fff; font-style: italic; }
.manifesto__txt a { color: #f0a868; font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(240, 168, 104, 0.5); }
.manifesto__txt a:hover { border-bottom-color: #f0a868; }
@media (max-width: 640px) {
  .manifesto .wrap { padding: 30px 18px 32px; }
  .manifesto__lead { font-size: 25px; }
  .manifesto__txt { font-size: 15px; }
  .manifesto__cols { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- Hero intro (banda blu: cos'è + cosa fare) ---------- */
.hi__lead { font-family: var(--serif); font-weight: 800; color: #fff; font-size: clamp(28px, 4.4vw, 46px); line-height: 1.08; letter-spacing: -0.01em; max-width: 17em; margin: 0 auto; }
.hi__lead em { color: #f0a868; font-style: italic; }
.hi__sub { color: rgba(255, 255, 255, 0.9); font-size: clamp(15px, 1.7vw, 18px); line-height: 1.55; max-width: 40em; margin: 14px auto 0; }
.hi__sub b { color: #f0a868; font-weight: 700; }
.hi__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.hi__btn { display: inline-flex; align-items: center; font: 600 14.5px var(--sans); padding: 12px 22px; border-radius: 4px; }
.hi__btn--primary { background: #f0a868; color: #11243f; }
.hi__btn--primary:hover { background: #ffba7d; }
.hi__btn--ghost { color: #fff; border: 1px solid rgba(255, 255, 255, 0.45); }
.hi__btn--ghost:hover { border-color: #fff; }
.hi__steps { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-top: 22px; color: rgba(255, 255, 255, 0.8); font-size: 12.5px; }
.hi__steps b { color: #f0a868; margin-right: 5px; }
/* auth-aware: nav.js mette .is-auth su <html> */
[data-auth-in] { display: none; }
.is-auth [data-auth-in] { display: inline-flex; }
.is-auth [data-auth-out] { display: none; }

/* ---------- Demo "see it in action" (senza signup) ---------- */
.demo { border-bottom: 1px solid var(--rule); background: #fbfaf4; }
.demo .wrap { max-width: 980px; padding: 32px 24px 38px; }
.demo__head { text-align: center; margin-bottom: 18px; }
.demo__head h2 { font-family: var(--serif); font-size: clamp(22px, 3vw, 30px); margin-top: 4px; }
.demo__auto { color: var(--accent); font-size: 11.5px; font-weight: 600; margin-top: 8px; min-height: 14px; letter-spacing: 0.02em; }
.demo__pick { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.demo__chip { background: #fff; border: 1px solid var(--rule); border-radius: 999px; padding: 8px 15px; font: 500 13px var(--sans); cursor: pointer; color: var(--ink); }
.demo__chip span { color: var(--muted); }
.demo__chip:hover { border-color: var(--ink); }
.demo__chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.demo__chip.on span { color: rgba(255, 255, 255, 0.7); }
.demo__grid { display: grid; grid-template-columns: 1fr 1.25fr; border: 1px solid var(--ink); background: #fff; }
.demo__story { padding: 22px 24px; border-right: 1px solid var(--rule); }
.demo__result { padding: 22px 24px; min-height: 150px; }
.demo__klabel { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.demo__h { font-family: var(--serif); font-weight: 700; font-size: 21px; line-height: 1.2; }
.demo__meta { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.demo__badge { display: inline-block; font: 700 13px var(--sans); padding: 5px 12px; border-radius: 4px; margin-bottom: 8px; }
.demo__mech, .demo__act { font-size: 14.5px; line-height: 1.55; color: #222; margin-top: 8px; }
.demo__mech b, .demo__act b { color: var(--ink); }
.demo__loading { color: var(--muted); font-size: 14px; padding: 16px 0; }
.demo__loading a { color: var(--accent); font-weight: 600; }
.demo__cta { text-align: center; margin-top: 20px; }
@media (max-width: 700px) {
  .demo__grid { grid-template-columns: 1fr; }
  .demo__story { border-right: 0; border-bottom: 1px solid var(--rule); }
}

/* ---------- Layout grid ---------- */
.main { display: grid; grid-template-columns: 1fr 340px; gap: 40px; padding: 28px 0 0; }
.rail { border-left: 1px solid var(--rule); padding-left: 28px; }

/* ---------- Hero ---------- */
.kicker { color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.hero { border-bottom: 1px solid var(--ink); padding-bottom: 26px; }
.hero__head {
  font-family: var(--serif); font-weight: 800; line-height: 1.04; letter-spacing: -0.01em;
  font-size: clamp(38px, 5.2vw, 60px); margin: 10px 0 14px;
}
.hero__head a:hover { color: var(--accent); }
.hero__dek { font-size: 20px; line-height: 1.5; color: #2a2a2a; max-width: 40em; }
.byline { color: var(--muted); font-size: 13px; margin-top: 16px; }
.byline b { color: var(--ink); font-weight: 600; }

/* ---------- Featured row ---------- */
.featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; padding: 24px 0; border-bottom: 1px solid var(--ink); }
.featured .card + .card, .feat-col { border-left: 1px solid var(--rule); padding-left: 22px; }
.featured .card:first-child { padding-left: 0; }

/* ---------- Card ---------- */
.card .kicker { font-size: 11px; }
.card__head { font-family: var(--serif); font-weight: 700; line-height: 1.16; font-size: 21px; margin: 7px 0 0; }
.card__head a:hover { color: var(--accent); }
.card__meta { color: var(--muted); font-size: 12.5px; margin-top: 9px; }

/* ---------- Section columns ---------- */
.sections { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--ink); }
.seccol + .seccol { border-left: 1px solid var(--rule); padding-left: 24px; }
.sechead { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 14px; }
.sechead h3 { color: var(--accent); font-size: 16px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.sechead a { color: var(--muted); font-size: 12.5px; }
.sechead a:hover { color: var(--accent); }
.lead__head { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.18; margin-bottom: 7px; }
.lead__head a:hover { color: var(--accent); }
.lead__meta { color: var(--muted); font-size: 12.5px; }
.minilist { margin-top: 16px; border-top: 1px solid var(--rule); }
.mini { padding: 13px 0; border-bottom: 1px solid var(--rule); }
.mini__head { font-family: var(--serif); font-weight: 600; font-size: 16px; line-height: 1.22; }
.mini__head a:hover { color: var(--accent); }
.mini__meta { color: var(--muted); font-size: 12px; margin-top: 5px; }

/* ---------- Onboard / register (homepage) ---------- */
.onboard { border: 1px solid var(--ink); background: #fff; padding: 26px 30px; margin-bottom: 28px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; align-items: center; }
.onboard__txt h3 { font-family: var(--serif); font-size: 27px; line-height: 1.12; margin: 6px 0 8px; color: var(--ink); }
.onboard__txt p { color: #333; font-size: 14.5px; line-height: 1.5; }
.onboard__form { display: flex; flex-direction: column; gap: 10px; }
.onboard__form input { border: 1px solid #c9c9c9; padding: 11px 13px; font-family: var(--sans); font-size: 14px; background: var(--paper); }
.onboard__form input:focus { outline: none; border-color: var(--ink); }
.onboard__form button { background: var(--ink); color: #fff; border: 0; padding: 12px; font-family: var(--sans); font-weight: 600; font-size: 14px; cursor: pointer; transition: background 0.15s; }
.onboard__form button:hover { background: var(--accent); }
.onboard__form button:disabled { opacity: 0.6; cursor: default; }
.onboard__status { font-size: 12px; color: #777; min-height: 16px; line-height: 1.4; }
.onboard__cta { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; padding: 13px 24px; font: 600 14px var(--sans); align-self: flex-start; }
.onboard__cta:hover { background: var(--accent); }
@media (max-width: 700px) { .onboard { grid-template-columns: 1fr; padding: 22px; } }

/* ---------- Relevant to you (personalized) ---------- */
.relevant { border-bottom: 2px solid var(--accent); padding-bottom: 22px; margin-bottom: 26px; }
.relevant .sechead--wide { border-bottom-color: var(--accent); }
.relevant .sechead--wide h3 { color: var(--accent); }
.relgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.relcard { display: block; }
.relcard h4 { font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.18; margin: 6px 0; }
.relcard:hover h4 { color: var(--accent); }
.rel-alert { display: inline-block; background: rgba(179, 38, 30, 0.12); color: var(--down); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 3px; margin-bottom: 7px; }
@media (max-width: 900px) { .relgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .relgrid { grid-template-columns: 1fr; } }

/* ---------- Developing Themes (concept clusters) ---------- */
.sechead--wide { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin: 6px 0 18px; }
.sechead--wide h3 { color: var(--accent); font-size: 16px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.sechead__x { color: var(--muted); font-size: 13px; font-style: italic; font-family: var(--serif); }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; padding-bottom: 26px; border-bottom: 1px solid var(--ink); }
.theme__h { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--rule); padding-bottom: 7px; margin-bottom: 8px; }
.theme__name { font-family: var(--serif); font-weight: 700; font-size: 19px; color: var(--accent); }
.theme__name:hover { color: var(--ink); }
.theme__n { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.theme .minilist { margin-top: 0; border-top: 0; }
.theme .mini:first-child { padding-top: 2px; }
.theme__more { display: inline-block; margin-top: 8px; color: var(--accent); font-size: 12.5px; font-weight: 600; }
.theme__more:hover { text-decoration: underline; }
@media (max-width: 900px) { .themes { grid-template-columns: 1fr; } }

/* ---------- Opinion ---------- */
.opinion { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.opinion > .kicker { display: block; margin-bottom: 16px; font-size: 13px; }
.opgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.op + .op { border-left: 1px solid var(--rule); padding-left: 24px; }
.op__head { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 20px; line-height: 1.25; }
.op__head a:hover { color: var(--accent); }
.op__by { color: var(--muted); font-size: 12.5px; margin-top: 9px; }

/* ---------- Sidebar / rail ---------- */
.rail__title { color: var(--ink); font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 2px solid var(--ink); padding-bottom: 7px; margin-bottom: 12px; }
.mostread { list-style: none; }
.mostread li { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.mostread .n { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1; min-width: 22px; }
.mostread .h { font-family: var(--serif); font-weight: 600; font-size: 16px; line-height: 1.22; }
.mostread .h a:hover { color: var(--accent); }

.brief { border: 1px solid var(--rule); padding: 18px; margin: 26px 0; background: #fffdf8; }
.brief h2 { font-family: var(--serif); font-size: 21px; font-weight: 700; }
.brief p { color: var(--muted); font-size: 13.5px; margin: 6px 0 12px; }
.brief form { display: flex; gap: 8px; }
.brief input { flex: 1; border: 1px solid var(--rule); padding: 9px 10px; font-family: var(--sans); font-size: 13px; background: #fff; }
.brief button { background: var(--accent); color: #fff; border: 0; padding: 9px 14px; font-weight: 600; font-size: 13px; cursor: pointer; }
.brief button:hover { background: #143a66; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.chip2 { border: 1px solid var(--rule); padding: 6px 11px; font-size: 12.5px; color: #333; background: #fff; }
.chip2:hover { border-color: var(--accent); color: var(--accent); }

.promo { border: 1px solid var(--rule); padding: 18px; }
.promo h2 { font-family: var(--serif); font-weight: 800; letter-spacing: 0.1em; font-size: 22px; }
.promo p { color: var(--muted); font-size: 13.5px; margin: 6px 0 10px; }
.promo a { color: var(--accent); font-weight: 600; font-size: 13.5px; }
.promo a:hover { text-decoration: underline; }

/* ---------- Promo band (cosa fa il sito) ---------- */
.promo-band { border-top: 2px solid var(--ink); background: #fbfaf4; padding: 46px 0; margin-top: 32px; }
.promo-band__head { max-width: 760px; margin-bottom: 22px; }
.promo-band__head h2 { font-family: var(--serif); font-weight: 800; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12; margin-top: 8px; letter-spacing: -0.01em; }
.promo-row { display: grid; grid-template-columns: 86px 1fr; gap: 22px; padding: 24px 0; border-top: 1px solid var(--rule); align-items: start; }
.promo-row__n { font-family: var(--serif); font-size: 42px; font-weight: 700; color: var(--accent); line-height: 0.9; }
.promo-row__b h3 { font-family: var(--serif); font-weight: 700; font-size: 24px; margin-bottom: 8px; }
.promo-row__b p { color: #333; font-size: 16px; line-height: 1.6; max-width: 62ch; }
.promo-band__cta { margin-top: 28px; }
.cta-link { color: var(--accent); font-weight: 700; font-size: 17px; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.cta-link:hover { color: var(--ink); }
@media (max-width: 640px) {
  .promo-row { grid-template-columns: 1fr; gap: 6px; }
  .promo-row__n { font-size: 30px; }
}

/* ---------- Footer ---------- */
.foot { border-top: 2px solid var(--ink); margin-top: 36px; padding: 30px 0 50px; }
.foot__top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
.foot__brand .foot__logo { font-family: var(--serif); font-weight: 800; letter-spacing: 0.1em; font-size: 28px; }
.foot__brand p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.foot__brand .social { display: flex; gap: 14px; margin-top: 14px; color: var(--muted); }
.foot h2 { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.foot ul { list-style: none; }
.foot ul li { padding: 4px 0; font-size: 13.5px; }
.foot ul li a:hover { color: var(--accent); }
.foot__copy { color: var(--muted); font-size: 12.5px; text-align: right; }

/* ---------- Article page (Reuters-style) ---------- */
.article { max-width: 780px; margin: 0 auto; padding: 40px 24px 60px; }
.article .kicker { font-size: 13px; }
.article h1 { font-family: var(--serif); font-weight: 800; line-height: 1.08; font-size: clamp(32px, 4.6vw, 50px); margin: 12px 0 16px; letter-spacing: -0.01em; }
.article .dek { font-size: 21px; line-height: 1.5; color: #2a2a2a; margin-bottom: 22px; }
.article .meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 14px 0; margin-bottom: 30px; }
.article .meta b { color: var(--ink); font-weight: 600; }
.article .body { font-size: 18px; line-height: 1.75; }
.article .body p { margin-bottom: 22px; }
.article .body > p:first-of-type::first-letter { font-family: var(--serif); font-weight: 800; float: left; font-size: 64px; line-height: 0.82; padding: 6px 10px 0 0; color: var(--ink); }
.article h3.block { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); border-bottom: 2px solid var(--ink); padding-bottom: 7px; margin: 34px 0 14px; }
.article .conn { padding: 11px 0; border-bottom: 1px solid var(--rule); }
.article .conn a { font-family: var(--serif); font-weight: 600; font-size: 17px; }
.article .conn a:hover { color: var(--accent); }
.article .conn span { color: var(--muted); font-size: 12.5px; }
.article .src { color: var(--accent); font-weight: 600; }
.article .src:hover { text-decoration: underline; }
.article .backhome { color: var(--muted); font-size: 13px; margin-bottom: 24px; display: inline-block; }
.article .backhome:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main { grid-template-columns: 1fr; }
  .rail { border-left: 0; padding-left: 0; border-top: 2px solid var(--ink); margin-top: 20px; padding-top: 20px; }
  .featured, .sections, .opgrid, .foot__top { grid-template-columns: 1fr; }
  .featured .card + .card, .seccol + .seccol, .op + .op { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 18px; }
  .nav__in { gap: 18px; overflow-x: auto; justify-content: flex-start; white-space: nowrap; }
  .topbar__mid { display: none; }
  .foot__copy { text-align: left; }
}
@media (max-width: 600px) {
  /* topbar: tieni solo Subscribe + Intelligence */
  .topbar__right a:nth-child(-n + 3) { display: none; }
  .topbar__right { gap: 10px; }
  .wrap { padding: 0 16px; }
  .hero__head { font-size: 30px; }
  .promo-row { grid-template-columns: 1fr; gap: 6px; }
}
