/* Bytes Of Jord public site. Values come from tokens.css. */

@view-transition {
    navigation: auto;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-text);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); }
a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { margin: 0; }

.display { font-family: var(--font-display); letter-spacing: -0.035em; font-weight: 600; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--on-accent);
    font-weight: 600; text-decoration: none; transition: top var(--motion-quick);
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 40px; }
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.reading { max-width: 720px; }

.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: .04em; }
.tag { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--sunken); color: var(--muted); text-decoration: none; }
a.tag:hover { color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.badge.friends { background: color-mix(in srgb, var(--herb) 16%, transparent); color: var(--herb); }
.badge.draft { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.badge.ai { background: var(--band); color: var(--band-text); }

.dots { background-image: radial-gradient(color-mix(in srgb, var(--text) 14%, transparent) 1px, transparent 1.2px); background-size: 22px 22px; }

.pulse { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--herb); flex-shrink: 0; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--herb); opacity: 0; animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }

.rise { animation: rise 600ms cubic-bezier(.2, 0, 0, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 500ms cubic-bezier(.2, 0, 0, 1), transform 500ms cubic-bezier(.2, 0, 0, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* Buttons and links */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 24px;
    border: 0; border-radius: var(--radius-button); font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: transform var(--motion-base), box-shadow var(--motion-base), background-color var(--motion-quick);
}
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--sh-md), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-primary:hover { color: var(--on-accent); transform: translateY(-1px); box-shadow: var(--sh-lg); }
.btn-ghost { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--border); }
.btn-ghost:hover { color: var(--text); box-shadow: var(--sh-md), inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, var(--border)); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

