/* Dr Rosie's Desk
   Palette and type live in :root. Change a token and every page follows.
   Order: base, sidebar, shared parts, home, books, art, notes, about, contact, responsive. */

:root {
  /* Burgundy, dusty pink and cream */
  --wine: #22090d;
  --wine2: #3c111c;
  --pink: #f1abd0;
  --pink2: #f9cce3;
  --cream: #f8f2e9;
  --paper: #fbf6ec;
  --ink: #302024;
  --muted: #6b5a5e;
  --coral: #ef734c;
  --blue: #8faec5;
  /* Botanical greens, timber, brass */
  --leaf: #3e7a4f;
  --fern: #6fa35f;
  --moss: #264a31;
  --sage: #dfe8d6;
  --kraft: #eadfd0;
  --timber: #b5753e;
  --brass: #c99b3b;
  /* Rainbow accents (small details only) */
  --r1: #ef5b5b; --r2: #f4a64a; --r3: #f3d65a; --r4: #6fb56a; --r5: #5a9fd4; --r6: #9a7bd0;

  --serif: Fraunces, Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'DM Mono', ui-monospace, Menlo, Consolas, monospace;
  --hand: Caveat, 'Segoe Print', 'Bradley Hand', cursive;
  --side: 284px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.7 var(--sans); }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, .brand { font-family: var(--serif); font-weight: 600; letter-spacing: -.04em; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 5vw, 5rem); line-height: 1.02; margin-bottom: 26px; }
h2 { font-size: clamp(2.1rem, 3.6vw, 3.4rem); line-height: 1.08; margin-bottom: 20px; }
h3 { font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1.15; }
p { max-width: 62ch; }
.mono, .eyebrow, .tag, .btn { font-family: var(--mono); font-size: 12px; letter-spacing: .07em; }
.eyebrow { text-transform: uppercase; display: block; margin-bottom: 20px; }
.wrap { width: min(1040px, calc(100% - 72px)); margin: auto; position: relative; z-index: 1; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cream); color: var(--wine); padding: 10px 16px; z-index: 60; border-radius: 6px; }
.skip:focus { left: 8px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }
.deco { position: absolute; top: 0; right: 4vw; width: clamp(90px, 11vw, 150px); height: auto; pointer-events: none; z-index: 0; }
.sway { transform-box: fill-box; transform-origin: 50% 0; animation: sway 7s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }

.btn { display: inline-flex; text-decoration: none; padding: 14px 24px; border-radius: 50px; border: 1px solid var(--wine); background: var(--wine); color: var(--cream); font-weight: 500; letter-spacing: 0; align-items: center; justify-content: center; transition: transform .2s; }
.btn:hover { transform: translateY(-3px); }
.btn.pink { background: var(--pink); color: var(--wine); border-color: var(--pink); }
.btn.outline { background: transparent; border-color: #f1abd099; color: var(--pink); }
.btn.dark-outline { background: transparent; color: var(--wine); }
.notice { border-left: 3px solid var(--coral); padding-left: 14px; font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag { display: inline-block; text-transform: uppercase; padding: 6px 10px; border: 1px solid #ae9a95; border-radius: 4px; letter-spacing: .04em; }
.tag.ghost { border-style: dashed; color: var(--muted); }

/* Sidebar */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--wine); color: var(--pink); display: flex; flex-direction: column; padding: 36px 24px 24px; overflow-y: auto; z-index: 40; border-right: 1px solid #f1abd024; }
.brand { display: block; font-size: 28px; line-height: 1.1; text-decoration: none; margin-bottom: 8px; }
.side-tag { font: 12px/1.5 var(--mono); letter-spacing: .04em; color: #f1abd0b3; margin: 0 0 30px; max-width: 24ch; }
.menu { display: none; background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 30px; padding: 8px 14px; font-family: var(--mono); font-size: 12px; }
.sidebar nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a { display: block; padding: 10px 14px; border-radius: 8px; border-left: 3px solid transparent; font: 600 20px/1.2 var(--serif); letter-spacing: -.02em; text-decoration: none; color: #f8dce9; transition: background .2s; }
.sidebar nav a small { display: block; font: 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #f1abd0b3; margin-top: 3px; }
.sidebar nav a:hover { background: #f1abd01a; }
.sidebar nav a[aria-current="page"] { background: #f1abd024; border-left-color: var(--coral); color: var(--cream); }
.side-foot { margin-top: auto; padding-top: 28px; position: relative; }
.side-hello { display: block; border: 1px dashed #f1abd077; border-radius: 10px; padding: 14px 16px; text-decoration: none; font-size: 14px; line-height: 1.45; color: #f8dce9; position: relative; z-index: 1; background: var(--wine); }
.side-hello strong { display: block; font: 600 17px var(--serif); color: var(--pink); margin-bottom: 2px; }
.side-hello:hover { border-style: solid; }
.main { margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
main > section { position: relative; overflow: hidden; }
.site-foot { margin-top: auto; background: var(--wine); color: var(--pink); padding: 22px 0; font: 12px var(--mono); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Interior page headers */
.page-head { padding: 90px 0 64px; }
.page-head h1 { max-width: 14ch; }
.page-head p.lead { font-size: 1.25rem; line-height: 1.55; }
.band { padding: 80px 0; position: relative; overflow: hidden; }

/* Home: hero scene */
.hero { background: var(--wine); color: var(--pink); padding: 96px 0 104px; }
.hero::before { content: ''; position: absolute; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px; right: -10vw; top: 0; background: radial-gradient(circle, #f1abd01f, transparent 65%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.9rem, 6.4vw, 4.6rem); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; margin-bottom: 28px; }
.hero .h1-second { display: block; }
.hero-eyebrow { white-space: nowrap; letter-spacing: .06em; margin-bottom: 26px; }
.hero p.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); max-width: 480px; color: #f8dce9; }
.hero .accent { font-style: italic; color: var(--cream); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.scene { position: relative; container-type: inline-size; max-width: 700px; width: 100%; }
.scene-svg { display: block; width: 100%; height: auto; border-radius: 26px; box-shadow: 0 30px 60px #0008, 0 0 0 1px #f1abd033; }

/* Interactive desk lamp. The lamp is a real button laid over the drawing. */
.lamp-btn { position: absolute; left: 21.1%; top: 56.2%; width: 14.4%; height: 17.4%; border: 0; border-radius: 14px; background: transparent; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lamp-btn:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.lamp-light, .lamp-items, .lamp-tint { opacity: 0; transition: opacity .4s ease; }
.lamp-dim { opacity: 1; transition: opacity .4s ease; }
.shade { transition: fill .4s ease; }
.bulb { fill: #ffe2a0; transition: fill .4s ease; }
.scene:not(.lamp-on) .shade { fill: #a95a3e; }
.scene:not(.lamp-on) .bulb { fill: #b99a76; }
.scene.lamp-on .lamp-light, .scene.lamp-on .lamp-items { opacity: 1; }
.scene.lamp-on .lamp-tint { opacity: .22; }
.scene.lamp-on .lamp-dim { opacity: 0; }
/* Small handwritten drawer labels, drawn inside the scene. The first one appears with the lamp. */
.svg-note { font: 600 17px var(--hand); fill: #5a1b27; }
.lamp-note { opacity: 0; transition: opacity .4s ease; }
.scene.lamp-on .lamp-note { opacity: 1; }
.breathe { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 5.5s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.045); } }
/* Desk cat looks up on mouse hover (script.js adds .cat-noticed for mouse pointers only). */
.cat-head { transform-box: fill-box; transform-origin: 70% 95%; }
.cat-eyes-open { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }
.cat-eyes-closed { opacity: 1; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cat-head { transition: transform .45s ease-out; }
  .cat-eyes-open, .cat-eyes-closed { transition: opacity .25s ease; }
  .scene.cat-noticed .cat-head { transform: translateY(-3px) rotate(-5deg); transition-delay: .08s; }
  .scene.cat-noticed .cat-eyes-open { opacity: 1; transition-delay: .25s; animation: cat-blink .3s ease-in-out 1.4s 1; }
  .scene.cat-noticed .cat-eyes-closed { opacity: 0; transition-delay: .25s; }
}
@keyframes cat-blink { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.12); } }

/* Home: trilogy, latest note, art preview */
.intro { background: var(--cream); padding: 80px 0; }
.intro-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.latest { background: var(--kraft); padding: 76px 0; }
.note-card { background: var(--paper); padding: 34px 36px; box-shadow: 8px 10px 0 #31192314; max-width: 760px; position: relative; }
.note-card::before { content: ''; position: absolute; left: 36px; top: -11px; width: 80px; height: 22px; background: #8fc27aaa; transform: rotate(-2deg); }
.note-card h3 { margin-bottom: 10px; }
.note-card h3 a { text-decoration: none; }
.note-card h3 a:hover { text-decoration: underline; }
.note-card .meta { font: 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 8px; }
.note-card p { margin-bottom: 18px; }
.note-card .more { font: 500 13px var(--mono); }

/* Books */
.books-head { background: var(--cream); }
.books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.book { display: flex; flex-direction: column; }
.cover { aspect-ratio: 3 / 4; display: flex; flex-direction: column; justify-content: space-between; padding: 30px 26px; overflow: hidden; position: relative; border-radius: 4px 10px 10px 4px; box-shadow: 10px 12px 0 #31192314; transition: transform .25s; }
.cover::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 18px; background: linear-gradient(90deg, #0003, #0000); z-index: 2; }
.cover:hover { transform: translateY(-6px) rotate(-.6deg); }
.cover small, .cover .cover-author { position: relative; z-index: 1; text-transform: uppercase; font: 500 11px var(--mono); letter-spacing: .14em; }
.cover-title { position: relative; z-index: 1; font: 600 clamp(2.3rem, 3.6vw, 3.8rem)/.95 var(--serif); letter-spacing: -.045em; max-width: 300px; }
.cover-title.long { font-size: clamp(2rem, 3.1vw, 3.2rem); }
.cover-art { position: absolute; right: 0; bottom: 0; width: 82%; height: auto; }
.cover1 { background: #e7a2bb; color: #3b1425; }
.cover2 { background: #601d27; color: #f5bfcd; }
.cover3 { background: #bccbd1; color: #273f4e; }
.book-info { padding: 24px 3px 0; }
.book-info h3 { margin-bottom: 8px; }
.book-info p { font-size: 16px; }
.disclaimer { font-size: 14px; color: var(--muted); margin-top: 34px; }

/* Art */
.art-head { background: var(--sage); }
.soon { font: italic 600 clamp(3.4rem, 9vw, 7.4rem)/1 var(--serif); letter-spacing: -.05em; color: var(--wine); margin: 10px 0 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 26px 0; }
.chip { border: 1px dashed #5b6f55; border-radius: 99px; padding: 6px 14px; font: 12px var(--mono); }
.gallery { position: relative; padding-top: 34px; margin: 36px 0 10px; }
.gallery::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 11px; background: var(--timber); border-radius: 3px; box-shadow: 0 5px 0 #7d4a2455; }
.gallery-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 34px; align-items: start; }
.piece { position: relative; margin: 38px 0 0; }
.piece::before { content: ''; position: absolute; left: 25%; width: 50%; top: -38px; height: 38px; background: linear-gradient(to top right, transparent calc(50% - 1px), #5b3a22 50%, transparent calc(50% + 1px)) left / 50% 100% no-repeat, linear-gradient(to top left, transparent calc(50% - 1px), #5b3a22 50%, transparent calc(50% + 1px)) right / 50% 100% no-repeat; }
.frame { background: linear-gradient(135deg, #c78a4c, #9a6232); padding: 12px; box-shadow: 8px 10px 0 #26432b26; }
.mat { background: var(--paper); padding: 16px; }
.mat img, .mat svg { display: block; width: 100%; height: auto; }
.label { display: inline-block; margin-top: 16px; background: var(--paper); border: 1px solid #bfae9c; padding: 6px 10px; font: 12px var(--mono); }
.wall { max-width: 360px; margin: 0 auto; }
.wall .mat { aspect-ratio: 4 / 5; display: grid; place-items: center; text-align: center; padding: 24px; }
.wall .mat p { margin: 0; font: italic 600 2rem/1.1 var(--serif); letter-spacing: -.03em; color: var(--wine); }
.wall-note { text-align: center; margin-inline: auto; color: var(--muted); font-size: 14px; margin-top: 26px; }

/* Notes */
.notes-head { background: var(--kraft); }
.topics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.topics span { border: 1px solid #9e8781; border-radius: 99px; padding: 6px 14px; font: 12px var(--mono); }
.note-list { display: flex; flex-direction: column; gap: 26px; }
.note-page { background: var(--paper); padding: 64px 0 90px; }
.note-page h1 { max-width: 20ch; }
.note-body { font-size: 1.12rem; line-height: 1.8; }
.note-body h2 { font-size: 1.8rem; margin-top: 2.2rem; }
.note-body blockquote { margin: 1.8rem 0; padding-left: 20px; border-left: 3px solid var(--coral); font: italic 600 1.5rem/1.3 var(--serif); letter-spacing: -.02em; }
.back { display: inline-block; margin-bottom: 28px; font: 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; }

/* About */
.about-head { background: var(--cream); }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.pen-card { background: var(--pink2); padding: 44px 32px 34px; transform: rotate(-2deg); box-shadow: 10px 12px 0 #31192314; position: relative; }
.pen-card::before { content: ''; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; transform: translateX(-50%) rotate(2deg); background: #8fc27aaa; }
.pen-card .hi { font: italic 600 clamp(2.6rem, 4.4vw, 4.4rem)/1 var(--serif); letter-spacing: -.04em; text-align: center; color: var(--wine); margin: 0 0 30px; }
.hats { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-around; gap: 14px; flex-wrap: wrap; }
.hats li { display: flex; flex-direction: column; align-items: center; gap: 8px; font: 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--wine); }
.hats svg { width: 52px; height: 52px; fill: none; stroke: var(--wine); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.origin { background: var(--wine); color: var(--pink); padding: 80px 0; }
.origin-grid { display: grid; grid-template-columns: 1fr .9fr; gap: 56px; align-items: center; }
.origin p { color: #f5dbe7; }
.slot { border: 2px dashed #f1abd077; border-radius: 10px; padding: 26px 28px; }
.slot strong { display: block; font: 600 1.3rem var(--serif); color: var(--pink); margin-bottom: 6px; }
.notebook { position: relative; background-color: var(--paper); color: var(--wine); padding: 44px 30px 38px 74px; transform: rotate(2deg); box-shadow: 10px 14px 0 #0005; background-image: repeating-linear-gradient(transparent 0 35px, #b8d0e0 35px 36px); }
.notebook::before { content: ''; position: absolute; left: 54px; top: 0; bottom: 0; width: 2px; background: #e58aa5; }
.notebook::after { content: ''; position: absolute; left: 30px; top: -10px; width: 90px; height: 24px; background: #8fc27aaa; transform: rotate(-4deg); }
.notebook .scribble { color: var(--wine); font: italic 600 clamp(2.2rem, 3.6vw, 3.6rem)/1.17 var(--serif); letter-spacing: -.03em; margin: 0; }
.notebook .small { display: block; font: 13px var(--mono); letter-spacing: .1em; margin-top: 26px; }
.swatches { display: flex; gap: 8px; margin-top: 18px; }
.swatches i { width: 22px; height: 22px; border-radius: 50%; display: block; }

/* Say Hello */
.hello-head { background: var(--wine); color: var(--pink); }
.hello-head h1 { max-width: 16ch; }
.hello-head p { color: #f8dbe7; }
.audiences { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; padding: 0; list-style: none; }
.audiences li { border: 1px solid #f1abd077; border-radius: 99px; padding: 6px 14px; font: 12px var(--mono); }
.postcard { background-color: var(--paper); color: var(--wine); transform: rotate(1.5deg); box-shadow: 10px 14px 0 #0005; display: grid; grid-template-columns: 1fr 110px; gap: 22px; max-width: 560px; padding: 36px 26px 26px; background-image: repeating-linear-gradient(135deg, #e58aa5 0 14px, transparent 14px 22px, #5a9fd4 22px 36px, transparent 36px 44px); background-size: 100% 8px; background-repeat: no-repeat; background-position: top; margin-top: 44px; }
.postcard .lines { display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.postcard .line { border-bottom: 1.5px dashed #8a7a7e; padding-bottom: 6px; font-size: 14px; color: var(--muted); }
.postcard .line strong { color: var(--wine); }
.stamp { border: 3px dotted #b29a9f; padding: 8px; align-self: start; background: #fff7ea; }
.stamp svg { display: block; width: 100%; height: auto; }
.stamp span { display: block; text-align: center; font: 10px var(--mono); letter-spacing: .08em; margin-top: 4px; }

/* Not found */
.lost { padding: 120px 0; background: var(--cream); }

/* Large screens: text beside the scene */
@media (min-width: 1280px) {
  .hero-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 72px; }
  .hero h1 { font-size: clamp(3rem, 3.9vw, 4.3rem); }
}

/* Tablet and phone: the sidebar becomes a top bar with a compact menu */
@media (max-width: 900px) {
  .sidebar { position: sticky; top: 0; inset: auto; width: 100%; padding: 0; flex-direction: column; overflow: visible; border-right: 0; border-bottom: 1px solid #f1abd024; }
  .side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 19px; min-height: 64px; }
  .brand { margin: 0; font-size: 23px; }
  .side-tag, .side-foot { display: none; }
  .menu { display: block; }
  .sidebar nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--wine); padding: 6px 19px 16px; max-height: calc(100vh - 80px); overflow-y: auto; border-bottom: 1px solid #f1abd033; box-shadow: 0 18px 30px #0007; }
  .sidebar nav.open { display: block; }
  .sidebar nav a { font-size: 18px; padding: 9px 12px; }
  .main { margin-left: 0; }
  .wrap { width: calc(100% - 38px); }
  .page-head { padding: 64px 0 48px; }
  .band, .intro, .latest, .origin { padding: 60px 0; }
  .intro-grid, .about-grid, .origin-grid { grid-template-columns: 1fr; gap: 40px; }
  .books { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .deco { display: none; }
}
@media (max-width: 640px) {
  .hero { padding: 48px 0 64px; }
  .hero-eyebrow { white-space: normal; font-size: 11px; }
  h1 { font-size: clamp(2.7rem, 12vw, 4rem); }
  .books { grid-template-columns: 1fr; }
  .book { max-width: 320px; width: 100%; margin: 0 auto; }
  .cover { width: 100%; padding: 26px 22px; }
  .cover-title { font-size: 2.9rem; }
  .cover-title.long { font-size: 2.4rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .note-card { padding: 28px 22px; }
  .notebook { padding-left: 62px; }
  .notebook::before { left: 44px; }
  .postcard { grid-template-columns: 1fr; }
  .stamp { max-width: 110px; }
  .lamp-btn { min-width: 44px; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Home: the three books as covers */
.intro-grid { grid-template-columns: minmax(0, 640px); }
.home-books { margin-top: 48px; }
a.book { color: inherit; text-decoration: none; }
a.book:hover h3, a.book:focus-visible h3 { text-decoration: underline; text-underline-offset: 4px; }
a.book:focus-visible { outline: 3px solid var(--coral); outline-offset: 6px; }
.home-books .book-info { padding-top: 20px; }
.home-books .tags { margin-bottom: 10px; }

/* Say Hello: working contact links */
.audiences a { display: inline-block; color: inherit; text-decoration: none; border: 1px solid #f1abd077; border-radius: 99px; padding: 8px 16px; font: 12px var(--mono); letter-spacing: .05em; transition: background .2s, color .2s; }
.audiences li { border: 0; padding: 0; }
.audiences a:hover, .audiences a:focus-visible { background: var(--pink); color: var(--wine); border-color: var(--pink); }
.audiences a:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.hello-head h1 em { color: var(--cream); }
.postcard .hello-title strong { font: 600 clamp(1.5rem, 2.4vw, 2rem)/1.1 var(--serif); letter-spacing: -.03em; }
.postcard .line.hello-title, .postcard .line.mail { border-bottom-style: solid; }
.postcard .line { font-size: 15px; line-height: 1.55; }
.postcard .email { font: 600 clamp(1.25rem, 2.6vw, 1.7rem)/1.2 var(--serif); letter-spacing: -.02em; color: var(--wine); word-break: break-word; }
.postcard .email:hover, .postcard .email:focus-visible { text-decoration-thickness: 2px; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.copy-btn { background: transparent; color: var(--wine); cursor: pointer; font-family: var(--mono); }
.copy-btn:hover { background: #4b1a2514; }
.btn:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.copy-status { font: 12px var(--mono); color: var(--muted); min-height: 1em; }

/* Home: GP Study and From the Desk (October 2026) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.study-home { background: var(--sage); padding: 76px 0; }
.study-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center; }
.study-grid p { max-width: 56ch; }
.study-drawer { display: grid; place-items: center; position: relative; min-height: 190px; text-decoration: none; background: linear-gradient(#e7c797, #d9b27a); border: 2px solid #8f5528; border-radius: 10px; box-shadow: 0 7px 0 #8f552855, 0 14px 22px #22090d22; padding: 44px 22px 26px; transform: rotate(-1.5deg); }
.study-drawer::before { content: ''; position: absolute; left: 50%; top: 18px; width: 54px; height: 18px; transform: translateX(-50%); border-radius: 12px; background: linear-gradient(#f0d080, #b8902f); box-shadow: 0 2px 0 #7a5a1a; }
.study-label { background: var(--paper); border: 2px solid var(--brass); border-radius: 3px; padding: 6px 16px; font: 600 1.2rem var(--serif); letter-spacing: -.03em; color: var(--ink); }
.latest-lead { max-width: 60ch; margin-bottom: 30px; }
.latest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 30px; }
.latest-grid .note-card { max-width: none; }
.all-notes { display: inline-block; margin-top: 26px; }

/* Notes archive and article */
.note-featured { margin-bottom: 46px; }
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 30px; margin-top: 18px; }
.note-grid .note-card { max-width: none; }
.note-controls { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-bottom: 18px; }
.note-search input { font: 16px var(--sans); padding: 11px 16px; border: 1px solid #9e8781; border-radius: 99px; background: var(--paper); color: var(--ink); width: min(320px, 100%); }
.note-search { flex: 1 1 260px; max-width: 340px; }
.note-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.note-tag { border: 1px solid #9e8781; border-radius: 99px; padding: 6px 14px; font: 12px var(--mono); background: transparent; color: var(--ink); cursor: pointer; }
.note-tag[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: var(--cream); }
.note-tag:focus-visible, .note-search input:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.note-count { color: var(--muted); margin: 0 0 18px; }
.note-card-sub { font-style: italic; }
.note-preview { background: #f3e1c4; border-left: 3px solid var(--brass); padding: 10px 14px; font-size: 14px; }
.note-article { max-width: 720px; }
.note-article h1 { margin-top: 8px; }
.note-subtitle { font: italic 500 1.3rem/1.4 var(--serif); color: var(--muted); max-width: 40ch; margin: 0 0 14px; }
.note-article > .meta { display: block; color: var(--muted); margin-bottom: 30px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.note-body h3 { font-size: 1.35rem; margin-top: 1.8rem; }
.note-body ul, .note-body ol { padding-left: 1.3em; }
.note-body hr { border: 0; border-top: 1px solid #d7c9bd; margin: 2.2rem 0; }
.note-body a { color: var(--wine2); }
sup.cite { font-size: .7em; line-height: 0; }
sup.cite a { text-decoration: none; padding: 0 1px; color: #8a3a52; font-weight: 600; }
.note-refs { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid #d7c9bd; font-size: 15px; line-height: 1.6; }
.note-refs h2 { font-size: 1.4rem; }
.note-refs ol { padding-left: 1.6em; }
.note-refs li { margin-bottom: 10px; scroll-margin-top: 90px; }
.note-refs li:target { background: #f9cce355; }
.ref-link, .ref-back { font: 12px var(--mono); white-space: nowrap; }
.note-back { display: inline-block; margin-top: 2.4rem; }
@media (max-width: 900px) {
  .study-home { padding: 60px 0; }
  .study-grid { grid-template-columns: 1fr; gap: 34px; }
  .study-drawer { min-height: 150px; max-width: 360px; }
}
/* main > section clips overflow; the article must not, or footnote jumps scroll the section instead of the page */
main > section.note-page { overflow: visible; }
sup.cite a { scroll-margin-top: 140px; }
.all-notes[hidden], .note-featured[hidden], .note-controls[hidden], .note-count[hidden] { display: none; }
.latest-grid > .note-card:only-child { grid-column: 1 / -1; max-width: 760px; }

/* Legal pages */
.legal-head { background: var(--kraft); }
.legal-date { color: var(--muted); margin: 18px 0 0; }
.legal-body { max-width: 720px; }
.legal-body h2 { font-size: 1.6rem; margin-top: 2rem; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body code { font: 14px var(--mono); background: var(--paper); padding: 1px 6px; border-radius: 4px; }
.site-foot a { color: inherit; }
.site-foot .foot-kofi { white-space: nowrap; }
.site-foot .foot-kofi span[aria-hidden] { display: inline-block; }
.contact-note { max-width: 640px; margin-top: 46px; color: #f1d7e3; font-size: 15px; line-height: 1.6; }
.contact-note h2 { font: 500 12px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--pink); margin-bottom: 10px; }
.contact-note ul { margin: 0; padding-left: 1.1em; }
.contact-note li { margin-bottom: 6px; }
