/* Soft Cottagecore — antjanus.com redesign 023 */

:root {
  --paper: #f5eee0;
  --paper-2: #efe5d2;
  --card: #fbf7ef;
  --ink: #33291f;
  --text: #4a3d33;
  --muted: #6b5a4d;
  --line: #dccdb4;
  --stitch: #c4a986;
  --sage: #8fa382;
  --sage-ink: #4b6142;
  --sage-wash: #e4ead9;
  --rose: #d8aaa2;
  --rose-ink: #97463f;
  --rose-wash: #f3dfd9;
  --butter: #f0dc9f;
  --butter-wash: #f7ecc8;
  --lavender: #c2b4d6;
  --lav-ink: #5e4b7d;
  --lav-wash: #e9e2f1;
  --willow: #364f6a;
  --willow-wash: #dfe6ee;
  --btn: #4b6142;
  --btn-text: #fbf7ef;
  --btn-hover: #3c4f35;
  --focus: #97463f;
  --code-bg: #2f2824;
  --code-text: #efe4d0;
  --shadow: 0 1px 0 rgba(90, 64, 40, .06), 0 10px 28px -14px rgba(90, 64, 40, .35);
  --grain-opacity: .5;
  --radius: 22px;
  --radius-sm: 14px;
  --serif-display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --serif: "Lora", "Iowan Old Style", Georgia, serif;
  --hand: "Caveat", "Segoe Print", cursive;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1f1a16; --paper-2: #27211c; --card: #2c2520; --ink: #f3e8d4; --text: #e0d3bf; --muted: #b8a893;
    --line: #4a3f35; --stitch: #6b5a48; --sage: #7f9471; --sage-ink: #b3c9a2; --sage-wash: #2f3a2a;
    --rose: #a8726b; --rose-ink: #e8aaa0; --rose-wash: #3e2a27; --butter: #8a7640; --butter-wash: #3d3422;
    --lavender: #7e6f96; --lav-ink: #cbbbe6; --lav-wash: #332c40; --willow: #a7bfdb; --willow-wash: #253240;
    --btn: #b3c9a2; --btn-text: #1f1a16; --btn-hover: #c7d9b8; --focus: #f0c4a0;
    --code-bg: #171310; --shadow: 0 1px 0 rgba(0,0,0,.3), 0 14px 30px -16px rgba(0,0,0,.7); --grain-opacity: .25;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1f1a16; --paper-2: #27211c; --card: #2c2520; --ink: #f3e8d4; --text: #e0d3bf; --muted: #b8a893;
  --line: #4a3f35; --stitch: #6b5a48; --sage: #7f9471; --sage-ink: #b3c9a2; --sage-wash: #2f3a2a;
  --rose: #a8726b; --rose-ink: #e8aaa0; --rose-wash: #3e2a27; --butter: #8a7640; --butter-wash: #3d3422;
  --lavender: #7e6f96; --lav-ink: #cbbbe6; --lav-wash: #332c40; --willow: #a7bfdb; --willow-wash: #253240;
  --btn: #b3c9a2; --btn-text: #1f1a16; --btn-hover: #c7d9b8; --focus: #f0c4a0;
  --code-bg: #171310; --shadow: 0 1px 0 rgba(0,0,0,.3), 0 14px 30px -16px rgba(0,0,0,.7); --grain-opacity: .25;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background-color: var(--paper);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}
/* paper grain: optional raster texture first, generated fractal noise underneath */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image:
    url("assets/paper-texture.jpg"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .33  0 0 0 0 .2  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='900' height='900'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='2'/><feColorMatrix values='0 0 0 0 .55  0 0 0 0 .42  0 0 0 0 .25  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
  background-size: 1200px auto, 260px 260px, 900px 900px;
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] body::before { mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { mix-blend-mode: screen; } }

img { max-width: 100%; display: block; }
a { color: var(--sage-ink); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--rose-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--serif-display); font-weight: 400; color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.4rem; line-height: 1.25; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--card); padding: .6rem 1rem; border-radius: 999px; z-index: 50; }
.skip:focus { top: 1rem; }

.wrap { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2rem); margin-inline: auto; }

/* ------- handwriting kicker ------- */
.kicker { font-family: var(--hand); font-size: 1.6rem; line-height: 1.1; color: var(--rose-ink); font-weight: 600; display: inline-block; transform: rotate(-2deg); margin-bottom: .2rem; }
.eyebrow { font-family: var(--serif); font-size: .875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.lede { font-size: 1.3rem; line-height: 1.55; color: var(--text); max-width: 60ch; }
.muted { color: var(--muted); }

/* ------- header ------- */
.site-header { position: relative; background: var(--paper-2); z-index: 10; }
.site-header::after { /* scalloped hem */
  content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px;
  background: radial-gradient(circle at 12px 0, var(--paper-2) 11.5px, transparent 12px) repeat-x;
  background-size: 24px 12px;
}
.header-inner { display: flex; align-items: center; gap: 1.25rem; padding: .9rem 0 .7rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand svg { width: 52px; height: 52px; flex-shrink: 0; }
.brand-words { display: flex; flex-direction: column; line-height: 1; }
.brand-words small { font-family: var(--hand); font-size: 1.2rem; color: var(--rose-ink); font-weight: 600; }
.brand-words strong { font-family: var(--serif-display); font-weight: 400; font-size: 1.35rem; color: var(--ink); }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; align-items: center; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .95rem; border-radius: 999px; text-decoration: none; color: var(--text); font-size: 1.05rem; transition: background-color .15s, color .15s; }
.main-nav a:hover { background: var(--card); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--stitch); }
.main-nav a[aria-current="page"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rose-ink); margin-right: .5rem; }
.main-nav a.nav-ai { background: var(--lav-wash); color: var(--lav-ink); box-shadow: inset 0 0 0 1.5px var(--lavender); }
.main-nav a.nav-ai:hover { background: var(--lavender); color: var(--ink); }
.header-tools { display: flex; align-items: center; gap: .5rem; }
.search-form { display: flex; align-items: center; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding-left: .9rem; }
.search-form input { border: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--text); width: 9rem; min-height: 40px; }
.search-form input::placeholder { color: var(--muted); }
.search-form input:focus { outline: none; }
.search-form:focus-within { box-shadow: 0 0 0 3px var(--focus); }
.search-form button { border: 0; background: transparent; color: var(--sage-ink); min-width: 44px; min-height: 44px; border-radius: 999px; cursor: pointer; display: grid; place-items: center; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: background-color .15s; }
.icon-btn:hover { background: var(--butter-wash); }
.icon-btn svg { width: 22px; height: 22px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
.menu-toggle { display: none; }

@media (max-width: 1080px) {
  .search-form { display: none; }
}
@media (max-width: 860px) {
  .menu-toggle { display: grid; }
  .header-inner { flex-wrap: wrap; }
  .header-tools { margin-left: auto; }
  .main-nav { order: 3; width: 100%; margin: 0; display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: .2rem; padding: .5rem 0 .75rem; }
  .main-nav a { width: 100%; padding: 0 1rem; font-size: 1.15rem; }
  .main-nav .mobile-search { display: block; }
}
.main-nav .mobile-search { display: none; }
.main-nav .mobile-search .search-form { display: flex; margin-top: .5rem; }
.main-nav .mobile-search input { width: 100%; }

/* reading-progress vine */
.vine { position: fixed; top: 0; left: 0; height: 5px; width: 100%; z-index: 60; pointer-events: none; }
.vine span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sage), var(--sage-ink)); border-radius: 0 6px 6px 0; position: relative; }
.vine span::after { content: ""; position: absolute; right: -8px; top: -5px; width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle, var(--butter) 30%, var(--rose) 32%); box-shadow: 0 0 0 2px var(--paper); }