.iconbtn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; min-width: 40px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-decoration: none;
    transition: color var(--motion-quick), border-color var(--motion-quick);
}
.iconbtn:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.kbd { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.arr { transition: transform var(--motion-base); flex-shrink: 0; }
a:hover .arr, button:hover .arr { transform: translateX(3px); }

.ulink {
    color: var(--text); font-weight: 600; text-decoration: none; padding-bottom: 4px;
    background-image: linear-gradient(var(--accent), var(--accent)); background-size: 100% 2px; background-position: 0 100%; background-repeat: no-repeat;
    transition: background-size 300ms cubic-bezier(.2, 0, 0, 1);
}
.ulink:hover { color: var(--text); background-size: 0% 2px; background-position: 100% 100%; }
.textbtn { border: 0; background: none; font: inherit; cursor: pointer; }

/* Status strip, header, footer */
.status-strip { border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.status-strip .wrap { height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.status-strip .status { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.socials { display: flex; gap: 2px; }
.social { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--muted); border-radius: 6px; }
.social:hover { color: var(--accent); }

.site-header {
    position: sticky; top: 0; z-index: 20; view-transition-name: site-header;
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.site-header .wrap { height: 76px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; flex: 1; min-width: 0; }
.brand:hover { color: var(--text); }
.brand-name { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.logo-tile { width: 40px; height: 40px; border-radius: 11px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--sh-md), inset 0 1px 0 rgba(255, 255, 255, .2); flex-shrink: 0; }
.main-nav { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--sunken); }
.navpill { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.navpill:hover { color: var(--text); }
.navpill.active { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--border); }
.header-actions { display: flex; gap: 8px; align-items: center; flex: 1; justify-content: flex-end; }
.menu-toggle { display: none; }
.mobile-nav { display: none; }

.site-footer { margin-top: 160px; background: var(--surface); border-top: 1px solid var(--border); }
.site-footer > .wrap { padding-top: 96px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 72px; }
.footer-cta { align-items: end; }
.footer-title { font-size: 72px; line-height: 1; margin: 0; }
.footer-bottom { padding-top: 32px; border-top: 1px solid var(--border); font-size: 14px; align-items: center; }
.footer-bottom nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent); }

main { view-transition-name: page; display: block; }

/* Sections */
.section { padding-top: 120px; }
.sec-head { align-items: end; padding-top: 28px; border-top: 1px solid var(--border); margin-bottom: 40px; }
.sec-title { font-size: 56px; line-height: 1; }
.sec-head .lead-col { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.sec-head p { margin: 0; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* Placeholders and images */
.ph {
    position: relative; overflow: hidden; background-color: var(--ph1); color: var(--ph-ink);
    background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, .22) 14px 15px);
}
:root[data-theme="dark"] .ph { background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, .04) 14px 15px); }
.ph.t2 { background-color: var(--ph2); }
.ph.t3 { background-color: var(--ph3); }
.ph.t4 { background-color: var(--ph4); }
.ph-label { position: absolute; left: 14px; bottom: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; opacity: .8; }
.media { position: relative; overflow: hidden; background-color: var(--ph1); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.ai-chip { position: absolute; right: 10px; top: 10px; }

/* Cards */
.card {
    position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-card);
    box-shadow: var(--sh-sm), inset 0 0 0 1px var(--border); color: var(--text); text-decoration: none; overflow: hidden;
    transition: transform 260ms cubic-bezier(.2, 0, 0, 1), box-shadow 260ms cubic-bezier(.2, 0, 0, 1);
}
a.card:hover { color: var(--text); transform: translateY(-4px); box-shadow: var(--sh-lg), inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, var(--border)); }
a.card:hover .arr { transform: translate(3px, -3px); }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card h3 { font-size: 24px; letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.card .tags { margin-top: auto; }

.browser { width: 100%; border-radius: 14px 14px 0 0; background: var(--surface); box-shadow: var(--sh-lg); overflow: hidden; }
.browser-bar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 14px; border-bottom: 1px solid var(--border); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.browser-bar span { margin-left: 12px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* Home */
.hero { position: relative; overflow: hidden; }
.hero-dots { position: absolute; inset: 0; -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 0%, transparent 70%); }
.hero .grid12 { position: relative; align-items: center; padding-top: 104px; padding-bottom: 96px; }
.hero-copy { grid-column: span 7; display: flex; flex-direction: column; gap: 28px; }
.hero-title { font-size: 88px; line-height: .98; }
.hero-lead { margin: 0; font-size: 21px; line-height: 1.55; color: var(--muted); max-width: 580px; }
.pill-note { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px 0 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--border); font-size: 13px; font-weight: 500; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.stats { margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 560px; border-top: 1px solid var(--border); }
.stats div { padding: 18px 20px 0; }
.stats div:first-child { padding-left: 0; }
.stats div + div { border-left: 1px solid var(--border); }
.stats dt { font-family: var(--font-display); font-size: 36px; font-weight: 600; letter-spacing: -0.035em; }
.stats dd { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.hero-art { grid-column: 9 / span 4; position: relative; padding: 24px 0 40px; }
.hero-art .backdrop { position: absolute; inset: 8% -12% 0 6%; border-radius: 40px; background: var(--accent-soft); transform: rotate(4deg); }
.hero-art .portrait { position: relative; aspect-ratio: 4 / 5; border-radius: 28px; box-shadow: var(--sh-lg); }
.float-card { position: absolute; left: -56px; bottom: 8px; width: 250px; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-lg), inset 0 0 0 1px var(--border); display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; }
.float-card .thumb { width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0; }
.float-commit { position: absolute; right: -28px; top: 0; padding: 10px 14px; border-radius: 12px; background: var(--band); color: var(--band-text); font-size: 12px; box-shadow: var(--sh-lg); display: flex; flex-direction: column; gap: 2px; }
.float-commit span:first-child { color: var(--band-muted); }

.tools-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee { display: flex; gap: 48px; width: max-content; white-space: nowrap; padding: 22px 0; font-family: var(--font-mono); font-size: 15px; color: var(--muted); animation: slide 40s linear infinite; }
.marquee span { display: inline-flex; align-items: center; gap: 48px; }
.marquee span::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--border); }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.bento .feature { grid-column: span 7; grid-row: span 2; }
.bento .feature .shot { padding: 40px 40px 0; background-color: var(--sunken); flex: 1; display: flex; align-items: flex-end; }
.bento .feature .card-body { padding: 28px 32px 32px; gap: 12px; }
.bento .feature h3 { font-size: 32px; }
.bento .side { grid-column: span 5; flex-direction: row; }
.bento .side .thumb { width: 42%; flex-shrink: 0; }

