:root {
    --page-background: #EAE3D2;             /* paper-soft (page) */
    --background: #F4EFE6;                  /* paper (cards) */
    --foreground: #181610;                  /* ink */
    --nav: #6B6555;                         /* ink-mute */
    --original-title: #6B6555;
    --icons-separator: #C9C0AE;             /* rule */
    --search-bar: #EAE3D2;
    --search-bar-outline: #C9C0AE;
    --search-results-separator: #C9C0AE;
    --highlighted-search-result: #F8F4EA;
    --h2: #6B6555;
    --link: #B74122;                        /* tomato accent */
    --attention: #B74122;
    --horizontal-rule: #C9C0AE;
    --footer: #6B6555;

    --sans: 'Fraunces', Georgia, serif;
    --serif: 'Fraunces', Georgia, serif;
    --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --sage: #7A8265;

    /* spacing scale — used throughout the layout for vertical and gap rhythm */
    --space-1: 0.5rem;   /* tight: icon gaps, label-to-value */
    --space-2: 1rem;     /* base: item-to-item, paragraph-level */
    --space-3: 1.5rem;   /* loose: related-group spacing */
    --space-4: 2rem;     /* major block padding/margin */
    --space-5: 3rem;     /* section breaks between major blocks */
    --space-6: 4rem;     /* page-level breaks */

    --step-number-column-width: 3.5em;
    --ingredient-quantity-column-width: 5.5em;
    --ingredient-name-column-width: 13em;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page-background: #1A1814;         /* dark warm brown */
        --background: #232017;              /* slightly lighter */
        --foreground: #F4EFE6;              /* cream as ink */
        --nav: #B0A990;
        --original-title: #B0A990;
        --icons-separator: #3A352A;
        --search-bar: #232017;
        --search-bar-outline: #3A352A;
        --search-results-separator: #3A352A;
        --highlighted-search-result: #2A2519;
        --h2: #B0A990;
        --link: #E66645;
        --attention: #E66645;
        --horizontal-rule: #3A352A;
        --footer: #B0A990;
        --sage: #95A07A;
    }

    /* accessing the colors defined inside the svg isn't possible when embedded as an image and i don't want to inline them, so this is the best i can do */
    header .logo,
    header ul li img,
    h3 .icons img {
        filter: invert() hue-rotate(180deg);
    }
}

/* paper texture: subtle SVG noise multiplied/screened over the page */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 100;
}
@media (prefers-color-scheme: dark) {
    body::before { mix-blend-mode: screen; opacity: 0.35; }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    font-size: 18px;
    line-height: 1.4;
    font-family: var(--sans);
    scroll-behavior: smooth;
}
body {
    background-color: var(--page-background);
    color: var(--foreground);
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    counter-reset: step;
}

header {
    padding: 1em;
    overflow: auto;  /* clearfix */
    margin-bottom: 1em;
}
header .name {
    display: inline-block;
}
header nav {
    margin: 0;
    color: var(--nav);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8em;
    margin-top: -0.1rem;  /* to counteract line height making it appear to have a larger top-margin than left-margin */
}
header nav a {
    text-decoration: none;
    color: inherit;
}
header nav i {
    font-style: normal;
    padding: 0 0.2em;
}
header .logo {
    height: 0.75em;
    padding-right: 0.1em;
}
h1 {
    font-size: 2rem;
    margin: 0.4rem 0;
    line-height: 1.2;
}
h1 sup {
    font-size: 0.64rem;
    vertical-align: text-top;
    color: orange;
    margin-left: -0.1rem;
    line-height: 1.6;
}
h1 em {
    color: var(--original-title);
    font-size: 1.4rem;  /* to match x-height of heading */
    font-weight: normal;
    font-style: normal;
    display: inline-block;
}
h1 span,
h3 span {  /* separate original name after this a little (but not if it's on another line) */
    padding-right: 0.4rem;
}
header ul {
    font-size: 0.8em;
    font-weight: normal;
    text-transform: uppercase;
    float: right;
    margin: 0;
}
header ul li {
    list-style-type: none;
    padding: 0.5em 0.7em 0.5em 0.6em;  /* different on left and right to compensate for space (on left) and border (on right) */
    border-right: 1px solid var(--icons-separator);
    text-align: center;
    display: inline-block;
}
header ul li:last-child {
    border-right: none;
    padding-right: 0;
}
header ul li img {
    height: 2em;
    padding-bottom: 0.4em;
    display: block;
    margin: auto;
}
header ul li a {
    text-decoration: none;
    color: inherit;
}
header p {
    max-width: 66%;
    margin: 0.5rem 0;
    font-family: var(--serif);
}
header .nutrition {
    padding-bottom: 0.5em;
    font-size: 0.8em;
    font-family: var(--sans);
    opacity: 0.67;  /* slightly gray */
}
header .nutrition img {
    vertical-align: bottom;
    height: 1.3em;
    padding-right: 0.3em;
}
@media screen and (max-width: 700px) {
    header {
        margin-bottom: 0;
    }
    header ul {
        float: none;
        margin-top: 1em;
    }
    header ul li {
        padding: 0;
        padding-bottom: 0.5em;
        display: block;
        border: none;
        text-align: left;
    }
    header ul li img {
        vertical-align: bottom;
        height: 1.3em;
        padding: 0;
        padding-right: 0.3em;
        display: inline;
    }
    header p {
        max-width: 100%;
    }
}

