@import url('https://fonts.googleapis.com/css2?family=Familjen+Grotesk:ital,wght@0,400..700;1,400..700&family=Spline+Sans+Mono:wght@400;500&display=swap');

/* Ricette — foglio a righe. Le regole sono limitate a body.recipe: indice e
   altre pagine mantengono il loro foglio di stile. */
body.recipe {
  --recipe-paper: oklch(98.8% 0.002 250);
  --recipe-ink: oklch(22% 0.012 250);
  --recipe-ink-2: oklch(48% 0.014 250);
  --recipe-muted: oklch(63% 0.012 250);
  --recipe-rule: oklch(88% 0.022 245);
  --recipe-link: oklch(48% 0.150 25);
  --recipe-link-hover: oklch(38% 0.140 25);
  --recipe-link-under: oklch(82% 0.070 25);
  --recipe-image: oklch(96% 0.004 250);
  --recipe-font: "Familjen Grotesk", "Helvetica Neue", Helvetica, sans-serif;
  --recipe-data: "Spline Sans Mono", ui-monospace, monospace;
  margin: 0;
  background: var(--recipe-paper);
  color: var(--recipe-ink);
  font-family: var(--recipe-font);
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.recipe *, .recipe *::before, .recipe *::after { box-sizing: border-box; }
.recipe-sheet {
  max-width: 66rem;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.25rem) clamp(1.25rem, 4vw, 3rem) clamp(3.5rem, 7vw, 7rem);
}
.recipe-sheet > * { width: 100%; max-width: 48rem; margin-right: auto; margin-left: auto; }
.recipe a { color: var(--recipe-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .17em; text-decoration-color: var(--recipe-link-under); transition: color 150ms ease-out, text-decoration-color 150ms ease-out; }
.recipe a:hover { color: var(--recipe-link-hover); text-decoration-color: var(--recipe-link); }
.recipe a:focus-visible { outline: 2px solid var(--recipe-link); outline-offset: 3px; text-decoration: none; }

.recipe .recipe-masthead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0; font-family: var(--recipe-data); font-size: .97rem; letter-spacing: .06em; text-transform: uppercase; color: var(--recipe-muted); }
.recipe .recipe-masthead a { color: var(--recipe-ink); text-decoration: none; }
.recipe .recipe-masthead .stato { color: var(--recipe-muted); }
.recipe-opening { margin-top: clamp(3rem, 8vw, 6rem); }
.recipe h1 { max-width: 24ch; margin: 0; color: var(--recipe-ink); font-family: var(--recipe-font); font-size: clamp(2.6rem, 7vw, 4rem); font-weight: 500; line-height: 1.02; letter-spacing: -.032em; text-wrap: balance; }
.recipe-opening figure { width: 100%; margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; padding: 0; background: var(--recipe-image); box-shadow: none; transform: none; }
.recipe-opening figure img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; background: var(--recipe-image); object-fit: cover; object-position: center; }
.recipe-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; width: 100%; margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; padding: 0; border-top: 1px solid var(--recipe-rule); border-bottom: 1px solid var(--recipe-rule); }
.recipe-meta div { min-width: 0; padding: 1.1rem 1.5rem 1.1rem 0; }
.recipe-meta dt { margin: 0; color: var(--recipe-muted); font-family: var(--recipe-font); font-size: .97rem; font-weight: 500; line-height: 1.3; letter-spacing: .09em; text-transform: uppercase; }
.recipe-meta dd { margin: .5rem 0 0; color: var(--recipe-ink); font-family: var(--recipe-data); font-size: 1.5rem; font-weight: 400; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.recipe .standfirst { max-width: none; margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; color: var(--recipe-ink-2); font-size: 1.15rem; font-style: normal; line-height: 1.6; text-align: left; text-wrap: pretty; }

.recipe-section { margin-top: clamp(3.5rem, 8vw, 6rem); }
.recipe-section > h2, .recipe-colophon h2 { margin: 0 0 1.5rem; color: var(--recipe-ink); font-family: var(--recipe-font); font-size: 1.45rem; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; text-transform: none; }
.recipe-prose { max-width: 48rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); color: var(--recipe-ink-2); text-align: left; text-wrap: pretty; }
.recipe-prose p { max-width: 34rem; }
.recipe-prose > :first-child { margin-top: 0; }
.recipe-prose > :last-child { margin-bottom: 0; }
.recipe-prose ul, .recipe-prose ol, .body-list ul, .body-list ol { margin: 1.5rem 0; padding-left: 1.5rem; color: var(--recipe-ink-2); }
.recipe-prose li, .body-list li { margin: .5rem 0; }
.recipe-prose blockquote { max-width: 34rem; margin: 1.5rem 0; padding: 0 0 0 1.5rem; border: 0; color: var(--recipe-ink-2); }
.recipe-prose code { padding: .1em .3em; background: transparent; color: var(--recipe-ink); font-family: var(--recipe-data); font-size: .97rem; }

