/* Tidingsly console. Phone-first; big buttons, one decision per page. */
:root {
  --accent: #1f4e79;
  --accent-ink: #ffffff;
  --ink: #1b1b1b;
  --muted: #6a6a6a;
  --line: #e3e1dc;
  --paper: #ffffff;
  --panel: #f6f5f2;
  --ok: #2b7a3d;
  --warn: #b26a00;
  --warn-bg: #fff4dd;
  --bad: #b3261e;
  --bad-bg: #fde8e6;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 17px/1.5 var(--font); color: var(--ink); background: var(--panel); -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
h1 { font-size: 1.7rem; line-height: 1.15; margin: 0 0 .35rem; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
p.lead { color: var(--muted); margin: 0 0 1.2rem; }
p.lead.big { font-size: 1.15rem; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.hint { font-weight: 400; color: var(--muted); font-size: .88rem; }
p.hint { margin: .3rem 0 0; }

/* Top bar */
.top { background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; }
.top .brand { display: flex; align-items: center; gap: .5rem; color: inherit; text-decoration: none; min-width: 0; }
.top .brand .mark { width: 26px; height: 26px; flex-shrink: 0; }
.top .brand span { color: inherit; text-decoration: none; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top nav { display: flex; gap: .3rem; align-items: center; flex-shrink: 0; }
.top nav a, .top nav button.link { color: inherit; text-decoration: none; font: inherit; font-size: .85rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.08); white-space: nowrap; cursor: pointer; line-height: 1.2; }
.top nav a.home { border-color: transparent; background: transparent; padding-left: .3rem; }
.top nav a[aria-current] { background: var(--accent-ink); color: var(--accent); border-color: var(--accent-ink); }
.top nav form { margin: 0; }

main.wrap { max-width: 1080px; margin: 0 auto; padding: 22px 16px calc(env(safe-area-inset-bottom) + 56px); }
.narrow { max-width: 620px; margin: 0 auto; }
.landing main.wrap { padding-top: 12vh; }
.hero { font-size: 2.6rem; line-height: 1.05; margin: 0 0 1rem; }
.foot { max-width: 1080px; margin: 0 auto; padding: 0 16px 1.4rem; font-size: .82rem; color: var(--muted); }
.foot a { color: var(--muted); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* Cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.stack > * + * { margin-top: .9rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row input[type=text], .row input[type=email] { flex: 1; min-width: 0; }
.spread { justify-content: space-between; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 600; padding: .6rem 1.1rem; border-radius: 10px; border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.quiet { background: var(--paper); color: var(--ink); border-color: var(--line); font-weight: 500; }
.btn.big { padding: .85rem 1.4rem; font-size: 1.05rem; }
.btn.huge { width: 100%; padding: 1.05rem 1.2rem; font-size: 1.2rem; border-radius: 14px; margin-top: .4rem; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }
.link-btn.danger { color: var(--bad); }
form.inline { margin-top: 1.6rem; text-align: center; }
form.inline .link-btn { font-size: .9rem; }
.cta-row { display: flex; align-items: center; justify-content: flex-end; gap: .8rem; margin-top: 1.2rem; flex-wrap: wrap; }

/* Two big choices */
.choices { display: grid; gap: 12px; margin: 1.2rem 0; }
.choice { display: grid; gap: 4px; text-align: left; font: inherit; padding: 18px 20px; border-radius: 16px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.choice .big { font-size: 1.25rem; font-weight: 700; }
.choice .sub { font-size: .92rem; color: var(--muted); }
.choice.primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.choice.primary .sub { color: color-mix(in srgb, var(--accent-ink) 82%, transparent); }
.choice:hover { filter: brightness(1.04); }

/* Forms */
label { display: block; font-weight: 600; margin-bottom: .3rem; }
input[type=text], input[type=email], input[type=color], select, textarea {
  font: inherit; width: 100%; padding: .65rem .8rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink);
}
input[type=color] { width: 72px; height: 44px; padding: 3px; }
input[type=file] { font: inherit; font-size: .92rem; }
textarea { min-height: 110px; resize: vertical; }
textarea.script { min-height: 46vh; font-size: 1.08rem; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.field { margin-bottom: 1rem; }
.fields-2 { display: grid; grid-template-columns: 1fr auto; gap: 0 16px; align-items: end; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .35rem; width: 1.15rem; height: 1.15rem; }
.check.small { font-size: .9rem; margin-top: .4rem; }
details.more summary { cursor: pointer; color: var(--accent); font-weight: 600; margin: .6rem 0; }
.preview { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; line-height: 1.6; }
.preview p { margin: .7rem 0; }
.cover-preview { display: block; width: 120px; height: 120px; border-radius: 10px; object-fit: cover; margin: .4rem 0 .6rem; border: 1px solid var(--line); }
.dev { margin-top: 1.4rem; }
#mic.listening { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }

/* Notices */
.notice { padding: .75rem .95rem; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); margin-bottom: 1rem; }
.notice.ok { background: #e6f4ea; border-color: #bfe3c8; }
.notice.warn { background: var(--warn-bg); border-color: #f2d59a; }
.notice.bad { background: var(--bad-bg); border-color: #f0b8b3; }

/* Waiting */
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--accent); margin: 8vh auto 1.2rem; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Compare */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.compare .col { display: grid; gap: .8rem; }
.compare .col-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.compare .col-head h2 { margin: 0; }
.compare .col.ai .preview { border-color: var(--accent); }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } .compare .col.ai { order: -1; } }

/* Words */
.word .term { font-size: 1.1rem; }
.word .row { margin-top: .5rem; }

/* Live */
.tracks { display: grid; gap: 12px; margin: 1rem 0; }
.track audio { width: 100%; margin: .5rem 0; }
.track-title { margin: .2rem 0 0; font-weight: 600; }
.copy { font-size: .88rem; }

/* Episode list */
.feeds { font-size: .95rem; }
.feeds .url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; word-break: break-all; flex: 1; min-width: 0; }
.ep-list { list-style: none; padding: 0; margin: 0; }
.ep-list li a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.ep-list .ep-title { font-weight: 600; }
.ep-list .num { display: inline-block; min-width: 1.6rem; color: var(--muted); font-weight: 500; }
.ep-list .ep-meta { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 2rem 0; }
.chip { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--panel); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip.review { background: #e8f1fb; color: var(--accent); border-color: transparent; }
.chip.published { background: #e6f4ea; color: var(--ok); border-color: transparent; }
.chip.busy { background: #fff8e6; color: var(--warn); border-color: transparent; }
.chip.failed { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.chip.busy::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; margin-right: .35em; animation: spin .9s linear infinite; vertical-align: -1px; }

.error-page main { max-width: 560px; margin: 12vh auto; padding: 0 20px; }

@media (max-width: 640px) {
  h1 { font-size: 1.45rem; }
  .hero { font-size: 2.1rem; }
  .top nav a, .top nav button.link { padding: .28rem .6rem; font-size: .8rem; }
  .cta-row { flex-direction: column-reverse; align-items: stretch; }
  .cta-row .btn { width: 100%; }
}

/* ---- Your voice ---- */
.tips ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.tips li { margin: .2rem 0; }
.script-card .read { background: var(--panel); border-radius: 10px; padding: 14px 16px; font-size: 1.15rem; line-height: 1.65; margin: .6rem 0 .9rem; }
.script-card .read p { margin: .6rem 0; }
.rec-controls .btn { margin-top: 0; }
.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
#rec-start.armed { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { filter: brightness(1.15); } }

/* Wordmark on the landing page */
.logo { display: flex; align-items: center; gap: .6rem; color: var(--accent, #1f4e79); font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; margin-bottom: 1.4rem; }
.logo .mark { width: 34px; height: 34px; }

/* Admin console */
.row.between { justify-content: space-between; }
.admin-show.pending { border-left: 4px solid var(--warn); }
.admin-show .feeds { margin: .6rem 0; }
.admin-show .feeds .row { gap: .5rem; }
.listings { display: grid; grid-template-columns: 11rem 1fr 1fr; gap: .45rem .7rem; align-items: center; margin-top: .6rem; }
.listings .lh { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.listings .dir { font-size: .9rem; font-weight: 600; display: flex; flex-direction: column; line-height: 1.2; }
.listings .dir a { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--line); }
.listings .dir.missing a { color: var(--warn); border-bottom-color: var(--warn); }
.listings input { width: 100%; min-width: 0; font: inherit; font-size: .88rem; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.listings .pi { grid-column: 2 / 4; }
.listings .save { grid-column: 1 / 4; display: flex; justify-content: flex-end; margin-top: .3rem; }
@media (max-width: 720px) {
  .listings { grid-template-columns: 1fr; }
  .listings .lh { display: none; }
  .listings .dir { margin-top: .5rem; }
  .listings .pi, .listings .save { grid-column: 1; }
}

/* Admin: review queue */
.held { border-left: 4px solid var(--bad); }
.held .why { margin: .5rem 0; font-size: .95rem; }
.held details { margin: .4rem 0 .8rem; }
.held summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .9rem; }
.held .script { max-height: 22rem; overflow: auto; padding: .6rem .9rem; margin-top: .4rem; background: var(--panel); border-radius: 10px; font-size: .95rem; }
.held .script p { margin: 0 0 .7rem; }
.held .decide { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.held .decide input[type=text] { min-width: 18rem; font: inherit; font-size: .9rem; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }

/* Voice: three clips */
.clip.done { border-left: 4px solid var(--ok); }
.clip .read p { margin: 0; }
.samples { display: flex; flex-direction: column; gap: .4rem; margin-top: .6rem; }
.samples audio { width: 100%; }

/* Email embed */
.embed .embed-row { display: grid; grid-template-columns: 260px 1fr; gap: 1rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--line); }
.embed .embed-row:first-of-type { border-top: 0; }
.embed .card-preview { width: 260px; height: auto; aspect-ratio: 1200 / 630; border-radius: 8px; display: block; border: 1px solid var(--line); background: var(--panel); }
.embed .embed-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.embed .embed-actions .row { gap: .5rem; }
.embed .embed-actions b { font-size: .95rem; }
@media (max-width: 600px) { .embed .embed-row { grid-template-columns: 1fr; } .embed .card-preview { width: 100%; } }