/* ------- buttons & chips ------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: 0 1.4rem; border-radius: 999px; font: inherit; font-size: 1.05rem; font-weight: 600; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background-color .15s, color .15s, transform .15s, box-shadow .15s; }
.btn-primary { background: var(--btn); color: var(--btn-text); box-shadow: 0 3px 0 color-mix(in srgb, var(--btn) 60%, #000); }
.btn-primary:hover { background: var(--btn-hover); color: var(--btn-text); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--btn) 60%, #000); }
.btn-secondary { background: var(--card); color: var(--rose-ink); border-color: var(--rose); }
.btn-secondary:hover { background: var(--rose-wash); color: var(--rose-ink); }
.link-tertiary { color: var(--muted); font-size: 1.05rem; text-decoration: none; border-bottom: 1.5px dashed var(--stitch); padding-bottom: 2px; display: inline-flex; min-height: 44px; align-items: center; }
.link-tertiary:hover { color: var(--sage-ink); }
.more-link { font-family: var(--hand); font-size: 1.45rem; font-weight: 600; color: var(--sage-ink); text-decoration: none; white-space: nowrap; }
.more-link:hover { color: var(--rose-ink); text-decoration: underline; }
.chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .875rem; padding: .2rem .7rem; border-radius: 999px; background: var(--butter-wash); color: var(--muted); border: 1px solid color-mix(in srgb, var(--butter) 70%, var(--line)); text-decoration: none; line-height: 1.5; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rose); }
a.chip:hover { background: var(--rose-wash); color: var(--rose-ink); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.badge { display: inline-block; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .1rem .6rem; border-radius: 999px; background: var(--rose-wash); color: var(--rose-ink); border: 1px solid var(--rose); }
.badge.new { background: var(--sage-wash); color: var(--sage-ink); border-color: var(--sage); }

/* ------- sections ------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .3rem 0 0; color: var(--muted); }
.band { background: var(--paper-2); position: relative; }
.band::before, .band::after { content: ""; position: absolute; left: 0; right: 0; height: 12px; background-size: 24px 12px; background-repeat: repeat-x; }
.band::before { top: -12px; background-image: radial-gradient(circle at 12px 12px, var(--paper-2) 11.5px, transparent 12px); }
.band::after { bottom: -12px; background-image: radial-gradient(circle at 12px 0, var(--paper-2) 11.5px, transparent 12px); }
.band.sage { --paper-2: var(--sage-wash); background: var(--sage-wash); }

.divider { display: flex; align-items: center; justify-content: center; gap: .6rem; color: var(--sage); margin: 0 auto; padding: 1rem 0; }
.divider svg.sprig { width: 120px; height: 36px; }
.divider svg.sprig.flip { transform: scaleX(-1); }
.divider svg.daisy { width: 34px; height: 34px; }

/* ------- cards ------- */
.card { position: relative; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stitched { outline: 1.5px dashed var(--stitch); outline-offset: -9px; }
.stitched:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

.post-card { display: flex; flex-direction: column; padding: 1rem 1rem 1.4rem; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px) rotate(-.3deg); }
.post-card .arch { aspect-ratio: 16 / 10; border-radius: 999px 999px 14px 14px / 70% 70% 14px 14px; overflow: hidden; background: var(--sage-wash); margin-bottom: 1rem; border: 1.5px solid var(--line); }
.post-card .arch img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.82) sepia(.1); transition: filter .3s; }
.post-card:hover .arch img { filter: none; }
.post-card .meta { font-size: .95rem; color: var(--muted); margin-bottom: .35rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.post-card h3 { font-size: 1.35rem; margin-bottom: .45rem; padding: 0 .35rem; }
.post-card .meta, .post-card p, .post-card .chips { padding: 0 .35rem; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.post-card h3 a:focus-visible { outline: none; }
.post-card:has(h3 a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.post-card p { color: var(--text); margin-bottom: .8rem; }
.post-card .chips { margin-top: auto; position: relative; }

.floral-fill { display: grid; place-items: center; width: 100%; height: 100%; color: var(--sage); background:
  radial-gradient(circle at 20% 30%, var(--rose-wash) 0 18%, transparent 19%),
  radial-gradient(circle at 80% 70%, var(--butter-wash) 0 22%, transparent 23%), var(--sage-wash); }
.floral-fill svg { width: 40%; height: auto; }

/* recipe index card (ruled) */
.recipe { background:
  linear-gradient(var(--card), var(--card)) padding-box;
  border-radius: 12px; border: 1.5px solid var(--line); box-shadow: var(--shadow); position: relative; padding: 1.2rem 1.4rem 1.3rem; overflow: hidden; }
.recipe::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 calc(1.65rem - 1px), color-mix(in srgb, var(--willow) 14%, transparent) calc(1.65rem - 1px) 1.65rem); background-position: 0 3.1rem; }
.recipe::after { content: ""; position: absolute; left: 0; right: 0; top: 2.9rem; height: 2px; background: color-mix(in srgb, var(--rose-ink) 55%, transparent); }
.recipe > * { position: relative; }
.recipe .rc-top { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; color: var(--muted); min-height: 1.9rem; align-items: baseline; }
.recipe .rc-top .coll { font-family: var(--hand); font-size: 1.35rem; font-weight: 600; color: var(--rose-ink); }
.recipe h3 { margin: .9rem 0 .2rem; font-size: 1.3rem; line-height: 1.65rem; }
.recipe h3 a { color: var(--ink); text-decoration: none; }
.recipe h3 a::after { content: ""; position: absolute; inset: -20rem; }
.recipe h3 a:hover { color: var(--rose-ink); }
.recipe p { margin: 0; line-height: 1.65rem; }
.recipe:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.recipe a:focus-visible { outline: none; }

/* ------- home hero ------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.04; margin-bottom: 1.2rem; }
.hero h1 em { font-style: italic; font-family: var(--serif); color: var(--sage-ink); font-weight: 500; }
.hero .lede { margin-bottom: 1.8rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: center; }
.stitch-stats { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.stitch-stats li { width: 118px; height: 118px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--card); border: 1.5px solid var(--line); outline: 1.5px dashed var(--stitch); outline-offset: -8px; box-shadow: var(--shadow); }
.stitch-stats li:nth-child(2) { background: var(--rose-wash); transform: rotate(3deg); }
.stitch-stats li:nth-child(3) { background: var(--sage-wash); transform: rotate(-2deg); }
.stitch-stats strong { font-family: var(--serif-display); font-weight: 400; font-size: 1.8rem; color: var(--ink); line-height: 1; }
.stitch-stats span { font-size: .875rem; color: var(--muted); line-height: 1.2; margin-top: .3rem; padding: 0 .9rem; }

.window { position: relative; max-width: 440px; margin-inline: auto; width: 100%; }
.window-frame { position: relative; aspect-ratio: 4 / 5; border-radius: 999px 999px 26px 26px / 55% 55% 26px 26px; overflow: hidden; border: 10px solid var(--card); box-shadow: 0 0 0 1.5px var(--line), var(--shadow); background: var(--sage-wash); }
.window-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 28% 30%; filter: sepia(.12) saturate(.9); }
.window-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--rose) 30%, transparent)); }
.window .garland { position: absolute; inset: -9% -14% auto; height: 60%; background: url("assets/hero-garland.png") center top / contain no-repeat; pointer-events: none; }
.window .garland-svg { position: absolute; left: -8%; bottom: -5%; width: 60%; color: var(--sage); pointer-events: none; }
.window .garland-svg.right { left: auto; right: -9%; bottom: auto; top: 6%; width: 38%; transform: rotate(160deg); }
.window .tag-note { position: absolute; right: -4%; bottom: 10%; background: var(--butter-wash); border: 1.5px solid var(--butter); padding: .55rem 1rem .6rem; border-radius: 10px; font-family: var(--hand); font-size: 1.4rem; font-weight: 600; color: var(--ink); transform: rotate(-4deg); box-shadow: var(--shadow); }

/* shelf of featured (Start here) */
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.shelf .post-card:nth-child(2) { transform: translateY(1.2rem); }
.shelf .post-card:nth-child(2):hover { transform: translateY(calc(1.2rem - 3px)); }
.num-ribbon { position: absolute; top: -12px; left: 22px; z-index: 2; font-family: var(--hand); font-weight: 600; font-size: 1.3rem; background: var(--rose-ink); color: var(--card); padding: .05rem .8rem .15rem; border-radius: 8px 8px 8px 0; }

/* list rows */
.garden-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.garden-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.2rem; align-items: baseline; padding: 1.1rem 1.4rem; border-radius: var(--radius-sm); background: var(--card); border: 1.5px solid var(--line); position: relative; }
.garden-row time { font-family: var(--hand); font-size: 1.35rem; color: var(--rose-ink); font-weight: 600; }
.garden-row h3 { font-size: 1.25rem; margin: 0 0 .2rem; }
.garden-row h3 a { color: var(--ink); text-decoration: none; }
.garden-row h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-sm); }
.garden-row h3 a:hover { color: var(--rose-ink); }
.garden-row p { margin: 0; }
.garden-row:hover { background: var(--butter-wash); }

