/* Client portal styles.
 *
 * One stylesheet, no framework and no JavaScript, because the Content Security
 * Policy is default-src 'none' and the pages are printed as often as they are
 * read: a client's management sees this in a board pack.
 */

:root {
  --ink: #16202c;
  --ink-muted: #5b6b7c;
  --line: #dfe5ec;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --accent: #0b6b5c;
  --error: #a12222;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }

.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { font-weight: 600; letter-spacing: 0.01em; }
.header-right { display: flex; align-items: center; gap: 14px; }
.who { color: var(--ink-muted); font-size: 14px; }

main.wrap { padding-top: 28px; padding-bottom: 48px; }

h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 19px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 22px 0 8px; }
p { margin: 0 0 12px; }

.muted { color: var(--ink-muted); }
.small { font-size: 14px; }
.period { margin-bottom: 22px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}
.card-narrow { max-width: 420px; margin: 40px auto; }

label { display: block; font-size: 14px; margin: 14px 0 4px; }
input[type="email"], input[type="password"] {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

button.primary {
  margin-top: 18px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}
button.linkish {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}
.inline-form { display: inline; margin: 0; }

.error {
  background: #fdeeee;
  border: 1px solid #f0c4c4;
  border-radius: 6px;
  color: var(--error);
  padding: 10px 12px;
  font-size: 14px;
}

a { color: var(--accent); }
.back { font-size: 14px; text-decoration: none; }
.report-list { list-style: none; margin: 18px 0 0; padding: 0; }
.report-link { font-size: 17px; font-weight: 600; text-decoration: none; }

.headline { display: flex; flex-wrap: wrap; gap: 22px; margin: 0 0 18px; }
.stat { min-width: 120px; }
.stat dt { font-size: 13px; color: var(--ink-muted); margin: 0; }
.stat dd { margin: 2px 0 0; font-size: 22px; font-weight: 600; }
.stat dd.delta { font-size: 13px; font-weight: 400; color: var(--ink-muted); }

.chart { margin: 18px 0; padding: 0; overflow-x: auto; }
.chart svg { max-width: 100%; height: auto; }

.posts { list-style: none; margin: 0; padding: 0; }
.posts li { border-top: 1px solid var(--line); padding: 14px 0; }
.post-text { white-space: pre-wrap; margin-bottom: 4px; }

.notes { margin: 14px 0 0; padding-left: 18px; }
.method li { margin-bottom: 6px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 18px 0 40px;
  color: var(--ink-muted);
  font-size: 13px;
}

@media print {
  .site-header form, .back { display: none; }
  body { background: #fff; }
  .card { break-inside: avoid; border-color: #ccc; }
}