.search {
    margin: var(--space-2) auto var(--space-3);
    max-width: 32em;
    padding: 0 var(--space-2);
}
.search input {
    background: transparent;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--horizontal-rule);
    padding: var(--space-1) 0;
    width: 100%;
    font-family: var(--serif);
    font-size: 1.15rem;
    font-style: italic;
    font-variation-settings: 'opsz' 30, 'wght' 350;
    color: var(--foreground);
    text-align: center;
    transition: border-color 0.3s;
    -webkit-appearance: none;
}
.search input:focus {
    outline: none;
    border-bottom-color: var(--link);
}
.search input::placeholder {
    color: var(--nav);
    font-style: italic;
}
.search input[disabled] {
    cursor: not-allowed;
}
.search .error {
    color: var(--attention);
    font-size: 0.8em;
    text-align: center;
    padding: var(--space-1) 0;
}
.search .results {
    margin-top: var(--space-1);
}
.search .results:empty {
    display: none;
}
.searchresult {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: var(--space-2);
    padding: 0.7rem 0.9rem;
    background: var(--background);
    border-bottom: 1px solid var(--horizontal-rule);
    color: var(--foreground);
    text-decoration: none;
    align-items: baseline;
    transition: color 0.15s, background-color 0.15s;
}
.searchresult:first-child {
    border-top: 1px solid var(--horizontal-rule);
}
.searchresult:last-child {
    border-bottom: 0;
}
.searchresult.selected,
.searchresult:hover {
    background: var(--highlighted-search-result);
    color: var(--link);
    opacity: 1;
}
.searchresult h3 {
    grid-column: 1;
    margin: 0;
    font-size: 1.05rem;
    font-variation-settings: 'opsz' 24, 'wght' 430;
    font-weight: normal;
    line-height: 1.25;
}
.searchresult h3 .title {
    padding-right: 0.4em;
}
.searchresult h3 em {
    font-style: italic;
    color: var(--original-title);
    font-size: 0.88rem;
    font-variation-settings: 'opsz' 18, 'wght' 350;
}
.searchresult .icons {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-style: normal;
}
.searchresult .icons img {
    height: 0.95em;
    width: auto;
}
.searchresult.more {
    display: block;
    text-align: center;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--link);
    padding: 0.8rem 0.9rem;
}
.searchresult.more:hover {
    background: var(--highlighted-search-result);
}

.servingsuggestion {
    width: 48em;
    max-width: 100%;
    margin: auto;
}
.servingsuggestion img {
    display: block;
    width: 100%;
}
.servingsuggestion a {
    text-decoration: none;
    color: inherit;
}
.servingsuggestion a:hover {
    opacity: 1;
}
.servingsuggestion .attribution {
    font-size: 0.6em;
    line-height: 1;
    padding: 0 0.4em 0.4em 0;
    margin-top: -1.4em;  /* 1em text height plus 0.4em bottom padding */
    text-align: right;
    color: var(--background);
}

section {
    padding: 0.01em 1em;  /* avoid margin collapse */
    max-width: 48em;
    background-color: var(--background);
    margin: 0 auto 1em;
    overflow: auto;  /* clearfix */
}