/* icon (experiment) cards */
.seed-card { padding: 1.5rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: .4rem; }
.seed-card .glyph { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; margin-bottom: .5rem; border: 1.5px dashed var(--stitch); }
.seed-card .glyph svg { width: 30px; height: 30px; }
.seed-card h3 { font-size: 1.25rem; margin: 0; }
.seed-card h3 a { color: var(--ink); text-decoration: none; }
.seed-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.seed-card h3 a:hover { color: var(--rose-ink); }
.seed-card p { margin: 0 0 .6rem; }
.seed-card .type { font-family: var(--hand); font-size: 1.3rem; font-weight: 600; color: var(--muted); }
.tone-sage .glyph { background: var(--sage-wash); color: var(--sage-ink); }
.tone-rose .glyph { background: var(--rose-wash); color: var(--rose-ink); }
.tone-butter .glyph { background: var(--butter-wash); color: var(--muted); }
.tone-lav .glyph { background: var(--lav-wash); color: var(--lav-ink); }
.tone-willow .glyph { background: var(--willow-wash); color: var(--willow); }

.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.link-list a { display: flex; align-items: center; gap: .8rem; min-height: 48px; padding: .3rem .6rem; border-radius: 12px; text-decoration: none; color: var(--ink); }
.link-list a:hover { background: var(--butter-wash); }
.link-list svg { width: 22px; height: 22px; color: var(--sage-ink); flex-shrink: 0; }
.link-list small { display: block; color: var(--muted); font-size: .95rem; }