.band { margin-top: 140px; background: var(--band); color: var(--band-text); position: relative; overflow: hidden; }
.band::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px); background-size: 22px 22px; }
.band .grid12 { position: relative; padding-top: 112px; padding-bottom: 112px; align-items: center; }
.band .num, .band .muted { color: var(--band-muted); }
.band-copy { grid-column: span 5; display: flex; flex-direction: column; gap: 24px; }
.band-copy h2 { font-size: 52px; line-height: 1.02; }
.band-copy p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--band-muted); }
.checklist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.checklist li { display: flex; gap: 12px; align-items: center; }
.checklist .tick { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: inset 0 0 0 2px var(--band-muted); }
.checklist .done .tick { background: #7FE0C4; color: #062A21; box-shadow: none; }
.project-cards { grid-column: 7 / span 6; display: flex; flex-direction: column; gap: 16px; }
.project-card { padding: 22px 24px; border-radius: 18px; background: rgba(5, 8, 15, .45); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 10px; }
.project-card h3 { font-size: 22px; letter-spacing: -0.02em; }
.project-card p { margin: 0; color: var(--band-muted); font-size: 15px; }
.project-card .tag { background: rgba(255, 255, 255, .08); color: var(--band-text); }
.status-chip { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: rgba(127, 224, 196, .16); color: #7FE0C4; }
.code { border-radius: 18px; background: rgba(5, 8, 15, .55); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 80px -30px rgba(0, 0, 0, .6); overflow: hidden; font-family: var(--font-mono); font-size: 14px; line-height: 1.75; }
.code pre { margin: 0; padding: 24px 28px; white-space: pre-wrap; }
.code .k { color: #9DB7FF; } .code .t { color: #7FE0C4; } .code .c { color: #6E7A93; }

.kitchen .feature { grid-column: span 6; }
.kitchen .feature .photo { aspect-ratio: 4 / 5; border-radius: var(--radius-photo); box-shadow: var(--sh-md); }
.overlap { position: relative; margin: -96px 28px 0; padding: 24px 28px; border-radius: 18px; background: var(--surface); box-shadow: var(--sh-lg), inset 0 0 0 1px var(--border); display: flex; flex-direction: column; gap: 10px; }
.overlap h3 { font-size: 32px; }
.overlap p { margin: 0; color: var(--muted); font-size: 15px; }
.plain-card { display: flex; flex-direction: column; gap: 12px; color: var(--text); text-decoration: none; }
.plain-card:hover { color: var(--text); }
.plain-card .photo { border-radius: 18px; transition: transform 260ms cubic-bezier(.2, 0, 0, 1), box-shadow 260ms; }
.plain-card:hover .photo { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.mini-grid { grid-column: span 6; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); align-content: start; }
.card-title { font-size: 17px; font-weight: 600; }
.card-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.pull-quote { font-family: var(--font-display); font-size: 40px; line-height: 1.2; font-weight: 500; letter-spacing: -0.025em; margin: 0; }
.byline { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; }

/* Page heads */
.page-head { position: relative; overflow: hidden; }
.page-head .grid12 { position: relative; padding-top: 96px; padding-bottom: 64px; align-items: end; }
.page-title { font-size: 72px; line-height: 1; }
.page-lead { margin: 0; font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 620px; }
.breadcrumb { font-family: var(--font-mono); font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; }

/* Chips and filters */
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 0;
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer;
    transition: background-color var(--motion-base), color var(--motion-base), box-shadow var(--motion-base);
}
.chip:hover { color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, var(--border)); }
.chip.on, .chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.toolbar { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--sunken); }
.seg a, .seg button { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.seg .on, .seg [aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }

/* Recipes index */
.recipe-grid { columns: 4 260px; column-gap: var(--gutter); }
.recipe-grid > * { break-inside: avoid; margin-bottom: 28px; }
.recipe-card .photo { aspect-ratio: 4 / 5; border-radius: 18px; }
.recipe-card .photo.square { aspect-ratio: 1 / 1; }
.recipe-card .card-info { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.recipe-card .badge { position: absolute; left: 12px; top: 12px; }
.pager { display: flex; gap: 12px; justify-content: center; margin-top: 40px; }

/* Recipe detail */
.recipe-hero-art { grid-column: 8 / span 5; position: relative; padding: 24px 0 40px; }
.recipe-hero-art .photo { position: relative; aspect-ratio: 4 / 5; border-radius: 28px; box-shadow: var(--sh-lg); }
.recipe-hero-copy { grid-column: span 6; display: flex; flex-direction: column; gap: 26px; }
.meta-bar { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; justify-content: space-between; padding: 22px 28px; border-radius: 20px; background: var(--surface); box-shadow: var(--sh-md), inset 0 0 0 1px var(--border); }
.meta-bar dl { display: flex; flex-wrap: wrap; margin: 0; }
.meta-bar dl div { padding: 2px 28px; }
.meta-bar dl div:first-child { padding-left: 0; }
.meta-bar dl div + div { border-left: 1px solid var(--border); }
.meta-bar dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }
.flabel { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cook-banner { margin-top: 12px; display: none; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 14px; background: var(--band); color: var(--band-text); font-size: 14px; }
.cooking .cook-banner { display: flex; }
.story-lead { font-family: var(--font-display); font-size: 30px; line-height: 1.3; font-weight: 500; letter-spacing: -0.025em; margin: 0; }
.story-rest p { font-size: 18px; line-height: 1.7; color: var(--muted); max-width: 680px; }
.story-more[hidden] { display: none; }
.recipe-body { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.ing-panel { flex: 1 1 340px; max-width: 420px; position: sticky; top: 100px; padding: 28px; border-radius: 22px; background: var(--surface); box-shadow: var(--sh-lg), inset 0 0 0 1px var(--border); }
.ing-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.scaler { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background-color: var(--sunken); box-shadow: inset 0 0 0 1px var(--border); margin-bottom: 8px; }
.scaler output { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stepper { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--surface); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--border); color: var(--text); font-size: 22px; cursor: pointer; }
.stepper:hover { color: var(--accent); }
.group-name { margin: 22px 0 2px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--accent); }
.tick { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--border); cursor: pointer; font-size: 16px; line-height: 1.5; }
.tick input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.tick:has(input:checked) span { color: var(--muted); text-decoration: line-through; }
.qty { display: inline-block; font-family: var(--font-mono); font-size: 14px; font-weight: 600; padding: 0 4px; border-radius: 4px; transition: background-color 600ms; }
.qty.changed { background: var(--accent-soft); animation: odometer 300ms cubic-bezier(.2, 0, 0, 1); }
@keyframes odometer { from { transform: translateY(-40%); opacity: .2; } to { transform: none; opacity: 1; } }
.method { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.progress { height: 6px; border-radius: 999px; background: var(--sunken); overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); }
.progress > div { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 300ms cubic-bezier(.2, 0, 0, 1); }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 24px; border-radius: 20px; background: var(--surface); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--border); transition: opacity var(--motion-base); }
.step-n { font-family: var(--font-display); font-size: 40px; line-height: 1; font-weight: 600; color: var(--accent); }
.step label { display: flex; gap: 16px; align-items: flex-start; cursor: pointer; }
.step input { margin-top: 6px; width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.step-text { font-size: 17px; line-height: 1.65; }
.step:has(input:checked) { opacity: .55; }
.step:has(input:checked) .step-text { text-decoration: line-through; }
.timer-btn { margin-left: 34px; margin-top: 12px; }
.timer-pill { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: none; flex-direction: column; gap: 8px; }
.timer-pill.on { display: flex; }
.timer-pill .pill { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 16px; border-radius: 999px; background: var(--band); color: var(--band-text); box-shadow: var(--sh-lg); font-family: var(--font-mono); font-size: 14px; }
.timer-pill .pill.done { background: var(--herb); color: #fff; }
.timer-pill button { border: 0; background: rgba(255, 255, 255, .12); color: inherit; border-radius: 999px; width: 28px; height: 28px; cursor: pointer; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery .media { aspect-ratio: 1 / 1; border-radius: 18px; }
.source-credit { padding: 16px 20px; border-radius: 14px; background: var(--sunken); font-size: 14px; color: var(--muted); }

.cooking .step { padding: 40px; }
.cooking .step-text { font-size: 26px; line-height: 1.5; }
.cooking .tick { font-size: 20px; }

.ing-sheet-toggle { display: none; }

/* Apps */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--gutter); }
.app-card .shot { aspect-ratio: 16 / 9; }
.app-card .shot-wrap { padding: 20px 20px 0; background: var(--sunken); }
.app-card .shot-wrap .browser { border-radius: 10px 10px 0 0; }
.app-card[hidden] { display: none; }
.app-detail-links { display: flex; gap: 12px; flex-wrap: wrap; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(80%, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.carousel > * { scroll-snap-align: start; }
.prose { font-size: 17px; line-height: 1.75; }
.prose p { margin: 0 0 1.1em; }
.prose h2, .prose h3 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 1.6em 0 .6em; }
.prose a { color: var(--accent); }
.prose code { font-family: var(--font-mono); font-size: .9em; background: var(--sunken); padding: 2px 6px; border-radius: 6px; }

/* About */
.about-intro { padding-top: 96px; align-items: start; }
.about-side { grid-column: span 4; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 100px; }
.about-side .portrait { aspect-ratio: 4 / 5; border-radius: 28px; box-shadow: var(--sh-lg); }
.facts { margin: 0; padding: 20px 24px; border-radius: 18px; background: var(--surface); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--border); display: grid; gap: 12px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.about-main { grid-column: 6 / span 7; display: flex; flex-direction: column; gap: 28px; }
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 40px; display: flex; flex-direction: column; gap: 20px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline .line { position: absolute; left: 11px; top: 8px; width: 2px; height: var(--drawn, 100%); background: var(--accent); transition: height 200ms linear; }
.timeline > li { position: relative; }
.node { position: absolute; left: -36px; top: 26px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--border); }
.current .node { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.role { border-radius: 20px; background: var(--surface); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--border); }
.role summary { list-style: none; cursor: pointer; padding: 22px 24px; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.role summary::-webkit-details-marker { display: none; }
.role summary h3 { font-size: 22px; letter-spacing: -0.02em; }
.role .chev { transition: transform var(--motion-base); color: var(--muted); }
.role[open] .chev { transform: rotate(180deg); }
.role-body { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 14px; }
.role-body ul { margin: 0; padding-left: 20px; color: var(--muted); }
.skill-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gutter); }
.interest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.interest { padding: 22px; border-radius: 18px; color: var(--text); text-decoration: none; display: flex; flex-direction: column; gap: 6px; min-height: 140px; justify-content: flex-end; }
a.interest:hover { color: var(--text); transform: translateY(-2px); }