h2 {
    margin: 0.8rem 0;
    color: var(--h2);
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 0.1em;
    font-weight: normal;
    counter-reset: step;  /* handy if used on a recipe page */
    clear: both;
}
.category-nav {
    max-width: 48em;
    margin: var(--space-3) auto var(--space-2);
    padding: 0 var(--space-2);
    text-align: center;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1.8;
}
.category-nav a {
    color: var(--nav);
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}
.category-nav a:not(:last-child)::after {
    content: '·';
    color: var(--horizontal-rule);
    margin: 0 0.6em;
    letter-spacing: 0;
}
.category-nav a:hover {
    color: var(--link);
}
h3 {
    margin: 0.5rem 0 1rem;  /* larger bottom margin to fix spacing if the last recipe in a category has no description */
    font-size: 1.3rem;
}
h3 a {
    text-decoration: none;
    color: inherit;
}
h3 em {
    color: var(--original-title);
    font-size: 0.95rem;  /* to match x-height of heading */
    font-weight: normal;
    font-style: normal;
    display: inline-block;
}
h3 .icons {
    font-size: 0.9em;
    margin-left: 0.5em;  /* avoid text getting too close to them */
    float: right;
    line-height: 1.8;  /* visually center them */
}
h3 .icons img {
    height: 1em;
}
h3 + p {
    margin-top: -0.5rem;  /* move the description a bit closer to the recipe's title */
    font-family: var(--serif);
}
h3 + h3 {
    margin-top: -0.5rem;  /* in the same vein, move the recipe title below a description-less recipe a bit upwards */
}
.index .servingsuggestion {
    width: 100%;
    margin: 1rem 0;
}

ul, p {
    margin: 1rem 0;
}
hr {
    border: 0;
    width: 100%;
    border-top: 1px solid var(--horizontal-rule);  /* using a border instead of background color to circument no-background-colors print settings */
}
.recipe hr {
    counter-increment: step;
    margin-bottom: -2.2em;
    clear: right;  /* fix for long descriptions pushing across the hr in firefox */
}
.recipe hr + hr {  /* in case there is a leading hr in the document in addition to the hardcoded one */
    display: none;
}
.recipe hr:first-child {  /* hide first hr's line, but keep the step number */
    border-color: transparent;
}
.recipe hr::after {
    content: counter(step);
    display: inline-block;
    color: var(--link);
    background-color: transparent;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.8em;
    font-variation-settings: 'opsz' 72, 'wght' 320, 'SOFT' 100;
    font-variant-numeric: oldstyle-nums;
    line-height: 1;
    min-width: 1.4em;
    text-align: center;
    margin-top: 1rem;
}
.recipe hr + ul {
    display: inline-block;
    margin-left: var(--step-number-column-width);
    width: calc(var(--ingredient-quantity-column-width) + var(--ingredient-name-column-width));
    vertical-align: top;
}
.recipe hr + ul + blockquote {
    display: inline-block;
    width: calc(100% - var(--step-number-column-width) - var(--ingredient-name-column-width) - var(--ingredient-quantity-column-width));
    vertical-align: top;
    float: right;
}
.recipe hr + blockquote {
    display: inline-block;
    margin-left: var(--step-number-column-width);
    width: calc(100% - var(--step-number-column-width));
}
@media screen and (max-width: 700px) {
    .recipe hr + ul {
        margin-bottom: 0;
        width: auto;
    }
    .recipe hr + ul + blockquote,
    .recipe hr + blockquote {
        display: block !important;
        width: calc(100% - var(--step-number-column-width));
        margin-left: var(--step-number-column-width);
    }
}
.recipe hr + ul li {
    list-style-type: none;
    padding-right: 1em;  /* prevent ingredient names getting too close to the instructions */
}
.recipe hr + ul li:has(> code:first-child) {
    display: grid;
    grid-template-columns: var(--ingredient-quantity-column-width) 1fr;
    column-gap: 0.5em;
}
.recipe hr + ul li > code:first-child {
    grid-column: 1;
    text-align: right;
    background: transparent;
    padding: 0;
    margin: 0;
    min-width: 0;
}
code {
    font-family: var(--sans);
}
blockquote {
    font-family: var(--serif);
}
blockquote img {
    max-width: 100%;
}
blockquote blockquote blockquote {  /* for drawing attention to part of an instruction */
    background-image: url("tabler-icons/tabler-icon-flag.svg");
    background-size: 1.2em;
    background-position: -0.2em 0.1em;
    background-repeat: no-repeat;
    padding-left: 1.3em;
    font-style: italic;
    color: var(--attention);
}
blockquote blockquote blockquote em {
    font-style: normal;
}
a {
    color: var(--link);
}
a:hover {
    opacity: 0.6;
}

