/* TLDW styles, taken from the Claude Design mock-up (Atkinson Hyperlegible, teal accent). */
:root {
  --accent: #0F766E;
  --accent-dark: #0B5A53;
  --accent-light: #E6F4F1;
  --text: #16201E;
  --muted: #55605D;
  --border: #E3E8E6;
  --input-border: #C9D2CF;
  --soft: #F5F8F7;
  --placeholder: #DDE4E1;
  --negative: #C2410C;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  color: var(--text);
  background: #FFFFFF;
  font-size: 20px;
  line-height: 1.5;
}
a { color: var(--accent-dark); }
button { font-family: inherit; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }

/* header */
header.top { border-bottom: 1px solid var(--border); }
header.top .bar {
  max-width: 1280px; margin: 0 auto; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 24px; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.logo-mark.big { width: 44px; height: 44px; border-radius: 11px; }
nav.main { display: flex; gap: 24px; align-items: center; }
nav.main a, nav.main button { color: var(--muted); text-decoration: none; font-size: 18px; background: none; border: 0; cursor: pointer; padding: 0; }

main.page { margin: 0 auto; padding: 56px 24px 80px; display: flex; flex-direction: column; gap: 48px; }
main.narrow { max-width: 880px; }
main.medium { max-width: 720px; }
main.wide { max-width: 1280px; padding-top: 40px; gap: 40px; }
main.status { max-width: 1120px; padding-top: 48px; gap: 40px; }
h1 { margin: 0; line-height: 1.15; }
h2 { margin: 0; font-size: 28px; }

/* forms and buttons */
input[type=text], input[type=email], input[type=password], input[type=url] {
  height: 56px; padding: 0 16px; font-size: 20px; font-family: inherit; color: var(--text);
  border: 2px solid var(--input-border); border-radius: 10px; background: #FFFFFF; width: 100%;
}
input:focus { outline: 3px solid #99D5CF; border-color: var(--accent); }
.button {
  height: 60px; padding: 0 32px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #FFFFFF; font-weight: 700; font-size: 21px; border-radius: 12px;
  border: 0; text-decoration: none; cursor: pointer;
}
.button:disabled { opacity: 0.6; cursor: wait; }
.error { color: #9B1C14; background: #FDECEA; border-radius: 10px; padding: 10px 14px; font-size: 17px; }
.note { color: var(--accent-dark); background: var(--accent-light); border-radius: 10px; padding: 10px 14px; font-size: 17px; }

/* login */
.login-wrap { background: var(--soft); min-height: 100vh; padding: 64px 24px; display: flex; align-items: center; justify-content: center; }
.login { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 32px; }
.login .brand { display: flex; align-items: center; gap: 12px; justify-content: center; font-weight: 700; font-size: 30px; }
.card-form { background: #FFFFFF; border: 1px solid var(--border); border-radius: 20px; padding: 40px 32px; display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 700; font-size: 18px; }
.center { text-align: center; }

/* home */
.analyse-row { display: flex; flex-wrap: wrap; gap: 12px; }
.analyse-row input { flex: 999 1 360px; min-width: 0; height: 68px; padding: 0 20px; font-size: 22px; border-radius: 12px; }
.analyse-row .button { flex: 1 1 140px; height: 68px; font-size: 22px; }
.divider { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 17px; }
.divider span.line { flex: 1 1 0; height: 1px; background: var(--border); }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 24px;
  border: 2px dashed var(--input-border); border-radius: 16px; background: var(--soft); text-align: center; cursor: pointer;
}
.dropzone.drag { border-color: var(--accent); background: var(--accent-light); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.test-toggle { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 16px; }
.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.list li + li { border-top: 1px solid var(--border); }
.list a { display: flex; align-items: center; gap: 16px; padding: 16px 20px; text-decoration: none; color: inherit; flex-wrap: wrap; }
.list .empty { padding: 20px; color: var(--muted); }
.thumb {
  flex: 0 0 96px; height: 54px; border-radius: 8px; background: var(--placeholder) center/cover no-repeat;
  display: inline-flex; align-items: center; justify-content: center;
}
.row-text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; }
.row-text .title { font-weight: 700; font-size: 19px; }
.row-text .meta { color: var(--muted); font-size: 16px; }
.pill { padding: 4px 14px; border-radius: 999px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.pill.queued { background: #EEF1F0; color: #3F4946; }
.pill.processing { background: #E8F0FB; color: #1D4F91; }
.pill.done { background: var(--accent-light); color: var(--accent-dark); }
.pill.failed { background: #FDECEA; color: #9B1C14; }

/* processing */
.job-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.job-head .thumb { flex: 0 0 160px; height: 90px; border-radius: 12px; }
.job-head .info { flex: 1 1 260px; min-width: 0; }
.progress-top { display: flex; justify-content: space-between; font-size: 18px; color: var(--muted); }
.progress-top b { color: var(--text); }
.progress { height: 12px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress div { height: 100%; border-radius: 999px; background: var(--accent); transition: width 0.6s ease; }
.steps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 16px; }
.steps li { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.steps li + li { border-top: 1px solid var(--border); }
.dot { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.dot.done { background: var(--accent); }
.dot.active { border: 3px solid var(--accent); }
.dot.active::after { content: ""; width: 12px; height: 12px; border-radius: 999px; background: var(--accent); }
.dot.pending { border: 2px solid var(--input-border); }
.step-text { flex: 1 1 auto; display: flex; flex-direction: column; }
.step-text .label { font-size: 20px; }
.step-text .label.pending { color: var(--muted); }
.step-text .label.active { font-weight: 700; }
.step-text .detail { color: var(--muted); font-size: 17px; }

/* result */
.result-head { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.player {
  flex: 0 0 320px; height: 180px; border-radius: 14px; background: var(--placeholder) center/cover no-repeat;
  display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; overflow: hidden; padding: 0;
}
.player iframe { width: 100%; height: 100%; border: 0; }
.play-circle { width: 56px; height: 56px; border-radius: 999px; background: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; }
.head-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.head-text h1 { font-size: 36px; line-height: 1.2; }
.badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 16px; font-weight: 700; }
.badge.cache { background: #EEF1F0; color: #3F4946; }
.badge.fresh { background: #E8F0FB; color: #1D4F91; }
.result-body { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.result-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.cards { display: flex; flex-wrap: wrap; gap: 20px; }
.score-card { flex: 1 1 300px; border: 1px solid var(--border); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.score-number { font-size: 64px; font-weight: 700; line-height: 1; }
.score-bar { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.score-bar div { height: 100%; border-radius: 999px; }
.score-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; }
.verdict { font-size: 24px; font-weight: 700; }
.skip-card {
  flex: 1 1 300px; border: 2px solid var(--accent); background: var(--accent-light); border-radius: 18px; padding: 28px;
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); cursor: pointer; text-align: left; font-family: inherit;
}
.skip-card .time { display: flex; align-items: center; gap: 12px; font-size: 56px; font-weight: 700; color: var(--accent-dark); line-height: 1.1; }
.section { display: flex; flex-direction: column; gap: 14px; }
.summary { margin: 0; font-size: 21px; max-width: 760px; }
.points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.points li { display: flex; gap: 16px; align-items: baseline; }
.chip-time {
  flex: 0 0 auto; min-width: 72px; text-align: center; padding: 2px 10px; border-radius: 8px; background: #F0F3F2;
  color: var(--accent-dark); font-weight: 700; font-size: 18px; border: 0; cursor: pointer; font-variant-numeric: tabular-nums;
}
.sentiment-bar { display: flex; height: 18px; border-radius: 999px; overflow: hidden; gap: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 28px; font-size: 19px; }
.legend span.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; margin-right: 8px; }
.comments { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.comments figure { margin: 0; border: 1px solid var(--border); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.comments blockquote { margin: 0; font-size: 18px; }
.comments figcaption { color: var(--muted); font-size: 15px; }
.tag { align-self: flex-start; font-size: 14px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--accent-light); color: var(--accent-dark); }
.tag.negative { background: #FDEEE6; color: #9A3412; }
.chat { flex: 1 1 360px; min-width: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--soft); display: flex; flex-direction: column; }
.chat .chat-head { padding: 20px 22px; border-bottom: 1px solid var(--border); }
.chat .chat-head h2 { font-size: 22px; }
.messages { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; min-height: 280px; max-height: 520px; overflow-y: auto; }
.msg { max-width: 85%; padding: 12px 16px; font-size: 18px; white-space: pre-wrap; }
.msg.me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--accent); color: #FFFFFF; }
.msg.bot { align-self: flex-start; border-radius: 14px 14px 14px 4px; background: #FFFFFF; border: 1px solid var(--border); }
.msg .refs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.suggestions { padding: 0 22px 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.suggestions button { font-size: 16px; padding: 8px 14px; min-height: 44px; border-radius: 999px; border: 1px solid var(--input-border); background: #FFFFFF; color: var(--text); cursor: pointer; }
.ask-row { padding: 14px 22px 22px; display: flex; gap: 10px; }
.ask-row input { height: 52px; font-size: 18px; }
.send { flex: 0 0 52px; height: 52px; border: 0; border-radius: 10px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* status */
.status-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 17px; }
.live span { width: 10px; height: 10px; border-radius: 999px; background: var(--accent); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.stat { border: 1px solid var(--border); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 6px; }
.stat h2 { color: var(--muted); font-size: 18px; font-weight: 400; }
.stat .big { font-size: 64px; font-weight: 700; line-height: 1.05; }
.stat .big small { font-size: 28px; color: var(--muted); font-weight: 400; }
.stat .sub { color: var(--muted); font-size: 17px; }
.status-body { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 18px; min-width: 520px; }
th { background: var(--soft); text-align: left; padding: 14px 18px; }
td { padding: 14px 18px; border-top: 1px solid var(--border); }
td.num { font-variant-numeric: tabular-nums; color: var(--muted); }
.workers li { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.busy-dot { flex: 0 0 12px; height: 12px; border-radius: 999px; background: var(--accent); }
.busy-dot.idle { background: #FFFFFF; border: 2px solid #9AA5A1; }

@media (max-width: 600px) {
  body { font-size: 18px; }
  main.page { padding: 32px 16px 56px; gap: 32px; }
  header.top .bar { padding: 16px; }
  .player { flex: 1 1 100%; height: auto; aspect-ratio: 16 / 9; }
  .head-text h1 { font-size: 28px; }
  .skip-card .time { font-size: 44px; }
  .score-number { font-size: 52px; }
  .stat .big { font-size: 52px; }
}
