/* pcc tenant — PCC Foundation essay scoring demo. Navy and teal after the
   Foundation's letterhead; system fonts; no build step. */
:root {
  --navy: #0d1f3c;
  --navy-2: #1b3358;
  --teal: #00a0b0;
  --teal-soft: #d9f3f5;
  --ink: #1d2433;
  --muted: #5d6677;
  --line: #e1e5ec;
  --bg: #f6f7fa;
  --card: #ffffff;
  --warn: #b4530a;
  --warn-soft: #fff1e2;
  --up: #11773b;
  --down: #b42318;
  --mark: #fff2a8;
  --mark-on: #ffd84d;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--navy-2); }
code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; }
h1 { font-size: 1.6rem; margin: 0 0 0.3rem; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.strong { font-weight: 650; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--navy); color: #fff; padding: 0.8rem 1.5rem;
}
.brand { color: #fff; text-decoration: none; font-weight: 650; letter-spacing: 0.01em; }
.brand__mark { background: var(--teal); padding: 0.1rem 0.45rem; border-radius: 4px; margin-right: 0.25rem; }
.brand__sub { font-weight: 400; opacity: 0.75; margin-left: 0.5rem; }
.nav { display: flex; gap: 0.25rem; }
.nav a { color: #dfe6f2; text-decoration: none; padding: 0.35rem 0.75rem; border-radius: 6px; }
.nav a:hover { background: var(--navy-2); }
.nav a.on { background: var(--navy-2); color: #fff; }
.demo-band {
  background: var(--warn-soft); color: var(--warn); text-align: center;
  font-size: 0.82rem; padding: 0.3rem 1rem; border-bottom: 1px solid #f3d9bd;
}
main { max-width: 1240px; margin: 0 auto; padding: 1.75rem 1.5rem 4rem; }

.hero { margin-bottom: 1.5rem; }
.lead { color: var(--muted); max-width: 52rem; margin: 0.25rem 0 1rem; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.crumbs { font-size: 0.85rem; margin-bottom: 0.4rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1rem 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; }
.tile--bar { border-style: dashed; }
.tile__label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.tile__value { font-size: 1.6rem; font-weight: 650; margin: 0.2rem 0; font-variant-numeric: tabular-nums; }
.tile__foot { font-size: 0.85rem; color: var(--muted); }

.grid { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.grid th, .grid td { padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid th { background: #eef1f6; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); font-weight: 600; }
.grid tr:last-child td { border-bottom: 0; }
.grid .n { text-align: right; font-variant-numeric: tabular-nums; }
.ranking tr.tie--0 td { background: #f1fafb; }
.ranking tr.tie--1 td { background: #f7f4fd; }
.tiemark { font-size: 0.72rem; color: var(--teal); margin-left: 0.3rem; font-weight: 650; }
td.flag { color: var(--warn); font-weight: 650; }
td.up { color: var(--up); font-weight: 650; }
td.down { color: var(--down); font-weight: 650; }

.pill { display: inline-block; font-size: 0.75rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: #e7ebf2; color: var(--navy-2); vertical-align: middle; font-weight: 600; }
.pill--live { background: var(--teal-soft); color: #00727e; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

.callout { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 8px; padding: 0.9rem 1.1rem; margin: 1.5rem 0; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: 8px; padding: 1.25rem; color: var(--muted); }

.runpick select { font: inherit; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; max-width: 100%; }
.runpick label { font-size: 0.85rem; color: var(--muted); display: flex; gap: 0.5rem; align-items: center; }

.scorebox { display: flex; gap: 0.5rem; }
.scorebox div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.8rem; font-size: 1.4rem; font-weight: 650; text-align: center; min-width: 4.5rem; font-variant-numeric: tabular-nums; }
.scorebox span { display: block; font-size: 0.7rem; color: var(--muted); font-weight: 500; text-transform: uppercase; }
.scorebox__ai { border-color: var(--teal) !important; }

.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.5rem; margin-top: 1rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.essay { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.3rem; margin-bottom: 1rem; }
.essay h2 { margin-top: 0; }
.essay__text { white-space: pre-wrap; font-family: Georgia, "Iowan Old Style", serif; font-size: 1.02rem; line-height: 1.7; }
mark.ev { background: var(--mark); border-radius: 2px; padding: 0 1px; transition: background 0.15s; }
mark.ev--on { background: var(--mark-on); box-shadow: 0 0 0 2px var(--mark-on); }

.topic { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.85rem 1rem; margin-bottom: 0.75rem; }
.topic:hover { border-color: var(--teal); }
.topic__head { display: flex; justify-content: space-between; gap: 0.75rem; font-weight: 600; }
.topic__key { font: 0.75rem ui-monospace, Menlo, monospace; background: #eef1f6; padding: 0.05rem 0.35rem; border-radius: 4px; color: var(--muted); }
.topic__scores { display: flex; gap: 0.35rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.topic__scores span { font-size: 0.82rem; background: #eef1f6; padding: 0.1rem 0.45rem; border-radius: 5px; }
.topic__scores .ai { background: var(--teal-soft); color: #00646e; font-weight: 700; }
.topic__scores .ai--outside { background: var(--warn-soft); color: var(--warn); }
.topic__level { font-size: 0.88rem; margin: 0.55rem 0 0.3rem; }
.topic__why { margin: 0.3rem 0; }
blockquote { margin: 0.5rem 0 0; padding: 0.4rem 0.75rem; border-left: 3px solid var(--mark-on); background: #fffbe6; font-family: Georgia, serif; font-size: 0.92rem; }

.guidance textarea { width: 100%; font: 0.95rem/1.5 ui-monospace, Menlo, monospace; padding: 0.75rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.guidance .note { display: block; margin-top: 0.6rem; font-size: 0.85rem; color: var(--muted); }
.guidance .note input { display: block; width: 100%; margin-top: 0.25rem; font: inherit; font-size: 0.95rem; padding: 0.5rem; border: 1px solid var(--line); border-radius: 6px; }
.actions { margin-top: 0.75rem; }
button { font: inherit; font-weight: 600; background: var(--navy); color: #fff; border: 0; border-radius: 7px; padding: 0.55rem 1.1rem; cursor: pointer; }
button:disabled { opacity: 0.6; cursor: default; }
.guidance-text { white-space: pre-wrap; font-size: 0.88rem; margin: 0.6rem 0 0; }

.essay-prompt { margin-top: 2rem; color: var(--navy-2); }
.rtopic { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1.1rem; margin-bottom: 0.9rem; }
.rtopic h4 { margin: 0 0 0.6rem; }
.levels { display: grid; gap: 0.5rem; }
.level { display: grid; grid-template-columns: 2rem 1fr; gap: 0.6rem; font-size: 0.9rem; }
.level__score { font-weight: 700; font-size: 1.1rem; color: var(--teal); text-align: center; }
.level__alt { background: var(--teal-soft); padding: 0.25rem 0.5rem; border-radius: 4px; margin-top: 0.3rem; font-size: 0.85rem; }
.level ul { margin: 0.3rem 0 0; padding-left: 1.1rem; color: var(--muted); }

.progress { height: 8px; background: #e7ebf2; border-radius: 999px; overflow: hidden; margin-top: 0.75rem; }
.progress__bar { height: 100%; background: var(--teal); transition: width 0.4s; }
.chg { font: 0.8rem ui-monospace, Menlo, monospace; background: #eef1f6; padding: 0.05rem 0.35rem; border-radius: 4px; }

/* sign-in (shared template) */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 2rem; max-width: 30rem; margin: 2rem auto; }
.signin-form label { display: block; font-size: 0.9rem; color: var(--muted); }
.signin-form input { display: block; width: 100%; font: inherit; padding: 0.6rem; border: 1px solid var(--line); border-radius: 7px; margin: 0.3rem 0 0.9rem; }
.banner { padding: 0.75rem 1rem; border-radius: 8px; margin: 1rem 0; }
.banner-ok { background: var(--teal-soft); }
.banner-err { background: #fde8e7; color: var(--down); }