/* === Tier 3: index editorial layout === */
.index-mast {
    padding: var(--space-4) 0 var(--space-2);
    margin-bottom: 0;
    border-bottom: 1px solid var(--horizontal-rule);
    text-align: center;
    overflow: visible;
}
.index-mast .title {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-variation-settings: 'opsz' 96, 'wght' 380, 'SOFT' 80;
    line-height: 1;
    letter-spacing: -0.035em;
    margin: 0;
    font-weight: normal;
    text-transform: none;
}
.ornament {
    font-family: var(--serif);
    font-style: italic;
    color: var(--link);
    font-size: 1rem;
    letter-spacing: 0.5em;
    line-height: 1;
}
.index-mast .ornament,
.recipe-head .ornament {
    margin-top: var(--space-1);
}
.index-lede {
    max-width: 32ch;
    margin: var(--space-5) auto 0;
    text-align: center;
    font-size: 1.4rem;
    line-height: 1.4;
    font-variation-settings: 'opsz' 36, 'wght' 350;
    color: var(--foreground);
    padding: 0 var(--space-2);
    font-family: var(--serif);
}
.index-lede em {
    font-style: italic;
    color: var(--link);
}

/* sticky-sidebar category sections (override base section card) */
main.index .index-cat {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: var(--space-5);
    padding: var(--space-5) 0;
    border-bottom: 1px solid var(--horizontal-rule);
    max-width: 64em;
    margin: 0 auto;
    background: transparent;
}
.index-cat .cat-name {
    position: sticky;
    top: 2rem;
    align-self: start;
}
.index-cat .cat-name h2 {
    font-family: var(--serif);
    font-style: italic;
    font-size: 2rem;
    color: var(--link);
    line-height: 1;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
}
.index-cat .cat-name h2 a { color: inherit; text-decoration: none; }
.index-cat .cat-name .count {
    display: block;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--nav);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.6rem;
}
.index-cat .cat-name .more {
    display: inline-block;
    margin-top: 1.2rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--foreground);
    text-decoration: none;
    border-bottom: 1px solid var(--horizontal-rule);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}
.index-cat .cat-name .more:hover {
    color: var(--link);
    border-bottom-color: var(--link);
}

@media (max-width: 720px) {
    .index-mast { padding: var(--space-3) 0 var(--space-2); }
    main.index .index-cat {
        grid-template-columns: 1fr;
        gap: var(--space-2);
        padding: var(--space-4) var(--space-3);
    }
    .index-cat .cat-name { position: static; }
}

/* recipe-link rows (used inside index-cat and on category pages) */
.recipe-link {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: var(--space-2);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--horizontal-rule);
    color: var(--foreground);
    text-decoration: none;
    transition: color 0.2s;
    align-items: baseline;
}
.recipe-link:hover {
    color: var(--link);
    opacity: 1;
}
.recipe-link h3 {
    grid-column: 1;
    font-size: 1.2rem;
    font-variation-settings: 'opsz' 24, 'wght' 430;
    line-height: 1.2;
    margin: 0;
    font-weight: normal;
}
.recipe-link h3 .title { padding-right: 0.4em; }
.recipe-link h3 em {
    font-style: italic;
    color: var(--original-title);
    font-size: 0.92rem;
    font-variation-settings: 'opsz' 18, 'wght' 350;
    margin-left: 0.2em;
}
.recipe-link .icons {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-style: normal;
}
.recipe-link .icons img {
    height: 1em;
    width: auto;
    vertical-align: middle;
}
.recipe-link .descr {
    grid-column: 1 / -1;
    font-size: 0.95rem;
    color: var(--nav);
    margin: 0.3rem 0 0;
    line-height: 1.5;
}
.recipe-link .servingsuggestion {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    width: 100%;
    max-width: none;
}

/* on the index sticky-sidebar layout, hide descriptions and images for tighter rows */
main.index .index-cat .recipes .recipe-link .descr,
main.index .index-cat .recipes .recipe-link .servingsuggestion {
    display: none;
}

/* category + search pages: section sits on the paper (no card) and centers recipe-link rows */
main.category section,
main.search-main section {
    max-width: 48em;
    margin: 0 auto;
    padding: 0 var(--space-2);
    background: transparent;
}

