/* Goods For Society. One light theme by design: white, black, one mustard accent.
   Layout: a single reading column, like a clean Markdown document. */
@font-face {
  font-family: "Besley";
  src: url("../fonts/besley-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #111111;
  --mustard: #d8a22b;
  --line: rgba(17, 17, 17, 0.14);
  --frame: rgba(17, 17, 17, 0.035);
  --display: "Besley", Georgia, "Times New Roman", serif;
  --body: "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --measure: 40rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
@media (min-width: 48rem) { body { font-size: 1.125rem; } }

img { max-width: 100%; height: auto; display: block; }
figure img { max-height: 80svh; width: auto; margin-inline: auto; }
a { color: inherit; text-decoration-line: underline; text-decoration-color: var(--mustard); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; padding: 0.5rem 1rem; background: var(--paper); }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); z-index: 1; }

.wrap {
  max-width: calc(var(--measure) + 2 * 24px);
  margin-inline: auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

/* Header */
.site-header { border-top: 4px solid var(--mustard); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 0.25rem 1.5rem;
  padding-block: 1.25rem;
}
.wordmark { font-family: var(--display); font-weight: 600; font-size: 1.125rem; text-decoration: none; margin-right: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-nav a { text-decoration-line: none; font-size: 0.9375rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration-line: underline; }

/* Note for people: this site is written for agents */
.note .wrap { padding-block: 1.75rem 1.75rem; border-bottom: 1px solid var(--line); }
.note-inline .wrap { padding-inline: 0; padding-block: 0.5rem 1.75rem; }
.note .wrap > p { margin: 0; }
.note .wrap > p:first-child { border-left: 4px solid var(--mustard); padding-left: 1rem; max-width: 40rem; }
.note .wrap > p.actions { margin-top: 1rem; padding-left: calc(1rem + 4px); }
.note .button { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.9375rem; }

/* Document */
main { padding-block: 2.25rem 5rem; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem); letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; margin-top: 3.5rem; }
h3 { font-size: 1.1875rem; margin-top: 2.25rem; }
main > * + * { margin-top: 1.25rem; }
main > h1 + * { margin-top: 1.5rem; }
main > h2 + *, main > h3 + * { margin-top: 1rem; }
p, ul, ol { margin-bottom: 0; }
ul, ol { padding-left: 1.25rem; }
main li + li { margin-top: 0.35rem; }
li::marker { color: var(--ink); }
strong { font-weight: 600; }
.dates { font-size: 0.875rem; }
main > h1 + .dates { margin-top: 0.5rem; }
blockquote { margin: 0; padding-left: 1.25rem; border-left: 3px solid var(--mustard); }
blockquote p + p { margin-top: 0.25rem; font-size: 0.9375rem; }

/* Home opening: nothing else above the fold */
.opening {
  min-height: calc(100svh - 5.5rem);
  display: flex; flex-direction: column; justify-content: center;
  gap: 1.5rem;
  padding-block: 2rem 4rem;
}
.opening h1 { font-size: clamp(2.25rem, 1.3rem + 4vw, 3.75rem); line-height: 1.08; max-width: 14em; }
.opening p { margin: 0; font-size: 1.1875rem; max-width: 34em; }
@media (min-width: 48rem) { .opening p { font-size: 1.3125rem; } }


/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.75rem 1.375rem;
  font: 600 1rem/1.2 var(--body);
  color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 0;
  text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--ink); color: var(--paper); }
.button.primary { background: var(--mustard); border-color: var(--mustard); }
.button.primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Tables */
.table { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375em; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: 0.625rem 1rem 0.625rem 0; border-bottom: 1px solid var(--line); }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-weight: 600; border-bottom: 2px solid var(--ink); }
tbody th { font-weight: 600; width: 34%; }
td.num, th.num { text-align: right; white-space: nowrap; }
@media (max-width: 35.99rem) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack tr { display: block; padding-block: 0.75rem; border-bottom: 1px solid var(--line); }
  table.stack td { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.75rem; border: 0; padding: 0.125rem 0; text-align: left; white-space: normal; }
  table.stack td::before { content: attr(data-label); font-weight: 600; }
  table.stack td:first-child { display: block; font-weight: 600; padding-bottom: 0.25rem; }
  table.stack td:first-child::before { content: none; }
}

/* Images and empty frames */
figure { margin: 0; }
.frame { width: 100%; background: var(--frame); border: 1px solid var(--line); }
.pair { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 36rem) { .pair { grid-template-columns: 1fr 1fr; } }
.wide { margin-inline: calc(-1 * min(6vw, 4rem)); }
@media (max-width: 47.99rem) { .wide { margin-inline: 0; } }

/* Forms */
form { display: grid; gap: 1.25rem; max-width: 28rem; }
.field { display: grid; gap: 0.375rem; }
label { font-weight: 600; font-size: 0.9375rem; }
input[type="text"], input[type="email"], select {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 0;
  padding: 0.625rem 0.75rem; width: 100%;
}
input:focus-visible { outline: 2px solid var(--mustard); outline-offset: 0; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; font-weight: 400; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: 0.25rem; accent-color: var(--ink); }
.hidden-field { position: absolute; left: -9999px; }
.terms-box { border: 2px solid var(--ink); padding: 1.25rem 1.5rem; }
.terms-box > * + * { margin-top: 0.75rem; }
.terms-box p, .terms-box ul { margin-top: 0.75rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-block: 2rem 3rem; display: grid; gap: 1rem; font-size: 0.9375rem; }
.site-footer nav { display: grid; gap: 0.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
