: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 */
.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: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.6rem; flex-wrap: wrap; }
.brand { font-family: Fraunces, serif; font-size: 1.15rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.brand .x { color: var(--gold); }
.brand .dot { color: var(--accent); }
.site-nav { display: flex; gap: 0.15rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.86rem; padding: 0.35rem 0.7rem; 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); }

/* Hero */
.hero { padding: 4.6rem 0 2rem; }
.hero h1 { font-size: clamp(2.4rem, 6.2vw, 4.1rem); line-height: 1.03; 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; }

/* 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: 1.8rem 0; font-size: 0.9rem; color: var(--muted); }
.site-footer p { margin: 0.15rem 0; }

@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; }

/* Section annotations (workspace) */
.prose h2, .prose h3 { position: relative; }
.anno-add { background: none; border: 0; cursor: pointer; padding: 0; opacity: 0.4; margin-left: 0.5rem; color: var(--muted); vertical-align: middle; transition: opacity .15s, color .15s; }
.anno-add svg { vertical-align: middle; display: inline-block; }
.prose h2:hover .anno-add, .prose h3:hover .anno-add { opacity: 0.85; }
.anno-add:hover { opacity: 1; color: var(--accent); }
.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: 66rem; margin: 0 auto; padding: 0 1.4rem; display: grid; grid-template-columns: minmax(0, 44rem) 16rem; justify-content: center; gap: 2.4rem; align-items: start; }
.doc .prose { max-width: none; }
.doc-rail { position: relative; }
.rail-cta { position: absolute; top: 2.6rem; left: 0; background: transparent; border: 1px dashed var(--line); color: var(--muted); border-radius: 999px; padding: 0.4rem 0.9rem; font-size: 0.82rem; cursor: pointer; }
.rail-cta:hover { border-color: var(--accent); color: var(--accent); }
.rail-card { position: absolute; left: 0; width: 100%; 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 { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.4rem; }
.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 { position: static; margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
  .doc-rail::before { content: "Notes"; display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.9rem; }
  .rail-cta { position: static; margin-bottom: 0.9rem; }
  .rail-card { position: static !important; top: auto !important; width: auto; max-width: 44rem; margin-bottom: 0.8rem; }
}

/* Per-page tools (source / version history) */
.page-tools { display: flex; gap: 1.3rem; 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); }
/* 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-primary { margin: 0 0 0.7rem !important; }
.foot-changelog { display: inline-block; font-weight: 600; color: var(--accent); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.95rem; font-size: 0.9rem; }
.foot-changelog:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.site-footer .signout { color: var(--muted); }
.site-footer .signout:hover { color: var(--accent); }