/* Search */
.search-form { display: flex; gap: 12px; max-width: 720px; }
.input, .search-form input, .field input, .field textarea, .field select {
    width: 100%; height: 48px; padding: 0 16px; border: 0; border-radius: var(--radius-input); background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border); color: var(--text); font: inherit; font-size: 16px;
}
.field textarea { height: auto; min-height: 140px; padding: 12px 16px; resize: vertical; line-height: 1.6; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus, .search-form input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 13px; color: var(--muted); }
.validation-message, .field-error { color: var(--danger); font-size: 13px; }
.alert { padding: 14px 18px; border-radius: 12px; font-size: 14px; background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.alert.ok { background: color-mix(in srgb, var(--herb) 14%, transparent); color: var(--herb); }
.hit-group { margin-top: 40px; }
.hits { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hit { display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--border); color: var(--text); text-decoration: none; }
.hit:hover { color: var(--text); box-shadow: var(--sh-md), inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, var(--border)); }
.hit .snippet { color: var(--muted); font-size: 14px; }
mark { background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 2px; }

.palette { position: fixed; inset: 0; z-index: 60; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.palette.open { display: flex; }
.palette-backdrop { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(6px); animation: fade var(--motion-page); }
.palette-panel { position: relative; width: min(680px, 100%); max-height: 70vh; display: flex; flex-direction: column; border-radius: 20px; background: var(--surface); box-shadow: var(--sh-lg), inset 0 0 0 1px var(--border); overflow: hidden; animation: pop var(--motion-page); }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.palette-input input { flex: 1; height: 64px; border: 0; background: none; color: var(--text); font: inherit; font-size: 18px; outline: none; }
.palette-results { overflow-y: auto; padding: 8px; }
.palette-results h3 { padding: 12px 12px 6px; }
.palette-results a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none; animation: rise 300ms cubic-bezier(.2, 0, 0, 1) both; }
.palette-results a[aria-selected="true"], .palette-results a:hover { background: var(--sunken); }
.palette-results small { color: var(--muted); font-size: 13px; }
.palette-foot { display: flex; gap: 16px; padding: 10px 20px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }

/* Auth card */
.auth { min-height: calc(100vh - 112px); display: flex; align-items: center; justify-content: center; padding: 64px 16px; position: relative; overflow: hidden; }
.auth-bg { position: absolute; inset: -40px; filter: blur(40px); opacity: .7; background: radial-gradient(circle at 30% 30%, var(--ph4), transparent 60%), radial-gradient(circle at 70% 60%, var(--ph1), transparent 55%), radial-gradient(circle at 50% 90%, var(--ph3), transparent 60%); }
.auth-card { position: relative; width: min(440px, 100%); padding: 40px; border-radius: 24px; background: var(--surface); box-shadow: var(--sh-lg), inset 0 0 0 1px var(--border); display: flex; flex-direction: column; gap: 20px; }
.auth-card h1 { font-size: 36px; line-height: 1.05; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.divider { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Empty and error states */
.empty { padding: 56px 24px; border-radius: 22px; background-color: var(--sunken); box-shadow: inset 0 0 0 1px var(--border); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty h2, .empty h3 { font-size: 26px; }
.empty p { margin: 0; color: var(--muted); max-width: 460px; }
.plate { width: 160px; height: 160px; border-radius: 50%; background: var(--surface); box-shadow: var(--sh-lg), inset 0 0 0 14px var(--sunken), inset 0 0 0 15px var(--border); }

/* Reconnect banner (portal only) */
#components-reconnect-modal { display: none; position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 100; padding: 8px 16px; border-radius: 999px; background: var(--band); color: var(--band-text); font-size: 13px; box-shadow: var(--sh-lg); align-items: center; gap: 10px; }
#components-reconnect-modal.show { display: flex; }
#components-reconnect-modal button { border: 0; border-radius: 999px; padding: 4px 12px; background: rgba(255, 255, 255, .14); color: inherit; font: inherit; cursor: pointer; }

/* Responsive */
@media (max-width: 1023px) {
    .ing-panel { position: static; max-width: none; }
    .about-side { position: static; }
}

@media (max-width: 960px) {
    .wrap { padding: 0 16px; }
    .grid12 > *, .bento > *, .sec-head > * { grid-column: 1 / -1 !important; }
    .hero-title { font-size: 56px; }
    .page-title { font-size: 48px; }
    .sec-title, .band-copy h2 { font-size: 40px; }
    .footer-title { font-size: 48px; }
    .pull-quote { font-size: 28px; }
    .hide-sm { display: none !important; }
    .main-nav { display: none; }
    .menu-toggle { display: inline-flex; }
    .mobile-nav.open { display: flex; flex-direction: column; gap: 4px; padding: 8px 16px 16px; border-top: 1px solid var(--border); }
    .mobile-nav a { padding: 12px 8px; color: var(--text); text-decoration: none; font-weight: 600; border-radius: 10px; }
    .mobile-nav a.active { background: var(--sunken); }
    .hero .grid12 { padding-top: 56px; padding-bottom: 56px; }
    .hero-art, .recipe-hero-art { max-width: 380px; margin: 0 auto; width: 100%; }
    .float-card { left: -8px; }
    .float-commit { right: -8px; }
    .bento .side { flex-direction: column; }
    .bento .side .thumb { width: 100%; aspect-ratio: 16 / 9; }
    .section { padding-top: 80px; }
    .band { margin-top: 96px; }
    .band .grid12 { padding-top: 72px; padding-bottom: 72px; }
    .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .meta-bar dl div { padding: 2px 16px; }
    .step { grid-template-columns: 1fr; padding: 20px; }
    .step-n { font-size: 28px; }
    .ing-sheet-toggle { display: inline-flex; position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30; }
    .site-footer { margin-top: 96px; }
    .site-footer > .wrap { padding-top: 56px; gap: 40px; }
}

@media (min-width: 1440px) {
    :root { --container: 1280px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 120ms !important; animation-iteration-count: 1 !important; transition-duration: 120ms !important; }
    .marquee, .pulse::after { animation: none !important; }
    .rise, .reveal { transform: none !important; }
    .timeline .line { display: none; }
    a.card:hover, .plain-card:hover .photo { transform: none; }
    @view-transition { navigation: none; }
}

@media print {
    .status-strip, .site-header, .site-footer, .no-print, .palette, .timer-pill, .ing-sheet-toggle, .meta-bar .actions, .story-toggle, .gallery { display: none !important; }
    body { background: #fff; color: #000; font-size: 12pt; }
    .section { padding-top: 16pt; }
    .recipe-hero-art { display: none; }
    .page-head .grid12 { padding: 0; }
    .page-title { font-size: 28pt; }
    .ing-panel, .step, .meta-bar { box-shadow: none; border: 1px solid #ccc; position: static; }
    .step { padding: 8pt; break-inside: avoid; }
    .recipe-body { gap: 16pt; }
    .story-more[hidden] { display: block; }
}