/* search page: slightly larger emphasis since the bar IS the page */
.search.fullpage {
    margin: var(--space-3) auto var(--space-4);
}
.search.fullpage input {
    font-size: 1.3rem;
}
.search-main .no-results {
    max-width: 48em;
    margin: var(--space-4) auto;
    padding: 0 var(--space-2);
    text-align: center;
    font-style: italic;
    color: var(--nav);
}

/* === Tier 4: today's pick (index page featured block, compact card) === */
.featured {
    max-width: 48em;
    margin: var(--space-3) auto var(--space-3);
    padding: var(--space-3) var(--space-2);
    display: grid;
    grid-template-columns: 9em 1fr;
    gap: var(--space-3);
    align-items: center;
}
.featured[hidden] { display: none; }
.featured-img-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
    text-decoration: none;
    color: inherit;
}
.featured-img-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.featured-img-wrap:hover img { transform: scale(1.03); }
.featured-label {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--link);
    margin-bottom: var(--space-1);
}
.featured-body h2 {
    font-size: 1.5rem;
    font-variation-settings: 'opsz' 60, 'wght' 420, 'SOFT' 50;
    font-weight: normal;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 var(--space-1);
    color: var(--foreground);
    text-transform: none;
}
.featured-body .descr {
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--nav);
    margin: 0 0 var(--space-2);
    font-variation-settings: 'opsz' 18, 'wght' 350;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.featured-meta {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--nav);
    margin-bottom: var(--space-1);
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.8em;
}
.featured-meta span:not(:last-child)::after {
    content: '·';
    color: var(--link);
    margin-left: 0.8em;
}
.featured .read-more {
    display: inline-block;
    color: var(--foreground);
    text-decoration: none;
    font-style: italic;
    font-size: 0.95rem;
    font-variation-settings: 'opsz' 20, 'wght' 400;
    border-bottom: 1px solid var(--link);
    padding-bottom: 1px;
}
.featured .read-more:hover { color: var(--link); opacity: 1; }
.featured .read-more::after {
    content: ' →';
    display: inline-block;
    transition: transform 0.3s;
}
.featured .read-more:hover::after { transform: translateX(0.4em); }

@media (max-width: 720px) {
    .featured { grid-template-columns: 7em 1fr; gap: var(--space-2); }
    .featured-body h2 { font-size: 1.3rem; }
    .featured-body .descr { -webkit-line-clamp: 3; }
}

/* === Tier 2: recipe page editorial layout === */
.recipe-head {
    padding: var(--space-5) var(--space-2) var(--space-4);
    text-align: center;
    border-bottom: 1px solid var(--horizontal-rule);
    margin-bottom: 0;
    overflow: visible;
}
.recipe-head .recipe-breadcrumb {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--nav);
    margin-bottom: 1.5rem;
}
.recipe-head .recipe-breadcrumb a { color: inherit; text-decoration: none; }
.recipe-head .recipe-breadcrumb a:hover { color: var(--link); }
.recipe-head .recipe-breadcrumb i { font-style: normal; padding: 0 0.4em; color: var(--horizontal-rule); }
.recipe-head .meta-top {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--link);
    margin-bottom: 1.2rem;
}
.recipe-head h1 {
    font-size: clamp(2.6rem, 9vw, 6.5rem);
    font-variation-settings: 'opsz' 144, 'wght' 380, 'SOFT' 100;
    line-height: 0.92;
    letter-spacing: -0.04em;
    margin: 0 0 0.8rem;
    font-weight: normal;
    hyphens: none;
    word-break: normal;
    overflow-wrap: break-word;
}
.recipe-head .original-title {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--original-title);
    font-variation-settings: 'opsz' 36, 'wght' 350, 'SOFT' 50;
}

.recipe .hero {
    margin: var(--space-4) auto 0;
    max-width: 56em;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}
.recipe .hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.recipe .hero .attribution {
    position: absolute;
    bottom: 0.8rem;
    right: 1rem;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: white;
    background: rgba(0,0,0,0.5);
    padding: 0.4em 0.8em;
    backdrop-filter: blur(6px);
    margin: 0;
}

