/* TrueVoice: shared pieces for every layout (tester card, code panel, request form). Layout lives in each page. */
.tv {
  --ink: #1c1b19;
  --soft: #5f5c56;
  --tv-muted: #8d8a83;
  --tv-line: #e7e5e0;
  --paper: #fbfbfa;
  --human: #1e7a45;
  --ai: #c2570c;
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
  padding: 0 var(--pad);
}
.tv section { scroll-margin-top: 90px; }
.eyebrow { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tv-muted); }
.tv h1 { font-weight: 500; font-size: clamp(40px, 5vw, 64px); letter-spacing: -0.035em; line-height: 1.02; }
.tv h2 { font-weight: 400; font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.025em; line-height: 1.1; }
.tv-lead { font-weight: 300; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; color: var(--soft); }
.body { font-weight: 300; font-size: 17px; line-height: 1.6; color: var(--soft); }

.btn {
  display: inline-block; 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;
}
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: #3a3935; }
.btn.light:hover { background: var(--ink); color: #fff; }
.btn:disabled { opacity: 0.55; pointer-events: none; }

.ticks-list { list-style: none; display: grid; gap: 10px; }
.ticks-list li { position: relative; padding-inline-start: 26px; font-weight: 300; font-size: 17px; line-height: 1.5; color: var(--soft); }
.ticks-list li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 0.45em; width: 12px; height: 7px; border-left: 1.5px solid var(--human); border-bottom: 1.5px solid var(--human); transform: rotate(-45deg); }

/* ---------- Tester ---------- */
.card { background: #fff; border: 1px solid var(--tv-line); border-radius: 18px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.07); }
.try { text-align: center; padding: clamp(22px, 3vw, 34px); }
.try[hidden] { display: none; }
.try h3 { font-weight: 400; font-size: 22px; letter-spacing: -0.02em; }
.try .sub { margin-top: 6px; font-weight: 300; font-size: 15px; color: var(--soft); }
.inputs[hidden] { display: none; }
.drop {
  position: relative; display: block; margin-top: 18px; padding: 30px 20px;
  border: 1.5px dashed #cfccc5; border-radius: 12px; background: var(--paper);
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.drop:hover, .drop.over { border-color: var(--ink); background: #f6f5f2; }
.drop.busy, .drop.off { pointer-events: none; opacity: 0.55; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.drop-main { display: block; font-size: 17px; }
.drop-sub { display: block; margin-top: 6px; font-weight: 300; font-size: 13.5px; color: var(--tv-muted); }
.or { display: flex; align-items: center; gap: 12px; margin: 12px 0; font-size: 13px; color: var(--tv-muted); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--tv-line); }
.mic {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px 18px;
  border: 1px solid #cfccc5; border-radius: 12px; background: none; font: inherit; font-size: 16px; color: var(--ink); cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.mic:hover { border-color: var(--ink); background: #f6f5f2; }
.mic:disabled { pointer-events: none; opacity: 0.55; }
.mic[hidden] { display: none; }
.mic.rec { border-color: var(--ai); color: var(--ai); font-variant-numeric: tabular-nums; }
.mic.rec::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ai); animation: pulse 1.2s ease-in-out infinite; }
.mic.rec svg { display: none; }
.level { display: none; align-items: center; gap: 2px; height: 16px; margin-inline-start: 4px; }
.mic.rec .level { display: inline-flex; }
.level i { display: block; width: 3px; height: 16px; border-radius: 2px; background: var(--ai); transform: scaleY(0.15); transition: transform 0.08s linear; }
@keyframes pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .mic.rec::before { animation: none; } }
.status { min-height: 1.5em; margin-top: 12px; font-weight: 300; font-size: 15px; color: var(--soft); }
.status.bad { color: var(--ai); }
.result[hidden] { display: none; }
.verdict { font-weight: 500; font-size: 30px; letter-spacing: -0.02em; }
.verdict.human { color: var(--human); }
.verdict.ai, .verdict.partial { color: var(--ai); }
.verdict.unsure { color: var(--tv-muted); }
.why { margin-top: 6px; font-weight: 300; font-size: 16px; color: var(--soft); }
.timeline { display: flex; gap: 2px; height: 14px; margin-top: 18px; 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; }
.again {
  margin-top: 18px; padding: 9px 18px; border-radius: 10px; border: 1px solid var(--ink);
  background: none; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer;
}
.again:hover { background: var(--ink); color: #fff; }
#ts, #ts-access { display: flex; justify-content: center; }
#ts:not(:empty), #ts-access:not(:empty) { margin-top: 12px; }
.fine { margin-top: 14px; font-weight: 300; font-size: 12.5px; line-height: 1.55; color: var(--tv-muted); }

/* ---------- Code panel ---------- */
.code {
  border-radius: 14px; background: #1c1b19; color: #d9d6cf; overflow: hidden; text-align: left;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; line-height: 1.65;
}
.code .bar { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid #33312d; font-size: 12px; color: #8d8a83; }
.code .bar .label { padding: 4px 8px; }
.code .bar button { padding: 4px 10px; border: 0; border-radius: 6px; background: none; font: inherit; color: #8d8a83; cursor: pointer; }
.code .bar button[aria-selected="true"] { background: #33312d; color: #f4f2ee; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; white-space: pre; }
.code pre[hidden] { display: none; }
.code .c { color: #77746d; }      /* comment */
.code .s { color: #b9d8a6; }      /* string */
.code .k { color: #e7b98a; }      /* keyword, key */
.code .h { color: #8fd0a6; }      /* human */
.code .a { color: #f0a36b; }      /* ai */
.code + .code { margin-top: 12px; }

/* ---------- Request form ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; 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: 96px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-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 .send { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form .note { font-weight: 300; font-size: 13px; color: var(--tv-muted); }
.form-msg { min-height: 0; font-weight: 300; font-size: 15px; color: var(--soft); }
.form-msg.bad { color: var(--ai); }
.form-done[hidden], .form[hidden] { display: none; }
.form-done h3 { font-weight: 400; font-size: 24px; letter-spacing: -0.02em; }
.form-done p { margin-top: 8px; font-weight: 300; font-size: 17px; color: var(--soft); }

@media (max-width: 640px) {
  .form { grid-template-columns: 1fr; }
  .code { font-size: 11.5px; }
}

/* right-to-left pages */
[dir="rtl"] .form select { background-position: 18px 50%, 13px 50%; padding-right: 13px; padding-left: 34px; }
