/* The PM Data Standard — one stylesheet. Document restraint. */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Satoshi";
  src: url("/fonts/Satoshi-Regular.woff2") format("woff2"),
       url("/fonts/Satoshi-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("/fonts/Satoshi-Medium.woff2") format("woff2"),
       url("/fonts/Satoshi-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("/fonts/Satoshi-Bold.woff2") format("woff2"),
       url("/fonts/Satoshi-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #F7F8F8;
  --well: #EDEEF1;
  --ink: #25272C;
  --ink-2: #5A616F;
  --blue: #002A87;
  --blue-hover: #003CB0;
  --sun: #F7B506;
  --rule: #D8DBDF;
  --sans: "Satoshi", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.7;
}
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.quiet { color: var(--ink-2); font-size: 0.92rem; }
.optional { color: var(--ink-2); font-weight: 400; }

h1, h2, h3 { font-weight: 700; color: var(--blue); line-height: 1.2; }
h2 { font-size: 1.75rem; margin: 0 0 1.25rem; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }

.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: calc(68ch + 48px); }

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.section { padding: 4.5rem 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--blue); color: #fff; padding: 0.5rem 1rem;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 0.9rem; padding-bottom: 0.9rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-name { font-weight: 700; color: var(--blue); letter-spacing: 0.01em; }
.site-header nav { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.site-header nav a:hover { text-decoration: underline; }
.nav-cta {
  border: 1px solid var(--blue); border-radius: 8px; padding: 0.3rem 1rem;
}
.nav-cta:hover { background: var(--blue); color: #fff !important; text-decoration: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 1rem;
  border-radius: 8px; padding: 0.7rem 1.6rem; cursor: pointer;
  text-decoration: none; transition: background-color 120ms ease, color 120ms ease;
}
.btn-primary { background: var(--blue); color: #fff; border: 1px solid var(--blue); }
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }
.btn-secondary { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn-secondary:hover { color: var(--blue-hover); border-color: var(--blue-hover); }
.btn-small { font-size: 0.85rem; padding: 0.35rem 0.9rem; }
.btn-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2.25rem; }

/* ---------- Ask your vendors ---------- */
.ask-email { background: #fff; border: 1px solid #DDDFE3; border-radius: 8px; padding: 1.25rem; margin-top: 1.25rem; }
.ask-email-text {
  white-space: pre-wrap; font-family: inherit; font-size: 0.95rem; line-height: 1.6;
  color: #25272C; margin: 0 0 1rem; border-left: 3px solid #002A87; padding-left: 1rem;
}

/* ---------- Status chips & register ---------- */
.chip {
  display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; white-space: nowrap;
}
.chip-aligned { background: #1E7F4F; color: #fff; }
.chip-partial { background: #F7B506; color: #25272C; }
.chip-pending { background: #fff; color: #6B6E76; border: 1px solid #C9CBD1; }

.register { border-top: 1px solid #DDDFE3; }
.register-row { border-bottom: 1px solid #DDDFE3; padding: 1.1rem 0; }
.register-main { display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap; }
.register-name { font-weight: 700; font-size: 1.05rem; }
.register-cat { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: #6B6E76; }
.register-deadline, .register-reviewed { font-size: 0.75rem; }
.register-date { font-size: 0.85rem; }
.register-links { margin-left: auto; display: flex; gap: 0.9rem; white-space: nowrap; }
.register-annotation { font-size: 0.75rem; color: #6B6E76; margin: 0.45rem 0 0; display: flex; align-items: center; gap: 6px; }
.annotation-seal { display: inline-flex; }
.register-detail { margin-top: 0.6rem; }
.register-detail summary { cursor: pointer; font-size: 0.8rem; color: #002A87; }
.checklist { list-style: none; padding: 0.6rem 0 0; margin: 0; }
.checklist li { padding: 0.3rem 0; }
.check { display: inline-block; width: 1.2em; font-weight: 700; }
.check-met { color: #1E7F4F; }
.check-unmet { color: #9A9DA5; }
.rationale { margin: 0.25rem 0 0 2rem; font-size: 0.9rem; color: #4A4D54; }
.rationale .mono { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #6B6E76; }

/* ---------- Admin review screen ---------- */
.review-row { border: 1px solid #DDDFE3; border-radius: 8px; padding: 1rem; margin: 1rem 0; }
.review-row legend { font-weight: 700; padding: 0 0.4rem; }
.inline-radio { margin-right: 1.2rem; font-size: 0.95rem; }
.review-audit { border-left: 3px solid #DDDFE3; padding-left: 1rem; margin: 1rem 0; }
#status-preview { color: #002A87; }

/* ---------- Invite banner ---------- */
.invite-banner { background: #002A87; color: #fff; padding: 1rem 0; }
.invite-banner-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.invite-banner-seal { flex: 0 0 auto; display: flex; }
.invite-banner p { margin: 0; flex: 1 1 auto; font-size: 1rem; }
.invite-banner a { color: #fff; text-decoration: underline; }
.btn-banner {
  background: #F7B506; color: #25272C; border: none; text-decoration: none !important;
  padding: 0.55rem 1.1rem; border-radius: 6px; font-weight: 600; white-space: nowrap;
}
.btn-banner:hover { filter: brightness(1.05); }

/* ---------- Invite tool ---------- */
.invite-counter { letter-spacing: 0.04em; margin: -0.5rem 0 1.5rem; }
.invite-actions { margin-top: 1.25rem; }

/* ---------- Hero ---------- */
.hero { padding: 6.5rem 0 5.5rem; }
.eyebrow {
  font-size: 0.8rem; letter-spacing: 0.14em; color: var(--ink-2); margin: 0 0 2rem;
}
.hero-title {
  font-size: clamp(2.4rem, 5.2vw, 3.8rem); margin: 0 0 1.25rem; color: var(--blue);
  font-weight: 600;
}
.hero-motto {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-style: italic; color: var(--ink);
  margin: 0 0 1.5rem;
}
.underline-accent {
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 4px;
  text-underline-offset: 10px;
}
.hero-sub { max-width: 58ch; margin: 0 auto; color: var(--ink); }

/* ---------- Clauses ---------- */
.clauses { list-style: none; margin: 2.5rem 0 0; padding: 0; }
.clause {
  display: grid; grid-template-columns: 3.5rem 1fr; gap: 1.25rem;
  padding: 1.75rem 0; border-top: 1px solid var(--rule);
}
.clause:last-child { border-bottom: 1px solid var(--rule); }
.clause-num { color: var(--blue); font-size: 1.1rem; padding-top: 0.2rem; }
.clause-lead { font-weight: 700; font-size: 1.15rem; margin: 0 0 0.3rem; color: var(--blue); }
.clause p:last-child { margin: 0; }
.pull-quote {
  font-style: italic; font-size: 1.5rem; text-align: center;
  margin: 3.5rem auto; max-width: 34ch; color: var(--ink); border: 0;
}

/* ---------- Ledger ---------- */
.ledger-wrap { overflow-x: auto; margin: 2rem 0 1rem; }
.ledger { width: 100%; border-collapse: collapse; }
.ledger th {
  text-align: left; font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2);
  font-weight: 500; padding: 0 1rem 0.6rem 0; border-bottom: 1px solid var(--ink);
}
.ledger td {
  padding: 1.1rem 1rem 1.1rem 0; border-bottom: 1px solid var(--rule); vertical-align: top;
}
.ledger-name { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.ledger-cat { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.ledger-date { font-size: 0.85rem; white-space: nowrap; }
.date-mark {
  display: inline-block; width: 9px; height: 9px; background: var(--sun);
  margin-right: 0.6rem; border-radius: 1px; vertical-align: baseline;
}
.ledger-link a { font-size: 0.9rem; text-decoration: none; }
.ledger-link a:hover { text-decoration: underline; }

/* ---------- Sign form ---------- */
.sign-form { margin-top: 2rem; background: var(--well); padding: 2rem; border: 1px solid var(--rule); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field.wide { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.field input, .field select, .field textarea, .admin-table input, .admin-table select {
  font-family: var(--sans); font-size: 1rem; font-weight: 500; color: var(--ink);
  background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 0.6rem 0.75rem;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 0; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.attest-label { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft, #5A616F); cursor: pointer; }
.attest-label input[type="checkbox"] { margin-top: 3px; flex: 0 0 auto; width: 16px; height: 16px; accent-color: #002A87; }
.form-note { margin-top: 12px; }
.form-error { color: #8a1f11; font-weight: 700; }

/* ---------- Email template ---------- */
.email-template { border: 1px solid var(--ink); background: #fff; margin-top: 2rem; }
.email-template-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6rem 1rem; border-bottom: 1px solid var(--rule);
  font-size: 0.72rem; letter-spacing: 0.12em; color: var(--ink-2);
}
.email-template pre {
  margin: 0; padding: 1.25rem; font-size: 0.85rem; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; font-weight: 700; padding: 1.1rem 0; color: var(--blue);
  list-style: none; position: relative; padding-right: 2rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 1rem;
  font-family: var(--mono); color: var(--ink-2);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 1.25rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 3.5rem 0; margin-top: 2rem; }
.footer-inner { text-align: center; }
.footer-seal { margin-bottom: 1rem; }
.footer-title { font-size: 0.8rem; letter-spacing: 0.1em; color: var(--ink-2); margin: 0 0 1rem; }
.footer-links { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.footer-links a { font-size: 0.9rem; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-note { color: var(--ink-2); font-size: 0.85rem; margin: 0; }

/* ---------- Document page (/standard) ---------- */
.doc-banner {
  border: 1px solid var(--blue); background: #fff; padding: 0.9rem 1.25rem;
  font-size: 0.92rem; margin-bottom: 3rem;
}
.doc-banner p { margin: 0; }
.doc-header h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0 0 0.75rem; font-weight: 600; }
.doc-meta { font-size: 0.8rem; letter-spacing: 0.12em; color: var(--ink-2); margin: 0 0 1.75rem; }
.doc-preamble { font-family: var(--sans); font-weight: 400; }
.doc-section { margin: 2.75rem 0; }
.doc-section h2 { font-size: 1.35rem; }
.doc-section h2 .clause-num { margin-right: 0.75rem; }
.doc-section p { font-weight: 400; }
.definitions dt { font-weight: 700; color: var(--blue); margin-top: 1.25rem; }
.definitions dd { margin: 0.25rem 0 0; font-weight: 400; }
.signature-block { margin: 3rem 0 2rem; display: grid; gap: 2.5rem; max-width: 34rem; }
.signature-line { display: flex; flex-direction: column; gap: 0.4rem; }
.signature-line .line { display: block; border-bottom: 1px solid var(--ink); height: 2rem; }
.signature-line .label { font-size: 0.7rem; letter-spacing: 0.14em; color: var(--ink-2); }

/* ---------- Confirmation ---------- */
.confirm-seal { margin-bottom: 1.5rem; }

/* ---------- Admin ---------- */
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.admin-bar h1 { margin: 0; }
.admin-table td { font-size: 0.95rem; }
.admin-table input, .admin-table select { width: 100%; min-width: 8rem; font-size: 0.9rem; padding: 0.4rem 0.5rem; }
.admin-table input[type="date"] { min-width: 9.5rem; }
.inline-form { display: inline-flex; gap: 0.4rem; margin: 0.2rem 0.4rem 0.2rem 0; align-items: center; }
.admin-login-form { max-width: 24rem; }

/* ---------- Fade-in ---------- */
@media (prefers-reduced-motion: no-preference) {
  .fade-in { opacity: 0; transform: translateY(10px); transition: opacity 500ms ease, transform 500ms ease; }
  .fade-in.visible { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .section { padding: 3rem 0; }
  .hero { padding: 4rem 0 3.5rem; }
  .form-grid { grid-template-columns: 1fr; }
  .clause { grid-template-columns: 2.5rem 1fr; gap: 0.9rem; }
  .header-inner { justify-content: center; }
}

/* ---------- Print (/standard as signable document) ---------- */
@media print {
  .site-header, .site-footer, .no-print, .doc-banner { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  a { color: var(--ink); text-decoration: none; }
  .doc-section { break-inside: avoid; }
  .signature-block { break-inside: avoid; }
  .container.narrow { max-width: 100%; padding: 0; }
}
