/* isxyei.gr — one stylesheet, no build step. */

:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --border: #e2ded7;
  --text: #1b1a18;
  --muted: #6b6760;
  --accent: #1f4f8f;
  --accent-soft: #eaf0f8;

  --true-fg: #0f5132;   --true-bg: #dff3e6;
  --partly-fg: #7a5200; --partly-bg: #fbeecd;
  --mis-fg: #8a3d10;    --mis-bg: #fbe3d4;
  --false-fg: #8a1c1c;  --false-bg: #fadcdc;
  --unver-fg: #4a4a4a;  --unver-bg: #e9e7e3;

  --radius: 10px;
  --max: 56rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15161a;
    --surface: #1d1f24;
    --border: #32353c;
    --text: #edecea;
    --muted: #9b9a96;
    --accent: #8ab4f8;
    --accent-soft: #23293a;

    --true-fg: #8fe0b0;   --true-bg: #16311f;
    --partly-fg: #f0cd82; --partly-bg: #3a2d10;
    --mis-fg: #f3ad83;    --mis-bg: #3d2314;
    --false-fg: #f49a9a;  --false-bg: #3d1a1a;
    --unver-fg: #b9b7b3;  --unver-bg: #2a2c31;
  }
}

* { box-sizing: border-box; }

/* The browser's own `[hidden] { display: none }` is a user-agent rule, so any
   author rule that sets `display` beats it — `form { display: grid }` below
   would otherwise show a form this page marked hidden. site.js toggles the
   sign-in gate and the vote buttons with `.hidden`, so this has to hold. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
        "Noto Serif", serif;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--surface); padding: .5rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

/* --- header / footer --- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; gap: .75rem 2rem;
  align-items: baseline; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem;
}
.brand { text-decoration: none; color: inherit; display: block; }
.brand-name {
  display: block; font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em;
}
.brand-tagline { display: block; color: var(--muted); font-size: .9rem; }
.site-header nav { display: flex; gap: 1.25rem; font-size: .95rem; }

.site-footer {
  margin-top: 4rem; padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  font-size: .9rem; color: var(--muted);
}
.site-footer p { margin: .4rem 0; }

main { padding-top: 2.5rem; }

h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .75rem; }
h2 { font-size: 1.3rem; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.1rem; margin: .5rem 0; }

.muted { color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); padding: 2rem 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }

/* --- index --- */

.intro { max-width: 38rem; margin-bottom: 2.5rem; }
.intro p { color: var(--muted); }

.video-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }

.video-card {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 1.25rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; align-items: start;
}
.video-card .thumb { display: block; }
.video-card img {
  width: 100%; height: auto; display: block;
  border-radius: 6px; background: var(--border); object-fit: cover; aspect-ratio: 4/3;
}
.video-card h2 { font-size: 1.2rem; margin: 0 0 .35rem; }
.video-card h2 a { color: inherit; text-decoration: none; }
.video-card h2 a:hover { text-decoration: underline; }
.meta { color: var(--muted); font-size: .9rem; margin: 0 0 .6rem; }
.summary { margin: .5rem 0; }

