/* Audio Twin finder (R63). Everything is scoped under .twin and prefixed tw- so nothing
   here can restyle the charts. Colours come from the tokens in /styles.css: --accent is
   a fill with --on-accent text on top, green text is --accent-text (SD-16). */
:root { --tw-bad: #b3261e; --tw-bad-soft: #fde7e4; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --tw-bad: #ff9a8f; --tw-bad-soft: #43201d; }
}
:root[data-theme="dark"] { --tw-bad: #ff9a8f; --tw-bad-soft: #43201d; }

.twin { max-width: 600px; font-size: 16px; line-height: 1.5; }
.twin [hidden] { display: none !important; }
.twin .tw-title { font-size: clamp(30px, 8vw, 40px); line-height: 1.08; letter-spacing: -0.8px; }
.twin .page-lede { font-size: 17px; margin-bottom: 0; }
.twin .tw-stats { margin-top: 14px; font-weight: 700; color: var(--accent-text); }

.twin .tw-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px 20px; margin: 20px 0; }
.twin .tw-panel.tw-quiet { background: transparent; }
.twin h3 { font-size: 21px; line-height: 1.2; letter-spacing: -0.3px; margin-bottom: 8px; }
.twin .tw-step { margin-bottom: 6px; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-text); }
.twin .tw-sub { margin-bottom: 16px; color: var(--text-muted); }
.twin .tw-hint { margin-top: 6px; font-size: 14px; color: var(--text-muted); }

.twin .tw-howto { margin: 6px 0 18px; padding-left: 22px; color: var(--text-muted); }
.twin .tw-howto li { margin: 4px 0; }
.twin .tw-howto b { color: var(--text); }
.twin .tw-howto a, .twin .tw-foot a, .twin .tw-hint a, .twin label a { color: var(--accent-text); font-weight: 600; }
.twin .tw-open { display: flex; width: 100%; margin: 8px 0 14px; }

.twin label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.twin input, .twin select, .twin textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border-control); border-radius: 10px; padding: 11px 12px; min-height: 46px;
}
.twin textarea { resize: vertical; display: block; }
.twin input::placeholder, .twin textarea::placeholder { color: var(--text-subtle); }
.twin input:focus-visible, .twin select:focus-visible, .twin textarea:focus-visible,
.twin button:focus-visible, .twin a:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.twin fieldset { border: 0; margin-top: 18px; min-width: 0; }
.twin legend { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.twin .tw-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.twin .tw-row > div { min-width: 0; }
.twin .tw-row.tw-three { grid-template-columns: 1.2fr 1.3fr 1fr; }
.twin .tw-row.tw-contact { grid-template-columns: 1fr 1.4fr; margin-bottom: 0; }
@media (max-width: 420px) {
  .twin .tw-row.tw-three { grid-template-columns: 1fr 1fr; }
  .twin .tw-row.tw-three > div:first-child { grid-column: 1 / -1; }
}
.twin .tw-check { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; margin: 18px 0 0; }
.twin .tw-check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); flex: none; }

.twin button, .twin a.tw-ghost { font: inherit; cursor: pointer; }
.twin .tw-primary {
  display: block; width: 100%; margin-top: 14px; padding: 13px 18px; min-height: 50px;
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: 999px; font-weight: 700; font-size: 17px;
}
.twin .tw-primary:hover { background: var(--accent-hover); }
.twin .tw-primary:disabled { opacity: 0.55; cursor: default; }
.twin .tw-ghost {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 16px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border-control); border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
}
.twin .tw-ghost:hover { border-color: var(--accent); background: var(--hover); }
.twin .tw-ghost.tw-danger { color: var(--tw-bad); border-color: var(--tw-bad); }
.twin .tw-link { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--accent-text); font-weight: 600; text-decoration: underline; padding: 8px; }
.twin .tw-link.tw-small { display: inline-block; margin: 6px 0 0; padding: 4px 0; font-size: 14px; text-align: left; }
.twin .tw-pair { margin: 10px 0 0; }
.twin .tw-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.twin .tw-actions .tw-primary { width: auto; flex: 1 1 160px; margin-top: 0; }

