/* Piedmont Society — shared base styles (tokens, reset, chrome, forms).
   Page-specific styles stay inline in each page's <style>.
   Contrast (dev-tools/contrast.js): --gold-text 4.74:1 and --muted 5.43:1 on
   --paper; --field 3.49:1 (non-text 3:1); focus rings >= 8:1. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/fraunces-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #faf8f4;
  --ink: #1c1a17;
  --copy: #46423c;
  --pine: #0f2340;
  --pine-deep: #0a1a2e;
  --gold: #a8833c;        /* decorative only: rules, borders, large display text */
  --gold-text: #8a6a2c;   /* gold for small text on paper/white (>= 4.5:1) */
  --gold-light: #d9b978;  /* gold text on navy */
  --hairline: #e4ded2;    /* decorative dividers */
  --field: #8c8476;       /* form-control borders (>= 3:1) */
  --muted: #6b655d;
  --placeholder: #736d64;
  --ok: #2c6e49;
  --err: #a03030;
  --warn: #8a5424;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--body); background: var(--paper); color: var(--ink);
  line-height: 1.65; font-size: 17px; -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--pine); color: #fff; }

/* ---------- focus ---------- */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 3px; }
.on-dark :focus-visible, .topbar :focus-visible, footer :focus-visible { outline-color: var(--gold-light); }

/* ---------- utilities ---------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: #fff; color: var(--pine); padding: 10px 18px; font-size: 15px; font-weight: 500;
  text-decoration: none; border: 2px solid var(--pine);
}
.skip-link:focus, .skip-link:focus-visible { top: 12px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-text); }

/* ---------- top bar (portal + history) ---------- */
.topbar { background: var(--pine); padding: 16px 0; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.topbar .brand { font-family: var(--display); font-size: 16px; color: #e9e4da; text-decoration: none; }
.topbar nav { display: flex; align-items: center; gap: 4px 22px; flex-wrap: wrap; }
.navlink {
  display: inline-block; padding: 5px 0 3px; line-height: 1.3;
  color: var(--gold-light); text-decoration: none; background: none; border: none; cursor: pointer;
  font-family: var(--body); font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  border-bottom: 1px solid rgba(217,185,120,.45); border-radius: 0;
  transition: color .2s, border-color .2s;
}
.navlink:hover { color: #fff; border-color: #fff; }

/* ---------- footer ---------- */
footer { background: var(--pine); color: #b4c2ce; padding: 36px 0; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 32px; align-items: baseline; justify-content: space-between; }
footer .name { font-family: var(--display); font-size: 17px; color: #e9e4da; }
footer .fine { font-size: 13px; letter-spacing: .04em; }
footer a { color: var(--gold-light); text-decoration: none; display: inline-block; padding: 3px 0; }
footer a:hover { text-decoration: underline; }

/* ---------- forms ---------- */
.field { margin-bottom: 28px; }
label, .label { display: block; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.input,
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=url] {
  width: 100%; min-height: 44px; padding: 8px 0 10px; border: none; border-bottom: 1px solid var(--field);
  border-radius: 0; background: transparent; font-family: var(--body); font-size: 18px; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder { color: var(--placeholder); opacity: 1; }
input:focus { border-bottom-color: var(--pine); box-shadow: 0 1px 0 0 var(--pine); }
input:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
input[aria-invalid=true] { border-bottom-color: var(--err); }
select {
  min-height: 40px; padding: 0 48px 0 12px; border: 1px solid var(--field); border-radius: 0; color: var(--ink);
  -webkit-appearance: none; appearance: none; min-width: 160px; cursor: pointer;
  /* own chevron, pinned near the right edge (the native arrow sits right against the text) */
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230f2340' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
}
select:disabled { cursor: default; opacity: .6; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--pine); flex: none; cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer;
  font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink); margin: 0; font-weight: 400; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; letter-spacing: 0; text-transform: none; }
.field-error { font-size: 13.5px; color: var(--err); margin-top: 6px; }

/* ---------- buttons ---------- */
.btn, .submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 14px 32px; background: var(--pine); color: #fff; border: 1px solid var(--pine);
  border-radius: 0; text-decoration: none; cursor: pointer;
  font-family: var(--body); font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.submit { width: 100%; margin-top: 8px; }
.btn:hover, .submit:hover { background: var(--pine-deep); }
.btn.secondary { background: transparent; color: var(--pine); border-color: var(--field); }
.btn.secondary:hover { border-color: var(--pine); background: #fff; }
.btn.small { min-height: 36px; padding: 6px 16px; font-size: 11px; letter-spacing: .14em; }
.btn[disabled], .submit[disabled] { opacity: .6; cursor: default; }
.link-btn {
  display: inline-block; min-height: 24px; padding: 3px 0; background: none; border: none; border-radius: 0; cursor: pointer;
  font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold-text); border-bottom: 1px solid rgba(138,106,44,.45); text-decoration: none;
}
.link-btn:hover { color: var(--pine); border-color: var(--pine); }
.link-btn[disabled] { opacity: .5; cursor: default; }

/* ---------- status messages ---------- */
.status { margin-top: 16px; font-size: 15.5px; min-height: 24px; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
.status.info { color: var(--copy); }
.notice {
  margin-top: 24px; padding: 18px 22px; background: #fff; border: 1px solid var(--hairline); border-left: 3px solid var(--gold);
  font-size: 15.5px; color: var(--copy);
}
.notice.err { border-left-color: var(--err); }
.notice.ok { border-left-color: var(--ok); }
.notice strong { color: var(--pine); font-weight: 500; }

/* ---------- portal page furniture ---------- */
.page-title { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 4vw, 40px); color: var(--pine); margin-top: 14px; line-height: 1.15; }
.page-title:focus { outline: none; }
.sub { margin-top: 12px; color: var(--muted); font-size: 15.5px; }
.narrow { max-width: 480px; margin: 0 auto; padding: 72px 24px 96px; }
.narrow form { margin-top: 36px; }
main:focus { outline: none; }

@media (max-width: 860px) {
  .wrap { padding: 0 20px; }
  .narrow { padding: 48px 20px 72px; }
  .eyebrow { letter-spacing: .18em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
