/* Nomi Maschili — plain CSS, no framework, no external fonts.
   Layout: one centred column; name cards carry a small calendar tile for the name day. */
:root {
  /* «Fiocco azzurro» theme: baby blue and Italian azzurro, navy ink, a tricolore touch */
  --page: #f3f8fd;      /* baby-blue page */
  --bg: #ffffff;        /* cards, header, inputs */
  --surface: #e4f0fb;   /* soft panels */
  --ink: #132a47;       /* navy text */
  --muted: #4d6380;
  --line: #cde0f3;
  --green: #1565b8;     /* azzurro: links, buttons */
  --green-ink: #ffffff;
  --red: #1a6fc2;       /* azzurro accent: eyebrows, numbers, rules */
  --baby: #a9d3f5;      /* baby blue */
  --baby-soft: #d6ebfc;
  --tri-g: #009246; --tri-w: #ffffff; --tri-r: #ce2b37;   /* tricolore */
  --warn: #c0392b;
  --heart: #ce2b37;
  --tile: #ffffff;
  --shadow: 0 2px 10px rgb(21 101 184 / 0.08);
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0b1626; --bg: #11213a; --surface: #172b4a; --ink: #e9f1fb; --muted: #a6b9d4; --line: #26395a;
    --green: #8cc4ff; --green-ink: #0b1626; --red: #8cc4ff; --baby: #3a7bc8; --baby-soft: #1c3458;
    --warn: #ff8a7a; --heart: #ff6b77; --tile: #11213a; --shadow: 0 2px 12px rgb(0 0 0 / 0.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0b1626; --bg: #11213a; --surface: #172b4a; --ink: #e9f1fb; --muted: #a6b9d4; --line: #26395a;
  --green: #8cc4ff; --green-ink: #0b1626; --red: #8cc4ff; --baby: #3a7bc8; --baby-soft: #1c3458;
  --warn: #ff8a7a; --heart: #ff6b77; --tile: #11213a; --shadow: 0 2px 12px rgb(0 0 0 / 0.35); color-scheme: dark;
}
@font-face { font-family: "Playfair Display"; font-weight: 600; font-display: swap; src: url(/assets/fonts/playfair-display-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 600; font-style: italic; font-display: swap; src: url(/assets/fonts/playfair-display-latin-600-italic.woff2) format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 700; font-display: swap; src: url(/assets/fonts/playfair-display-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url(/assets/fonts/nunito-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-style: italic; font-display: swap; src: url(/assets/fonts/nunito-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url(/assets/fonts/nunito-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url(/assets/fonts/nunito-latin-800-normal.woff2) format("woff2"); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.6 var(--body); }
a { color: var(--green); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; margin: 2.2rem 0 0.9rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }

.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.flag { height: 5px; background: linear-gradient(90deg, var(--tri-g) 0 33.3%, var(--tri-w) 33.3% 66.6%, var(--tri-r) 66.6%); box-shadow: 0 1px 0 rgb(0 0 0 / 0.05); }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar { display: flex; align-items: center; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.logo { font-family: var(--display); font-size: 1.45rem; text-decoration: none; color: var(--ink); font-weight: 600; white-space: nowrap; }
.logo span { color: var(--green); font-style: italic; margin-left: 0.15em; }
.search { position: relative; flex: 1 1 220px; min-width: 0; }
.search input { width: 100%; font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); }
.results a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 4px; text-decoration: none; color: var(--ink); }
.results a:hover, .results a.sel { background: var(--surface); }
.results small { color: var(--muted); text-align: right; }
.results .none { padding: 8px 10px; color: var(--muted); }
.lang { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-decoration: none; border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px; color: var(--ink); }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; padding-block: 0 12px; font-size: 0.93rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }

main { padding-block: 8px 56px; }
.crumbs { font-size: 0.85rem; color: var(--muted); padding-top: 16px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 4px; opacity: 0.6; }
.phead { padding: 22px 0 6px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; margin: 10px 0 0; }
.eyebrow { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); font-weight: 700; margin: 0 0 8px; }

/* home hero */
.hero { padding: 40px 0 12px; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn { font: inherit; font-weight: 600; background: var(--green); color: var(--green-ink); border: 1px solid var(--green); border-radius: 6px; padding: 10px 18px; text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--green); }

/* name cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.card a { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; column-gap: 12px; height: 100%; padding: 12px 12px 12px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); background: var(--bg); transition: border-color .15s; }
.card a:hover { border-color: var(--green); }
.cn { font-family: var(--display); font-size: 1.28rem; font-weight: 600; }
.cm { grid-column: 1; font-size: 0.88rem; color: var(--muted); line-height: 1.4; }
.tile { grid-column: 2; grid-row: 1 / 3; align-self: start; width: 46px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; text-align: center; background: var(--tile); }
.tile b { display: block; font-size: 1.15rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
.tile i { display: block; font-style: normal; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; background: var(--red); color: #fff; line-height: 1.7; }
.tile-m i { background: var(--green); color: var(--green-ink); }
.tile-none { border-style: dashed; height: 42px; opacity: 0.5; }

/* grids */
.months, .catgrid, .guides { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.months { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.catgrid, .guides { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.months a, .catgrid a, .guides a { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; border-radius: 8px; background: var(--surface); text-decoration: none; color: var(--ink); }
.months a:hover, .catgrid a:hover, .guides a:hover { outline: 1px solid var(--green); }
.months b, .catgrid b, .guides b { font-family: var(--display); font-size: 1.1rem; font-weight: 600; }
.months span, .catgrid span, .guides span { font-size: 0.85rem; color: var(--muted); }

.letters, .chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.letters a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font-family: var(--display); font-size: 1.1rem; color: var(--ink); }
.letters a:hover, .letters a[aria-current] { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.chips a { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--surface); text-decoration: none; font-size: 0.9rem; }

.filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.filter button { font: inherit; font-size: 0.85rem; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.filter button.on { background: var(--green); color: var(--green-ink); border-color: var(--green); }

/* name page */
.namepage .phead h1 { font-size: clamp(2.8rem, 9vw, 5rem); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; margin: 16px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts > div { padding: 14px 16px 14px 0; }
.facts dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
.facts dd { margin: 4px 0 0; font-family: var(--display); font-size: 1.25rem; }
.note, .origin, .prose p { max-width: 66ch; }
.note { font-size: 1.08rem; margin: 20px 0 0; }
.origin { color: var(--muted); font-style: italic; }
.sib { background: var(--surface); padding: 12px 14px; border-radius: 8px; max-width: 66ch; }

.pn { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; }
.pn a { display: flex; flex-direction: column; text-decoration: none; font-family: var(--display); font-size: 1.15rem; }
.pn a:last-child { text-align: right; }
.pn small { font-family: var(--body); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; max-width: 70ch; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--muted); }

/* name-day calendar */
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px 24px; }
.calm h2 { font-size: 1.2rem; margin: 18px 0 6px; border-bottom: 2px solid var(--red); padding-bottom: 4px; }
.calm h2 a { color: var(--ink); text-decoration: none; }
.calm ul { list-style: none; margin: 0; padding: 0; }
.calm li a { display: flex; gap: 10px; padding: 3px 0; text-decoration: none; color: var(--ink); }
.calm li b { min-width: 1.8em; text-align: right; color: var(--red); font-variant-numeric: tabular-nums; }
.calm li a:hover { color: var(--green); }

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; max-width: 720px; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
td.num { font-variant-numeric: tabular-nums; }

.sets { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.sets li { padding: 14px 16px; background: var(--surface); border-radius: 8px; }
.sets p { margin: 0; }
.setnames { font-family: var(--display); font-size: 1.35rem; margin-bottom: 4px !important; }

.foot { border-top: 1px solid var(--line); background: var(--surface); font-size: 0.9rem; color: var(--muted); }
.foot .wrap { padding-block: 24px; }
.foot p { margin: 0 0 6px; }

@media (max-width: 560px) {
  .bar { gap: 10px; }
  .search { order: 3; flex-basis: 100%; }
  .cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* answers, intros, share card, curated lists */
.answer { font-size: 1.15rem; max-width: 62ch; margin: 12px 0 0; }
.intro { max-width: 68ch; font-size: 1.05rem; margin: 14px 0; }
.notewrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 24px; align-items: start; margin-top: 8px; }
.namecard { margin: 20px 0 0; }
.namecard img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.picks { list-style: none; counter-reset: pick; margin: 24px 0 0; padding: 0; display: grid; gap: 4px; max-width: 760px; }
.picks li { counter-increment: pick; position: relative; padding: 16px 0 16px 56px; border-bottom: 1px solid var(--line); }
.picks li::before { content: counter(pick); position: absolute; left: 0; top: 18px; width: 38px; text-align: right; font-family: var(--display); font-size: 1.6rem; color: var(--red); font-variant-numeric: tabular-nums; }
.picks h2 { margin: 0 0 4px; font-size: 1.5rem; }
.picks h2 a { color: var(--ink); text-decoration: none; }
.picks h2 a:hover { color: var(--green); }
.picks p { margin: 4px 0 0; max-width: 66ch; }
.pm { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 720px) { .notewrap { grid-template-columns: 1fr; } }

/* list pages and calendar */
.picks h3 { margin: 0 0 4px; font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.picks h3 a { color: var(--ink); text-decoration: none; }
.picks h3 a:hover { color: var(--green); }
.monthjump { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 8px; position: sticky; top: env(safe-area-inset-top, 0px); background: var(--bg); padding-block: 8px; z-index: 5; }
.monthjump a { padding: 4px 10px; border-radius: 999px; background: var(--surface); text-decoration: none; text-transform: capitalize; font-size: 0.9rem; }
.calmonth { scroll-margin-top: 64px; }
.calmonth h2 { border-bottom: 2px solid var(--red); padding-bottom: 4px; }
.caldays { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; }
.caldays li { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 64px; }
.caldays li:target { background: var(--surface); }
.caldays b { min-width: 7.5em; font-variant-numeric: tabular-nums; color: var(--red); font-weight: 600; }
.inspired { margin-top: 10px; }

/* header button for the generator */
.nav a.hot { color: var(--green-ink); background: var(--red); padding: 1px 10px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.nav a.hot:hover, .nav a.hot[aria-current] { color: var(--green-ink); text-decoration: none; filter: brightness(1.08); }

/* name generator */
.gen { display: grid; gap: 18px; margin-top: 18px; padding: 20px; background: var(--surface); border-radius: 10px; max-width: 860px; }
.genfields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .gencats legend { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.field label small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.field input, .field select { font: inherit; font-size: 1.1rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); min-width: 0; width: 100%; }
.gencats { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gencats legend { margin-bottom: 8px; padding: 0; }
.catchip { font: inherit; font-size: 0.88rem; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; }
.catchip[aria-pressed="true"] { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.gen .btn { justify-self: start; font-size: 1rem; }
.genout { scroll-margin-top: 16px; }
.genhead { margin-top: 2rem; }
.genhead em { font-style: italic; color: var(--green); }
.gencat { margin-top: 1.6rem; }
.gencat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--red); padding-bottom: 4px; margin-bottom: 10px; }
.gencat-head h3 { font-size: 1.2rem; margin: 0; }
.gencat-head h3 a { color: var(--ink); text-decoration: none; }
.gencat-head h3 a:hover { color: var(--green); }
.more { font: inherit; font-size: 0.88rem; background: none; border: 0; color: var(--green); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
.gcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.gcard a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); background: var(--bg); }
.gcard a:hover { border-color: var(--green); }
.gname { font-family: var(--display); font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.gname span { color: var(--muted); font-weight: 400; }
.gmean { font-size: 0.9rem; color: var(--muted); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--green); }
.gtags { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.gtags li { font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.gtags li.ok { color: var(--green); }
.gtags li.warn { color: var(--red); }

/* v3: richer name pages */
.namepage h2 { font-size: 1.35rem; }
.namepage p { max-width: 68ch; }
.notewrap h2 { margin-top: 1.6rem; }
.dlist, .famous { margin: 0; padding-left: 1.2em; max-width: 68ch; }
.dlist li, .famous li { padding: 3px 0; }
.dlist b { color: var(--red); font-weight: 600; margin-right: 4px; }
.dlist a { text-decoration: none; }
.facts-s { margin-top: 0; }
.facts-s dd { font-size: 1.05rem; font-family: var(--body); }
.caldays small { color: var(--muted); }
.monthjump a[aria-current] { background: var(--green); color: var(--green-ink); }
.sources { font-size: 0.88rem; color: var(--muted); max-width: 70ch; margin-top: 24px; }
.prose ul { max-width: 68ch; padding-left: 1.2em; }
.prose li { margin: 6px 0; }

/* v4: name finder */
.finder { gap: 22px; }
.finder .q { border: 0; margin: 0; padding: 0; min-width: 0; }
.qh { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.2rem; font-weight: 600; margin: 0 0 8px; padding: 0; color: var(--ink); }
.qh span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: var(--green-ink); font-family: var(--body); font-size: 0.9rem; flex: none; }
.qh small { font-family: var(--body); font-size: 0.85rem; font-weight: 400; color: var(--muted); }
details.q > summary { cursor: pointer; list-style: none; }
details.q > summary::-webkit-details-marker { display: none; }
details.q > summary::after { content: "+"; margin-left: 4px; color: var(--green); font-family: var(--body); }
details.q[open] > summary::after { content: "–"; }
.hint { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; }
.chiprow { display: flex; flex-wrap: wrap; gap: 6px; }
.chiprow .catchip { font-size: 0.95rem; padding: 6px 14px; }
.finder .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 2rem; }
.rhead h2 { margin: 0; }
.fcards { list-style: none; margin: 14px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.fcard { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.fhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.fav { font: inherit; font-size: 1.3rem; line-height: 1; background: none; border: 1px solid var(--line); border-radius: 999px; width: 38px; height: 38px; cursor: pointer; color: var(--red); flex: none; }
.fav[aria-pressed="true"] { background: var(--red); color: #fff; border-color: var(--red); }
.match { position: relative; height: 22px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.match span { position: absolute; inset: 0 auto 0 0; background: var(--green); opacity: 0.18; }
.match b { position: relative; display: block; font-size: 0.8rem; line-height: 22px; padding-left: 10px; color: var(--green); }
.why { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 0.88rem; }
.why li { padding-left: 18px; position: relative; }
.why li.ok::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.why li.warn::before { content: "!"; position: absolute; left: 4px; color: var(--red); font-weight: 700; }
.why li.warn { color: var(--red); }
.more-link { margin-top: auto; font-size: 0.9rem; }
.made { margin-top: 2rem; padding: 18px 20px; border: 2px solid var(--green); border-radius: 10px; }
.made h2 { margin-top: 0; }
.madegroup { margin-top: 14px; }
.madegroup h3 { font-size: 1.05rem; margin: 0; }
.madegroup p { margin: 2px 0 6px; font-size: 0.88rem; color: var(--muted); max-width: 70ch; }
.madelist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.madelist li { padding: 6px 12px; border-radius: 999px; background: var(--surface); font-size: 0.95rem; }
.madelist small { color: var(--muted); }
.favs { margin-top: 2rem; padding: 18px 20px; background: var(--surface); border-radius: 10px; }
.favs h2 { margin-top: 0; }
.favlist { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.favlist li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.favlist a { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.favlist small { color: var(--muted); }
.favlist .fav { width: 28px; height: 28px; font-size: 0.85rem; }
.muted.small { font-size: 0.82rem; }
@media (max-width: 520px) { .made, .favs { padding: 14px; } .fcards { grid-template-columns: 1fr; } }


/* ================= «Fiocco azzurro» theme ================= */
h1, h2, h3, .logo, .gname, .cn, .pn a { font-family: var(--display); font-weight: 700; letter-spacing: -0.005em; }
h1, h2, h3 { color: var(--ink); }
h2 { font-size: 1.5rem; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--baby); outline-offset: 2px; }
::selection { background: var(--baby-soft); color: var(--ink); }

/* header: white bar, tricolore line on top, a blue bow in the logo */
.top { background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.logo { font-size: 1.6rem; color: var(--ink); }
.logo span { font-style: italic; font-weight: 600; color: var(--green); margin-left: 0.08em; }
.logo::before { content: ""; display: inline-block; width: 30px; height: 30px; margin-right: 10px; vertical-align: -6px; border-radius: 9px; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 100%22%3E%3Cg stroke=%22%23ffffff%22 stroke-width=%222%22 stroke-linejoin=%22round%22%3E%3Cpath fill=%22%23ffffff%22 d=%22M56 46 L40 94 L48 88 L53 97 L64 50Z%22/%3E%3Cpath fill=%22%23ffffff%22 d=%22M64 46 L80 94 L72 88 L67 97 L56 50Z%22/%3E%3Cpath fill=%22%23ffffff%22 d=%22M60 42 C46 18 12 10 10 32 C8 54 40 56 60 48Z%22/%3E%3Cpath fill=%22%23ffffff%22 d=%22M60 42 C74 18 108 10 110 32 C112 54 80 56 60 48Z%22/%3E%3Cpath fill=%22none%22 stroke=%22%23ffffff%22 stroke-opacity=%22.7%22 d=%22M52 40 C40 26 22 22 20 32 M68 40 C80 26 98 22 100 32%22/%3E%3Crect x=%2252%22 y=%2236%22 width=%2216%22 height=%2216%22 rx=%226%22 fill=%22%23cfe7fb%22/%3E%3C/g%3E%3C/svg%3E") center / 24px no-repeat; }
.search input { border-radius: 999px; padding: 9px 16px; background: var(--surface); border: 1px solid transparent; }
.search input:focus { background: var(--bg); border-color: var(--baby); }
.results { border-radius: 14px; box-shadow: 0 12px 30px rgb(21 101 184 / 0.18); }
.results a { border-radius: 10px; }
.nav { gap: 6px 8px; padding-block: 2px 12px; }
.nav a { padding: 3px 12px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 0.92rem; }
.nav a:hover, .nav a[aria-current] { color: var(--green); background: var(--surface); text-decoration: none; }
.nav a.hot, .nav a.hot:hover, .nav a.hot[aria-current] { background: var(--green); color: var(--green-ink); padding: 3px 14px; }

/* page heads and hero: baby-blue panel with the fiocco azzurro */
.eyebrow { color: var(--red); letter-spacing: 0.12em; }
.phead { padding-top: 26px; }
.phead h1 { position: relative; }
.hero { position: relative; margin-top: 18px; padding: 46px clamp(20px, 5vw, 56px) 42px; padding-right: clamp(20px, 30vw, 330px); border-radius: 26px; overflow: hidden;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 100%22%3E%3Cg stroke=%22%231565b8%22 stroke-width=%222%22 stroke-linejoin=%22round%22%3E%3Cpath fill=%22%23a9d3f5%22 d=%22M56 46 L40 94 L48 88 L53 97 L64 50Z%22/%3E%3Cpath fill=%22%23a9d3f5%22 d=%22M64 46 L80 94 L72 88 L67 97 L56 50Z%22/%3E%3Cpath fill=%22%236fb2ec%22 d=%22M60 42 C46 18 12 10 10 32 C8 54 40 56 60 48Z%22/%3E%3Cpath fill=%22%236fb2ec%22 d=%22M60 42 C74 18 108 10 110 32 C112 54 80 56 60 48Z%22/%3E%3Cpath fill=%22none%22 stroke=%22%23ffffff%22 stroke-opacity=%22.7%22 d=%22M52 40 C40 26 22 22 20 32 M68 40 C80 26 98 22 100 32%22/%3E%3Crect x=%2252%22 y=%2236%22 width=%2216%22 height=%2216%22 rx=%226%22 fill=%22%231565b8%22/%3E%3C/g%3E%3C/svg%3E") right 6% center / clamp(150px, 22vw, 250px) no-repeat, linear-gradient(150deg, #cfe6fb 0%, #e9f4fe 60%, #f7fbff 100%);
  border: 1px solid var(--line); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--tri-g) 0 33.3%, #ffffff 33.3% 66.6%, var(--tri-r) 66.6%); }
.hero h1 { color: #0f2f57; font-size: clamp(2.4rem, 6.5vw, 4rem); }
.hero h1::after { content: ""; display: block; width: 70px; height: 3px; margin-top: 14px; border-radius: 3px; background: var(--green); }
.hero .lead { color: #35506f; }
.hero .eyebrow { color: #1565b8; }
@media (max-width: 640px) { .hero { padding-right: 20px; padding-top: 150px; background-position: center 26px, 0 0; background-size: 150px, auto; } }

/* buttons */
.btn { border-radius: 999px; padding: 11px 22px; font-weight: 800; box-shadow: 0 2px 0 rgb(15 47 87 / 0.12); }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--bg); border-color: var(--baby); color: var(--green); box-shadow: none; }

/* cards: white, rounded, soft blue shadow */
.card a, .catgrid a, .guides a, .months a, .gcard a, .fcard, .picks li, .namecard img, .facts div, .made, .favs, .gen, .calm, .pn a { border-radius: 16px; }
.card a, .catgrid a, .guides a, .months a, .gcard a, .fcard { background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.card a:hover, .catgrid a:hover, .guides a:hover, .months a:hover, .gcard a:hover { transform: translateY(-2px); border-color: var(--baby); box-shadow: 0 6px 18px rgb(21 101 184 / 0.14); }
@media (prefers-reduced-motion: reduce) { .card a, .catgrid a, .guides a, .months a, .gcard a { transition: none; } .card a:hover, .catgrid a:hover, .guides a:hover, .months a:hover, .gcard a:hover { transform: none; } }
.catgrid b, .guides b, .months b { color: var(--green); font-family: var(--display); font-size: 1.05rem; }
.cn { font-size: 1.15rem; }

/* name-day tile: azzurro header like a little calendar */
.tile { border-radius: 10px; border-color: var(--line); background: var(--bg); box-shadow: var(--shadow); }
.tile i { background: var(--green); color: var(--green-ink); font-weight: 800; }
.tile b { color: var(--ink); font-family: var(--display); }
.tile-none { background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 100%22%3E%3Cg stroke=%22%231565b8%22 stroke-width=%223%22 stroke-linejoin=%22round%22%3E%3Cpath fill=%22%23a9d3f5%22 d=%22M56 46 L40 94 L48 88 L53 97 L64 50Z%22/%3E%3Cpath fill=%22%23a9d3f5%22 d=%22M64 46 L80 94 L72 88 L67 97 L56 50Z%22/%3E%3Cpath fill=%22%236fb2ec%22 d=%22M60 42 C46 18 12 10 10 32 C8 54 40 56 60 48Z%22/%3E%3Cpath fill=%22%236fb2ec%22 d=%22M60 42 C74 18 108 10 110 32 C112 54 80 56 60 48Z%22/%3E%3Cpath fill=%22none%22 stroke=%22%23ffffff%22 stroke-opacity=%22.7%22 d=%22M52 40 C40 26 22 22 20 32 M68 40 C80 26 98 22 100 32%22/%3E%3Crect x=%2252%22 y=%2236%22 width=%2216%22 height=%2216%22 rx=%226%22 fill=%22%231565b8%22/%3E%3C/g%3E%3C/svg%3E") center / 24px no-repeat; }

/* letters */
.letters a { background: var(--bg); border: 1px solid var(--line); color: var(--green); font-weight: 700; border-radius: 12px; }
.letters a:hover, .letters a[aria-current] { background: var(--green); color: var(--green-ink); border-color: var(--green); }

/* name page */
.facts div { background: var(--surface); border: 0; }
.facts dd { color: var(--ink); }
.answer { background: var(--bg); border-left: 5px solid var(--green); border-radius: 0 16px 16px 0; padding: 14px 18px; box-shadow: var(--shadow); }
.chips a { background: var(--surface); color: var(--green); font-weight: 700; }
.dlist b { color: var(--green); }
table { border-collapse: separate; border-spacing: 0; background: var(--bg); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
th { background: var(--surface); color: var(--ink); }
.faq details { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; margin: 8px 0; box-shadow: var(--shadow); }
.faq summary { font-weight: 700; }
.pn a { background: var(--bg); box-shadow: var(--shadow); padding: 12px 16px; border: 1px solid var(--line); }

/* lists */
.picks li { background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); padding-right: 16px; margin-bottom: 10px; }
.picks li::before { font-family: var(--display); color: var(--baby); font-weight: 700; }
.calm h2, .calmonth h2, .gencat-head { border-bottom-color: var(--baby); }
.calm li b, .caldays b { color: var(--green); }
.calm { background: var(--bg); padding: 2px 14px 10px; box-shadow: var(--shadow); }

/* generator */
.gen { background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 22px; }
.qh span { background: var(--green); color: var(--green-ink); }
.catchip { border-color: var(--line); background: var(--surface); color: var(--ink); font-weight: 700; }
.catchip:hover { border-color: var(--baby); }
.catchip[aria-pressed="true"] { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.field input, .field select { border-radius: 12px; background: var(--page); }
.match { background: var(--surface); }
.match span { background: var(--baby); opacity: .7; }
.match b { color: #0f3d6e; }
.made { border: 2px solid var(--baby); background: linear-gradient(180deg, var(--baby-soft), var(--bg) 140px); }
.madelist li { background: var(--surface); }
.favs { background: var(--surface); border: 1px solid var(--line); }
.fav { color: var(--heart); border-color: var(--line); background: var(--bg); }
.fav[aria-pressed="true"] { background: var(--heart); border-color: var(--heart); color: #fff; }
.why li.warn, .why li.warn::before, .gtags li.warn { color: var(--warn); }

/* footer: deep azzurro with the tricolore on top */
.foot { position: relative; background: #0f2f57; color: #d9e7f8; border-top: 0; margin-top: 40px; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--tri-g) 0 33.3%, #ffffff 33.3% 66.6%, var(--tri-r) 66.6%); }
.foot a { color: #a9d3f5; }
.foot b { color: #fff; font-family: var(--display); }

/* dark mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero { background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 100%22%3E%3Cg stroke=%22%23a9d3f5%22 stroke-width=%222%22 stroke-linejoin=%22round%22%3E%3Cpath fill=%22%234f8fd6%22 d=%22M56 46 L40 94 L48 88 L53 97 L64 50Z%22/%3E%3Cpath fill=%22%234f8fd6%22 d=%22M64 46 L80 94 L72 88 L67 97 L56 50Z%22/%3E%3Cpath fill=%22%233a7bc8%22 d=%22M60 42 C46 18 12 10 10 32 C8 54 40 56 60 48Z%22/%3E%3Cpath fill=%22%233a7bc8%22 d=%22M60 42 C74 18 108 10 110 32 C112 54 80 56 60 48Z%22/%3E%3Cpath fill=%22none%22 stroke=%22%23ffffff%22 stroke-opacity=%22.7%22 d=%22M52 40 C40 26 22 22 20 32 M68 40 C80 26 98 22 100 32%22/%3E%3Crect x=%2252%22 y=%2236%22 width=%2216%22 height=%2216%22 rx=%226%22 fill=%22%23a9d3f5%22/%3E%3C/g%3E%3C/svg%3E") right 6% center / clamp(150px, 22vw, 250px) no-repeat, linear-gradient(150deg, #173a66 0%, #11213a 75%); }
  :root:not([data-theme="light"]) .hero h1 { color: #e9f1fb; }
  :root:not([data-theme="light"]) .hero .lead { color: #bccde6; }
  :root:not([data-theme="light"]) .hero .eyebrow { color: #8cc4ff; }
  :root:not([data-theme="light"]) .hero h1::after { background: #8cc4ff; }
  :root:not([data-theme="light"]) .match b { color: #e9f1fb; }
  :root:not([data-theme="light"]) .foot { background: #08111f; }
  :root:not([data-theme="light"]) .logo::before { background-color: #1565b8; }
  :root:not([data-theme="light"]) .tile-none { background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 100%22%3E%3Cg stroke=%22%23a9d3f5%22 stroke-width=%222%22 stroke-linejoin=%22round%22%3E%3Cpath fill=%22%234f8fd6%22 d=%22M56 46 L40 94 L48 88 L53 97 L64 50Z%22/%3E%3Cpath fill=%22%234f8fd6%22 d=%22M64 46 L80 94 L72 88 L67 97 L56 50Z%22/%3E%3Cpath fill=%22%233a7bc8%22 d=%22M60 42 C46 18 12 10 10 32 C8 54 40 56 60 48Z%22/%3E%3Cpath fill=%22%233a7bc8%22 d=%22M60 42 C74 18 108 10 110 32 C112 54 80 56 60 48Z%22/%3E%3Cpath fill=%22none%22 stroke=%22%23ffffff%22 stroke-opacity=%22.7%22 d=%22M52 40 C40 26 22 22 20 32 M68 40 C80 26 98 22 100 32%22/%3E%3Crect x=%2252%22 y=%2236%22 width=%2216%22 height=%2216%22 rx=%226%22 fill=%22%23a9d3f5%22/%3E%3C/g%3E%3C/svg%3E"); }
  @media (max-width: 640px) { :root:not([data-theme="light"]) .hero { background-position: center 26px, 0 0; background-size: 150px, auto; } }
}

/* ================= Home page v2: illustrated, search-first ================= */
.t-blue { --tint: #e2f0fd; --tink: #1565b8; }
.t-mint { --tint: #e1f5ec; --tink: #1d7a52; }
.t-peach { --tint: #fdede2; --tink: #b55a22; }
.t-lilac { --tint: #eeeafd; --tink: #5b45b5; }
.t-sand { --tint: #f9f1da; --tink: #8a6a0e; }
.t-rose { --tint: #fde7ec; --tink: #b23a58; }

.hx { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 24px; margin-top: 18px; padding: 40px clamp(20px, 4vw, 52px) 36px;
  border-radius: 28px; position: relative; overflow: visible;
  background: radial-gradient(120% 140% at 0% 0%, #ffffff 0%, #eaf4fe 45%, #d6ebfc 100%); border: 1px solid var(--line); box-shadow: 0 10px 40px rgb(21 101 184 / 0.10); }
.hx::after { content: ""; position: absolute; left: 28px; right: 28px; bottom: -1px; height: 4px; border-radius: 4px 4px 0 0;
  background: linear-gradient(90deg, var(--tri-g) 0 33.3%, #ffffff 33.3% 66.6%, var(--tri-r) 66.6%); }
.hx-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 5px 14px 5px 8px; border-radius: 999px; background: var(--bg);
  color: var(--green); font-weight: 800; font-size: 0.9rem; box-shadow: var(--shadow); }
.bowdot { width: 24px; height: 24px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 100%22%3E%3Cg stroke=%22%23ffffff%22 stroke-width=%222%22 stroke-linejoin=%22round%22%3E%3Cpath fill=%22%23ffffff%22 d=%22M56 46 L40 94 L48 88 L53 97 L64 50Z%22/%3E%3Cpath fill=%22%23ffffff%22 d=%22M64 46 L80 94 L72 88 L67 97 L56 50Z%22/%3E%3Cpath fill=%22%23ffffff%22 d=%22M60 42 C46 18 12 10 10 32 C8 54 40 56 60 48Z%22/%3E%3Cpath fill=%22%23ffffff%22 d=%22M60 42 C74 18 108 10 110 32 C112 54 80 56 60 48Z%22/%3E%3Cpath fill=%22none%22 stroke=%22%23ffffff%22 stroke-opacity=%22.7%22 d=%22M52 40 C40 26 22 22 20 32 M68 40 C80 26 98 22 100 32%22/%3E%3Crect x=%2252%22 y=%2236%22 width=%2216%22 height=%2216%22 rx=%226%22 fill=%22%23cfe7fb%22/%3E%3C/g%3E%3C/svg%3E") center / 17px no-repeat; }
.hx h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.08; color: #0f2f57; }
.hx .lead { color: #35506f; margin-top: 14px; }
.hx-search { position: relative; margin-top: 22px; max-width: 560px; }
.hx-search svg { position: absolute; left: 18px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--green); pointer-events: none; }
.hx-search input { width: 100%; font: inherit; font-size: 1.08rem; padding: 16px 20px 16px 52px; border-radius: 999px; border: 2px solid #b9d9f6; background: #fff; color: var(--ink);
  box-shadow: 0 6px 20px rgb(21 101 184 / 0.12); }
.hx-search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgb(21 101 184 / 0.15); }
.hx-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; }
.hx-chips a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgb(255 255 255 / 0.85); border: 1px solid #c6e0f6; color: var(--green); font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.hx-chips a:hover { background: var(--green); border-color: var(--green); color: #fff; }
.hx-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 24px 0 0; padding: 0; }
.hx-stats b { display: block; font-family: var(--display); font-size: 1.7rem; color: #0f2f57; line-height: 1; }
.hx-stats span { font-size: 0.85rem; color: #4d6380; }
.hx-art svg { width: 100%; height: auto; display: block; max-width: 460px; margin-left: auto; animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .hx-art svg { animation: none; } }
@media (max-width: 860px) { .hx { grid-template-columns: 1fr; padding-top: 24px; } .hx-art { order: -1; } .hx-art svg { max-width: 300px; margin: 0 auto; } }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2.6rem 0 1rem; }
.sec-head h2 { margin: 0; }
.sec-head a { font-weight: 700; text-decoration: none; }

.duo { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; margin-top: 2.4rem; }
.panel { background: var(--bg); border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 14px; font-size: 1.4rem; }
.today-box { background: linear-gradient(160deg, #fff 0%, #f2f8ff 100%); position: relative; overflow: hidden; }
.today-box::after { content: ""; position: absolute; right: -18px; bottom: -18px; width: 120px; height: 120px; border-radius: 50%; background: var(--baby-soft); opacity: .7; z-index: 0; }
.today-box > * { position: relative; z-index: 1; }
.today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.today-list a { font-family: var(--display); font-size: 1.9rem; font-weight: 700; text-decoration: none; color: var(--green); }
.today-list small { display: block; color: var(--muted); }
.today-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.today-actions a { font-weight: 700; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rank a { display: grid; grid-template-columns: 30px 120px 1fr 54px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.rank a:hover { background: var(--surface); }
.rank .rk { font-family: var(--display); font-weight: 700; color: var(--green); text-align: center; }
.rank li:nth-child(-n+3) .rk { background: var(--green); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; font-size: 0.9rem; }
.rank .nm { font-weight: 700; }
.rank .bar { display: block; height: 10px; border-radius: 10px; background: var(--surface); overflow: hidden; }
.rank .bar i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #a9d3f5, #1565b8); }
.rank .ct { font-size: 0.85rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.panel .more { display: inline-block; margin-top: 12px; font-weight: 700; text-decoration: none; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } .rank a { grid-template-columns: 28px 100px 1fr 48px; } }

.styles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.styles a { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 18px; text-decoration: none; background: var(--tint); color: var(--ink); border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease; }
.styles a:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgb(21 101 184 / 0.13); border-color: rgb(255 255 255 / .8); }
.styles .ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: var(--tink); margin-bottom: 6px; box-shadow: 0 2px 6px rgb(0 0 0 / .06); }
.styles .ic svg { width: 24px; height: 24px; }
.styles b { font-family: var(--display); font-size: 1.15rem; }
.styles span:last-child { font-size: 0.85rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .styles a { transition: none; } .styles a:hover { transform: none; } }

.genband { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: center; margin-top: 3rem; padding: 34px clamp(20px, 4vw, 48px); border-radius: 28px; color: #e8f2fd;
  background: radial-gradient(120% 140% at 100% 0%, #2a7fd0 0%, #1565b8 40%, #0f3d72 100%); box-shadow: 0 14px 40px rgb(15 61 114 / 0.25); }
.genband h2 { color: #fff; margin: 0 0 10px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.genband .eyebrow { color: #a9d3f5; }
.genband p { max-width: 52ch; }
.btn.light { background: #fff; color: #0f3d72; border-color: #fff; }
.mock { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mock li { background: #fff; color: var(--ink); border-radius: 16px; padding: 12px 16px; box-shadow: 0 6px 18px rgb(0 0 0 / .15); display: grid; gap: 6px; }
.mock li:nth-child(2) { margin-left: 22px; } .mock li:nth-child(3) { margin-left: 44px; }
.mock b { font-family: var(--display); font-size: 1.2rem; } .mock b span { color: var(--muted); font-weight: 600; }
.mock i { display: block; height: 8px; border-radius: 8px; background: linear-gradient(90deg, #1565b8 var(--w), #e4f0fb var(--w)); }
.mock small { color: #1d7a52; font-weight: 700; }
@media (max-width: 860px) { .genband { grid-template-columns: 1fr; } .mock li:nth-child(n) { margin-left: 0; } }

.cal12 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.cal12 a { display: grid; gap: 2px; padding: 0 0 12px; border-radius: 16px; overflow: hidden; text-decoration: none; text-align: center; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); }
.cal12 .mn { background: var(--baby-soft); color: var(--green); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; padding: 6px 0; margin-bottom: 6px; }
.cal12 b { font-family: var(--display); font-size: 1.15rem; }
.cal12 span:last-child { font-size: .82rem; color: var(--muted); }
.cal12 a.now { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }
.cal12 a.now .mn { background: var(--green); color: #fff; }
.cal12 a:hover { border-color: var(--baby); }

.trust ul { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.trust li { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); }
.trust .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--tint); color: var(--tink); margin-bottom: 10px; }
.trust .ic svg { width: 24px; height: 24px; }
.trust b { font-family: var(--display); font-size: 1.15rem; }
.trust p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hx { background: radial-gradient(120% 140% at 0% 0%, #1a3a66 0%, #12243f 55%, #0f1e35 100%); }
  :root:not([data-theme="light"]) .hx h1, :root:not([data-theme="light"]) .hx-stats b { color: #e9f1fb; }
  :root:not([data-theme="light"]) .hx .lead, :root:not([data-theme="light"]) .hx-stats span { color: #bccde6; }
  :root:not([data-theme="light"]) .hx-search input { background: #0f1e35; border-color: #2c4d78; color: var(--ink); }
  :root:not([data-theme="light"]) .hx-chips a, :root:not([data-theme="light"]) .hx-kicker { background: #12243f; border-color: #2c4d78; color: #8cc4ff; }
  :root:not([data-theme="light"]) .today-box { background: var(--bg); }
  :root:not([data-theme="light"]) .styles a { background: var(--surface); }
  :root:not([data-theme="light"]) .styles .ic, :root:not([data-theme="light"]) .trust .ic { background: #0f1e35; color: #8cc4ff; }
  :root:not([data-theme="light"]) .mock li { background: #12243f; color: var(--ink); }
}

/* ================= Footer v3 and trust pages ================= */
.foot .wrap { padding-block: 38px 18px; }
.fgrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.fabout p { margin: 0 0 8px; color: #c4d6ee; max-width: 34ch; }
.flogo { font-family: var(--display); font-size: 1.5rem; color: #fff !important; font-weight: 700; }
.flogo span { font-style: italic; color: #a9d3f5; font-weight: 600; }
.fcol h2 { font-family: var(--body); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: #a9d3f5; margin: 6px 0 10px; }
.fcol ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.fcol a { color: #e6eff9; text-decoration: none; }
.fcol a:hover { color: #fff; text-decoration: underline; }
.fbottom { margin-top: 28px; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / 0.14); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; font-size: 0.82rem; color: #a8bcd6; }
.fbottom p { margin: 0; }
@media (max-width: 760px) { .fgrid { grid-template-columns: 1fr 1fr; } .fabout { grid-column: 1 / -1; } }

.trustlayout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 36px; align-items: start; }
.trustnav { position: sticky; top: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.trustnav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.trustnav a { display: block; padding: 6px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.trustnav a:hover { background: var(--surface); color: var(--green); }
@media (max-width: 860px) { .trustlayout { grid-template-columns: 1fr; } .trustnav { position: static; } }
.legal h2 { font-size: 1.3rem; margin-top: 1.8rem; }
.legal p, .legal li { max-width: 70ch; }
.updated { margin-top: 2rem; font-size: 0.88rem; color: var(--muted); }
.authorcard { display: flex; gap: 20px; align-items: flex-start; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.authorcard h2 { margin: 2px 0 6px !important; }
.authorcard p { margin: 0 0 8px; }
.authorcard img, .avatar { width: 96px; height: 96px; border-radius: 50%; flex: none; object-fit: cover; }
.avatar { display: grid; place-items: center; background: var(--green); color: #fff; font-family: var(--display); font-size: 2.4rem; font-weight: 700; }
@media (max-width: 520px) { .authorcard { flex-direction: column; } }
.contactgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.contactgrid > div { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px 10px; box-shadow: var(--shadow); }
.contactgrid h2 { font-size: 1.1rem !important; }
.byline { margin-top: 2rem; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--muted); }

/* long email addresses never overflow their box */
.legal a, .authorcard a, .contactgrid a, .fbottom a { overflow-wrap: anywhere; word-break: break-word; }
.contactgrid > div { display: flex; flex-direction: column; padding: 4px 20px 20px; }
.contactgrid > div p:last-child { margin-top: auto; padding-top: 6px; }
.mailbtn { display: inline-block; padding: 9px 18px; font-size: 0.95rem; text-decoration: none; }
.mailline { margin-top: 18px; font-size: 1rem; }

/* ===== Mobile & tablet version ===== */
html { scroll-padding-top: 16px; -webkit-text-size-adjust: 100%; }
a, button, summary, input, select, label { -webkit-tap-highlight-color: rgba(21, 101, 184, .15); }
h2[id] { scroll-margin-top: 72px; }
.jump { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 18px 0 6px; padding: 2px 0 6px; }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); color: var(--green); font-weight: 700; font-size: .92rem; text-decoration: none; border: 1px solid transparent; }
.jump a:hover, .jump a.on { background: var(--green); color: var(--green-ink); }
.tabbar { display: none; }
.totop { position: fixed; right: 18px; bottom: 22px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(21, 101, 184, .35); }
.totop[hidden] { display: none; }

/* tablets and phones */
@media (max-width: 1024px) {
  .nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
  .logo { min-height: 44px; display: inline-flex; align-items: center; }
  .hx-chips a, .monthjump a, .today-actions a, .more-link, .more, .monthjump, .sec-head a, .fav, .gen summary.qh, details.more-q > summary { min-height: 44px; display: inline-flex; align-items: center; }
  .fav, .monthjump a { justify-content: center; min-width: 44px; }
  .rank a { min-height: 46px; }
  .trustnav a { min-height: 44px; display: flex; align-items: center; }
  .letters a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .chips a, .catchip, .filter button { min-height: 44px; display: inline-flex; align-items: center; }
  .faq summary { padding-block: 14px; }
  .crumbs a { display: inline-block; padding-block: 10px; }
  .fgrid a, .fbottom a { display: inline-block; padding-block: 11px; }
  .results a { padding-block: 12px; }
  .search input, .hx-search input, .gen input, .gen select { min-height: 46px; font-size: 16px; }
}

/* phones */
@media (max-width: 760px) {
  body { font-size: 1.05rem; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .bar { padding-block: 6px 6px; gap: 6px; }
  .logo { font-size: 1.35rem; }
  .logo::before { width: 28px; height: 28px; margin-right: 8px; vertical-align: -6px; background-size: 22px; }
  .search { order: 3; flex-basis: 100%; }
  .search input { padding: 10px 16px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; padding: 2px 16px 8px; margin: 0; max-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; background: var(--surface); }
  .nav a.hot { background: var(--green); }
  h1 { font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.12; }
  .namepage h1 { font-size: clamp(2.6rem, 13vw, 3.4rem); }
  h2 { font-size: 1.45rem; line-height: 1.25; }
  .answer { font-size: 1.08rem; line-height: 1.6; padding: 16px 18px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pn { gap: 10px; }
  .pn a { padding: 14px; min-height: 64px; }
  .card a { min-height: 56px; }
  .hx-art svg { max-width: 150px; }
  .hx { padding: 14px 18px 22px; gap: 4px; margin-top: 12px; border-radius: 22px; }
  .hx h1 { font-size: clamp(1.85rem, 8.2vw, 2.3rem); }
  .facts dd { font-size: 1.1rem; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-flow: column; grid-template-rows: 1fr; max-height: calc(80px + env(safe-area-inset-bottom)); overflow: hidden; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 94%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px rgba(16, 52, 92, .08); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 800; letter-spacing: .01em; }
  .tabbar a > * { flex: none; }
  .tabbar .tl { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current] { color: var(--green); background: var(--surface); }
  .tabbar a[aria-current] svg { stroke-width: 2.3; }
  .totop { bottom: calc(76px + env(safe-area-inset-bottom)); right: 14px; width: 44px; height: 44px; }
  .trustlayout > * { min-width: 0; }
  .trustnav { padding: 8px; border-radius: 14px; box-shadow: none; max-width: 100%; }
  .trustnav ul { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .trustnav ul::-webkit-scrollbar { display: none; }
  .trustnav li { flex: none; }
  .trustnav a { min-height: 42px; display: flex; align-items: center; background: var(--surface); white-space: nowrap; }
  .trustnav a[aria-current] { background: var(--green); color: var(--green-ink); }
}
@media (max-width: 380px) { .facts { grid-template-columns: 1fr; } .tabbar a { font-size: .64rem; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