.recipe .meta-strip {
    display: flex;
    border-top: 1px solid var(--horizontal-rule);
    border-bottom: 1px solid var(--horizontal-rule);
    padding: var(--space-3) 0;
    margin: var(--space-4) auto 0;
    max-width: 48em;
    text-align: center;
}
.recipe .meta-strip .item {
    flex: 1;
    border-right: 1px solid var(--horizontal-rule);
    padding: 0 1rem;
}
.recipe .meta-strip .item:last-child { border-right: none; }
.recipe .meta-strip .label {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--nav);
    margin-bottom: 0.4rem;
}
.recipe .meta-strip .value {
    font-size: 1.2rem;
    font-variation-settings: 'opsz' 30, 'wght' 400;
    line-height: 1.1;
    word-break: break-word;
}
.recipe .meta-strip .value a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--horizontal-rule);
}
.recipe .meta-strip .value a:hover { border-color: var(--link); color: var(--link); opacity: 1; }

.recipe .recipe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    justify-content: center;
    margin: var(--space-4) auto 0;
    max-width: 48em;
    padding: 0 var(--space-2);
}
.recipe .recipe-tags:empty { display: none; }
.recipe .recipe-tags .tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.3em 0.95em;
    border: 1px solid var(--horizontal-rule);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--nav);
    background: var(--background);
}
.recipe .recipe-tags .tag img {
    height: 1em;
    width: auto;
    vertical-align: middle;
}
.recipe .recipe-tags .tag.veg {
    color: var(--sage);
    border-color: var(--sage);
}

.recipe .descr {
    max-width: 36em;
    margin: var(--space-5) auto var(--space-2);
    padding: 0 var(--space-2);
    font-size: 1.15rem;
    line-height: 1.6;
    text-align: justify;
    hyphens: auto;
    font-family: var(--serif);
    font-variation-settings: 'opsz' 24, 'wght' 360;
}
.recipe .descr::first-letter {
    font-size: 4em;
    line-height: 0.85;
    float: left;
    padding: 0.08em 0.16em 0 0;
    color: var(--link);
    font-style: italic;
    font-variation-settings: 'opsz' 144, 'wght' 420, 'SOFT' 100;
}
.recipe .descr.no-dropcap::first-letter {
    font-size: inherit;
    line-height: inherit;
    float: none;
    padding: 0;
    color: inherit;
    font-style: inherit;
    font-variation-settings: inherit;
}
@media (max-width: 600px) {
    .recipe .descr {
        text-align: left;
        font-size: 1.05rem;
    }
    /* meta strip becomes a 2x2 with hairlines preserved on the odd→even gap and between rows */
    .recipe .meta-strip {
        flex-wrap: wrap;
        padding: var(--space-2) 0;
    }
    .recipe .meta-strip .item {
        flex: 0 0 50%;
        padding: 0.4rem 0.8rem;
        border-right: none;
    }
    .recipe .meta-strip .item:nth-child(odd) {
        border-right: 1px solid var(--horizontal-rule);
    }
    .recipe .meta-strip .item:nth-child(1),
    .recipe .meta-strip .item:nth-child(2) {
        padding-bottom: var(--space-1);
        margin-bottom: var(--space-1);
        border-bottom: 1px solid var(--horizontal-rule);
    }
    /* step numerals get slightly more presence on mobile so they don't look orphaned */
    .recipe hr {
        margin-bottom: -2.6em;
    }
    .recipe hr::after {
        font-size: 2.2em;
        margin-top: 1.2rem;
    }
}

/* extra-narrow phones: tighten masthead, today's pick, and category list */
@media (max-width: 480px) {
    .index-mast .title { font-size: 2.4rem; }
    .index-mast { padding: var(--space-2) 0 var(--space-1); }
    .featured { padding: var(--space-2) var(--space-1); }
    .featured-body h2 { font-size: 1.2rem; }
    .featured-body .descr { font-size: 0.85rem; }
    main.index .index-cat { padding: var(--space-3) var(--space-2); gap: var(--space-2); }
    .index-cat .cat-name h2 { font-size: 1.6rem; }
    .recipe-link { padding: 0.8rem 0; }
    .recipe-link h3 { font-size: 1.05rem; }
    .recipe-link h3 em {
        display: block;
        margin-top: 0.15em;
        margin-left: 0;
    }
    .recipe-link .icons { gap: 0.3em; }
    .recipe-link .icons img { height: 0.9em; }
}

