/* ERA quarterly reviews. Palette from ERA's brand (site + logo); Lexend for readability. */
:root {
  --ink: #102740;
  --ink-2: #33475c;
  --mute: #5b6878;
  --line: #e3e7ee;
  --band: #f4f7fb;
  --paper: #ffffff;
  --blue: #1f4dad;
  --blue-dk: #163a85;
  --green: #5baa34;
  --green-text: #3b7a1e;
  --green-bg: #eef7e8;
  --amber: #b45309;
  --amber-bg: #fdf3e6;
  --radius: 6px;
  --font: "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.55; font-weight: 400;
}
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dk); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--mute); font-size: .92rem; }
.bad { color: var(--amber); }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- header */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top__inner { max-width: 1060px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.05rem; margin-right: auto; }
.brand img { display: block; }
.top__nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: .95rem; }
.top__nav a { text-decoration: none; }
.top__nav a:hover { text-decoration: underline; }
.inline { display: inline; margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; }
.linklike:hover { text-decoration: underline; }
.linklike--bad { color: var(--amber); }
.qswitch { position: relative; }
.qswitch summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 999px; padding: 3px 14px; font-weight: 500; }
.qswitch summary::-webkit-details-marker { display: none; }
.qswitch summary::after { content: ""; display: inline-block; margin-left: 8px; border: 5px solid transparent; border-top-color: var(--ink); transform: translateY(2px); }
.qswitch ul { position: absolute; right: 0; top: calc(100% + 6px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  list-style: none; margin: 0; padding: 6px 0; min-width: 140px; z-index: 5; }
.qswitch li a { display: block; padding: 6px 14px; }
.qswitch li a[aria-current] { font-weight: 600; }

/* ---------- page lead */
main.wrap { padding-top: 28px; padding-bottom: 24px; }
.lead { margin-bottom: 28px; max-width: 70ch; }
.lead__period { color: var(--ink-2); font-size: 1.02rem; }

/* ---------- groups */
.group { margin: 0 0 44px; }
.group__head { max-width: 70ch; margin-bottom: 14px; }
.group__head p, .group__note { color: var(--ink-2); font-size: .97rem; }
.group__more { margin-top: 10px; font-size: .95rem; }
.group--admin { background: var(--band); padding: 16px 18px; border-radius: var(--radius); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; }
.split--why { margin-bottom: 36px; }
.split__title { font-size: 1.02rem; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 2px solid currentColor; }
.split__title--good { color: var(--green-text); }
.split__title--work { color: var(--amber); }

/* ---------- top / bottom lists */
.standout { list-style: none; margin: 0; padding: 0; }
.standout__row { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.standout__row:last-child { border-bottom: 0; }
.standout__name { margin: 2px 0 4px; font-size: 1.12rem; font-weight: 600; }
.standout__name a { color: var(--ink); text-decoration: none; }
.standout__name a:hover { color: var(--blue); text-decoration: underline; }
.standout__rank { font-weight: 400; font-size: .88rem; color: var(--mute); margin-left: 6px; }

.reasons { list-style: none; margin: 0; padding: 0; font-size: .95rem; color: var(--ink-2); }
.reasons li { position: relative; padding-left: 16px; margin: 3px 0; }
.reasons li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; }
.reasons--good li::before { background: var(--green); }
.reasons--work li::before { background: var(--amber); }

.compact { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 8px 32px; }
.compact li { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; padding: 8px 0; }
.compact__name { margin: 0; font-weight: 600; }
.compact__name a { color: var(--ink); text-decoration: none; }
.compact__why { margin: 0; font-size: .9rem; color: var(--ink-2); }

.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts li:last-child { border-bottom: 0; }
.facts__name { margin: 0 0 2px; font-weight: 600; }
.facts__name a { color: var(--ink); text-decoration: none; }
.facts__nums { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: .94rem; color: var(--ink-2); }
.facts__nums strong { color: var(--ink); font-weight: 600; }

/* ---------- score ring (ERA's circular arrow) */
.ring { display: block; flex: none; }
.ring__track { stroke: var(--line); }
.ring__num { fill: var(--ink); font-family: var(--font); font-weight: 600; }
.ring--sm .ring__num { font-size: 15px; }
.ring--md .ring__num { font-size: 20px; }
.ring--lg .ring__num { font-size: 36px; }

/* ---------- tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-weight: 500; color: var(--mute); font-size: .84rem; border-bottom: 2px solid var(--line); vertical-align: bottom; }
tbody th { font-weight: 500; }
tbody th a { color: var(--ink); }
.num { text-align: right; white-space: nowrap; }
thead th.num { white-space: normal; min-width: 5.5em; }
tbody th { white-space: nowrap; }
tfoot td, tfoot th { color: var(--mute); border-bottom: 0; }
tr.is-top > * { background: var(--green-bg); }
tr.is-bottom > * { background: var(--amber-bg); }
tr.is-lead > *, tr.is-off > * { color: var(--mute); }
.team { margin: 22px 0 6px; font-size: 1.05rem; }
.team__pace { font-weight: 400; color: var(--mute); font-size: .88rem; margin-left: 8px; }
.wrapcell { white-space: normal; max-width: 28ch; }
.weights { margin: 10px 0 16px; }

/* ---------- person page */
.who { display: flex; gap: 24px; align-items: center; margin-bottom: 32px; flex-wrap: wrap; }
.who__text h1 { margin-bottom: .2em; }
.who__line { color: var(--ink-2); margin: 0; }
.who__prev { color: var(--mute); margin: 4px 0 0; font-size: .95rem; }
.build td, .build th { vertical-align: middle; }
.bar { position: relative; display: inline-block; width: 140px; height: 8px; background: var(--band); border-radius: 4px; vertical-align: middle; overflow: hidden; }
.bar__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.bar__fill--good { background: var(--green); }
.bar__fill--work { background: var(--amber); }
.bar__mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--ink); opacity: .35; }
.bar__num { display: inline-block; min-width: 2.2em; text-align: right; margin-left: 8px; }
.sum { margin-top: 10px; }
.nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 32px; margin: 0; }
.nums div { border-top: 1px solid var(--line); padding-top: 8px; }
.nums dt { color: var(--mute); font-size: .88rem; }
.nums dd { margin: 0; font-size: 1.25rem; font-weight: 600; }
.nums dd span { display: block; font-size: .85rem; font-weight: 400; color: var(--mute); }
.att-sum { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: .94rem; color: var(--ink-2); margin: 4px 0 10px; }
.att-sum strong { color: var(--ink); }
.att { max-width: 640px; }
.days { list-style: none; margin: 8px 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.days li { border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: .9rem; }
.days time { font-weight: 500; margin-right: 4px; }

/* ---------- prose (how it works) */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .35em 0; }

