:root {
  --bg: #fbf7f2;
  --ink: #241c1a;
  --muted: #7a6f68;
  --line: #e7ddd2;
  --card: #ffffff;
  --accent: #7a1f2b;
  --gold: #b8860b;
  --maxw: 60rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.4rem; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.muted { color: var(--muted); font-weight: 400; }
.eyebrow { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 0 0 0.4rem; }
.eyebrow a { color: var(--muted); }

/* Header — one bar: brand · content nav · search · account menu */
.site-header { border-bottom: 1px solid var(--line); background: rgba(251,247,242,0.9); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 20; }
.header-bar { display: flex; align-items: center; gap: 1.25rem; min-height: 3.6rem; }
.brand { font-family: Fraunces, serif; font-size: 1.18rem; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand .x { color: var(--gold); }
.brand .dot { color: var(--accent); }

.header-collapse { display: contents; }          /* inline on desktop; dropdown panel on mobile */
.site-nav { display: flex; gap: 0.1rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.86rem; padding: 0.4rem 0.75rem; border-radius: 999px; transition: color .12s, background .12s; }
.site-nav a:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.site-nav a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.nav-ext { display: inline-flex; align-items: center; gap: 0.25rem; }
.nav-ext-ico { opacity: 0.55; }
.admin-list { display: none; }                    /* desktop: admin lives in the account menu */

.header-right { margin-left: auto; display: flex; align-items: center; gap: 0.4rem; }
.icon-only { display: inline-flex; align-items: center; justify-content: center; height: 36px; width: 36px; padding: 0; color: var(--muted); background: none; border: 0; border-radius: 8px; cursor: pointer; transition: color .12s, background .12s; }
.icon-only:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.icon-only svg { width: 18px; height: 18px; }

.account { position: relative; }
.account-trigger { display: inline-flex; align-items: center; gap: 0.4rem; height: 36px; padding: 0 0.55rem 0 0.5rem; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font: inherit; transition: border-color .12s, background .12s; }
.account-trigger:hover, .account.open .account-trigger { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.account-avatar { width: 20px; height: 20px; color: var(--accent); flex: none; }
.account-name { font-size: 0.84rem; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chev { color: var(--muted); transition: transform .15s; flex: none; }
.account.open .account-chev { transform: rotate(180deg); }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 15rem; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px -12px rgba(30,26,34,0.35); padding: 0.4rem; z-index: 30; }
.account-menu[hidden] { display: none; }
.account-who { padding: 0.35rem 0.6rem 0.5rem; display: flex; flex-direction: column; gap: 0.1rem; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); margin-bottom: 0.3rem; }
.account-who-lbl { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.account-who-email { font-size: 0.86rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.account-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 0.88rem; }
.account-item svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.account-item:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--accent); }
.account-item:hover svg, .account-item.active, .account-item.active svg { color: var(--accent); }
.account-sep { height: 1px; background: color-mix(in srgb, var(--line) 60%, transparent); margin: 0.3rem 0; }

.header-login { color: var(--dim, var(--muted)); font-size: 0.86rem; text-decoration: none; padding: 0.35rem 0.55rem; border-radius: 8px; transition: color .12s; white-space: nowrap; }
.header-login:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 0.35rem; border-radius: 8px; }
.nav-toggle:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .account { display: none; }                     /* admin/session move into the mobile panel */
  .header-collapse { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 14px 26px -16px rgba(30,26,34,0.3); padding: 0.5rem 0 0.7rem; }
  .site-header.nav-open .header-collapse { display: block; }
  .site-nav { flex-direction: column; align-items: stretch; gap: 0.1rem; padding: 0 1.4rem; }
  .site-nav a { padding: 0.7rem 0.6rem; border-radius: 8px; }
  .admin-list { display: flex; flex-direction: column; padding: 0 1.4rem; }
  .admin-sep { height: 1px; background: var(--line); margin: 0.4rem 0.6rem; }
  .admin-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.6rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 0.9rem; }
  .admin-item svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
  .admin-item:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
}

