/* Splitly — editorial theme in the project palette. Every color earns its place. */
:root {
  --bg: #FFFFFF;
  --panel: #ffffff;
  --ink: #0B1A39;        /* headings, deep navy */
  --text: #3E4A63;       /* body, slate */
  --muted: #6f7a90;
  --line: #D7E6F7;       /* borders, pale blue */
  --primary: #208FEB;    /* actions + links */
  --river: #6AAFEF;      /* walk category */
  --accent: #22934F;     /* run category */
  --mint: #EAF7EF;
  --peach: #FEEFE4;      /* status surface */
  --lav: #F1F1F9;        /* reference-output surface */
  --coral: #FE483D;      /* errors only */
  --radius: 10px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; letter-spacing: 0; }
h1 { font-size: 2.4rem; margin: 0.4em 0 0.35em; }
h2 { font-size: 1.5rem; margin: 0 0 0.5em; }
h3 { font-size: 1.1rem; margin: 1.8em 0 0.6em; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--lav); padding: 0.1em 0.35em; border-radius: 4px; }

/* header */
.site-header {
  display: flex; align-items: baseline; gap: 1.5rem;
  max-width: 1080px; margin: 0 auto; padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.wordmark { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.site-header nav { display: flex; gap: 1.1rem; margin-right: auto; }
.site-header nav a, .site-footer nav a { color: var(--primary); text-decoration: none; font-size: 0.95rem; }
.site-header nav a:hover, .site-footer nav a:hover { color: var(--ink); text-decoration: underline; }
.header-actions { display: flex; gap: 0.4rem; }
.text-btn { background: none; border: 0; color: var(--text); font: inherit; font-size: 0.95rem; cursor: pointer; padding: 0.3rem 0.5rem; }
.text-btn:hover { color: var(--ink); text-decoration: underline; }

/* hero */
.hero {
  max-width: 1080px; margin: 0 auto; padding: 3.5rem 1.5rem 3rem;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: start;
}
.kicker { color: var(--muted); font-size: 0.95rem; margin: 0; }
.lede { font-size: 1.1rem; max-width: 34rem; }
.hero-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.btn-primary {
  background: var(--primary); color: #fff; border: 1px solid var(--primary);
  font: inherit; font-size: 1rem; padding: 0.65rem 1.3rem; border-radius: var(--radius); cursor: pointer;
}
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.weight { color: var(--muted); font-size: 0.95rem; }
.weight input { width: 4.5rem; font: inherit; padding: 0.3rem 0.4rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text); }
.weight input:focus, .ask-row input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.status { font-size: 0.95rem; margin-top: 1rem; background: var(--peach); border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.8rem; color: var(--text); max-width: 34rem; }
.status.error { background: #fff; border-color: var(--coral); color: var(--coral); }

/* session panel: the working surface, bordered not shadowed */
.session-panel {
  background: var(--mint); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.session-panel.over { border-color: var(--primary); }
.panel-head { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
#rc-file { font-weight: 600; overflow-wrap: anywhere; }
.stat-list { margin: 0; padding: 0.4rem 0; }
.stat-list > div { display: flex; justify-content: space-between; align-items: baseline; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.stat-list > div:last-child { border-bottom: 0; }
.stat-list dt { color: var(--muted); }
.stat-list dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.proportion { display: flex; height: 12px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-top: 0.8rem; background: var(--bg); }
.proportion-empty { font-size: 0.85rem; color: var(--muted); padding: 1rem; }
.rc-seg-run { background: var(--accent); }
.rc-seg-walk { background: var(--river); }
.proportion-legend { display: flex; gap: 1.2rem; font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.sw { display: inline-block; width: 0.7em; height: 0.7em; border-radius: 2px; margin-right: 0.35em; }
.sw.run { background: var(--accent); }
.sw.walk { background: var(--river); }

/* sections */
.section { max-width: 1080px; margin: 0 auto; padding: 2rem 1.5rem; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.section-head h2 { margin: 0; }
.btn-ghost {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  font: inherit; font-size: 0.9rem; padding: 0.45rem 0.9rem; border-radius: 8px; cursor: pointer;
  white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--ink); }
.prose { max-width: 44rem; }
.data-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); }
.data-table thead th { color: var(--muted); font-weight: 600; font-size: 0.9rem; border-bottom: 1px solid var(--ink); }
.seg-list { margin: 0; padding-left: 1.4rem; font-variant-numeric: tabular-nums; }
.seg-list li { padding: 0.2rem 0; }
.report {
  font-family: var(--mono); font-size: 0.85rem; line-height: 1.7;
  background: var(--lav); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem; white-space: pre-wrap; overflow-x: auto;
}

/* ask */
.ask-row { display: flex; gap: 0.6rem; max-width: 44rem; }
.ask-row input { flex: 1; font: inherit; padding: 0.65rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.answer { max-width: 44rem; margin-top: 1rem; border-left: 3px solid var(--primary); padding: 0.2rem 0 0.2rem 1rem; }

/* footer + legal */
.site-footer {
  max-width: 1080px; margin: 0 auto; padding: 1.5rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--muted); font-size: 0.9rem;
}
.site-footer nav { display: flex; gap: 1.1rem; }
.legal { max-width: 44rem; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.legal p { margin: 0 0 1em; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.2rem; }
  h1 { font-size: 1.9rem; }
  .site-header nav { display: none; }
}