@media (max-width: 620px) {
  .video-card { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

/* --- votes --- */

.vote { display: grid; justify-items: center; gap: .25rem; min-width: 4.5rem; }

/* Overrides the page's solid button: this one sits inside a card and reads as
   a control, not a call to action, until it is pressed. */
.vote-button {
  display: grid; justify-items: center; gap: .1rem; justify-self: stretch;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: .5rem .7rem; line-height: 1.2;
}
.vote-button:hover { border-color: var(--accent); color: var(--accent); }
.vote-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vote-button.voted {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent);
}
.vote-arrow { font-size: .85rem; line-height: 1; }
.vote-count {
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.vote-label {
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: .72rem; font-weight: 600; color: var(--muted);
}
.vote-button.voted .vote-label { color: inherit; }

/* The no-JavaScript rendering: the same number, without the affordance. */
.vote-static {
  display: grid; justify-items: center; gap: .1rem; margin: 0;
  padding: .5rem .7rem; line-height: 1.2;
}
.vote-status {
  margin: .25rem 0 0; max-width: 12rem; text-align: center;
  font-family: system-ui, sans-serif; font-size: .78rem; color: var(--false-fg);
}
.vote-status:empty { display: none; }

.video-header .vote { justify-items: start; margin-top: .75rem; }
.video-header .vote-button { justify-self: start; }

@media (max-width: 620px) {
  .vote { justify-items: start; }
  .vote-button, .vote-static {
    justify-self: start; grid-auto-flow: column; align-items: center; gap: .4rem;
  }
}

/* --- account --- */

.account-nav {
  display: flex; gap: 1rem; align-items: baseline;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: .9rem;
}
.account-name { color: var(--muted); }
.account-nav .cta {
  background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: .2rem .8rem; text-decoration: none;
}

/* A button that has to look like a link, because logging out is a POST. */
.linklike {
  background: none; border: 0; padding: 0; color: var(--accent);
  font: inherit; font-family: system-ui, sans-serif; font-size: .9rem;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
@media (prefers-color-scheme: dark) { .linklike { color: var(--accent); } }

.signin-gate {
  background: var(--accent-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.signin-gate p { margin: .4rem 0; }
.signin-gate .cta {
  display: inline-block; background: var(--accent); color: var(--surface);
  border-radius: 6px; padding: .4rem 1rem; text-decoration: none;
  font-family: system-ui, sans-serif; font-size: .9rem; font-weight: 600;
  margin-right: .75rem;
}
@media (prefers-color-scheme: dark) { .signin-gate .cta { color: #10131a; } }

.auth-page { max-width: 26rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .8rem; }

/* --- verdict pills & badges --- */

.tally { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0 0; }
.pill, .badge {
  display: inline-block; border-radius: 999px; padding: .15rem .65rem;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: .78rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
}
.verdict-true    { background: var(--true-bg);   color: var(--true-fg); }
.verdict-partly_true { background: var(--partly-bg); color: var(--partly-fg); }
.verdict-misleading  { background: var(--mis-bg); color: var(--mis-fg); }
.verdict-false   { background: var(--false-bg);  color: var(--false-fg); }
.verdict-unverified  { background: var(--unver-bg); color: var(--unver-fg); }
.verdict-pending { background: var(--accent-soft); color: var(--accent); }

/* --- video page --- */

.video-header { margin-bottom: 1.5rem; }
.player {
  position: relative; aspect-ratio: 16/9; width: 100%;
  border-radius: var(--radius); overflow: hidden; background: #000;
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.verdict-summary {
  margin: 1.5rem 0 0; padding: 1.25rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.verdict-summary .summary { margin-top: 0; }
.provenance { margin-bottom: 0; }

.claim {
  border: 1px solid var(--border); border-left: 5px solid var(--border);
  border-radius: var(--radius); background: var(--surface);
  padding: 1.25rem; margin: 1rem 0;
}
.claim.verdict-true    { border-left-color: var(--true-fg); background: var(--surface); }
.claim.verdict-partly_true { border-left-color: var(--partly-fg); background: var(--surface); }
.claim.verdict-misleading  { border-left-color: var(--mis-fg); background: var(--surface); }
.claim.verdict-false   { border-left-color: var(--false-fg); background: var(--surface); }
.claim.verdict-unverified  { border-left-color: var(--unver-fg); background: var(--surface); }

.claim-header {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: .85rem;
}
.claim-header .timestamp { font-variant-numeric: tabular-nums; }
.claim-header .anchor { margin-left: auto; color: var(--muted); text-decoration: none; }

.quote {
  margin: .9rem 0; padding-left: 1rem;
  border-left: 2px solid var(--border); color: var(--muted); font-style: italic;
}
.claim-text { margin: .5rem 0; font-size: 1.05rem; }
.explanation { margin: .5rem 0 1rem; }

.sources summary {
  cursor: pointer; font-family: system-ui, sans-serif; font-size: .85rem; color: var(--muted);
}
.sources ul { margin: .6rem 0 0; padding-left: 1.1rem; }
.sources li { margin-bottom: .6rem; font-size: .95rem; }
.sources .publisher { color: var(--muted); font-size: .85rem; margin-left: .4rem; }
.sources .excerpt { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.confidence { margin: .5rem 0 0; }

.transcript { margin-top: 2.5rem; }
.transcript summary { cursor: pointer; font-family: system-ui, sans-serif; }
.transcript pre {
  white-space: pre-wrap; word-wrap: break-word;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; margin-top: .75rem; font-size: .9rem; line-height: 1.6;
  font-family: inherit; max-height: 30rem; overflow: auto;
}

/* --- forms & prose --- */

.form-page, .prose { max-width: 40rem; }
form { display: grid; gap: 1rem; margin: 1.5rem 0; }
label {
  display: grid; gap: .35rem;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: .9rem; font-weight: 600;
}
input, textarea {
  font: inherit; font-family: system-ui, sans-serif; font-weight: 400;
  padding: .6rem .7rem; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.required { color: var(--false-fg); }
.honeypot { position: absolute; left: -9999px; }
button {
  justify-self: start; font: inherit; font-family: system-ui, sans-serif; font-weight: 600;
  background: var(--accent); color: #fff; border: 0; border-radius: 6px;
  padding: .6rem 1.4rem; cursor: pointer;
}
button:disabled { opacity: .6; cursor: progress; }
@media (prefers-color-scheme: dark) { button { color: #10131a; } }

.form-status { font-family: system-ui, sans-serif; font-size: .9rem; margin: 0; }
.form-status.ok { color: var(--true-fg); }
.form-status.error { color: var(--false-fg); }

.prose li { margin-bottom: .5rem; }
.verdict-key { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1rem; align-items: baseline; }
.verdict-key dd { margin: 0; }
@media (max-width: 620px) {
  .verdict-key { grid-template-columns: 1fr; }
  .verdict-key dd { margin-bottom: .5rem; }
}

/* The fact-check a reader has running, on the submission page. */
.run-panel {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}
.run-panel h2 { margin: 0 0 .35rem; font-size: 1.05rem; }
.run-panel[data-status="done"] { border-left-color: var(--true-fg); }
.run-panel[data-status="failed"],
.run-panel[data-status="interrupted"] { border-left-color: var(--false-fg); }
.run-panel[data-status="cancelled"] { border-left-color: var(--muted); }
.run-detail { margin: 0 0 .5rem; }
.run-steps {
  /* The list grows while the check runs; cap it and scroll rather than push
     the cancel button off the screen. */
  max-height: 14rem;
  overflow-y: auto;
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}
.run-steps li { margin: .15rem 0; }
.run-actions { display: flex; gap: 1rem; align-items: center; margin: .75rem 0 0; }
.quota-note { color: var(--muted); }
