/* TrueVoice app: one centred column. Shared by the main page, the report page and the legal pages. */
.tv-app {
  --ink: #1c1b19;
  --soft: #5f5c56;
  --tv-muted: #8d8a83;
  --tv-line: #e7e5e0;
  --paper: #fbfbfa;
  --human: #1e7a45;
  --ai: #c2570c;
  --rec: #c62828;
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
}
.tv-app .shell { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.tv-app header { position: relative; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.tv-app .wordmark { font-family: 'Fraunces', Georgia, serif; font-weight: 500; letter-spacing: -0.03em; }
.tv-app main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px var(--pad) 40px; text-align: center; }
.tv-app main > section { width: 100%; max-width: 420px; }
.tv-app [hidden] { display: none !important; }

.tv-app h1 { font-weight: 500; font-size: clamp(30px, 4.4vw, 44px); letter-spacing: -0.03em; line-height: 1.08; }
.tv-app .sub { margin-top: 10px; font-weight: 300; font-size: 17px; line-height: 1.5; color: var(--soft); }
.tv-app .status { min-height: 1.5em; margin-top: 14px; font-weight: 300; font-size: 15px; line-height: 1.5; color: var(--soft); }
.tv-app .status.bad { color: var(--ai); }
.tv-app .fine { margin-top: 22px; font-weight: 300; font-size: 12.5px; line-height: 1.55; color: var(--tv-muted); }
.tv-app .fine a { color: var(--soft); border-bottom: 1px solid var(--tv-line); }

.tv-app .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 22px; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: 16px; letter-spacing: -0.01em;
  border: 1px solid var(--ink); background: none; color: var(--ink); transition: background 0.2s, color 0.2s;
}
.tv-app .btn.dark { background: var(--ink); color: #fff; }
.tv-app .btn.dark:hover { background: #3a3935; }
.tv-app .btn:disabled { opacity: 0.55; pointer-events: none; }
.tv-app .link { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; border-bottom: 1px solid var(--tv-line); }
.tv-app .link:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- sign-in ---------- */
.gbtn {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin-top: 28px; padding: 12px 18px;
  border: 1px solid #d6d3cc; border-radius: 10px; background: #fff; font-family: inherit; font-size: 16px; color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.gbtn:hover { border-color: var(--ink); background: #f6f5f2; }
.gbtn svg { flex-shrink: 0; }
.tv-app .or { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; font-size: 13px; color: var(--tv-muted); }
.tv-app .or::before, .tv-app .or::after { content: ""; flex: 1; height: 1px; background: var(--tv-line); }
.signin > .mailform:first-of-type { margin-top: 28px; }
.signin .or + .mailform { margin-top: 0; }
.mailform { display: grid; gap: 10px; }
.mailform input {
  width: 100%; padding: 12px 14px; border: 1px solid #d6d3cc; border-radius: 10px; background: #fff;
  font: inherit; font-size: 16px; font-weight: 300; color: var(--ink); text-align: center; transition: border-color 0.2s;
}
.mailform input:focus { outline: none; border-color: var(--ink); }
#code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 22px; letter-spacing: 0.3em; }
#code::placeholder { font-family: 'Fraunces', Georgia, serif; font-size: 16px; letter-spacing: 0; }
.mailform .sent { font-weight: 300; font-size: 15px; line-height: 1.5; color: var(--soft); overflow-wrap: anywhere; }
.mailform .link { justify-self: center; margin-top: 4px; font-size: 14px; color: var(--soft); }

/* ---------- microphone and drop ---------- */
.bigmic {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 148px; height: 148px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16); transition: background 0.2s, transform 0.2s;
}
.bigmic:hover { background: #3a3935; }
.bigmic:active { transform: scale(0.97); }
.bigmic:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; }
.bigmic:disabled { opacity: 0.45; pointer-events: none; }
.bigmic .ring {
  position: absolute; inset: -12px; border-radius: 50%; border: 2px solid rgba(198, 40, 40, 0.35);
  transform: scale(var(--lvl, 1)); transition: transform 0.08s linear; opacity: 0;
}
.bigmic .stopsq { display: none; width: 34px; height: 34px; border-radius: 6px; background: #fff; }
.bigmic.rec { background: var(--rec); }
.bigmic.rec .ring { opacity: 1; }
.bigmic.rec svg { display: none; }
.bigmic.rec .stopsq { display: block; }
.miclabel { margin-top: 18px; font-size: 18px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.dropline { margin-top: 26px; font-weight: 300; font-size: 15px; line-height: 1.7; color: var(--soft); }
.pick { position: relative; color: var(--ink); border-bottom: 1px solid var(--tv-line); cursor: pointer; }
.pick:hover { border-color: var(--ink); }
.pick:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.pick input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.inputs.busy { opacity: 0.55; pointer-events: none; }

.dropcover {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(251, 251, 250, 0.94); border: 2px dashed var(--ink); margin: 12px; border-radius: 18px;
  font-family: 'Fraunces', Georgia, serif; font-size: 24px; color: var(--ink); pointer-events: none;
}

/* ---------- result ---------- */
.verdict { font-weight: 500; font-size: clamp(34px, 5vw, 44px); letter-spacing: -0.025em; }
.verdict.human { color: var(--human); }
.verdict.ai, .verdict.partial { color: var(--ai); }
.verdict.unsure { color: var(--tv-muted); }
.why { margin-top: 8px; font-weight: 300; font-size: 17px; line-height: 1.5; color: var(--soft); }
.timeline { display: flex; gap: 2px; height: 14px; margin-top: 22px; border-radius: 4px; overflow: hidden; }
.timeline span { flex-basis: 0; min-width: 3px; }
.timeline .human { background: var(--human); }
.timeline .ai { background: var(--ai); }
.timeline .unsure { background: #d9d6cf; }
.ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--tv-muted); font-variant-numeric: tabular-nums; direction: ltr; }
.again { margin-top: 26px; }
#ts { display: flex; justify-content: center; }
#ts:not(:empty) { margin-top: 14px; }

/* ---------- footer ---------- */
.tv-app footer.app-foot {
  justify-content: center; gap: 10px 26px; margin-top: 0; padding: 22px var(--pad) 28px; border-top: 0; background: none;
  font-size: 14px; color: var(--tv-muted);
}
.tv-app footer.app-foot a:hover, .tv-app footer.app-foot .link:hover { color: var(--ink); }
.tv-app footer.app-foot .link { border: 0; }
@media (max-width: 720px) {
  .tv-app footer.app-foot { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 20px; }
}

/* ---------- report form and legal text ---------- */
.tv-app main.page-text { display: block; text-align: start; padding-top: 8px; }
.page-text > section, .page-text > article { max-width: 640px; margin: 0 auto; }
.page-text h1 { margin-bottom: 10px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px; text-align: start; }
.form .full { grid-column: 1 / -1; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--soft); }
.form input, .form select, .form textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #d6d3cc; border-radius: 10px; background: #fff;
  font: inherit; font-size: 16px; font-weight: 300; color: var(--ink); transition: border-color 0.2s;
}
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8d8a83 50%), linear-gradient(135deg, #8d8a83 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--ink); }
.form .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 480px) { .form .row { grid-template-columns: minmax(0, 1fr); } }
.form .tick { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--ink); }
.form .tick input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--ink); }
.form .hp { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.form .hint { font-weight: 300; font-size: 13px; color: var(--tv-muted); }
.form .send { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form .send .status, .form .fine { margin-top: 0; }
.form .full > .row { margin-top: 6px; }
.form label[for] { display: block; }
.done h2, .where h2 { font-weight: 400; font-size: 26px; letter-spacing: -0.02em; }
.done p, .where p { margin-top: 8px; font-weight: 300; font-size: 17px; line-height: 1.55; color: var(--soft); }
.where { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--tv-line); }
.where ul { list-style: none; margin-top: 14px; display: grid; gap: 12px; }
.where li { font-weight: 300; font-size: 16px; line-height: 1.5; color: var(--soft); }
.where li a { color: var(--ink); border-bottom: 1px solid var(--tv-line); }
.where li a:hover { border-color: var(--ink); }

.legal { font-weight: 300; font-size: 17px; line-height: 1.65; color: #34322e; }
.legal h2 { margin-top: 36px; font-weight: 500; font-size: 22px; letter-spacing: -0.015em; color: var(--ink); }
.legal h3 { margin-top: 22px; font-weight: 500; font-size: 18px; color: var(--ink); }
.legal p, .legal ul, .legal table { margin-top: 12px; }
.legal ul { padding-inline-start: 22px; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--ink); border-bottom: 1px solid var(--tv-line); }
.legal a:hover { border-color: var(--ink); }
.legal strong { font-weight: 500; color: var(--ink); }
.legal .meta { margin-top: 6px; font-size: 14px; color: var(--tv-muted); }
.legal .note { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: var(--paper); border: 1px solid var(--tv-line); font-size: 15px; }
.legal .scroll { overflow-x: auto; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; }
.legal th, .legal td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--tv-line); text-align: start; vertical-align: top; }
.legal th { font-weight: 500; font-size: 13px; color: var(--tv-muted); }
.legal .danger { margin-top: 16px; }
.legal .danger .btn { border-color: var(--rec); color: var(--rec); }
.legal .danger .btn:hover { background: var(--rec); color: #fff; }

@media (max-width: 640px) {
  .form { grid-template-columns: 1fr; }
  .bigmic { width: 132px; height: 132px; }
}
[dir="rtl"] .form select { background-position: 13px 50%, 18px 50%; padding-right: 13px; padding-left: 34px; }
[dir="rtl"] .legal th, [dir="rtl"] .legal td { padding: 10px 0 10px 12px; }
.tv-app:lang(ar), .tv-app:lang(hi) { font-family: 'Fraunces', var(--font); }
@media (prefers-reduced-motion: reduce) { .bigmic .ring { transition: none; } }