.candle { background: #2f2824; color: #efe4d0; border-color: #4a3f35; }
.candle h2, .candle h3 { color: #f7ecd8; }
.candle p { color: #e0d3bf; }
.candle .kicker { color: #f0c4a0; }
.candle .btn-primary { background: #f0dc9f; color: #2f2824; box-shadow: 0 3px 0 #a8914f; }
.candle .btn-primary:hover { background: #f7e8bb; color: #2f2824; }
.candle a:focus-visible { outline-color: #f0c4a0; }

/* ------- page hero (inner pages) ------- */
.page-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); }
.page-hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: center; }
.page-hero .medallion { aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 10px solid var(--card); box-shadow: 0 0 0 1.5px var(--line), 0 0 0 12px var(--paper), 0 0 0 13.5px var(--stitch), var(--shadow); max-width: 340px; margin-inline: auto; width: 100%; }
.page-hero .medallion img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.25) saturate(.8) hue-rotate(-8deg); }

.jump { position: sticky; top: 0; z-index: 8; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1.5px dashed var(--line); }
.jump ul { list-style: none; display: flex; gap: .4rem; margin: 0; padding: .6rem 0; overflow-x: auto; align-items: center; }
.jump li:first-child { font-family: var(--hand); font-size: 1.35rem; font-weight: 600; color: var(--muted); padding-right: .4rem; white-space: nowrap; }
.jump a { display: inline-flex; min-height: 44px; align-items: center; padding: 0 1rem; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); text-decoration: none; color: var(--text); white-space: nowrap; font-size: 1rem; }
.jump a:hover { border-color: var(--sage); color: var(--sage-ink); }

/* filter tabs (index-card tabs) */
.tabs-row { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 2rem; }
.tab-btn { font: inherit; font-size: 1.05rem; min-height: 48px; padding: 0 1.2rem; border: 1.5px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; background: var(--paper-2); color: var(--text); cursor: pointer; margin-bottom: -2px; }
.tab-btn[aria-selected="true"], .tab-btn[aria-pressed="true"] { background: var(--card); color: var(--ink); border-color: var(--stitch); box-shadow: inset 0 3px 0 var(--rose-ink); font-weight: 600; }
.tab-btn:hover { color: var(--sage-ink); }
.tab-btn .count { color: var(--muted); font-weight: 400; margin-left: .35rem; }

/* pinned notes */
.pinned { padding: 1.6rem 1.6rem 1.4rem; border-radius: 6px 22px 8px 18px; }
.pinned::before { content: ""; position: absolute; top: -10px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f3c9c1, var(--rose-ink)); box-shadow: 0 3px 4px rgba(0,0,0,.2); }
.pinned.butter { background: var(--butter-wash); transform: rotate(-.8deg); }
.pinned.sagey { background: var(--sage-wash); transform: rotate(.7deg); }
.pinned ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .6rem; }
.pinned li a { color: var(--ink); font-family: var(--serif-display); font-size: 1.2rem; text-decoration-color: var(--stitch); }
.pinned li a:hover { color: var(--rose-ink); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.tag-cloud a { display: inline-flex; gap: .4rem; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px; background: var(--card); border: 1.5px dashed var(--stitch); text-decoration: none; color: var(--text); font-size: 1rem; }
.tag-cloud a span { color: var(--muted); font-size: .9rem; }
.tag-cloud a:hover { background: var(--rose-wash); color: var(--rose-ink); }

/* ------- storybook (AI stories) ------- */
.story { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; padding: 1.2rem; align-items: start; }
.story .cover { aspect-ratio: 3 / 4; border-radius: 10px 18px 18px 10px; overflow: hidden; box-shadow: inset 6px 0 0 rgba(0,0,0,.18), var(--shadow); border: 1.5px solid var(--line); }
.story .cover img { width: 100%; height: 100%; object-fit: cover; }
.story h3 a { color: var(--ink); text-decoration: none; }
.story h3 a:hover { color: var(--rose-ink); }
.story .part { font-family: var(--hand); font-size: 1.5rem; color: var(--lav-ink); font-weight: 600; }
.story.soon { opacity: .9; background: transparent; border-style: dashed; box-shadow: none; }
.story.soon .cover { display: grid; place-items: center; background: var(--lav-wash); color: var(--lav-ink); font-family: var(--hand); font-size: 1.5rem; text-align: center; padding: 1rem; }
.notice { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.2rem; border-radius: var(--radius-sm); background: var(--butter-wash); border: 1.5px solid var(--butter); }
.notice svg { width: 28px; height: 28px; flex-shrink: 0; color: var(--rose-ink); margin-top: .15rem; }
.notice p { margin: 0; }

.note-strip { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding: 1.4rem 1.8rem; border-radius: var(--radius); background: var(--lav-wash); border: 1.5px solid var(--lavender); }
.note-strip p { margin: 0; font-size: 1.2rem; color: var(--ink); max-width: 52ch; }

/* ------- projects ------- */
.feature { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; padding: 2rem; align-items: center; }
.feature .pic { border-radius: 18px; overflow: hidden; border: 1.5px solid var(--line); aspect-ratio: 16/11; }
.feature .pic img { width: 100%; height: 100%; object-fit: cover; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; margin: 1.4rem 0; }
.stat-row div { background: var(--butter-wash); padding: .8rem 1rem; text-align: center; }
.stat-row strong { display: block; font-family: var(--serif-display); font-weight: 400; font-size: 2rem; color: var(--ink); line-height: 1.1; }
.stat-row span { font-size: .95rem; color: var(--muted); }
.landscape { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 1.4rem; align-items: center; }
.landscape:nth-child(even) .pic { order: 2; }
.landscape .pic { aspect-ratio: 16/10; border-radius: 999px 999px 16px 16px / 60% 60% 16px 16px; overflow: hidden; border: 1.5px solid var(--line); background: #1d1a17; }
.landscape .pic img { width: 100%; height: 100%; object-fit: cover; }
.landscape h3 a { color: var(--ink); }
.stack { display: grid; gap: 1.8rem; }
.mini { padding: 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .4rem; }
.mini h3 { font-size: 1.2rem; margin: 0; }
.mini h3 a { color: var(--ink); text-decoration: none; }
.mini h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.mini h3 a:hover { color: var(--rose-ink); }
.mini p { margin: 0; }
.mini .stars { font-family: var(--hand); font-size: 1.35rem; font-weight: 600; color: var(--rose-ink); }
.mini .foot { margin-top: auto; padding-top: .6rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.side-card { padding: .8rem .8rem 1.2rem; display: flex; flex-direction: column; }
.side-card .pic { aspect-ratio: 16/10; border-radius: 14px; overflow: hidden; margin-bottom: .9rem; background: #1d1a17; border: 1.5px solid var(--line); }
.side-card .pic img { width: 100%; height: 100%; object-fit: cover; }
.side-card h3, .side-card p, .side-card .chips { padding: 0 .4rem; }
.side-card h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.side-card h3 a { color: var(--ink); text-decoration: none; }
.side-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.side-card h3 a:hover { color: var(--rose-ink); }
.side-card p { margin-bottom: .7rem; }
.side-card .chips { margin-top: auto; }

/* ------- about ------- */
.about-hero { display: grid; grid-template-columns: 380px 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hoop { position: relative; aspect-ratio: 1; border-radius: 50%; padding: 18px; background: linear-gradient(135deg, #d9b98c, #b88d5c 60%, #9c7447); box-shadow: var(--shadow); }
.hoop::before { content: ""; position: absolute; top: -18px; left: 50%; width: 46px; height: 34px; margin-left: -23px; border-radius: 8px; background: linear-gradient(#c9a476, #9c7447); }
.hoop img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 4px solid #f3e6cf; }
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.stat-tiles .card { padding: 1.4rem; text-align: center; }
.stat-tiles strong { display: block; font-family: var(--serif-display); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3rem); color: var(--ink); line-height: 1.05; }
.stat-tiles span { color: var(--muted); }
.career-bar { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.career-bar li { padding: .45rem .9rem; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); font-size: 1rem; }
.career-bar li b { font-weight: 600; color: var(--ink); }
.career-bar li span { color: var(--muted); margin-left: .35rem; }
.path { list-style: none; margin: 0; padding: 0; position: relative; }
.path::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; border-left: 3px dotted var(--stitch); }
.path > li { position: relative; padding: 0 0 2.2rem 4rem; }
.path > li::before { content: ""; position: absolute; left: 6px; top: 2px; width: 34px; height: 30px; border-radius: 50% 50% 46% 54% / 60% 55% 45% 40%; background: var(--paper-2); border: 2px solid var(--stitch); }
.path > li:first-child::before { background: var(--sage); border-color: var(--sage-ink); }
.path h3 { margin-bottom: .2rem; }
.path .period { font-family: var(--hand); font-size: 1.4rem; color: var(--rose-ink); font-weight: 600; }
.path ul { margin: .6rem 0 0; padding-left: 1.2rem; }
.path ul li { margin-bottom: .35rem; }
.path blockquote { margin: .8rem 0 0; padding: .8rem 1rem; background: var(--card); border-left: 3px solid var(--sage); border-radius: 0 12px 12px 0; }
details.history > summary { list-style: none; cursor: pointer; display: inline-flex; }
details.history > summary::-webkit-details-marker { display: none; }
details.history[open] .show-label { display: none; }
details.history:not([open]) .hide-label { display: none; }

.sampler { position: relative; padding: clamp(2rem, 5vw, 3.5rem); border-radius: 12px; background: var(--card); border: 14px solid transparent; background-clip: padding-box; box-shadow: 0 0 0 1.5px var(--line), var(--shadow); }
.sampler::before { content: ""; position: absolute; inset: -14px; border-radius: 12px; z-index: -1;
  background: repeating-linear-gradient(45deg, var(--rose) 0 3px, transparent 3px 9px), repeating-linear-gradient(-45deg, var(--sage) 0 3px, transparent 3px 9px), var(--paper-2); }
.sampler::after { content: ""; position: absolute; inset: 10px; border: 2px dashed var(--stitch); border-radius: 6px; pointer-events: none; }
.sampler ol { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1.1rem; counter-reset: pr; }
.sampler li { counter-increment: pr; font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 2.4vw, 1.55rem); color: var(--ink); line-height: 1.4; display: flex; gap: 1rem; }
.sampler li::before { content: counter(pr, upper-roman) "."; font-family: var(--serif-display); font-style: normal; color: var(--rose-ink); min-width: 2.4rem; font-size: 1.1rem; padding-top: .3rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.arched-photo { border-radius: 999px 999px 22px 22px / 50% 50% 22px 22px; overflow: hidden; border: 10px solid var(--card); box-shadow: 0 0 0 1.5px var(--line), var(--shadow); aspect-ratio: 4/5; }
.arched-photo img { width: 100%; height: 100%; object-fit: cover; }
.leaf-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.2rem; }
.leaf-list li { display: grid; grid-template-columns: 40px 1fr; gap: .9rem; }
.leaf-list svg { width: 34px; height: 34px; color: var(--sage-ink); }
.leaf-list b { font-family: var(--serif-display); font-weight: 400; font-size: 1.25rem; color: var(--ink); display: block; }
.cap-card { padding: 1.6rem; }
.cap-card ul { margin: .6rem 0 0; padding-left: 1.1rem; }
.cap-card li { margin-bottom: .25rem; }

/* ------- article ------- */
.article-hero { padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; text-align: center; }
.article-hero .crumbs { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; font-size: 1rem; color: var(--muted); margin-bottom: 1rem; }
.article-hero h1 { max-width: 20ch; margin: .3rem auto 1rem; font-size: clamp(2.3rem, 5.5vw, 4.2rem); }
.article-hero .lede { margin: 0 auto 1.2rem; }
.article-hero .chips { justify-content: center; }
.article-banner { width: min(1060px, 100% - 2rem); margin: 1.5rem auto 0; aspect-ratio: 21/9; border-radius: 999px 999px 24px 24px / 100% 100% 24px 24px; overflow: hidden; border: 12px solid var(--card); box-shadow: 0 0 0 1.5px var(--line), var(--shadow); }
.article-banner img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.15) saturate(.9); }
.article-layout { display: grid; grid-template-columns: 250px minmax(0, 700px) 1fr; gap: 3rem; width: min(1280px, 100% - 2rem); margin: 3rem auto 0; }
.toc { position: sticky; top: 1.5rem; align-self: start; padding: 1.3rem 1.2rem; }
.toc h2 { font-family: var(--hand); font-size: 1.6rem; color: var(--rose-ink); font-weight: 600; margin: 0 0 .5rem; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.toc a { display: flex; gap: .5rem; align-items: baseline; padding: .35rem .5rem; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 1rem; line-height: 1.35; }
.toc a::before { content: "✿"; color: var(--stitch); font-size: .9rem; }
.toc a:hover { background: var(--butter-wash); }
.toc a[aria-current="true"] { background: var(--sage-wash); color: var(--ink); font-weight: 600; }
.toc a[aria-current="true"]::before { color: var(--sage-ink); }
.toc-mobile { display: none; margin-bottom: 1.5rem; }
.toc-mobile summary { cursor: pointer; font-family: var(--hand); font-size: 1.5rem; font-weight: 600; color: var(--rose-ink); min-height: 44px; display: flex; align-items: center; padding: 0 1.2rem; }
.toc-mobile ol { margin: 0 1.2rem 1rem; padding-left: 1.2rem; }
.toc-mobile li { margin: .3rem 0; }
.aside-tools { position: sticky; top: 1.5rem; align-self: start; display: grid; gap: .6rem; justify-items: start; }
.aside-tools .label { font-family: var(--hand); font-size: 1.4rem; font-weight: 600; color: var(--muted); }
.prose { font-size: 1.1875rem; line-height: 1.75; }
.prose > * + h2 { margin-top: 2.6rem; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.1rem); display: flex; align-items: center; gap: .6rem; }
.prose h2::before { content: ""; width: 26px; height: 26px; flex-shrink: 0; background: var(--sage); -webkit-mask: var(--leaf-mask) center / contain no-repeat; mask: var(--leaf-mask) center / contain no-repeat; }
:root { --leaf-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 20C4 10 10 4 21 3c-1 11-7 17-17 17zm0 0l9-9' fill='black' stroke='black' stroke-width='1.2'/></svg>"); }
.prose ol, .prose ul { padding-left: 1.4rem; }
.prose li { margin-bottom: .35rem; }
.prose li::marker { color: var(--rose-ink); font-family: var(--serif-display); }
.prose code:not(pre code) { font-family: var(--mono); font-size: .9em; background: var(--butter-wash); color: var(--ink); padding: .08em .35em; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--butter) 70%, var(--line)); }
.prose blockquote { margin: 1.6rem 0; padding: 1.1rem 1.3rem 1.1rem 1.3rem; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); position: relative; }
.prose blockquote p:last-child { margin-bottom: 0; }
.callout-label { display: block; font-family: var(--hand); font-size: 1.5rem; font-weight: 600; line-height: 1.1; margin-bottom: .25rem; }
.prose blockquote.why { background: var(--sage-wash); border-color: var(--sage); border-radius: 4px 22px 22px 22px; }
.prose blockquote.why .callout-label { color: var(--sage-ink); }
.prose blockquote.ask { background: var(--rose-wash); border: 1.5px dashed var(--rose-ink); border-radius: 22px 4px 22px 22px; }
.prose blockquote.ask .callout-label { color: var(--rose-ink); }
.prose blockquote.note { background: var(--butter-wash); border-color: var(--butter); }
.prose blockquote.skill { background: var(--lav-wash); border-color: var(--lavender); }
.prose blockquote.skill .callout-label { color: var(--lav-ink); }
.code-card { margin: 1.8rem -2.5rem; border-radius: 18px; background: var(--code-bg); color: var(--code-text); overflow: hidden; box-shadow: var(--shadow); border: 1.5px solid #4a3f35; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: .35rem .6rem .35rem 1.1rem; background: #3a312b; border-bottom: 1.5px dashed #6b5a48; }
.code-head .lang { font-family: var(--hand); font-size: 1.3rem; font-weight: 600; color: #f0c4a0; }
.copy-btn { font: inherit; font-size: .95rem; min-height: 40px; min-width: 44px; padding: 0 .9rem; border-radius: 999px; border: 1.5px solid #6b5a48; background: transparent; color: #efe4d0; cursor: pointer; }
.copy-btn:hover { background: #4a3f35; }
.copy-btn:focus-visible { outline-color: #f0c4a0; }
.code-card pre { margin: 0; padding: 1.1rem 1.3rem 1.3rem; overflow-x: auto; font-family: var(--mono); font-size: .95rem; line-height: 1.65; tab-size: 2; }
.code-card code { font-family: inherit; }
.tok-c { color: #b3a491; font-style: italic; }
.tok-s { color: #bcd2a8; }
.tok-k { color: #eeaea5; }
.tok-t { color: #cfc0ea; }
.tok-f { color: #f1d88f; }
.filed { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px dotted var(--stitch); display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.filed .label { font-family: var(--hand); font-size: 1.4rem; color: var(--muted); font-weight: 600; }
.letter { padding: clamp(1.6rem, 4vw, 2.6rem); display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; background:
  linear-gradient(135deg, transparent 49.5%, color-mix(in srgb, var(--stitch) 30%, transparent) 50%, transparent 50.5%) top left / 60px 60px no-repeat, var(--card); }
.news-form { display: grid; gap: .7rem; }
.news-form .row { display: flex; gap: .6rem; flex-wrap: wrap; }
.news-form input[type="email"] { flex: 1 1 200px; min-height: 48px; border-radius: 999px; border: 1.5px solid var(--stitch); background: var(--paper); padding: 0 1.1rem; font: inherit; font-size: 1.05rem; color: var(--ink); }
.news-form input[type="email"]::placeholder { color: var(--muted); }
.news-form input[type="email"][aria-invalid="true"] { border-color: var(--rose-ink); }
.news-form label.check { display: flex; gap: .6rem; font-size: 1rem; align-items: flex-start; }
.news-form label.check input { width: 20px; height: 20px; margin-top: .2rem; accent-color: var(--sage-ink); }
.form-msg { font-size: 1rem; min-height: 1.5em; margin: 0; }
.form-msg.err { color: var(--rose-ink); }
.form-msg.ok { color: var(--sage-ink); }
.share-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.share-row a, .share-row button { font: inherit; font-size: 1rem; min-height: 44px; padding: 0 1rem; display: inline-flex; gap: .4rem; align-items: center; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer; }
.share-row a:hover, .share-row button:hover { background: var(--butter-wash); }
.share-row svg { width: 18px; height: 18px; }

/* ------- patterns ------- */
.patterns-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.three-ways { padding: 1.6rem 1.8rem; }
.three-ways dl { margin: .5rem 0 0; display: grid; gap: .9rem; }
.three-ways dt { font-family: var(--serif-display); font-size: 1.2rem; color: var(--ink); }
.three-ways dd { margin: 0; }
.three-ways .foot { margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1.5px dashed var(--stitch); font-style: italic; }
.pattern-tools { display: grid; gap: 1rem; margin-bottom: 1.8rem; }
.pattern-search { display: flex; align-items: center; gap: .6rem; background: var(--card); border: 1.5px solid var(--stitch); border-radius: 999px; padding: 0 .6rem 0 1.1rem; }
.pattern-search:focus-within { box-shadow: 0 0 0 3px var(--focus); }
.pattern-search svg { width: 22px; height: 22px; color: var(--muted); flex-shrink: 0; }
.pattern-search input { flex: 1; min-width: 0; min-height: 54px; border: 0; background: transparent; font: inherit; font-size: 1.1rem; color: var(--ink); }
.pattern-search input:focus { outline: none; }
.pattern-search input::placeholder { color: var(--muted); }
.filter-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pill-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill { font: inherit; font-size: 1rem; min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.pill:hover { border-color: var(--sage); }
.pill[aria-pressed="true"] { background: var(--sage-ink); color: var(--card); border-color: var(--sage-ink); }
:root[data-theme="dark"] .pill[aria-pressed="true"] { color: #1f1a16; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill[aria-pressed="true"] { color: #1f1a16; } }
.result-line { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.result-line select { font: inherit; font-size: 1rem; min-height: 44px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); padding: 0 .9rem; }
.clear-btn { font: inherit; background: none; border: 0; color: var(--rose-ink); text-decoration: underline; cursor: pointer; min-height: 44px; font-size: 1rem; }
.packet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 1.6rem; }
.packet { display: flex; flex-direction: column; border-radius: 10px 10px 20px 20px; overflow: hidden; padding: 0; }
.packet .face { position: relative; height: 150px; display: grid; place-items: center; background: var(--pk-wash); border-bottom: 1.5px dashed var(--stitch); }
.packet .face::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 12px; background: radial-gradient(circle at 8px 12px, var(--card) 6px, transparent 6.5px) repeat-x; background-size: 16px 12px; transform: rotate(180deg); }
.packet .face svg { width: 110px; height: 90px; color: var(--pk-ink); }
.packet .body { padding: 1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.packet .cat { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-family: var(--hand); font-size: 1.3rem; font-weight: 600; color: var(--pk-ink); }
.packet h2 { font-size: 1.3rem; margin: 0; }
.packet h2 a { color: var(--ink); text-decoration: none; }
.packet h2 a::after { content: ""; position: absolute; inset: 0; }
.packet h2 a:hover { color: var(--rose-ink); }
.packet h2 a:focus-visible { outline: none; }
.packet:has(h2 a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.packet p { margin: 0; font-size: 1.02rem; }
.packet .date { font-size: .9rem; color: var(--muted); }
.packet .chips { margin-top: auto; padding-top: .4rem; }
.cat-data { --pk-wash: var(--willow-wash); --pk-ink: var(--willow); }
.cat-layout { --pk-wash: var(--sage-wash); --pk-ink: var(--sage-ink); }
.cat-interaction { --pk-wash: var(--rose-wash); --pk-ink: var(--rose-ink); }
.cat-forms { --pk-wash: var(--butter-wash); --pk-ink: var(--muted); }
.cat-color { --pk-wash: var(--lav-wash); --pk-ink: var(--lav-ink); }
.empty-state { text-align: center; padding: 3rem 1rem; border: 2px dashed var(--stitch); border-radius: var(--radius); }
.empty-state svg { width: 80px; height: 80px; color: var(--sage); margin: 0 auto 1rem; }

/* pattern detail */
.back-link { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; text-decoration: none; font-size: 1.05rem; }
.use-cases { columns: 2; column-gap: 2rem; padding-left: 1.2rem; margin: .5rem 0 1.2rem; }
.use-cases li { margin-bottom: .35rem; }
.panes { overflow: hidden; }
.pane-bar { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .6rem .8rem 0; background: var(--paper-2); border-bottom: 1.5px solid var(--line); }
.pane-tabs { display: flex; gap: .25rem; flex-wrap: wrap; }
.pane-tabs [role="tab"] { font: inherit; font-size: 1rem; min-height: 44px; padding: 0 1rem; border: 1.5px solid transparent; border-bottom: 0; background: transparent; color: var(--text); border-radius: 12px 12px 0 0; cursor: pointer; margin-bottom: -1.5px; }
.pane-tabs [role="tab"][aria-selected="true"] { background: var(--card); border-color: var(--line); color: var(--ink); font-weight: 600; box-shadow: inset 0 3px 0 var(--sage-ink); }
.pane-actions { display: flex; gap: .4rem; padding-bottom: .6rem; }
.pane-actions button { font: inherit; font-size: .95rem; min-height: 40px; padding: 0 .9rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.pane-actions button:hover { background: var(--butter-wash); }
.pane { padding: 1.5rem; }
.pane[hidden] { display: none; }
.pane pre { margin: 0; background: var(--code-bg); color: var(--code-text); border-radius: 14px; padding: 1.1rem 1.2rem; overflow-x: auto; font-family: var(--mono); font-size: .92rem; line-height: 1.6; }
.pane .pane-note { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: 12px; background: var(--butter-wash); font-size: 1rem; }
.prompt-text { max-width: 70ch; }
.prompt-text p { margin-bottom: 1em; }
.stage { background: var(--paper); border-radius: 16px; border: 1.5px dashed var(--stitch); padding: clamp(1rem, 3vw, 1.8rem); }
.stage .cap { font-style: italic; color: var(--muted); margin: 0 0 .8rem; font-size: 1rem; }
.hss-strip { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; grid-template-columns: 1fr; margin-bottom: 1.6rem; }
@container (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, 1fr); } }
@container (min-width: 44rem) { .hss-strip { grid-template-columns: repeat(4, 1fr); } .hss-strip.five { grid-template-columns: repeat(5, 1fr); } }
.stage { container-type: inline-size; }
.hss-tile { background: var(--card); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .15rem; min-width: 0; text-align: left; font: inherit; color: inherit; border: 0; }
.hss-tile .lbl { font-family: var(--mono); font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hss-tile .fig { font-family: var(--serif-display); font-size: 1.7rem; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.hss-tile .fig.none { color: var(--muted); }
.hss-tile .sub { font-size: .95rem; color: var(--muted); overflow-wrap: anywhere; }
button.hss-tile { cursor: pointer; min-height: 44px; }
button.hss-tile:hover { background: var(--butter-wash); }
button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--sage-ink) 16%, var(--card)); box-shadow: inset 0 -3px 0 var(--sage-ink); }
button.hss-tile:focus-visible { outline-offset: -3px; }
.dl-list { list-style: none; margin: 0 0 .8rem; padding: 0; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.dl-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; background: var(--card); border-top: 1px solid var(--line); flex-wrap: wrap; }
.dl-list li:first-child { border-top: 0; }
.dl-list li[hidden] { display: none; }
.status { font-size: .9rem; font-weight: 600; padding: .05rem .6rem; border-radius: 999px; border: 1px solid var(--line); }
.st-done { background: var(--sage-wash); color: var(--sage-ink); }
.st-failed { background: var(--rose-wash); color: var(--rose-ink); }
.st-queued { background: var(--paper-2); color: var(--muted); }
.st-downloading { background: var(--willow-wash); color: var(--willow); }

/* ------- footer ------- */
.site-footer { background: var(--paper-2); margin-top: clamp(3rem, 8vw, 6rem); position: relative; padding: 3.5rem 0 1.5rem; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; background: radial-gradient(circle at 12px 12px, var(--paper-2) 11.5px, transparent 12px) repeat-x; background-size: 24px 12px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.5fr; gap: 2rem; }
.site-footer h2 { font-family: var(--hand); font-size: 1.6rem; font-weight: 600; color: var(--rose-ink); margin-bottom: .4rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-flex; min-height: 40px; align-items: center; color: var(--text); text-decoration: none; }
.site-footer li a:hover { color: var(--sage-ink); text-decoration: underline; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1.5px dashed var(--stitch); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: 1rem; align-items: center; }
.footer-bottom .daisies { color: var(--sage); display: flex; gap: .4rem; }
.footer-bottom .daisies svg { width: 22px; height: 22px; }

/* ------- responsive ------- */
@media (max-width: 1200px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
  .toc, .aside-tools { display: none; }
  .toc-mobile { display: block; }
  .code-card { margin-inline: 0; }
}
@media (max-width: 960px) {
  .hero-grid, .page-hero-grid, .about-hero, .two-col, .feature, .patterns-intro, .letter { grid-template-columns: 1fr; }
  .hero-grid .window { max-width: 360px; order: -1; }
  .shelf { grid-template-columns: 1fr; }
  .shelf .post-card:nth-child(2) { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-hero .hoop { max-width: 300px; margin-inline: auto; width: 100%; }
  .page-hero .medallion { max-width: 240px; }
}
@media (max-width: 700px) {
  .landscape { grid-template-columns: 1fr; }
  .landscape:nth-child(even) .pic { order: 0; }
  .story { grid-template-columns: 1fr; }
  .story .cover { max-width: 200px; }
  .garden-row { grid-template-columns: 1fr; gap: .2rem; }
  .stat-tiles { grid-template-columns: 1fr; }
  .use-cases { columns: 1; }
  .stitch-stats li { width: 100px; height: 100px; }
  .stitch-stats strong { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-words small { display: none; }
  .window .tag-note { right: 0; font-size: 1.2rem; }
  .prose { font-size: 1.125rem; }
  .stat-row strong { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .post-card:hover { transform: none; }
}

/* icon sizing inside controls */
.btn svg, .search-form svg, .pattern-search svg, .back-link svg, .share-row svg, .notice svg { width: 20px; height: 20px; flex-shrink: 0; }
.search-form button svg { width: 20px; height: 20px; }
.hero { overflow-x: clip; }

/* UI pattern library article */
.prose .prose-fig { margin: 1.8rem 0; padding: .6rem; }
.prose .prose-fig img { width: 100%; height: auto; display: block; border-radius: 12px; }
.prose blockquote p + p { margin-top: .8em; }
.prose .live-pattern a.btn { white-space: normal; text-decoration: none; height: auto; padding-block: .6rem; }
.prose p code { overflow-wrap: anywhere; }
