/* Maquette Stage — screenplay-paper theme. White page, black ink, Courier Prime. */
:root {
  --paper: #ffffff;      /* the page */
  --bg: #f2f1ea;         /* the desk behind the page */
  --ink: #17171a;        /* type */
  --ink-soft: #5c5a52;   /* secondary type */
  --line: #dad6c8;       /* rules / borders */
  --line-soft: #e8e5da;
  --accent: #17171a;     /* interactive = ink (monochrome, like typeset) */
  --hl: #fdf1a8;         /* highlighter — active script line */
  --verified: #2f7d52;
  --warn: #b23b3b;
  --amber: #957613;
  --radius: 3px;
  --maxw: 1080px;
  --page: 760px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Courier Prime", "Courier New", Courier, monospace;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #000; text-decoration-thickness: 2px; }
code { background: var(--line-soft); padding: 1px 5px; border-radius: 2px; font-size: .9em; }
h1 { font-size: 1.7rem; font-weight: 700; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 700; margin: 1.8em 0 .7em; text-transform: uppercase; letter-spacing: .06em; }
h3 { font-weight: 700; margin: 0 0 .4em; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }
.hint { display: block; color: var(--ink-soft); font-size: .82rem; margin-top: .35em; }

/* nav — a title bar on the page */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 24px; background: var(--paper); border-bottom: 1px solid var(--ink);
  position: sticky; top: 0; z-index: 10;
}
.brand { color: var(--ink); font-weight: 700; letter-spacing: .02em; text-decoration: none; text-transform: uppercase; }
.brand-mark { margin-right: 2px; }
.brand-sub { color: var(--ink-soft); font-weight: 400; }
.nav nav { display: flex; align-items: center; gap: 18px; }
.nav nav a { text-decoration: none; }
.nav nav a:hover { text-decoration: underline; }
.inline { display: inline; margin: 0; }

/* the page sheet */
.wrap {
  max-width: var(--page); margin: 26px auto; padding: 40px 52px 60px;
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 28px rgba(0,0,0,.06);
}
.wrap-wide { max-width: var(--maxw); }