.recipe .rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--recipe-rule); }
.recipe .row-data { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: .7rem 0; border-bottom: 1px solid var(--recipe-rule); text-wrap: pretty; }
.recipe .row-data .row-value { flex: none; color: var(--recipe-ink); font-family: var(--recipe-data); font-size: .97rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recipe .row-total { font-weight: 600; }
.recipe .row-total .row-value { font-weight: 500; }

.recipe .notes ul, .recipe .sources ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--recipe-rule); }
.recipe .notes li, .recipe .sources li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); margin: 0; padding: .85rem 0; border-bottom: 1px solid var(--recipe-rule); text-wrap: pretty; }
.recipe .notes .row-text, .recipe .sources .row-text { min-width: 0; }
.recipe .notes li::before, .recipe .sources li::before { color: var(--recipe-link); font-family: var(--recipe-data); font-size: .97rem; line-height: 1.8; font-variant-numeric: tabular-nums; }
.recipe .notes li::before { content: counter(list-item, decimal-leading-zero); }
.recipe .sources ol { counter-reset: list-item; }
.recipe .sources li::before { content: counter(list-item, decimal-leading-zero); }
.recipe .notes strong, .recipe .sources strong { font-weight: 600; }
.recipe .sources { color: var(--recipe-ink-2); font-size: .97rem; line-height: 1.6; }

.recipe .nutrition > h2 { margin-bottom: 1rem; }
.recipe .nutrition .apparato__note { max-width: 34rem; margin: 0 0 1.75rem; padding: 0; color: var(--recipe-ink-2); font-size: 17px; line-height: 1.62; text-wrap: pretty; }
.recipe .nutrition .scroll { width: 100%; max-width: none; margin: 0; padding: 0; overflow-x: auto; background: transparent; border: 0; }
.recipe .nutrition .matrix { width: 100%; min-width: 21rem; border-collapse: collapse; color: var(--recipe-ink); font-size: 17px; }
.recipe .nutrition .matrix th { padding: 0 1.5rem .7rem 0; border-bottom: 1px solid var(--recipe-rule); color: var(--recipe-muted); font-family: var(--recipe-font); font-size: .97rem; font-weight: 500; letter-spacing: .09em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.recipe .nutrition .matrix th:not(:first-child) { text-align: right; }
.recipe .nutrition .matrix td { padding: .7rem 1.5rem .7rem 0; border-bottom: 1px solid var(--recipe-rule); vertical-align: baseline; }
.recipe .nutrition .matrix td.n { color: var(--recipe-ink); font-family: var(--recipe-data); font-size: .97rem; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recipe .nutrition .matrix th:last-child, .recipe .nutrition .matrix td:last-child { padding-right: 0; color: var(--recipe-muted); }
.recipe .nutrition .matrix .nutrition-detail td { color: var(--recipe-ink-2); }
.recipe .nutrition .matrix .nutrition-detail td:first-child { padding-left: 1.2rem; }
.recipe .nutrition .matrix tr:has(td:first-child:not(.n)) td:first-child { }
.recipe .nutrition .matrix tr:has(td:first-child:not(.n)) td:first-child { }

.recipe-colophon { margin-top: clamp(4rem, 9vw, 7rem); color: var(--recipe-ink-2); font-size: 17px; }
.recipe-colophon h2 { margin-bottom: 1.5rem; color: var(--recipe-muted); font-family: var(--recipe-font); font-size: .97rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; }
.recipe-colophon ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--recipe-rule); }
.recipe-colophon li { margin: 0; padding: .7rem 0; border-bottom: 1px solid var(--recipe-rule); }
.recipe-colophon .file { margin: 2.5rem 0 0; color: var(--recipe-muted); font-family: var(--recipe-data); font-size: .97rem; letter-spacing: .02em; }

@media (max-width: 34rem) {
  .recipe-sheet { padding-right: 1.25rem; padding-left: 1.25rem; }
  .recipe .recipe-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  body.recipe { background: #fff; color: #000; font-size: 10.5pt; }
  .recipe-sheet { max-width: none; padding: 0; }
  .recipe a { color: inherit; text-decoration: none; }
  .recipe a[href^="http"]::after { content: " (" attr(href) ")"; font-family: var(--recipe-data); font-size: 8pt; word-break: break-all; }
}