.twin .tw-linkbox { margin-top: 16px; }
.twin .tw-linkbox label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.twin .tw-num { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; }
.twin .tw-inline { display: flex; gap: 8px; }
.twin .tw-inline input { flex: 1; min-width: 0; }
.twin .tw-paste { flex: none; }
.twin .tw-got { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--text-muted); overflow-wrap: anywhere; }
.twin .tw-got:empty { display: none; }
.twin .tw-got.tw-good { color: var(--accent-text); }
.twin .tw-got.tw-bad { color: var(--tw-bad); }

.twin .tw-here { margin-top: 18px; padding: 16px; border: 2px solid var(--accent); border-radius: 12px; background: var(--surface-2); }
.twin .tw-here-title { font-size: 19px; font-weight: 700; margin-bottom: 2px; }
.twin .tw-here .tw-sub { margin-bottom: 10px; }
.twin .tw-h4 { font-size: 16px; font-weight: 700; margin: 24px 0 2px; }
.twin .tw-gap { margin-top: 12px; }
.twin #m-email, .twin #m-birthday { margin-bottom: 4px; }
.twin .tw-hello a { display: block; color: var(--on-accent); text-decoration: underline; overflow-wrap: anywhere; }
.twin .tw-handle { display: block; font-size: 15px; font-weight: 600; }

.twin .tw-msg { margin-top: 12px; font-weight: 600; }
.twin .tw-msg:empty { display: none; }
.twin .tw-msg.tw-bad { color: var(--tw-bad); }
.twin .tw-msg.tw-good { color: var(--accent-text); }

.twin .tw-preview { margin-top: 16px; display: grid; gap: 10px; }
.twin .tw-fact { border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; background: var(--surface-2); }
.twin .tw-fact .tw-k { display: block; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.twin .tw-fact .tw-v { display: block; font-weight: 600; overflow-wrap: anywhere; }
.twin .tw-fact.tw-missing { border-style: dashed; border-color: var(--border-control); }
.twin .tw-fact.tw-missing .tw-v { color: var(--text-muted); font-weight: 500; }
.twin .tw-fact.tw-read .tw-k::after { content: " ✓"; color: var(--accent-text); }

.twin .tw-match { border: 2px solid var(--accent); border-radius: 12px; padding: 16px; margin-top: 14px; background: var(--surface-2); }
.twin .tw-match.tw-possible { border: 1px solid var(--border-control); }
.twin .tw-match h4 { font-size: 19px; letter-spacing: -0.2px; margin-bottom: 4px; }
.twin .tw-match p { margin-top: 6px; overflow-wrap: anywhere; }
.twin .tw-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.twin .tw-chips .tw-label { font-size: 13px; font-weight: 600; color: var(--text-muted); width: 100%; }
.twin .tw-chip { font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 10px; border: 1px solid transparent; }
.twin .tw-chip.tw-ok { color: var(--accent-text); border-color: var(--accent-text); }
.twin .tw-chip.tw-no { color: var(--tw-bad); background: var(--tw-bad-soft); }
.twin .tw-hello { margin-top: 12px; padding: 14px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 18px; overflow-wrap: anywhere; }
.twin .tw-hello small { display: block; font-weight: 600; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.twin .tw-waiting { margin-top: 12px; font-weight: 600; color: var(--accent-text); }

.twin .tw-code { font: 700 24px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; margin-bottom: 12px; color: var(--accent-text); overflow-wrap: anywhere; }
.twin #post { font-size: 14px; }
.twin .tw-keyrow { display: flex; gap: 10px; }
.twin .tw-keyrow input { flex: 1; min-width: 0; font-size: 14px; }

.twin .tw-foot { padding-bottom: 40px; font-size: 14px; color: var(--text-muted); }

.twin.tw-prose h3 { margin-top: 24px; font-size: 18px; }
.twin.tw-prose p, .twin.tw-prose li { color: var(--text-muted); margin-top: 6px; }
.twin.tw-prose ul { padding-left: 22px; }

/* The logo text is a paragraph here so the page title can be the one H1 (R78). */
.logo .logo-name { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