.recipe .section-marker {
    text-align: center;
    margin: var(--space-5) 0 var(--space-2);
    font-family: var(--serif);
    font-style: italic;
    color: var(--link);
    font-size: 1.3rem;
    font-variation-settings: 'opsz' 36, 'wght' 360, 'SOFT' 80;
    letter-spacing: 0.3em;
}

footer {
    text-align: center;
    color: var(--footer);
    margin: 2em 0;
}
footer .updatededit {
    font-size: 0.6em;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}
footer .updatededit a {
    color: inherit;
    text-decoration: none;
}

/* === Tier 4: print styles === */
@media print {
    @page { margin: 0.5in; }

    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        backdrop-filter: none !important;
    }
    html { font-size: 16px; scroll-behavior: auto; }
    body {
        background: white;
        color: black;
        font-size: 0.85rem;
        line-height: 1.4;
    }
    body::before { display: none; }  /* paper noise */

    a { color: black; text-decoration: none; }

    /* hide chrome on every page */
    .search, .featured, .category-nav, footer { display: none; }

    /* === Index print: a quiet table of contents === */
    .index header { padding: 0 0 0.4rem; border-bottom: 1px solid black; margin-bottom: 0.6rem; text-align: left; }
    .index header h1 { font-size: 1.6rem; line-height: 1; }
    .index header p { font-size: 0.85rem; max-width: none; color: #444; margin: 0.3rem 0 0; }
    .index section {
        max-width: none;
        background: transparent;
        padding: 0.4rem 0;
        page-break-inside: avoid;
        break-inside: avoid;
        border-bottom: 1px solid #aaa;
    }
    .index section h2 {
        font-size: 1.05rem;
        color: black;
        margin-bottom: 0.4rem;
        text-transform: none;
        letter-spacing: 0;
        font-style: italic;
    }
    .index section h2 a { color: black; }
    .index section h3 { font-size: 0.9rem; margin: 0.2rem 0; padding: 0; }
    .index section h3 a { color: black; }
    .index section h3 em { font-size: 0.78rem; color: #444; }
    .index section h3 .icons img { display: none; }  /* skip diet icons in print */
    .index section .servingsuggestion { display: none; }
    .index section p { display: none; }  /* skip descriptions in TOC */

    /* === Recipe print: kitchen-friendly === */
    .recipe .recipe-breadcrumb { font-size: 0.55rem; color: #444; margin-bottom: 0.4rem; letter-spacing: 0.15em; }
    .recipe .meta-top { font-size: 0.55rem; color: #444; margin-bottom: 0.6rem; letter-spacing: 0.15em; }
    .recipe-head { padding: 0 0 0.4rem; border-bottom: 1px solid black; text-align: left; }
    .recipe-head h1 { font-size: 1.8rem !important; line-height: 1; }
    .recipe-head .original-title { font-size: 0.85rem; color: #444; }

    .recipe .hero { display: none; }  /* photo not useful when cooking */

    .recipe .meta-strip {
        margin: 0.4rem 0 0.6rem;
        padding: 0.3rem 0;
        max-width: none;
        text-align: left;
    }
    .recipe .meta-strip .item { padding: 0 0.5rem; border-color: #999; }
    .recipe .meta-strip .item:first-child { padding-left: 0; }
    .recipe .meta-strip .label { font-size: 0.55rem; color: #444; margin-bottom: 0.15rem; }
    .recipe .meta-strip .value { font-size: 0.85rem; }
    .recipe .meta-strip .value a { border: 0; color: #444; }

    .recipe .recipe-tags { display: none; }
    .recipe .section-marker { display: none; }
    .recipe .nutrition { font-size: 0.7rem; color: #444; margin: 0.4rem 0; }

    .recipe .descr {
        margin: 0.5rem 0 0.6rem;
        font-size: 0.82rem;
        line-height: 1.45;
        max-width: none;
        text-align: left;
        hyphens: none;
        padding: 0;
    }
    .recipe .descr::first-letter {
        font-size: inherit;
        float: none;
        padding: 0;
        color: black;
        font-style: italic;
    }

    .recipe section {
        max-width: none;
        background: transparent;
        padding: 0;
    }
    .recipe section hr {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .recipe hr {
        margin-bottom: -2.2em;
        border-color: black;
    }
    .recipe hr::after {
        font-size: 1.6em;
        color: black;
        border-bottom: 1px solid black;
        margin-top: 0.8rem;
    }
    .recipe hr + ul li code:first-child { color: black; }
}
