/* Juna design tokens — from design/handover HANDOVER.md "Visual system" */
:root {
  --ground: #f3f5f7;
  --ground-chat: #e9edf1;
  --surface: #ffffff;
  --ink: #111418;
  --muted: #4b5563;
  --line: #dfe4ea;
  --line-input: #c9d1da;
  --line-row: #eef1f5;
  --accent: #1f4fd8;
  --accent-hover: #163ca6;
  --accent-tint: #e8eefc;
  --bubble-out: #dbe6ff;
  --fresh: #166534;
  --fresh-bg: #e8f5ec;
  --fresh-dot: #16a34a;
  --warn: #9a3412;
  --warn-bg: #fff7ed;
  --warn-val: #b45309;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--ground);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, .display { font-family: var(--font-display); letter-spacing: -0.02em; }
button { font-family: inherit; cursor: pointer; }

/* photo placeholder (until real media) */
.ph {
  background: #e3e8ee;
  background-image: repeating-linear-gradient(135deg, rgba(17,20,24,0.06) 0 2px, transparent 2px 14px);
  display: flex; align-items: center; justify-content: center;
  color: #3f4854; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
}
.photo { background-size: cover; background-position: center; }

/* provenance chip */
.src {
  font-family: var(--font-mono); font-size: 10px; padding: 2px 6px;
  border-radius: 4px; background: var(--line-row); color: #3f4854; white-space: nowrap;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 18px; border-radius: 8px; border: none;
  font-size: 15px; font-weight: 600; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 6px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: default; }

/* inputs */
.in {
  height: 48px; border: 1.5px solid var(--ink); border-radius: 8px; padding: 0 14px;
  font-family: inherit; font-size: 16px; color: var(--ink); outline: none; width: 100%;
  background: var(--surface);
}
.in-soft { border: 1px solid var(--line-input); border-width: 1px; }
textarea.in { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.mono { font-family: var(--font-mono); }

/* cards */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px;
}
.card-shadow { box-shadow: 0 1px 2px rgba(17,20,24,0.06); }

/* chips */
.chip {
  height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line-input);
  background: var(--surface); font-size: 13px; font-weight: 500; color: var(--ink);
}
.chip.on { border-color: var(--ink); background: var(--ink); color: #fff; }

/* readback row */
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line-row); font-size: 14px;
}
.row:last-child { border-bottom: none; }

/* freshness */
.fresh-line { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--fresh); }
.fresh-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--fresh-dot); }

/* tags */
.tag { padding: 3px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.tag-direct { background: var(--accent-tint); color: var(--accent); }
.tag-plain { background: var(--line-row); color: #3f4854; }

/* layout helpers */
.page { max-width: 1280px; margin: 0 auto; padding: 0 48px; }
.stack { display: flex; flex-direction: column; }
@media (max-width: 720px) {
  .page { padding: 0 16px; }
}
