/* Rupertini: home cooking blog. Fonts are self-hosted (OFL); nothing is loaded from other sites. */

@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/playfair-display-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/playfair-display-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 700; font-display: swap;
  src: url("fonts/playfair-display-cyrillic-700-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 700; font-display: swap;
  src: url("fonts/playfair-display-latin-700-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 900; font-display: swap;
  src: url("fonts/playfair-display-cyrillic-900-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 900; font-display: swap;
  src: url("fonts/playfair-display-latin-900-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/manrope-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/manrope-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/manrope-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/manrope-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/manrope-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/manrope-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #ffffff;
  --ink: #1c2117;
  --muted: #5b6452;
  --olive: #2f3b26;
  --on-olive: #f3f5ee;
  --tomato: #c8361e;
  --ochre: #d9a441;
  --sage: #eef2e7;
  --line: #dde2d4;
  --control: #2f3b26;
  --display: "Playfair Display", "Times New Roman", serif;
  --text: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171d13;
    --ink: #eef0e6;
    --muted: #a7b09b;
    --olive: #222b1b;
    --on-olive: #eef0e6;
    --tomato: #ee6c51;
    --sage: #212a1b;
    --line: #333f2b;
    --control: #a7b09b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--text);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--tomato); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0; }
main { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter) 72px; }

/* header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 32px;
  padding: 18px max(var(--gutter), (100% - var(--wrap)) / 2 + var(--gutter));
  background: var(--olive);
  color: var(--on-olive);
}
.brand { color: var(--on-olive); text-decoration: none; }
.brand b { font: italic 700 2.1rem/1 var(--display); letter-spacing: -0.01em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 26px; font-weight: 600; font-size: 0.95rem; }
.site-header nav a { color: var(--on-olive); text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current] { border-bottom-color: var(--ochre); }

/* footer */
.site-footer { background: var(--olive); color: var(--on-olive); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 20px 48px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 44px var(--gutter) 36px;
  font-size: 0.92rem;
}
.footer-brand { margin: 0; }
.footer-brand b { font: italic 700 1.6rem var(--display); }
.site-footer nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 24px; align-content: start; }
.site-footer nav a { color: var(--on-olive); text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.footer-note { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.15); opacity: 0.75; }

/* shared */
.lead { color: var(--muted); font-size: 1.08rem; max-width: 36em; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 22px 0 0; padding-top: 16px; border-top: 2px solid var(--ink); }
.facts div { min-width: 7em; }
.facts dt { color: var(--muted); font-size: 0.82rem; }
.facts dd { margin: 0; font-weight: 700; }

/* home: hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(24px, 4vw, 48px) 0 24px;
}
.hero-art { display: block; background: var(--cat); border-radius: 4px; overflow: hidden; }
.hero-img { width: 100%; animation: plate-in 0.9s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes plate-in { from { opacity: 0; transform: rotate(-14deg) scale(0.92); } to { opacity: 1; transform: none; } }
.hero-new { margin: 0 0 14px; color: var(--tomato); font-weight: 700; font-size: 0.95rem; }
.hero h1 { font-weight: 900; font-size: clamp(2.5rem, 5.6vw, 4.8rem); line-height: 1.02; letter-spacing: -0.02em; }
.hero h1 a { color: var(--ink); text-decoration: none; }
.hero h1 a:hover { color: var(--tomato); }
.hero .lead { margin: 18px 0 0; }

.intro { max-width: 46em; padding: 28px 0 8px; }
.intro p { margin: 0; font: italic 700 clamp(1.25rem, 2.2vw, 1.6rem)/1.4 var(--display); }

/* home: sections mosaic */
.cats { padding-top: 48px; }
.cats > h2, .recent-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 20px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 14px; }
.cat-tile {
  display: flex;
  flex-direction: column;
  padding: 14px 14px 18px;
  background: var(--cat);
  border-radius: 4px;
  color: #1c2117;
  text-decoration: none;
}
.cat-art { width: 78%; margin: 0 auto 10px; }
.cat-name { font: 700 1.3rem/1.15 var(--display); }
.cat-count { margin-top: 4px; font-size: 0.85rem; opacity: 0.75; }
.cat-tile:hover .cat-name { text-decoration: underline; text-decoration-color: var(--tomato); text-decoration-thickness: 3px; }
.cat-tile-big { grid-column: span 2; grid-row: span 2; padding: 22px 24px 26px; }
.cat-tile-big .cat-art { width: 82%; margin-bottom: 18px; }
.cat-tile-big .cat-name { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 900; }
.cat-tile:last-child:not(.cat-tile-big) { grid-column: span 2; display: grid; grid-template-columns: 46% 1fr; align-content: center; column-gap: 18px; }
.cat-tile:last-child:not(.cat-tile-big) .cat-art { grid-row: span 2; width: 100%; margin: 0; }
.cat-tile:last-child:not(.cat-tile-big) .cat-name { align-self: end; }

/* home: soup band */
.band {
  margin: 56px calc(var(--gutter) * -1) 0;
  padding: 40px var(--gutter) 44px;
  background: var(--cat);
  color: #1c2117;
}
.band .tile, .band .tile-title { color: #1c2117; }
.band .tile-meta { color: #4b5443; }
.band a { color: #a8301a; }
.band-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; margin-bottom: 22px; }
.band-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 900; }
.band-head p { margin: 0; }

/* tiles */
.recent { padding-top: 56px; }
.recent-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.recent-head h2 { margin-bottom: 20px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 32px 22px; }
.tiles-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles-mag { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; }
.tile { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.tile-art { width: 100%; border-radius: 4px; margin-bottom: 12px; transition: transform 0.25s ease; }
.tile:hover .tile-art { transform: rotate(-3deg); }
.tile-cat { color: var(--tomato); font-size: 0.82rem; font-weight: 700; }
.tile-title { font: 700 1.2rem/1.2 var(--display); margin: 2px 0 4px; }
.tile:hover .tile-title { text-decoration: underline; text-decoration-color: var(--tomato); text-decoration-thickness: 2px; }
.tile-meta { color: var(--muted); font-size: 0.88rem; }
.tile-big { grid-column: span 2; grid-row: span 2; }
.tile-big .tile-title { font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 900; }

/* all recipes: time filter without JS */
.page-head { padding: clamp(28px, 5vw, 56px) 0 8px; }
.page-head h1 { font-weight: 900; font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.02em; }
.page-head p { color: var(--muted); margin: 10px 0 0; }
.filter > input { position: absolute; opacity: 0; pointer-events: none; }
.filter-labels { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 18px 0 30px; border-bottom: 1px solid var(--line); }
.filter-labels label { padding: 10px 0; border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 600; cursor: pointer; }
.filter-labels label:hover { color: var(--tomato); }
#all:checked ~ .filter-labels label[for="all"],
#f30:checked ~ .filter-labels label[for="f30"],
#f60:checked ~ .filter-labels label[for="f60"],
#flong:checked ~ .filter-labels label[for="flong"] { border-bottom-color: var(--tomato); color: var(--tomato); }
#all:focus-visible ~ .filter-labels label[for="all"],
#f30:focus-visible ~ .filter-labels label[for="f30"],
#f60:focus-visible ~ .filter-labels label[for="f60"],
#flong:focus-visible ~ .filter-labels label[for="flong"] { outline: 3px solid var(--tomato); outline-offset: 3px; }
#f30:checked ~ .tiles .tile:not(.t30),
#f60:checked ~ .tiles .tlong,
#flong:checked ~ .tiles .tile:not(.tlong) { display: none; }

/* section page */
.section-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px 48px;
  align-items: center;
  margin: 28px 0 40px;
  padding: clamp(20px, 4vw, 44px);
  background: var(--cat);
  border-radius: 4px;
  color: #1c2117;
}
.section-hero h1 { font-weight: 900; font-size: clamp(2.4rem, 5vw, 4.2rem); letter-spacing: -0.02em; }
.section-hero p { margin: 14px 0 0; max-width: 30em; font-size: 1.1rem; }
.section-hero .section-count { font-weight: 700; font-size: 0.95rem; }
.section-art { width: 100%; max-width: 380px; justify-self: end; }

/* recipe page */
.recipe-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(24px, 4vw, 48px) 0 40px;
}
.crumbs { margin: 0 0 12px; font-weight: 700; font-size: 0.95rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.recipe-head h1 { font-weight: 900; font-size: clamp(2.2rem, 4.8vw, 4rem); line-height: 1.04; letter-spacing: -0.02em; }
.recipe-head .lead { margin: 18px 0 0; }
.recipe-art { width: 100%; border-radius: 4px; }

.recipe-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: 32px clamp(28px, 5vw, 64px); align-items: start; }
.ingredients-box { position: sticky; top: 16px; padding: 22px 22px 14px; background: var(--sage); border-radius: 4px; }
.ingredients-box h2, .recipe-main h2 { font-size: 1.6rem; margin-bottom: 12px; }
.recipe-main h2 { margin-top: 36px; }
.recipe-main > h2:first-child { margin-top: 0; }
.recipe-single { max-width: 46em; }
.recipe-main p { max-width: 38em; }
.ingredients { margin: 0; padding: 0; list-style: none; font-size: 0.97rem; }
.ingredients li { padding: 8px 0; border-top: 1px solid var(--line); }
.ingredients li:first-child { border-top: 0; }
.ingredients li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--tomato); }
.recipe-main .ingredients { max-width: 38em; }
.q.changed { color: var(--tomato); font-weight: 700; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; max-width: 38em; }
.steps li { position: relative; margin: 0 0 22px; padding-left: 3.4rem; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.2rem;
  width: 2.4rem;
  color: var(--tomato);
  font: 900 2rem/1 var(--display);
  text-align: right;
}
.steps li.done { opacity: 0.5; }
.ingredients-box .ingredients li, .recipe-main .ingredients li { position: relative; }
.has-ticks .ingredients li { padding-left: 30px; }
.tick {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  margin: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--control);
  border-radius: 3px;
  background: var(--paper);
  cursor: pointer;
}
.ingredients .tick { left: 0; top: 11px; }
.has-ticks .steps li { padding-right: 34px; }
.steps .tick { right: 0; top: 4px; }
.tick:checked { background: var(--tomato); border-color: var(--tomato); }
.tick:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.scaler { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.scaler-btn {
  width: 38px;
  height: 38px;
  border: 2px solid var(--control);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font: 700 1.2rem/1 var(--text);
  cursor: pointer;
}
.scaler-btn:hover { border-color: var(--tomato); color: var(--tomato); }
.scaler-val { min-width: 6.5em; text-align: center; font-weight: 700; }
.recipe-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin: 40px 0 0; font-size: 0.95rem; }
.reset-ticks { padding: 0; border: 0; background: none; color: var(--tomato); font: 600 0.95rem var(--text); text-decoration: underline; cursor: pointer; }
.more { margin-top: 64px; padding-top: 28px; border-top: 2px solid var(--ink); }
.more h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 22px; }
.more h2 a { color: inherit; }