/* Hero */
.hero { padding: 4.6rem 0 2rem; }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.7rem); line-height: 1.04; letter-spacing: -0.025em; margin: 0.3rem 0 1.2rem; max-width: 15ch; }
.hero-body { font-size: 1.12rem; max-width: 48ch; color: #46414c; }
.hero-body p { margin: 0 0 1rem; }
/* Split hero — copy + Living Silk render */
.hero-split { display: grid; grid-template-columns: 1.35fr 0.9fr; gap: 3rem; align-items: center; padding-top: 3.4rem; }
.hero-split .hero-copy { min-width: 0; }
.hero-split h1 { max-width: 16ch; }
.hero-split .hero-body { max-width: 44ch; }
.hero-figure { margin: 0; }
.hero-figure img { width: 100%; height: auto; display: block; border-radius: 16px; box-shadow: 0 24px 55px -20px rgba(30,26,34,0.45); }
.hero-figure figcaption { margin-top: 0.6rem; font-size: 0.76rem; color: var(--muted); text-align: center; font-style: italic; }
@media (max-width: 820px) {
  .hero-split { grid-template-columns: 1fr; gap: 1.8rem; padding-top: 2.4rem; }
  .hero-figure { max-width: 20rem; margin: 0 auto; order: -1; }
}

/* De-emphasized secondary links (e.g. résumé) */
.also { margin: -1rem 0 2.5rem; font-size: 0.92rem; color: var(--muted); }
.also a { color: var(--muted); text-underline-offset: 3px; }
.also a:hover { color: var(--accent); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.1rem; margin: 1.5rem 0 2.5rem; }
.cards-inline { margin-top: 2rem; }
.card { display: flex; flex-direction: column; gap: 0.5rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem 1.3rem 1.15rem; text-decoration: none; color: var(--ink); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(122,31,43,0.10); border-color: #d9c7b4; }
.card h2 { font-size: 1.28rem; margin: 0.1rem 0 0; }
.card p { margin: 0; color: #4a3f3a; font-size: 0.97rem; }
.card-link { margin-top: auto; color: var(--accent); font-weight: 500; font-size: 0.9rem; }
.badge { align-self: flex-start; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); border: 1px solid var(--gold); border-radius: 999px; padding: 0.12rem 0.6rem; }

/* Callout */
.callout { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; background: var(--accent); color: #fff; border-radius: 16px; padding: 1.6rem 1.8rem; margin: 0 0 3rem; }
.callout h3 { margin: 0 0 0.3rem; color: #fff; }
.callout p { margin: 0; color: #f4e6e2; max-width: 44ch; }
.btn { display: inline-block; background: #fff; color: var(--accent); border-radius: 999px; padding: 0.6rem 1.2rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #fff2ec; }

/* Prose */
.prose { padding: 2.4rem 0 1rem; max-width: 44rem; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0.2rem 0 0.6rem; }
.prose h2 { font-size: 1.5rem; margin: 2.2rem 0 0.6rem; }
.prose h3 { font-size: 1.18rem; margin: 1.8rem 0 0.4rem; }
.prose .lede { font-size: 1.15rem; color: #4a3f3a; margin: 0.8rem 0 1.2rem; }
.prose .badge { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin: 0.3rem 0; }
.prose blockquote { border-left: 3px solid var(--gold); margin: 1.2rem 0; padding: 0.2rem 0 0.2rem 1rem; color: var(--muted); font-style: italic; }
.prose code { background: #efe6da; padding: 0.1rem 0.35rem; border-radius: 5px; font-size: 0.9em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* Embeds */
.embed-frame { position: relative; width: 100%; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #111; margin: 1.2rem 0 0.4rem; }
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-caption { font-size: 0.9rem; color: var(--muted); margin: 0 0 1.5rem; }

/* Comments */
.comments { max-width: 44rem; margin: 2.5rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.comments h3 { margin: 0 0 0.2rem; }
.comment-list { list-style: none; padding: 0; margin: 1rem 0; }
.comment-list li { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.c-meta { font-size: 0.9rem; }
.c-text { margin-top: 0.25rem; }
.comment-form { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
.comment-form textarea { width: 100%; font: inherit; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; resize: vertical; }
.comment-form button { align-self: flex-start; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 0.5rem 1.1rem; font-weight: 600; cursor: pointer; }
.comment-form button:hover { background: #63161f; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2.2rem 0 1.8rem; font-size: 0.9rem; color: var(--muted); }
.site-footer p { margin: 0.15rem 0; }
.foot-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.4rem 2rem; flex-wrap: wrap; }
.foot-mark { font-family: Fraunces, serif; font-size: 1.08rem; font-weight: 600; color: var(--ink); }
.foot-mark .x { color: var(--gold); font-weight: 400; }
.foot-id p { margin: 0.35rem 0 0; font-size: 0.86rem; max-width: 42ch; }
.foot-nav { display: flex; gap: 1.3rem; align-items: center; flex-wrap: wrap; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover { color: var(--accent); }
.foot-meta { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.78rem; }

@media (max-width: 640px) {
  .hero { padding-top: 2.2rem; }
  .callout { padding: 1.3rem; }
  .header-actions { gap: 0.5rem; }
}

/* Brand logo (client mode) */
.brand-logo { height: 28px; width: auto; vertical-align: middle; display: inline-block; }
.brand-client, .brand-studio { vertical-align: middle; }

/* Header action icons (contact / calendar) */
.header-actions { display: flex; align-items: center; gap: 0.7rem; }
.icon-btn { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); text-decoration: none; font-size: 0.9rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.32rem 0.8rem; }
.icon-btn:hover { color: var(--accent); border-color: #d9c7b4; }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.icon-btn.primary:hover { background: #63161f; color: #fff; }

/* Public link cards (studio homepage mode) */
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.1rem; margin: 1.5rem 0 2.5rem; }
.link-card { display: flex; flex-direction: column; gap: 0.4rem; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: 14px; padding: 1.3rem 1.4rem; text-decoration: none; color: var(--ink); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.link-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(30,26,34,0.10); }
.link-card.hue-plum { border-top-color: var(--accent); }
.link-card.hue-green { border-top-color: var(--secondary); }
.link-card.hue-plum:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); border-top-color: var(--accent); }
.link-card.hue-green:hover { border-color: color-mix(in srgb, var(--secondary) 40%, var(--line)); border-top-color: var(--secondary); }
.link-card h3 { margin: 0.1rem 0 0; font-size: 1.35rem; }
.link-card p { margin: 0; color: #4a454f; font-size: 0.96rem; }
.link-card .go { margin-top: auto; color: var(--accent); font-weight: 500; font-size: 0.88rem; }
.link-card.hue-green .go { color: var(--secondary); }

/* Contact strip */
.contact-strip { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 1.4rem 1.6rem; margin: 0 0 3rem; }
.contact-strip h3 { margin: 0 0 0.2rem; }
.contact-strip p { margin: 0; color: var(--muted); max-width: 44ch; }
.contact-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* Contact form (API-backed) */
.contact-form { display: flex; flex-direction: column; gap: 0.7rem; max-width: 34rem; }
.contact-form input, .contact-form textarea { width: 100%; font: inherit; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.contact-form button[type="submit"] { align-self: flex-start; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 0.55rem 1.2rem; font-weight: 600; cursor: pointer; }

/* Workspace actions (upload / approve) */
.actions { max-width: 44rem; margin: 2rem 0 0; }
.action-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.approve-btn { background: transparent; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 0.35rem 0.9rem; font-weight: 600; cursor: pointer; font-size: 0.9rem; }
.approve-btn.is-on { background: var(--accent); color: #fff; }
.btn-ghost { display: inline-block; border: 1px dashed var(--line); border-radius: 999px; padding: 0.35rem 0.9rem; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.upload-label:hover .btn-ghost { border-color: var(--accent); color: var(--accent); }
.upload-list { list-style: none; padding: 0; margin: 0.8rem 0 0; font-size: 0.92rem; }
.upload-list li { padding: 0.2rem 0; }

/* Availability (studio calendar) */
.availability { margin: 0 0 2.5rem; }
.avail-head h3 { margin: 0 0 0.2rem; }
.slots { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0 0.6rem; }
.slot { display: inline-block; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 0.5rem 0.85rem; text-decoration: none; color: var(--ink); font: inherit; font-size: 0.92rem; cursor: pointer; }
.slot:hover { border-color: var(--accent); color: var(--accent); }
.slot.is-picked { background: var(--accent); color: #fff; border-color: var(--accent); }
.slot-tz { font-size: 0.82rem; margin: 0.2rem 0 0; }

/* Booking form */
.book-form { display: flex; flex-direction: column; gap: 0.6rem; max-width: 24rem; margin: 0.8rem 0 0; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.book-when { margin: 0 0 0.2rem; font-weight: 600; }
.book-form input { width: 100%; font: inherit; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.book-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.book-form button { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 0.5rem 1.1rem; font-weight: 600; cursor: pointer; }
.book-cancel { background: transparent !important; color: var(--muted) !important; border: 1px solid var(--line) !important; }
#book-done { font-weight: 500; color: var(--accent); }

/* Contact form layout in the strip */
.contact-strip .contact-copy { flex: 1 1 16rem; }
.contact-strip .contact-form { flex: 1 1 20rem; }


/* ============================================================
   STUDIO MODE — dark editorial (orgware idiom). Scoped to
   body.studio so the light client-workspace mode is untouched.
   Palette comes from tokens: --bg (dark ground), --ink (cream
   text), --accent (primary hue), --secondary (second hue).
   ============================================================ */
body.studio {
  --serif: "Fraunces", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --dim: color-mix(in srgb, var(--ink) 56%, var(--bg));
  --faint: color-mix(in srgb, var(--ink) 34%, var(--bg));
  --line-s: color-mix(in srgb, var(--ink) 12%, transparent);
  --line-2: color-mix(in srgb, var(--ink) 22%, transparent);
  --ground-2: color-mix(in srgb, var(--ink) 5%, var(--bg));
  --accent-bright: color-mix(in srgb, var(--accent) 62%, white);
  --secondary-bright: color-mix(in srgb, var(--secondary) 60%, white);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
body.studio a { color: inherit; }
body.studio ::selection { background: var(--accent); color: var(--on-accent); }
body.studio .wrap { max-width: 68rem; }

/* header */
body.studio .site-header { background: color-mix(in srgb, var(--bg) 80%, transparent); border-bottom: 1px solid var(--line-s); }
body.studio .brand { color: var(--ink); }
body.studio .brand-studio { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
body.studio .site-nav a { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
body.studio .site-nav a:hover, body.studio .site-nav a.active { color: var(--accent-bright); }

/* mono kicker — the signature label */
body.studio .kicker { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); display: block; margin: 0 0 1.5rem; }

/* hero */
body.studio .s-hero { position: relative; padding: clamp(4.5rem, 12vw, 8.5rem) 0 3.5rem; overflow: hidden; }
body.studio .s-hero::before { content: ""; position: absolute; inset: -45% -12% auto -12%; height: 150%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1000px 520px at 78% -10%, color-mix(in srgb, var(--accent) 29%, transparent), transparent 64%),
    radial-gradient(720px 420px at 6% 10%, color-mix(in srgb, var(--secondary) 20%, transparent), transparent 62%);
  animation: heroDrift 23s ease-in-out infinite alternate; will-change: transform; }
body.studio .s-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(115deg, transparent 30%, color-mix(in srgb, var(--accent) 22%, transparent) 46%, color-mix(in srgb, var(--secondary) 16%, transparent) 54%, transparent 70%);
  background-size: 220% 100%; opacity: 0.62; animation: heroShimmer 13s linear infinite; will-change: background-position; }
body.studio .s-hero .wrap { position: relative; z-index: 1; }
@keyframes heroDrift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-4%, 3%, 0) scale(1.1); } }
@keyframes heroShimmer { 0% { background-position: 130% 0; } 100% { background-position: -30% 0; } }
@media (prefers-reduced-motion: reduce) { body.studio .s-hero::before, body.studio .s-hero::after { animation: none; } }
body.studio .s-hero .content h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.7rem, 6.8vw, 5.2rem); line-height: 1.03; letter-spacing: -0.022em; max-width: 15ch; margin: 0 0 0.45em; }
body.studio .s-hero .content h1 em { font-style: italic; color: var(--accent-bright); }
body.studio .s-hero .content p { font-size: clamp(1.05rem, 2.1vw, 1.32rem); line-height: 1.5; color: var(--dim); max-width: 44ch; margin: 0; }
body.studio .cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.1rem; }
body.studio .s-btn { font-family: var(--mono); font-size: 0.84rem; letter-spacing: 0.02em; text-decoration: none; padding: 0.8rem 1.35rem; border-radius: 999px; display: inline-flex; align-items: center; gap: 0.5rem; transition: transform .15s, background .2s, border-color .2s, color .2s; }
body.studio .s-btn:hover { transform: translateY(-1px); }
body.studio .s-btn.primary { background: var(--accent); color: var(--on-accent); font-weight: 500; }
body.studio .s-btn.primary:hover { background: var(--accent-bright); }
body.studio .s-btn.ghost { border: 1px solid var(--line-2); color: var(--ink); }
body.studio .s-btn.ghost:hover { border-color: var(--accent); color: var(--accent-bright); }

/* bands */
body.studio .band { padding: clamp(3.5rem, 8vw, 6rem) 0; border-top: 1px solid var(--line-s); }

/* pillar cards */
body.studio .s-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem; margin-top: 2.4rem; }
body.studio .s-card { display: flex; flex-direction: column; gap: 0.55rem; border: 1px solid var(--line-s); border-radius: 14px; padding: 1.9rem 1.8rem; background: var(--ground-2); text-decoration: none; color: var(--ink); transition: border-color .25s, transform .25s; }
body.studio .s-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
body.studio .s-card .tag { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
body.studio .s-card.hue-green .tag, body.studio .s-card.hue-green .go { color: var(--secondary-bright); }
body.studio .s-card h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 3vw, 1.9rem); letter-spacing: -0.015em; margin: 0.15rem 0 0; }
body.studio .s-card p { margin: 0; color: var(--dim); font-size: 0.98rem; line-height: 1.55; }
body.studio .s-card .go { margin-top: auto; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.03em; color: var(--accent-bright); }

/* also line */
body.studio .also { margin: 1.8rem 0 0; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.03em; color: var(--faint); }
body.studio .also a { color: var(--faint); text-decoration: none; border-bottom: 1px solid transparent; }
body.studio .also a:hover { color: var(--accent-bright); border-color: var(--accent-bright); }

/* availability + contact — neutralize the light partial chrome, restyle dark */
body.studio .availability, body.studio .contact-strip, body.studio .actions { border: 0; background: transparent; padding: 0; margin: 0; max-width: none; }
body.studio .contact-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 720px) { body.studio .contact-strip { grid-template-columns: 1fr; } }
body.studio .avail-head h3, body.studio .contact-copy h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 3.4vw, 2.2rem); letter-spacing: -0.015em; margin: 0 0 0.4rem; }
body.studio .muted { color: var(--dim); }
body.studio .slot { background: color-mix(in srgb, var(--ink) 7%, var(--bg)); border: 1px solid var(--line-s); color: var(--dim); font-family: var(--mono); font-size: 0.82rem; }
body.studio .slot:hover { border-color: var(--line-2); color: var(--ink); }
body.studio .slot.is-picked { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
body.studio .btn, body.studio .contact-form button[type="submit"], body.studio .book-form button { background: var(--accent); color: var(--on-accent); }
body.studio .btn:hover, body.studio .contact-form button[type="submit"]:hover, body.studio .book-form button:hover { background: var(--accent-bright); }
body.studio .book-form { background: var(--ground-2); border-color: var(--line-2); }
body.studio .contact-form input, body.studio .contact-form textarea, body.studio .book-form input { background: color-mix(in srgb, var(--ink) 4%, var(--bg)); border-color: var(--line-2); color: var(--ink); }
body.studio .contact-form input::placeholder, body.studio .contact-form textarea::placeholder, body.studio .book-form input::placeholder { color: var(--faint); }
body.studio .contact-copy p a, body.studio #book-done { color: var(--accent-bright); }

/* footer */
body.studio .site-footer { border-top: 1px solid var(--line-s); margin-top: 0; padding: 2rem 0 3rem; }
body.studio .site-footer, body.studio .site-footer a { font-family: var(--mono); font-size: 0.76rem; color: var(--faint); letter-spacing: 0.04em; }
body.studio .site-footer a { text-decoration: none; }
body.studio .site-footer a:hover { color: var(--accent-bright); }
body.studio .foot-links { margin-top: 0.4rem; }

/* brand mark (studio header) */
body.studio .brand { display: inline-flex; align-items: baseline; }
body.studio .brand-studio { font-family: var(--serif); font-weight: 500; font-size: 1.32rem; letter-spacing: -0.02em; color: var(--ink); }
body.studio .brand-tld { color: var(--accent); font-style: italic; }

/* subtle theme chooser — a small corner disc that opens a row of color dots */
#palette-preview { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; align-items: center; gap: 9px; flex-direction: row-reverse; }
#palette-preview .pp-toggle { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; flex: none;
  border: 1px solid var(--line-2); background: color-mix(in srgb, var(--ink) 6%, var(--bg)); color: var(--dim);
  font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0.45; transition: opacity .2s; }
#palette-preview:hover .pp-toggle, #palette-preview.open .pp-toggle { opacity: 1; }
#palette-preview .pp-swatches { display: flex; gap: 7px; align-items: center; overflow: hidden; max-width: 0; opacity: 0; transition: max-width .28s ease, opacity .2s; }
#palette-preview.open .pp-swatches { max-width: 220px; opacity: 1; }
#palette-preview .pp-swatches button { width: 18px; height: 18px; border-radius: 50%; cursor: pointer; padding: 0; flex: none;
  border: 1px solid var(--line-2); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
#palette-preview .pp-swatches button.on { outline: 2px solid var(--accent); outline-offset: 2px; }

/* contact "suggest a time" field */
body.studio .cf-field { display: flex; flex-direction: column; gap: 0.35rem; }
body.studio .cf-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
body.studio .cf-label em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--faint); }

/* slot picker — accordion + horizontally-scrolling day columns */
body.studio .slotpick { margin-top: 0.2rem; }
body.studio .slot-toggle { background: transparent; border: 0; padding: 0.2rem 0; cursor: pointer; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.03em; color: var(--accent); display: inline-flex; align-items: center; gap: 0.5rem; }
body.studio .slot-toggle-label { text-decoration: underline; text-underline-offset: 3px; }
body.studio .slot-toggle:hover { color: var(--accent-bright); }
body.studio .slot-toggle .muted { color: var(--faint); text-decoration: none; }
body.studio .slot-caret { display: inline-block; color: var(--accent); transition: transform .2s; }
body.studio .slot-toggle.open .slot-caret { transform: rotate(90deg); }
body.studio .slot-body { margin-top: 0.8rem; }
body.studio .slot-body .cf-label { margin: 0 0 0.6rem; }
body.studio .slot-cols { display: flex; gap: 0.6rem; overflow-x: auto; padding-bottom: 0.5rem; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
body.studio .slot-col { flex: 0 0 auto; width: 5.2rem; display: flex; flex-direction: column; gap: 0.35rem; scroll-snap-align: start; }
body.studio .slot-colhead { display: flex; flex-direction: column; line-height: 1.1; margin-bottom: 0.15rem; }
body.studio .slot-wd { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
body.studio .slot-md { font-family: var(--mono); font-size: 0.66rem; color: var(--faint); }
body.studio .slot-col .slot { width: 100%; text-align: center; font-size: 0.78rem; padding: 0.4rem 0.3rem; }
body.studio .slot.is-picked { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 500; }
body.studio .slot-free-row { margin: 0.9rem 0 0; }
body.studio .slot-more { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.02em; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
body.studio .slot-more:hover { color: var(--accent-bright); }
body.studio #cf-time-free { margin-top: 0.6rem; }

/* Issues board (workspace, light) */
.board { max-width: 62rem; margin: 0 auto; padding: 0 1.4rem; }
.board .board-new { margin: 1.6rem 0 0.4rem; }
.board-form { display: flex; flex-direction: column; gap: 0.6rem; max-width: 38rem; margin-top: 0.9rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.board-form input, .board-form textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; resize: vertical; }
.board-actions { display: flex; align-items: center; gap: 0.7rem; }
.board-form button { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 0.5rem 1.2rem; font-weight: 600; cursor: pointer; }
.board-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin-top: 2rem; }
@media (max-width: 680px) { .board-cols { grid-template-columns: 1fr; } }
.b-col { background: #faf7f2; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.1rem 0.6rem; }
.b-col h3 { margin: 0 0 1rem; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.b-col h3 .muted { font-weight: 400; }
.b-col > p.muted { padding: 0.4rem 0 1rem; }
.b-card { border: 1px solid var(--line); border-radius: 11px; padding: 0.85rem 0.95rem; background: var(--card); margin-bottom: 0.7rem; }
.b-top a { color: var(--ink); text-decoration: none; font-weight: 500; }
.b-top a:hover { color: var(--accent); }
.b-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-top: 0.5rem; font-size: 0.8rem; }
.b-chip { background: #efe6da; color: var(--muted); border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.72rem; }
.b-c { color: var(--muted); }
.b-note { background: transparent; border: 0; padding: 0.5rem 0 0; color: var(--accent); font: inherit; font-size: 0.8rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.b-noteform { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }
.b-noteform textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 0.5rem; border: 1px solid var(--line); border-radius: 8px; }
.b-noteform button { align-self: flex-start; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 0.35rem 0.9rem; font-size: 0.85rem; cursor: pointer; }
.b-title { color: var(--ink); font-weight: 600; line-height: 1.35; }
.b-body { margin: 0.35rem 0 0; font-size: 0.88rem; color: color-mix(in srgb, var(--ink) 76%, var(--bg)); line-height: 1.45; }
.b-thread { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.55rem; }
.b-reply { border-left: 2px solid color-mix(in srgb, var(--accent) 30%, var(--line)); padding: 0.05rem 0 0.05rem 0.6rem; }
.b-reply-h { font-size: 0.78rem; }
.b-reply-b { font-size: 0.86rem; line-height: 1.45; margin-top: 0.1rem; }
.b-pri { font: inherit; font-size: 0.72rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.12rem 1.25rem 0.12rem 0.55rem; background-color: #fff; color: var(--muted); cursor: pointer; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.4rem center; background-size: 9px; }
.b-pri.pri-high { color: #b23b3b; border-color: color-mix(in srgb, #b23b3b 40%, var(--line)); background-color: color-mix(in srgb, #b23b3b 8%, #fff); }
.b-pri.pri-low { color: var(--muted); }
.b-card.pri-b-high { border-left: 3px solid #b23b3b; }

/* Content tables (markdown) */
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; line-height: 1.45; }
.prose thead th { text-align: left; font-weight: 600; color: var(--ink); padding: 0.6rem 0.85rem; border-bottom: 2px solid color-mix(in srgb, var(--accent) 32%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, transparent); vertical-align: bottom; }
.prose tbody td { padding: 0.6rem 0.85rem; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); vertical-align: top; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover td { background: color-mix(in srgb, var(--accent) 3.5%, transparent); }
.prose th:first-child, .prose td:first-child { padding-left: 0.3rem; font-weight: 500; color: var(--ink); }
.prose th:last-child, .prose td:last-child { padding-right: 0.3rem; }
.prose table code { white-space: nowrap; font-size: 0.82em; }
.prose .table-wrap { overflow-x: auto; }
@media (max-width: 680px) { .prose table { display: block; overflow-x: auto; white-space: nowrap; } .prose tbody td, .prose thead th { white-space: normal; } }

/* Section annotations (workspace) */
.prose h2, .prose h3 { position: relative; }
.anno-add { background: none; border: 0; cursor: pointer; padding: 3px; opacity: 0.6; margin-left: 0.55rem; color: var(--accent); vertical-align: middle; border-radius: 50%; line-height: 0; transition: opacity .15s, background .15s, transform .12s; }
.anno-add svg { vertical-align: middle; display: inline-block; width: 17px; height: 17px; }
.prose h2:hover .anno-add, .prose h3:hover .anno-add { opacity: 1; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.anno-add:hover { opacity: 1; transform: scale(1.1); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.anno-badge { display: inline-block; margin-left: 0.25rem; font-family: Inter, sans-serif; font-size: 0.66rem; font-weight: 600; line-height: 1; color: var(--accent); vertical-align: super; cursor: pointer; }
.anno-panel { margin: 0.5rem 0 1.3rem; padding: 0.8rem 1rem; border-left: 3px solid var(--accent); background: #faf6f0; border-radius: 0 10px 10px 0; max-width: 44rem; }
.anno-list { list-style: none; padding: 0; margin: 0; }
.anno-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.anno-list li:last-child { border-bottom: 0; }
.anno-list:empty { display: none; }
.anno-form { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.6rem; }
.anno-form textarea { font: inherit; padding: 0.5rem; border: 1px solid var(--line); border-radius: 8px; }
.anno-form button { align-self: flex-start; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 0.35rem 0.9rem; font-size: 0.85rem; cursor: pointer; }
.anno-hint { font-size: 0.85rem; }

/* Doc + comment rail (workspace, GDoc-style) */
.doc { max-width: 68rem; margin: 0 auto; padding: 0 1.4rem; display: grid; grid-template-columns: minmax(0, 42rem) 21rem; justify-content: center; gap: 2rem; align-items: stretch; }
.doc .prose { max-width: none; }
.doc-rail { position: relative; --rail: var(--bg); --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 0 0 0 0 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.4'/%3E%3C/svg%3E"); padding: 0; }
/* bottom: -3rem bridges the footer's margin-top:3rem so the peach meets the footer line */
.doc-rail::before { content: ""; position: absolute; z-index: 0; top: 0; bottom: -3rem; left: 0; right: -100vw; background-color: var(--rail); background-image: var(--paper); border-left: 1px solid var(--line); }
.doc-rail > .rail-cta, .doc-rail > .rail-card { z-index: 1; }
/* sticky footer so the gutter fills all the way down to the footer line */
body:not(.studio) { min-height: 100vh; display: flex; flex-direction: column; }
body:not(.studio) > main { flex: 1 0 auto; display: flex; flex-direction: column; overflow-x: clip; }
@media (min-width: 1001px) { body:not(.studio) > main > .doc { flex: 1 0 auto; align-content: stretch; } }
.rail-cta { position: absolute; top: 1.25rem; left: 1.25rem; background: color-mix(in srgb, var(--bg) 72%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); border-radius: 999px; padding: 0.42rem 0.95rem; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.rail-cta:hover { border-color: var(--accent); background: var(--accent); color: var(--on-accent, #fff); }
.rail-card { position: absolute; left: 1.25rem; right: 1.25rem; box-sizing: border-box; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 0.85rem; box-shadow: 0 1px 4px rgba(0,0,0,0.05); transition: top .18s ease; }
.rc-head { display: flex; align-items: center; gap: 0.5rem; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.4rem; }
.rc-head-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-resolve { margin-left: auto; background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; padding: 0; white-space: nowrap; }
.rc-resolve:hover { color: var(--secondary, #5f6f45); }
.rc-resolved-bar { display: none; align-items: center; gap: 0.45rem; font-size: 0.82rem; color: var(--secondary, #5f6f45); }
.rc-reopen { background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.8rem; text-decoration: underline; cursor: pointer; padding: 0; }
.rc-reopen:hover { color: var(--accent); }
.rail-card.resolved { opacity: 0.8; }
.rail-card.resolved .rc-head, .rail-card.resolved .rc-notes, .rail-card.resolved .rc-form { display: none; }
.rail-card.resolved .rc-resolved-bar { display: flex; }
.rc-notes { list-style: none; padding: 0; margin: 0; }
.rc-notes li { font-size: 0.84rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.rc-notes li:last-child { border-bottom: 0; }
.rc-notes strong { font-weight: 600; }
.rc-text { margin-top: 0.15rem; }
.rc-notes:empty { display: none; }
.rc-form { margin-top: 0.5rem; }
.rc-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.84rem; padding: 0.4rem 0.5rem; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.rc-actions { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.35rem; }
.rc-form button { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 0.3rem 0.85rem; font-size: 0.8rem; cursor: pointer; }
.rc-cancel { background: transparent !important; color: var(--muted) !important; padding: 0.3rem 0.5rem !important; }
@media (max-width: 1000px) {
  .doc { grid-template-columns: minmax(0, 46rem); justify-content: center; gap: 0; }
  .doc-rail { display: none; }  /* no side gutter on mobile — comments render inline under each section */
  .anno-add { opacity: 0.9; }   /* always visible on touch (no hover) */
  .anno-add svg { width: 19px; height: 19px; }
  /* inline comment cards, inserted right under their heading */
  .rail-card { position: static !important; top: auto !important; left: auto; right: auto; width: auto; box-sizing: border-box;
    margin: 0.7rem 0 1.5rem; background: color-mix(in srgb, #e88c4e 10%, var(--bg)); box-shadow: none; }
  .rail-cta { position: static !important; top: auto; left: auto; display: inline-flex; margin: 0.4rem 0 1.5rem; }
}

/* Per-page tools (source / version history) */
.page-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 2.2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.82rem; }
.page-tools a { color: var(--muted); text-decoration: none; }
.page-tools a:hover { color: var(--accent); }
.pt-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.82rem; cursor: pointer; padding: 0; }
.pt-btn:hover, .pt-btn.open { color: var(--accent); }
/* Version history panel */
.versions-panel { flex-basis: 100%; margin-top: 0.9rem; }
.ver-since { font-size: 0.8rem; margin: 0 0 0.7rem; }
.ver-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ver-row { border-bottom: 1px solid var(--line); }
.ver-row:last-child { border-bottom: 0; }
.ver-head { width: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.9rem; background: none; border: 0; text-align: left; cursor: pointer; padding: 0.6rem 0.85rem; font: inherit; color: var(--ink); }
.ver-head:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.ver-row.open .ver-head { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.ver-msg { font-weight: 500; font-size: 0.9rem; }
.ver-meta { margin-left: auto; font-size: 0.78rem; white-space: nowrap; }
.ver-new { display: inline-block; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; color: var(--on-accent, #fff); background: var(--accent); border-radius: 4px; padding: 0.05rem 0.3rem; vertical-align: middle; }
.ver-cur { display: inline-block; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--secondary, #5f6f45); border: 1px solid currentColor; border-radius: 4px; padding: 0.02rem 0.3rem; vertical-align: middle; }
.ver-diffbox { padding: 0 0.85rem 0.7rem; }
.ver-stat { font-size: 0.78rem; font-family: var(--mono, monospace); margin: 0.3rem 0; }
.ver-stat .add, .dl.add { color: #1a7f37; }
.ver-stat .del, .dl.del { color: #b00020; }
.ver-diff { margin: 0; max-height: 340px; overflow: auto; font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: 0.76rem; line-height: 1.45; background: color-mix(in srgb, var(--ink) 3%, var(--bg)); border-radius: 8px; padding: 0.5rem 0; }
.dl { padding: 0 0.7rem; white-space: pre-wrap; word-break: break-word; }
.dl.add { background: color-mix(in srgb, #1a7f37 10%, transparent); }
.dl.del { background: color-mix(in srgb, #b00020 9%, transparent); }
.dl.hunk { color: var(--muted); background: color-mix(in srgb, var(--accent) 6%, transparent); }
/* studio-mode footer github link */
body.studio .foot-links a:hover { color: var(--accent-bright); }

/* own-note controls (edit / delete) + sign out */
.rc-line { display: flex; align-items: baseline; gap: 0.4rem; }
.rc-own { margin-left: auto; display: inline-flex; gap: 0.3rem; }
.rc-own button { background: none; border: 0; cursor: pointer; padding: 0 0.15rem; font-size: 0.74rem; color: var(--muted); }
.rc-edit:hover { color: var(--accent); }
.rc-del { font-size: 1rem !important; line-height: 1; }
.rc-del:hover { color: #b00020; }
.rc-editform { margin-top: 0.4rem; }
.rc-editform textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.84rem; padding: 0.4rem 0.5rem; border: 1px solid var(--line); border-radius: 8px; }
.rc-editform button { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 0.25rem 0.75rem; font-size: 0.78rem; cursor: pointer; }
.rc-ecancel { background: transparent !important; color: var(--muted) !important; }
.signout { color: var(--muted) !important; font-size: 0.82rem; }
.site-nav a.signout:hover { color: var(--accent) !important; background: transparent !important; }

/* footer: prominent changelog + subtle sign out */
.foot-changelog { font-weight: 600; color: var(--accent) !important; }
.site-footer .signout { color: var(--muted); }
.site-footer .signout:hover { color: var(--accent); }

/* Homepage "In review" checklist */
.review-list { margin: 0 0 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.review-list h2 { font-size: 1.4rem; margin: 0 0 0.3rem; }
.checklist { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.checklist li { display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .rv-box { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); cursor: pointer; flex: none; }
.checklist a { color: var(--ink); text-decoration: none; font-weight: 500; }
.checklist a:hover { color: var(--accent); }
.checklist .rv-who { font-size: 0.82rem; }
.checklist li:has(.rv-box:checked) a { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }

/* ── Work Ledger ── */
.ledger-head { display: flex; align-items: center; gap: 1.8rem; flex-wrap: wrap; margin: 1.8rem 0 1.4rem; padding: 1.2rem 1.4rem; background: color-mix(in srgb, var(--ink) 4%, var(--bg)); border: 1px solid var(--line); border-radius: 14px; }
.ledger-stat { display: flex; flex-direction: column; line-height: 1.1; }
.ledger-stat .ls-num { font-family: var(--serif, Fraunces), serif; font-size: 1.9rem; font-weight: 600; color: var(--ink); }
.ledger-stat .ls-lab { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 0.15rem; }
.ledger-head .btn { margin-left: auto; }
.ledger-head .btn:disabled { opacity: 0.5; cursor: default; }
.ledger-chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; margin: 0.5rem 0 0.4rem; overflow-x: auto; padding-bottom: 1.2rem; }
.ledger-chart .bar { flex: 0 0 22px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.ledger-chart .bar-fill { width: 60%; min-height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; opacity: 0.85; }
.ledger-chart .bar:hover .bar-fill { opacity: 1; }
.ledger-chart .bar-lab { position: absolute; bottom: -1.1rem; font-size: 0.6rem; color: var(--muted); white-space: nowrap; }
.ledger-note { font-size: 0.82rem; margin: 0.2rem 0 1.6rem; }
.ledger-sessions h2 { font-size: 1.1rem; margin: 1.4rem 0 0.7rem; }
.sess { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 0.5rem; background: var(--card); }
.sess > summary { display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 0.95rem; cursor: pointer; list-style: none; }
.sess > summary::-webkit-details-marker { display: none; }
.sess-when { font-weight: 600; font-size: 0.9rem; }
.sess-span { font-size: 0.82rem; }
.sess-hrs { margin-left: auto; font-size: 0.85rem; font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; }
.sess-commits { list-style: none; margin: 0; padding: 0.2rem 0.95rem 0.8rem; border-top: 1px solid var(--line); }
.sess-commits li { font-size: 0.85rem; padding: 0.28rem 0; color: var(--ink); }
.sess-commits code { font-size: 0.78rem; background: color-mix(in srgb, var(--ink) 7%, var(--bg)); padding: 0.05rem 0.35rem; border-radius: 4px; }
.sess-commits a { text-decoration: none; }
@media (max-width: 640px) { .ledger-head .btn { margin-left: 0; width: 100%; } .ledger-stat .ls-num { font-size: 1.5rem; } }

/* Archive tree */
.arch-root { font-size: 0.9rem; margin: 0 0 1.6rem; }
.arch-branch { margin: 0 0 1.6rem; }
.arch-sec { font-size: 1.1rem; margin: 0 0 0.4rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--line); }
.arch-list { list-style: none; margin: 0; padding: 0; }
.arch-file { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.8rem; padding: 0.5rem 0.2rem; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.arch-file:last-child { border-bottom: 0; }
.arch-ico { font-size: 0.82rem; }
.arch-name { font-weight: 500; text-decoration: none; }
.arch-meta { font-size: 0.8rem; }
.arch-hist { margin-left: auto; font-size: 0.8rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.arch-hist:hover { color: var(--accent); }

/* Ledger — unified items (git sessions + manual entries) + no-charge */
.led-line { display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 0.95rem; }
.led-item.free { opacity: 0.6; }
.led-item.free .sess-hrs { color: var(--muted); }
.led-src { display: inline-block; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0.02rem 0.32rem; vertical-align: middle; }
.free-h { font-size: 1rem; margin: 1.8rem 0 0.15rem; color: var(--muted); }
.free-note { font-size: 0.82rem; margin: 0 0 0.7rem; }

/* Archive — historical corpus (earlier eras) */
.corpus { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--line); }
.corpus-h { font-size: 1.3rem; margin: 0 0 0.2rem; }
.corpus-lead { margin: 0 0 1.5rem; font-size: 0.9rem; }
.era { margin: 0 0 2rem; padding: 1.3rem 1.4rem; background: color-mix(in srgb, var(--ink) 3%, var(--bg)); border: 1px solid var(--line); border-radius: 14px; }
.era-kicker { font-family: var(--mono, ui-monospace, monospace); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.era-title { font-size: 1.15rem; margin: 0.15rem 0 0; }
.era-period { color: var(--muted); font-weight: 400; font-size: 0.95rem; }
.era-summary { font-size: 0.92rem; margin: 0.6rem 0 1.2rem; max-width: 64ch; }
.era-group { margin: 0 0 1.1rem; }
.era-group.legacy { opacity: 0.82; }
.era-grp { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 0.35rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--line); }
.era-legacy-tag { font-size: 0.6rem; color: var(--gold, #b8860b); border: 1px solid currentColor; border-radius: 4px; padding: 0.02rem 0.32rem; letter-spacing: 0.04em; vertical-align: middle; }
.era-grp-note { font-size: 0.8rem; margin: 0 0 0.4rem; }
.era-note { flex-basis: 100%; font-size: 0.8rem; margin-left: 1.7rem; }

/* Content search palette (⌘K) */
.hdr-search { cursor: pointer; background: none; border: 0; }
.search-modal[hidden] { display: none; }
.search-modal { position: fixed; inset: 0; z-index: 100; background: color-mix(in srgb, var(--ink) 32%, transparent); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 11vh 1rem 1rem; }
.search-panel { width: 100%; max-width: 40rem; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 34px 80px -22px rgba(30,26,34,0.55); overflow: hidden; }
.search-in { display: flex; align-items: center; gap: 0.7rem; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); }
.search-ico { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search-in input { flex: 1; border: 0; background: none; font: inherit; font-size: 1.05rem; color: var(--ink); outline: none; }
.search-esc { font-size: 0.68rem; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0.1rem 0.4rem; }
.search-results { list-style: none; margin: 0; padding: 0.4rem; max-height: 56vh; overflow: auto; }
.search-results:empty { display: none; }
.sr a { display: block; padding: 0.55rem 0.7rem; border-radius: 9px; text-decoration: none; color: var(--ink); }
.sr.on a, .sr a:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.sr-title { display: block; font-weight: 600; font-size: 0.95rem; }
.sr-sec { font-weight: 400; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-left: 0.4rem; }
.sr-snip { display: block; font-size: 0.82rem; margin-top: 0.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { padding: 1.3rem; text-align: center; font-size: 0.9rem; margin: 0; }
.search-hint { padding: 0.5rem 1.1rem; margin: 0; border-top: 1px solid var(--line); font-size: 0.72rem; }
@media (max-width: 640px) { .search-modal { padding-top: 6vh; } .search-hint { display: none; } }

/* Review checklist — per-page to-do dock */
.review-dock { margin-top: 3rem; }
.todo { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.25rem 1.5rem; box-shadow: 0 2px 12px rgba(30,26,34,0.05); }
.todo-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.todo-head h2 { font-size: 1.1rem; margin: 0; }
.todo-count { font-size: 0.82rem; white-space: nowrap; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.todo-list li:last-child { border-bottom: 0; }
.rv-check { position: relative; display: inline-flex; cursor: pointer; flex: none; }
.rv-check .rv-box { position: absolute; opacity: 0; width: 0; height: 0; }
.rv-mark { width: 20px; height: 20px; border: 2px solid var(--line); border-radius: 6px; display: inline-block; transition: background .12s, border-color .12s; }
.rv-check:hover .rv-mark { border-color: var(--accent); }
.rv-box:checked + .rv-mark { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4.5 4.5L19 7'/%3E%3C/svg%3E"); background-size: 15px; background-position: center; background-repeat: no-repeat; }
.rv-name { text-decoration: none; color: var(--ink); font-size: 0.95rem; }
.rv-name:hover { color: var(--accent); }
.todo-list li.done .rv-name { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.rv-flag { margin-left: auto; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gold); border: 1px solid currentColor; border-radius: 5px; padding: 0.05rem 0.42rem; white-space: nowrap; }
.todo-list li:not(.updated) .rv-flag { display: none; }

/* Chevron rolls each page's action items into the checklist dock. */
.todo-list li { display: block; }
.rv-row { display: flex; align-items: center; gap: 0.75rem; }
.rv-chev { flex: none; width: 20px; height: 20px; border: none; background: none; cursor: pointer; color: var(--muted); padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.rv-chev::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-top: -2px; }
.rv-chev[aria-expanded="true"]::before { transform: rotate(45deg); }
.rv-chev:hover { color: var(--accent); }
.rv-chev-spacer { flex: none; width: 20px; }
.rv-ai-count { margin-left: auto; font-size: 0.75rem; white-space: nowrap; }
.todo-list li.ai-all-done .rv-ai-count { color: var(--accent); }
.rv-row .rv-flag { margin-left: 0.4rem; }
.rv-actions { list-style: none; margin: 0.35rem 0 0.6rem; padding: 0 0 0 2.85rem; display: flex; flex-direction: column; gap: 0.4rem; }
.rv-actions[hidden] { display: none; }
.rv-ai { display: flex; align-items: flex-start; gap: 0.5rem; }
.rv-ai-box { display: flex; align-items: flex-start; gap: 0.45rem; cursor: pointer; flex: 1; }
.rv-ai-check { margin-top: 0.15rem; width: 0.95rem; height: 0.95rem; accent-color: var(--accent); flex: none; cursor: pointer; }
.rv-ai-label { font-size: 0.86rem; line-height: 1.35; color: var(--ink); }
.rv-ai.done .rv-ai-label { text-decoration: line-through; color: var(--muted); }
.rv-ai-meta { font-size: 0.72rem; white-space: nowrap; flex: none; padding-top: 0.1rem; }

/* Review sign-off (definitive, version-stamped) */
.review-signoff { margin: 2.5rem 0 0; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.ro-h { font-size: 1.05rem; margin: 0 0 0.2rem; }
.ro-lead { font-size: 0.86rem; margin: 0 0 1rem; max-width: 62ch; }
.ro-log { list-style: none; margin: 0 0 1rem; padding: 0; }
.ro-entry { padding: 0.6rem 0.85rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 0.5rem; background: color-mix(in srgb, var(--secondary, #5f6f45) 6%, var(--bg)); }
.ro-entry.stale { opacity: 0.72; }
.ro-top { font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.ro-check { color: var(--secondary, #5f6f45); font-weight: 700; }
.ro-commit { text-decoration: none; }
.ro-commit code { font-size: 0.75rem; background: color-mix(in srgb, var(--ink) 7%, var(--bg)); padding: 0.05rem 0.35rem; border-radius: 4px; }
.ro-stale { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gold); border: 1px solid currentColor; border-radius: 4px; padding: 0.02rem 0.35rem; }
.ro-note-text { font-size: 0.9rem; margin-top: 0.35rem; }
.ro-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.92rem; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 10px; resize: vertical; background: var(--card); }
.ro-actions { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.5rem; flex-wrap: wrap; }
.ro-btn { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 0.45rem 1.15rem; font-weight: 600; cursor: pointer; }
.ro-btn:hover { background: #63161f; }
.ro-undo { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 0.85rem; text-decoration: underline; }
.ro-undo:hover { color: var(--accent); }
.ro-state { font-size: 0.85rem; }
/* nav icon labels */
.hdr-tool-lbl { font-size: 0.86rem; white-space: nowrap; }

/* Operator metafile links (footer) */
.foot-ops { margin: 0.55rem 0 0; font-size: 0.82rem; }
.foot-ops a { color: var(--accent); text-decoration: none; font-weight: 500; }
.foot-ops a:hover { text-decoration: underline; }

/* external (bust-out) nav link */
.nav-ext-ico { margin-left: 0.28rem; opacity: 0.6; vertical-align: -1px; }
.nav-ext:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.nav-ext:hover .nav-ext-ico { opacity: 1; }

/* Live fabric component (hero + embeds) */
/* Transparent embeds: the sheet floats on the page — no card, just a drop-shadow
   that follows the fabric silhouette. Fallback still image keeps a soft card until live. */
.fabric-mount { position: relative; width: 100%; aspect-ratio: 3 / 4; }
.fabric-mount canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: drop-shadow(0 16px 26px rgba(30,26,34,0.30)); }
.fabric-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 14px; box-shadow: 0 24px 55px -20px rgba(30,26,34,0.45); transition: opacity .6s ease; }
.fabric-mount.is-live .fabric-fallback { opacity: 0; pointer-events: none; }
.fabric-embed { position: relative; width: 100%; max-width: 17rem; aspect-ratio: 3 / 4; }
.fabric-embed canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: drop-shadow(0 12px 20px rgba(30,26,34,0.28)); }
.living-lab-row { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; margin: 1rem 0 0.4rem; }
.living-lab-row .fabric-embed { flex: 0 0 17rem; width: 17rem; }
.living-lab-row > div { flex: 1 1 16rem; }
.living-lab-row .embed-open { margin: 0 0 .6rem; }
.living-lab-row .embed-caption { margin: 0; }
.embed-open { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.btn-alt { display: inline-block; background: transparent; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 0.55rem 1.1rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn-alt:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* Per-page action items — a shared to-do board under the review sign-off. */
.action-items { margin: 1.25rem 0 0; padding: 1.15rem 1.35rem; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--accent) 3%, var(--bg)); }
.ai-h { margin: 0 0 .15rem; font-size: 1.05rem; }
.ai-lead { margin: 0 0 .8rem; font-size: .88rem; }
.ai-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.ai-item { display: flex; align-items: flex-start; gap: .55rem; }
.ai-box { display: flex; align-items: flex-start; gap: .55rem; cursor: pointer; flex: 1 1 auto; }
.ai-check { margin-top: .18rem; width: 1.05rem; height: 1.05rem; accent-color: var(--accent); flex: none; cursor: pointer; }
.ai-label { line-height: 1.4; }
.ai-item.done .ai-label { text-decoration: line-through; color: var(--muted); }
.ai-meta { font-size: .78rem; white-space: nowrap; flex: none; padding-top: .12rem; }
.ai-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 1.15rem; line-height: 1; padding: 0 .15rem; flex: none; }
.ai-del:hover { color: var(--accent); }
.ai-add { display: flex; gap: .5rem; margin-top: .9rem; }
.ai-add[hidden] { display: none; }

/* Last-updated + unread flags on the home cards. */
.card-flags { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.unread-badge { display: inline-block; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .12rem .5rem; border-radius: 999px; }
.unread-badge[hidden] { display: none; }
.card.is-unread { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 32%, transparent); }
.card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-top: .5rem; }
.card-updated { font-size: .76rem; white-space: nowrap; }
/* Quiet "Updated X ago" line under the page heading, part of the content */
.page-updated { font-size: 0.78rem; margin: 0.15rem 0 1rem; }
.ai-add input { flex: 1; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; }