/* buttons — set type, stamped */
.btn {
  display: inline-block; background: var(--ink); color: var(--paper);
  padding: 9px 16px; border: 1px solid var(--ink); border-radius: var(--radius);
  font-family: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #333; color: var(--paper); text-decoration: none; }
.btn-sm { padding: 6px 11px; font-size: .82rem; }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--line-soft); color: var(--ink); }
.link { background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.link.danger { color: var(--warn); }
.link:hover { text-decoration-thickness: 2px; }

/* hero — a title page */
.hero { padding: 20px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.hero h1 { font-size: 2.2rem; max-width: 20ch; line-height: 1.2; }
.lead { font-size: 1.05rem; color: var(--ink-soft); max-width: 66ch; }
.hero-cta { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }

/* cards — index cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.card {
  display: block; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; color: var(--ink); text-decoration: none;
}
.card:hover { border-color: var(--ink); text-decoration: none; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.card h3 { font-size: 1rem; }
.dur { color: var(--ink-soft); font-size: .8rem; }

/* panels & forms */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.panel.narrow, .narrow { max-width: 460px; margin: 0 auto; }
.form { display: flex; flex-direction: column; gap: 15px; margin-top: 18px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .88rem; }
.form input[type=text], .form input[type=email], .form input[type=number], .form select, .form textarea {
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  border-radius: var(--radius); padding: 10px 12px; font-family: inherit; font-size: .95rem; width: 100%;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; }
.check { flex-direction: row !important; align-items: flex-start; gap: 9px; font-weight: 400; color: var(--ink-soft); }
.check input { margin-top: 3px; }
.alert { background: #fbeceb; border: 1px solid var(--warn); color: #7a2020; padding: 10px 13px; border-radius: var(--radius); }
.alert.ok { background: #e9f3ed; border-color: var(--verified); color: #1f5a3a; }

/* tables — a ledger */
.table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding: 8px 10px; border-bottom: 1px solid var(--ink); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.row-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* plan box */
.plan { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 14px 0; flex-wrap: wrap; }
.plan.pro { border-color: var(--verified); }
.plan strong { font-size: .95rem; }

/* badges — revision stamps */
.badge { font-size: .7rem; padding: 2px 8px; border-radius: 2px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border: 1px solid transparent; }
.badge-green { background: #e9f3ed; color: var(--verified); border-color: #bcdcc9; }
.badge-amber { background: #f7efd7; color: var(--amber); border-color: #e6d6a6; }
.badge-gray { background: var(--line-soft); color: var(--ink-soft); border-color: var(--line); }

/* player */
.player { display: grid; grid-template-columns: 320px 1fr; gap: 30px; align-items: start; }
.player-side { position: sticky; top: 74px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.eyebrow { font-size: .78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px; }
.eyebrow a { text-decoration: none; }
.player-title { font-size: 1.35rem; margin-bottom: 10px; }
#audio { width: 100%; margin: 14px 0 6px; }
.sync-note { font-size: .82rem; color: var(--ink-soft); margin: 6px 0 0; }
.sync-note.ok { color: var(--verified); }
.rights { font-size: .82rem; color: var(--ink-soft); margin: 10px 0 0; }
.rights.ok { color: var(--verified); font-weight: 700; }
.rights.warn { color: var(--warn); font-weight: 700; }

.share { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.share-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.share-row { display: flex; gap: 8px; margin-top: 7px; flex-wrap: wrap; align-items: center; }
.share-input { flex: 1; min-width: 180px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius); padding: 8px 10px; font-family: inherit; font-size: .8rem; }
.owner-tools { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.owner-tools a { text-decoration: none; }
.owner-tools a:hover { text-decoration: underline; }

/* the SCRIPT — formatted like a screenplay page */
.player-script { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 48px 64px; box-shadow: 0 8px 28px rgba(0,0,0,.05); }
.line { padding: 2px 0; margin: 2px 0; border-radius: 2px; }
.line.action { max-width: 62ch; margin: 12px 0; }
.line.action .text { display: block; }
.line.dialogue { margin: 12px 0; }
.line.dialogue .cue { display: block; text-transform: uppercase; font-weight: 700; padding-left: 34%; letter-spacing: .04em; }
.line.dialogue .text { display: block; margin: 0 20% 0 12%; }
.line.seekable { cursor: pointer; }
.line.seekable:hover { background: var(--line-soft); }
.line.active { background: var(--hl); box-shadow: -6px 0 0 var(--hl), 6px 0 0 var(--hl); }

/* show / podcast */
.show-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.podcast-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 18px 0; }
.episodes { list-style: none; padding: 0; margin: 8px 0; }
.episode { border-bottom: 1px solid var(--line); }
.episode-main { display: flex; justify-content: space-between; align-items: center; padding: 13px 4px; color: var(--ink); text-decoration: none; }
.episode-main:hover { background: var(--line-soft); }
.episode-title { font-weight: 700; }

/* publish funnel */
.pub-steps { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:.72rem; letter-spacing:.05em; color:var(--ink-soft); margin-bottom:18px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.pub-step { text-transform:uppercase; }
.pub-step.on { color:var(--ink); font-weight:700; text-decoration:underline; text-underline-offset:3px; }
.pub-step.done { color:var(--verified); }
.pub-sep { color:var(--line); }
.pub-preview { border-left:2px solid var(--line); padding:6px 0 6px 16px; margin:14px 0; }
.btn-big { font-size:1rem; padding:12px 22px; }

/* studio stub */
.studio { max-width:720px; margin:0 auto; }
.studio-bar { display:flex; justify-content:space-between; align-items:center; background:var(--ink); color:var(--paper); padding:8px 16px; border:1px solid var(--ink); font-size:.8rem; letter-spacing:.04em; }
.studio-body { background:var(--paper); border:1px solid var(--ink); border-top:0; padding:28px 32px; }
.studio-title { font-size:1.4rem; margin:4px 0 14px; }
.studio-cast { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.cast-chip { border:1px solid var(--line); border-radius:3px; padding:3px 9px; font-size:.82rem; }
.studio-script { box-shadow:none; padding:24px 34px; }
.studio-actions { margin-top:20px; display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
.studio-note { margin-top:14px; }

/* footer */
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: var(--maxw); margin: 0 auto; padding: 22px 24px; color: var(--ink-soft); font-size: .8rem; border-top: 1px solid var(--line); }

@media (max-width: 820px) {
  .wrap { padding: 28px 22px 44px; margin: 12px; }
  .player { grid-template-columns: 1fr; }
  .player-side { position: static; }
  .player-script { padding: 28px 24px; }
  .line.dialogue .cue { padding-left: 22%; }
  .line.dialogue .text { margin: 0 6% 0 8%; }
}

/* ---- timestamped feedback + private notes (Stage consumption) ---- */
.feedback, .notes { margin-top: 18px; }
.fb-body { width: 100%; box-sizing: border-box; margin: 6px 0; padding: 8px 10px; font: inherit;
  border: 1px solid var(--rule, #d8d2c4); border-radius: 8px; resize: vertical; background: #fff; }
.fb-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.fb-item { font-size: 13px; padding: 6px 8px; border: 1px solid var(--rule, #eee); border-radius: 8px; background: #fdfcf9; }
.fb-at { font-variant-numeric: tabular-nums; font-weight: 700; color: #6D4FC2; background: #f3eeff;
  border: 1px solid #d6c9f5; border-radius: 6px; padding: 1px 7px; cursor: pointer; font-size: 12px; }
.fb-name { margin-left: 6px; color: #8a8478; font-size: 12px; }
.fb-text { margin-top: 4px; white-space: pre-wrap; }
.fb-del { float: right; border: none; background: transparent; color: #b0a99c; cursor: pointer; font-size: 15px; line-height: 1; }