/* about, 404 */
.prose { max-width: 40em; padding: clamp(28px, 5vw, 56px) 0 0; }
.prose h1 { font-weight: 900; font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.02em; margin-bottom: 18px; }
.prose h2 { font-size: 1.6rem; margin: 36px 0 12px; }
.prose p { margin: 0 0 16px; }
.prose .lead { color: var(--ink); font: italic 700 1.4rem/1.4 var(--display); }

/* family guide: Android / iPhone / Windows switch without JavaScript */
.tabs { padding-top: 24px; }
.tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tab-labels { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px auto 16px; }
.tab-labels label {
  padding: 10px 28px;
  border: 2px solid var(--control);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
#tab-android:checked ~ .tab-labels label[for="tab-android"],
#tab-ios:checked ~ .tab-labels label[for="tab-ios"],
#tab-windows:checked ~ .tab-labels label[for="tab-windows"] { background: var(--tomato); border-color: var(--tomato); color: #fff; }
#tab-android:focus-visible ~ .tab-labels label[for="tab-android"],
#tab-ios:focus-visible ~ .tab-labels label[for="tab-ios"],
#tab-windows:focus-visible ~ .tab-labels label[for="tab-windows"] { outline: 3px solid var(--tomato); outline-offset: 3px; }
.tab-panel { display: none; max-width: 760px; margin: 0 auto; padding: 24px; background: var(--sage); border-radius: 4px; }
.tab-panel h1 { font-weight: 900; font-size: 1.9rem; margin-bottom: 12px; }
.tab-panel h2 { font-size: 1.35rem; margin: 28px 0 10px; }
#tab-android:checked ~ #panel-android,
#tab-ios:checked ~ #panel-ios,
#tab-windows:checked ~ #panel-windows { display: block; }
.recipe code { word-break: break-all; }

/* tablets and phones */
@media (max-width: 900px) {
  .cat-grid, .tiles-mag, .tiles-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-tile-big { grid-row: span 1; }
  .cat-tile-big .cat-art { width: 60%; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .brand b { font-size: 1.8rem; }
  .hero, .recipe-head, .section-hero { grid-template-columns: 1fr; }
  .hero-art, .recipe-art, .section-art { order: -1; }
  .recipe-art, .section-art { width: 72%; max-width: 320px; justify-self: start; }
  .recipe-grid { grid-template-columns: 1fr; }
  .ingredients-box { position: static; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .tile-big { grid-row: span 1; }
  .tile-title { font-size: 1.05rem; }
  .cat-tile:last-child:not(.cat-tile-big) { grid-template-columns: 40% 1fr; }
  .steps li { padding-left: 2.8rem; }
  .steps li::before { width: 2rem; font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-img { animation: none; }
  .tile-art { transition: none; }
  .tile:hover .tile-art { transform: none; }
}

/* print: just the recipe */
@media print {
  body { font-size: 11pt; background: #fff; color: #000; }
  .site-header nav, .site-footer, .more, .recipe-tools, .recipe-art, .scaler, .tick { display: none; }
  .site-header { background: none; color: #000; padding: 0 0 8pt; }
  .brand { color: #000; }
  .recipe-head { display: block; padding: 0 0 12pt; }
  .recipe-grid { grid-template-columns: 1fr 2fr; gap: 18pt; }
  .ingredients-box { position: static; background: none; border: 1px solid #999; }
  .steps li::before { color: #000; }
  a { color: #000; text-decoration: none; }
}
