/* webTTS pages. Built from the chosen mockup docs/app/screens/desktop/screens.css (the design board
   parts dropped); tokens come from the "Vlad Voice" design in Claude Design. Desktop only. */
:root {
  --blush: #FCE8EF;      /* the page */
  --ink: #1A1A1A;        /* text, actions, the player */
  --paper: #FFFFFF;      /* writing surface and rows */
  --mauve: #8A4B63;      /* small secondary text: 6.43:1 on paper, 5.49:1 on blush */
  --rose: #F2C4D4;       /* inner rules */
  --dim: #C9A3B2;        /* small text on the player: 7.76:1 on ink */
  --track: #4A3A40;      /* player track */
  --magenta: #C2185B;    /* a starred clip */
  --star-off: #A8577A;   /* an unstarred clip: 4.87:1 (the original #C98AA3 was 2.75:1) */
  --green: #1F8A4C;      /* playing */
  --green-lit: #5BD08A;  /* progress on the player */
  --red: #B42318;        /* errors: 6.57:1 on paper, 5.61:1 on blush */
  --green-text: #16753F; /* small success text: 5.75:1 on paper (#1F8A4C is 4.38:1) */
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--blush); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.4; }
a { color: var(--ink); }
a:hover { color: var(--green); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button[disabled] { cursor: not-allowed; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.player :focus-visible { outline-color: var(--blush); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- app frame ---------- */
.top { padding: 20px 40px; border-bottom: 1px solid var(--ink); display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 700; }
.top nav { display: flex; gap: 28px; align-items: center; }
.top nav a { text-decoration: none; }
.top nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.linkbtn { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.banner { padding: 12px 40px; background: var(--ink); color: var(--blush); }
.wrap { max-width: 1360px; margin: 0 auto; padding: 32px 40px 48px; display: flex; gap: 32px; align-items: flex-start; }
.col-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 0 0 420px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

/* ---------- voice chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; font-size: 15px; font-weight: 500; }
.chip[aria-checked="true"] { background: var(--ink); color: var(--blush); }
.preset-line { margin: -8px 0 0; font-size: 12px; color: var(--mauve); display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.preset-line .linkbtn { font-size: 12px; color: var(--ink); }

/* ---------- the writing sheet ---------- */
.sheet { background: var(--paper); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.sheet:has(.write:focus-visible) { outline: 2px solid var(--ink); outline-offset: 0; }
.pretag { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--mauve); }
.pretag b { font-weight: 400; color: var(--ink); background: var(--blush); border-radius: 999px; padding: 4px 10px; }
.lead-x { border: 0; background: none; font-size: 18px; line-height: 1; padding: 2px 6px; }
/* the box grows with the text; the count and Speak stay pinned at the bottom of the window */
.write { border: 0; outline: none; resize: none; background: transparent; width: 100%; padding: 0; min-height: 368px; field-sizing: content;
  font-size: 40px; line-height: 46px; letter-spacing: -0.02em; }
.write.mid { font-size: 28px; line-height: 36px; letter-spacing: -0.01em; }
.write.small { font-size: 20px; line-height: 29px; letter-spacing: 0; }
.write::placeholder { color: var(--ink); opacity: 0.55; } /* 3.90:1, large text; the original 0.38 was 2.38:1 */
.write[disabled] { color: var(--mauve); }
.hint { margin: 0; font-size: 15px; line-height: 21px; max-width: 64ch; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { border: 0; background: var(--blush); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.tag:hover { background: var(--rose); }
.tags .aside { flex-basis: 100%; font-size: 12px; color: var(--mauve); margin-top: 2px; }
.msg { margin: 0; font-size: 15px; line-height: 21px; }
.msg.err { color: var(--red); }
.row .msg.note { font-size: 12px; line-height: 17px; }
.msg.ok { color: var(--green-text); }
.msg b { font-weight: 600; }
.sheet-foot { border-top: 1px solid var(--rose); padding: 16px 0 28px; margin-bottom: -28px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  position: sticky; bottom: 0; background: var(--paper); }
.count { font-size: 12px; color: var(--mauve); display: flex; gap: 16px; flex-wrap: wrap; }
.count.over { color: var(--red); font-weight: 600; }
.actions { display: flex; gap: 24px; align-items: center; }
.quiet { background: none; border: 0; padding: 8px 0; font-size: 15px; }
.btn { background: var(--ink); color: var(--paper); border: 0; padding: 16px 40px; font-size: 16px; font-weight: 500; }
.btn.sm { padding: 12px 22px; font-size: 15px; }
.btn[disabled] { opacity: 0.45; }
.btn[aria-disabled="true"] { cursor: progress; }
.quiet[disabled] { color: var(--mauve); }
.btn-line { background: none; border: 1px solid var(--ink); padding: 11px 20px; font-size: 15px; }
.btn-danger { background: none; border: 1px solid var(--red); color: var(--red); padding: 11px 20px; font-size: 15px; }

/* ---------- voice options ---------- */
.opts { background: var(--paper); padding: 24px 28px 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; }
.opts[hidden] { display: none; }
.opts h3 { grid-column: 1 / -1; margin: 0; font-size: 15px; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; }
.opts h3:not(:first-child) { border-top: 1px solid var(--rose); padding-top: 20px; }
.opts h3 .meta { font-weight: 400; }
.opts h3 .quiet { font-weight: 400; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.field-s { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-s .name { display: flex; justify-content: space-between; font-size: 14px; }
.field-s .val { color: var(--mauve); font-variant-numeric: tabular-nums; }
.field-s .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--mauve); }
input[type="range"] { width: 100%; accent-color: var(--ink); margin: 4px 0; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--ink); background: none; border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.opts .msg { grid-column: 1 / -1; }
.opts .msg[hidden] { display: none; }

/* ---------- player and clip rows ---------- */
.player { background: var(--ink); color: var(--blush); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.player .lbl { font-size: 12px; color: var(--dim); }
.player .say { font-size: 24px; line-height: 30px; letter-spacing: -0.01em; text-wrap: pretty; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.player .ctl { display: flex; gap: 16px; align-items: center; }
.play-lg { width: 52px; height: 52px; flex-shrink: 0; border-radius: 999px; border: 0; background: var(--blush); color: var(--ink); font-size: 14px; }
.player .tr { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.track { height: 3px; background: var(--track); }
.track > i { display: block; height: 100%; background: var(--green-lit); }
.player .tm { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }

.row { background: var(--paper); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.play { width: 30px; height: 30px; flex-shrink: 0; border-radius: 999px; border: 0; background: var(--ink); color: var(--blush); font-size: 10px; }
.play.on { background: var(--green); color: var(--paper); }
.slot { width: 30px; height: 30px; flex-shrink: 0; border-radius: 999px; border: 1px dashed var(--mauve); }
.slot.gone { border-style: solid; border-color: var(--rose); }
.row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 1px; }
.row .txt { margin: 0; font-size: 14px; line-height: 19px; text-wrap: pretty; white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .txt.open { display: block; }
.more { background: none; border: 0; padding: 0; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; align-self: flex-start; }
.meta { font-size: 12px; color: var(--mauve); display: flex; gap: 2px 12px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.act-btn { align-self: flex-start; background: none; border: 1px solid var(--ink); color: var(--ink); padding: 5px 12px; font-size: 12px; margin-top: 4px; }
.icon.dl { width: auto; padding: 0 2px; font-size: 14px; white-space: nowrap; }
.icon.dl span { font-size: 11px; }
.status { font-size: 12px; line-height: 17px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.status.inline { flex-direction: row; gap: 12px; align-items: baseline; }
.status.err { color: var(--red); }
.status .act { font-size: 12px; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; color: var(--ink); }
.bar { height: 3px; background: var(--rose); margin-top: 4px; }
.bar > i { display: block; height: 100%; background: var(--ink); }
.icon { width: 28px; height: 30px; flex-shrink: 0; border: 0; background: none; font-size: 15px; padding: 0; }
.star { color: var(--star-off); }
.star[aria-pressed="true"] { color: var(--magenta); }
.list-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 2px 0; font-size: 12px; color: var(--mauve); }
.empty { background: var(--paper); padding: 28px 24px; font-size: 15px; line-height: 21px; }
.empty p { margin: 0 0 12px; }
.empty p:last-child { margin: 0; }
.sk { background: var(--blush); border-radius: 2px; height: 12px; }
.sk.w60 { width: 60%; } .sk.w80 { width: 80%; } .sk.w40 { width: 40%; } .sk.w30 { width: 30%; }
.sk-round { width: 30px; height: 30px; border-radius: 999px; background: var(--blush); flex-shrink: 0; }
.player .sk { background: var(--track); }

/* ---------- dialog ---------- */
.scrim { position: fixed; inset: 0; background: rgba(26, 26, 26, 0.4); display: flex; align-items: center; justify-content: center; z-index: 40; }
.dialog { background: var(--paper); padding: 32px; width: 100%; max-width: 500px; display: flex; flex-direction: column; gap: 14px; }
.dialog h2 { font-size: 24px; line-height: 30px; letter-spacing: -0.01em; font-weight: 500; margin: 0; }
.dialog p { margin: 0; line-height: 21px; }
.dialog .actions { justify-content: flex-end; margin-top: 10px; }

/* ---------- sign-in ---------- */
.pw-label { font-size: 12px; color: var(--mauve); }
.pw { border: 0; border-bottom: 1px solid var(--ink); background: transparent; outline: none; width: 100%; padding: 0 0 10px;
  font-size: 40px; line-height: 52px; letter-spacing: 0.08em; }
.pw:focus-visible { border-bottom-width: 2px; padding-bottom: 9px; }
.pw[aria-invalid="true"] { border-bottom-color: var(--red); }
.signin-say { font-size: 40px; line-height: 46px; letter-spacing: -0.02em; margin: 0 0 8px; font-weight: 400; }

/* ---------- admin ---------- */
.panel { background: var(--paper); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.panel h2 { font-size: 15px; font-weight: 700; margin: 0; display: flex; justify-content: space-between; align-items: baseline; }
.panel h2 .aside { font-weight: 400; font-size: 12px; color: var(--mauve); }
.panel .lead { font-size: 24px; line-height: 30px; letter-spacing: -0.01em; margin: 0; }
.panel p { margin: 0; }
.panel .sub { font-size: 12px; color: var(--mauve); display: flex; gap: 16px; flex-wrap: wrap; }
.meter { height: 14px; background: var(--blush); position: relative; }
.meter > i { display: block; height: 100%; background: var(--ink); }
.meter.thin { height: 6px; }
.meter .capline { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--red); }
.facts { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--mauve); }
.facts dd { margin: 0; }
.facts dd.err { color: var(--red); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-weight: 400; color: var(--mauve); font-size: 12px; padding: 0 14px 8px 0; border-bottom: 1px solid var(--rose); }
td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rose); vertical-align: top; font-variant-numeric: tabular-nums; }
td.num, th.num { text-align: right; }
td .txt { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; max-width: 46ch; }
td.err { color: var(--red); }
.ctl-block { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--rose); }
.ctl-block:first-of-type { border-top: 0; padding-top: 0; }
.ctl-block .name { font-size: 14px; font-weight: 600; }
.ctl-block .help { font-size: 12px; color: var(--mauve); }
.ctl-block .msg { font-size: 14px; }
.ctl-block .msg.ok { color: var(--green-text); }
.attention { background: var(--paper); border-left: 4px solid var(--red); padding: 20px 28px; display: flex; flex-direction: column; gap: 6px; }
.attention h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--red); }
.attention p { margin: 0; line-height: 21px; max-width: 72ch; }
.cap-row { display: flex; gap: 10px; align-items: center; }
.cap-in { border: 1px solid var(--ink); background: var(--paper); padding: 10px 12px; width: 140px; font-size: 17px; font-variant-numeric: tabular-nums; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.switch { width: 46px; height: 26px; border-radius: 999px; border: 1px solid var(--ink); background: var(--paper); padding: 2px; position: relative; flex-shrink: 0; }
.switch::after { content: ""; display: block; width: 20px; height: 20px; border-radius: 999px; background: var(--ink); transition: transform 120ms; }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { background: var(--blush); transform: translateX(20px); }
.ip { font-variant-numeric: tabular-nums; }
.log { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.log li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rose); }
.log li:first-child { padding-top: 0; }
.log .when { white-space: nowrap; }
.log .err { color: var(--red); }

/* ---------- small pages ---------- */
.page-msg { max-width: 880px; display: flex; flex-direction: column; gap: 22px; padding-top: 48px; }
.page-msg h1 { font-size: 40px; line-height: 46px; letter-spacing: -0.02em; margin: 0; font-weight: 400; }
.page-msg .code { font-size: 12px; color: var(--mauve); margin: 0; }
.page-msg .actions { justify-content: flex-start; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
.col-main.narrow { flex: 0 1 828px; }

/* ---------- additions for the real pages (the mockup set these inline) ---------- */
.fx { display: contents; } /* the effect fields sit in the options grid */
.sk.h10 { height: 10px; }
.sk.h24 { height: 24px; }
.sk.mt4 { margin-top: 4px; }
.account-line { font-size: 14px; }
.page-msg a.btn { text-decoration: none; display: inline-block; }
a.icon { display: inline-block; line-height: 30px; text-align: center; text-decoration: none; color: var(--ink); }
.account { display: flex; flex-direction: column; gap: 14px; }
#clip-list { display: flex; flex-direction: column; gap: 8px; } /* rows as separate cards, as in the column */
.list-foot .pager { display: flex; gap: 8px; }
.empty .msg.err { margin-bottom: 12px; }
.msg[hidden], .ctl-block .msg[hidden] { display: none; }
.cap-in[disabled], .switch[disabled], .btn-danger[disabled] { opacity: 0.45; }
.attention + .attention { margin-top: -12px; }
