/* Roxanne Ruby: the look of the guest library (/members/) and the Studio (/studio/).
   Loaded by those two pages only. Colors and type follow the main site (black, gold, cream, ruby;
   Poiret One and Josefin Sans, which the pages bring in from the site's font packages).
   To restyle, change the tokens in :root and both pages follow.
   Both pages sit under the Roxanne Ruby bar (components/SiteBar.astro), which is 61px tall and stays on top. */

:root {
  --ink: #0b0a09; --ink-raised: #17130f; --gold: #f2d5a0; --gold-mid: #b5a078; --bronze: #796a50;
  --cream: #fff5e2; --parchment: #f8eace; --stone: #e4dbd0; --ruby: #8b0000; --ruby-bright: #a3141a;
  --text: #2a211a; --muted: #5b4d40; --line: rgba(42, 33, 26, 0.16); --card: rgba(255, 255, 255, 0.62);
  --good: #2f5d3a; --warn: #8a5a00;
  --font-display: 'Poiret One', 'Josefin Sans', sans-serif;
  --font-body: 'Josefin Sans', system-ui, -apple-system, sans-serif;
  --font-accent: 'Josefin Slab', Georgia, serif;
  --radius: 10px;
  --bar: 61px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--cream); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.55; }
a { color: var(--ruby); }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 5vw, 42px); line-height: 1.12; letter-spacing: 0.02em; margin: 0 0 8px; }
h2 { font-family: var(--font-display); font-weight: 400; font-size: 26px; letter-spacing: 0.02em; margin: 38px 0 12px; }
h3 { font-family: var(--font-body); font-weight: 600; font-size: 19px; margin: 0 0 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sub { color: var(--muted); font-size: 16px; margin: 0 0 24px; max-width: 660px; }
.small { font-size: 14px; color: var(--muted); line-height: 1.5; }
.label { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze); }
.error { color: var(--ruby-bright); }