/* ---------- notes, logs */
.notes { margin: 0 0 16px; padding-left: 1.2em; font-size: .94rem; }
.notes__warn { color: var(--amber); }
.log { background: var(--band); padding: 12px; border-radius: var(--radius); overflow-x: auto; font-size: .85rem; white-space: pre-wrap; }

/* ---------- forms and buttons */
.btn { display: inline-block; background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: var(--radius);
  padding: 10px 20px; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-dk); color: #fff; }
.btn--quiet { background: var(--paper); color: var(--blue); }
.btn--quiet:hover { background: var(--band); color: var(--blue-dk); }
.btn--small { padding: 4px 12px; font-size: .9rem; }
.formrow { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; }
.formrow--tight { gap: 6px 10px; align-items: center; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--ink-2); }
label.check { flex-direction: row; align-items: center; gap: 8px; }
input, select, textarea { font: inherit; font-size: .95rem; color: var(--ink); border: 1px solid #c9d1dc; border-radius: var(--radius); padding: 7px 10px; background: var(--paper); }
.stack { display: grid; gap: 16px; max-width: 640px; }
.hint { font-size: .82rem; color: var(--mute); }
.flash { padding: 10px 14px; border-radius: var(--radius); margin: 0 0 18px; font-size: .95rem; }
.flash--ok { background: var(--green-bg); color: var(--green-text); }
.flash--error { background: var(--amber-bg); color: var(--amber); }

/* ---------- sign in */
.signin { max-width: 420px; margin: 8vh auto 0; text-align: center; }
.signin img { margin: 0 auto 18px; display: block; }
.signin .btn { margin-top: 8px; }
.devlogin { margin-top: 32px; display: grid; gap: 8px; text-align: left; border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- footer */
.foot { color: var(--mute); font-size: .82rem; padding-top: 18px; padding-bottom: 32px; border-top: 1px solid var(--line); }

@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  .split { grid-template-columns: 1fr; }
  .top__nav { gap: 12px; font-size: .9rem; }
  .brand span { font-size: .98rem; }
  .who { gap: 16px; }
  .bar { width: 90px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .top, .foot, .skip { display: none; } }