.btn { display: inline-block; background: var(--ruby); color: #fff; border: 1px solid var(--ruby); border-radius: 999px; padding: 11px 24px 9px; font: 600 13px var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--ruby-bright); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--text); }
.btn.ghost:hover { background: rgba(42, 33, 26, 0.07); }
.btn.tiny { padding: 6px 13px 4px; font-size: 11px; }
.btn[disabled] { opacity: 0.5; cursor: default; }
/* The Ask Claude button: one on every line. */
.ask { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; background: var(--ink); color: var(--gold); border: 0; border-radius: 999px; padding: 6px 12px 4px; font: 600 11px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.ask::before { content: "✳"; font-size: 12px; line-height: 1; }
.ask:hover { background: var(--ruby); color: #fff; }

.field, .select, textarea.field { padding: 11px 14px 9px; font: 400 16px var(--font-body); color: var(--text); border: 1px solid rgba(42, 33, 26, 0.35); border-radius: 8px; background: #fff; max-width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; container-type: inline-size; }
.card > :last-child { margin-bottom: 0; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px 2px; border-radius: 999px; background: rgba(121, 106, 80, 0.2); color: var(--text); white-space: nowrap; }
.pill.sample { background: var(--gold); color: var(--ink); }
.pill.good { background: rgba(47, 93, 58, 0.16); color: var(--good); }
.pill.warn { background: rgba(138, 90, 0, 0.16); color: var(--warn); }
.pill.bad { background: rgba(139, 0, 0, 0.12); color: var(--ruby); }
.note { background: var(--parchment); border: 1px solid rgba(181, 160, 120, 0.7); border-radius: var(--radius); padding: 14px 18px; font-size: 15px; color: var(--muted); margin: 0 0 20px; }
.note strong { color: var(--text); }
.msg { font-size: 15px; margin-top: 12px; color: var(--muted); }
.msg.bad { color: var(--ruby-bright); }
.privacy-line { margin: 14px 0 0; max-width: 660px; }
.privacy-line a { white-space: nowrap; }

/* ---------- Library (guest side) ---------- */
.top { background: var(--ink-raised); color: var(--gold); display: flex; justify-content: space-between; align-items: center; gap: 6px 16px; flex-wrap: wrap; padding: 10px clamp(1rem, 4vw, 2.5rem); }
.top a.logo { font-family: var(--font-display); font-size: 21px; letter-spacing: 0.08em; color: var(--gold); text-decoration: none; }
.top .who { font-size: 14px; color: #cfc4b3; word-break: break-word; }
.top .who a, .top .who button { color: var(--gold); background: none; border: 0; font: inherit; text-decoration: underline; cursor: pointer; margin-left: 12px; padding: 0; }
.wrap { max-width: 900px; width: 100%; margin: 0 auto; padding: 40px clamp(18px, 4vw, 28px) 80px; flex: 1; }
/* Course cards sit side by side and centre themselves, so a single card or the last card on a row is never
   stranded at the left edge. */
.tiles { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.tiles .card { flex: 1 1 280px; max-width: 430px; margin: 0; display: flex; flex-direction: column; }
.card.course { padding: 0; overflow: hidden; }
.course-body { padding: 18px 22px 20px; display: flex; flex-direction: column; flex: 1; }
.course-body h3 { line-height: 1.3; }
.course-body > p.small { flex: 1; margin: 6px 0 16px; }
.course-foot { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.course-foot .btn { margin-left: auto; }
.course-foot .pill { margin-bottom: 0; }
.price { font-weight: 600; font-size: 19px; color: var(--text); }
.cta-note { margin: 16px 0 0; font-size: 14px; }
/* The cover is a built-in look until Roxy has her own cover photos: ruby, gold or ink. */
.cover { position: relative; aspect-ratio: 16 / 9; display: flex; align-items: flex-end; padding: 16px 20px; font-family: var(--font-display); font-size: 23px; line-height: 1.15; letter-spacing: 0.03em; }
.cover em { position: absolute; top: 12px; right: 16px; font: 600 10px var(--font-body); font-style: normal; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.8; }
.cover-ink { color: var(--gold); background: radial-gradient(120% 140% at 85% 0%, #3a2f22 0%, #17130f 55%, #0b0a09 100%); }
.cover-ruby { color: #ffe9c4; background: radial-gradient(120% 150% at 12% 0%, #b01e23 0%, #8b0000 45%, #2a0606 100%); }
.cover-gold { color: #2a211a; background: radial-gradient(120% 150% at 82% 8%, #fff0cf 0%, #f2d5a0 42%, #b5a078 100%); }
.module { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze); margin: 28px 0 8px; }
.module.sub, .lesson.sub { margin-left: 18px; }
.lesson { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px 12px; margin: 0 0 8px; font: inherit; color: var(--text); cursor: pointer; }
.lesson.sub { width: calc(100% - 18px); }
.lesson:hover { border-color: var(--ruby); }
.lesson .k { font-size: 13px; color: var(--muted); white-space: nowrap; }
.back { background: none; border: 0; font: inherit; font-size: 15px; color: var(--muted); cursor: pointer; padding: 0; margin-bottom: 18px; }
.player { position: relative; padding-top: 56.25%; background: var(--ink); border-radius: var(--radius); overflow: hidden; margin: 18px 0 24px; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .standin { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--gold); text-align: center; padding: 16px; }
.player .standin .play { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--gold); display: flex; align-items: center; justify-content: center; font-size: 22px; padding-left: 4px; }
.audio-standin { display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--gold); border-radius: 999px; padding: 12px 20px; margin: 18px 0 24px; font-size: 14px; }
.audio-standin .bar { flex: 1; height: 3px; background: rgba(242, 213, 160, 0.35); border-radius: 3px; }
audio { width: 100%; margin: 18px 0 24px; }
.body { font-size: 17px; line-height: 1.75; }
.body h3 { margin-top: 26px; }
.body ul, .body ol { padding-left: 22px; }
.nav2 { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; }
.foot { background: var(--ink); color: #cfc4b3; padding: 28px clamp(18px, 4vw, 36px); display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: space-between; font-size: 14px; }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--gold); }
.foot .f-logo { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.06em; color: var(--gold); }
.devlink { margin-top: 16px; padding: 14px 18px; border: 1px dashed var(--bronze); border-radius: var(--radius); font-size: 15px; }

/* ---------- Studio (Roxy's side) ---------- */
.shell { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: calc(100vh - var(--bar)); flex: 1; }
.side { background: var(--ink); color: var(--gold); padding: 26px 16px; position: sticky; top: var(--bar); height: calc(100vh - var(--bar)); display: flex; flex-direction: column; }
.brand { font-family: var(--font-display); font-size: 30px; letter-spacing: 0.05em; margin: 0 10px; line-height: 1.1; }
.brand, .tag { display: block; }
.tag { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-mid); margin: 4px 10px 24px; }
.tabs { display: flex; flex-direction: column; gap: 2px; }
.tabs button { display: block; width: 100%; background: none; border: 0; color: #e9dcc3; font: 500 16px var(--font-body); text-align: left; padding: 11px 12px 9px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.tabs button:hover { background: rgba(242, 213, 160, 0.1); }
.tabs button.on { background: rgba(242, 213, 160, 0.2); color: var(--gold); }
.side-foot { margin-top: auto; font-size: 13px; color: #cfc4b3; line-height: 1.6; padding: 0 10px; word-break: break-all; }
.side-foot a { color: var(--gold); }
.main { padding: 36px clamp(18px, 3vw, 44px) 100px; max-width: 1160px; width: 100%; }
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.head h1 { margin: 0; }
.help { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(42, 33, 26, 0.45); background: #fff; color: var(--text); font: 600 14px var(--font-body); cursor: pointer; flex: none; padding-top: 2px; }
.help:hover, .help.on { background: var(--gold); border-color: var(--gold-mid); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stats .card { margin: 0; }
.stat { font-family: var(--font-display); font-size: 38px; line-height: 1.05; margin: 8px 0 6px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.two .card { margin: 0; }
.line { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; padding: 11px 0 9px; border-bottom: 1px solid rgba(42, 33, 26, 0.08); }
.line:last-child { border-bottom: 0; padding-bottom: 0; }
.line-main { flex: 1; min-width: 150px; }
.line-main strong { font-weight: 600; }
.line-amt { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-weight: 600; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bronze); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 8px 9px; border-bottom: 1px solid rgba(42, 33, 26, 0.08); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.act { text-align: right; white-space: nowrap; }
td.num .small { white-space: normal; }
.askline { margin-top: 8px; }
.pill { margin-bottom: 3px; }
td.act { width: 1%; }
td .minus, .minus { color: var(--ruby); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.bars .col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bars .col i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--ruby); }
.bars .col i.other { background: var(--gold-mid); border-radius: 0; }
.bars .col span { font-size: 11px; color: var(--muted); margin-top: 5px; white-space: nowrap; }
.key { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-size: 13px; color: var(--muted); }
.key i { width: 11px; height: 11px; border-radius: 2px; background: var(--ruby); display: inline-block; }
.key i.other { background: var(--gold-mid); }
.meter { height: 8px; border-radius: 8px; background: rgba(42, 33, 26, 0.12); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--ruby); }
.tog { display: inline-flex; align-items: center; border: 1px solid rgba(42, 33, 26, 0.3); border-radius: 999px; padding: 6px 13px 4px; font: 500 13px var(--font-body); background: #fff; color: var(--muted); cursor: pointer; margin: 2px 4px 2px 0; }
.tog.on { background: var(--ink); border-color: var(--ink); color: var(--gold); }
.tog[disabled] { cursor: default; opacity: 0.75; }
.mod { margin: 18px 0 8px; display: flex; gap: 8px; align-items: center; }
.mod .field { flex: 1; font-weight: 600; }
.les { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 8px; margin-bottom: 6px; flex-wrap: wrap; }
.les .t { cursor: pointer; flex: 1; min-width: 160px; }
.les .t:hover { text-decoration: underline; }
.ico { background: none; border: 0; cursor: pointer; font-size: 16px; color: var(--muted); padding: 4px 7px; }
.ico:hover { color: var(--ruby); }
.editor { min-height: 190px; background: #fff; border: 1px solid rgba(42, 33, 26, 0.35); border-radius: 8px; padding: 14px 16px; font-size: 17px; line-height: 1.7; outline: none; }
.savebar { position: fixed; left: 212px; right: 0; bottom: 0; background: var(--ink); color: var(--gold); padding: 12px clamp(18px, 4vw, 44px); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 15px; z-index: 20; }
/* The Links page screen. Made for a phone: one link per block, full-width boxes, buttons a thumb can hit. */
.lk-group .label { display: block; }
.lk-group .field { display: block; width: 100%; margin: 6px 0 12px; }
.lk-group .field.lk-h { font-weight: 600; }
.lk { border-top: 1px solid var(--line); padding: 16px 0 6px; margin-top: 14px; }
.lk-acts { gap: 8px; }
.lk-top .btn, .lk-acts .btn, .lk-add .btn { min-height: 44px; padding: 13px 14px 11px; display: inline-flex; align-items: center; letter-spacing: 0.06em; }
.lk-top .ask, .lk-acts .ask { min-height: 44px; padding: 0 16px; }
.btn.ghost.light { color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.savebar .row { gap: 8px; }
#linksbar .btn { padding: 12px 16px 10px; min-height: 44px; letter-spacing: 0.06em; }
.steps { padding-left: 22px; margin: 8px 0 0; }
.steps li { margin-bottom: 8px; }
details.where > summary { cursor: pointer; font-weight: 600; }
details.where ul { margin: 10px 0 0; padding-left: 20px; }
details.where li { margin-bottom: 6px; }

@media (max-width: 860px) {
  .shell { display: block; }
  .side { position: static; height: auto; padding: 14px 12px 8px; }
  .brand { font-size: 24px; display: inline-block; }
  .tag { display: inline-block; margin: 0 0 10px 6px; }
  .tabs { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .tabs button { width: auto; font-size: 15px; padding: 9px 13px 7px; flex: none; }
  .side-foot { margin: 6px 0 4px; font-size: 12px; }
  .side-foot br { display: none; }
  .side-foot a { margin-left: 10px; }
  .main { padding: 24px 16px 110px; }
  .savebar { left: 0; }
  .stat { font-size: 34px; }
}

/* A table turns into stacked cards, each value under its own label, when the card it sits in is too narrow for
   columns. It goes by the card's width, not the screen's, so a table in a half-width card stacks on a laptop too. */
@container (max-width: 560px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.5); padding: 10px 12px; margin-bottom: 10px; }
  table.stack td { border: 0; padding: 3px 0; text-align: left; white-space: normal; }
  table.stack td[data-l]::before { content: attr(data-l) ": "; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bronze); margin-right: 6px; }
  table.stack td.act { padding-top: 8px; }
  table.stack td:empty { display: none; }
  table.stack td > div.small { display: inline; margin-left: 6px; }
}
@container (max-width: 640px) {
  table.stack.wide thead { display: none; }
  table.stack.wide, table.stack.wide tbody, table.stack.wide tr, table.stack.wide td { display: block; width: 100%; }
  table.stack.wide tr { border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.5); padding: 10px 12px; margin-bottom: 10px; }
  table.stack.wide td { border: 0; padding: 3px 0; text-align: left; white-space: normal; }
  table.stack.wide td[data-l]::before { content: attr(data-l) ": "; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bronze); margin-right: 6px; }
  table.stack.wide td.act { padding-top: 8px; }
  table.stack.wide td:empty { display: none; }
  table.stack.wide td > div.small { display: inline; margin-left: 6px; }
}
