/* The coevcon.com broadside, by hand instead of Tailwind so this app stays build-free.
   Green General Sans is the human voice, black Ioskeley Mono the machine.
   Tokens and fonts follow coevcon.com as deployed (coevcon-www/src/styles/global.css). */
@font-face {
  font-family: 'Ioskeley Mono';
  src: url(/static/fonts/ioskeley-mono-400.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url(/static/fonts/general-sans-400.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}
:root {
  --paper: #f3efe4;
  --plate: #fbfaf5;
  --wash: #e9e3d3;
  --tape: #e6d9ae;
  --ink: #1d1c19;
  --graphite: #3a3832;
  --muted: #6e685c;
  --rule: #b8b09d;
  --accent: #2f6b4a;
  --accent-deep: #24543a;
  /* Not on the site, which has no errors to show. Red pencil on a proof. */
  --warn: #9a3f1d;
  --warn-wash: #f5e3d6;

  --sans: 'General Sans', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Ioskeley Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 25px;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, textarea { font: inherit; }
::selection { background: var(--tape); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
code { font-family: inherit; background: var(--wash); padding: 0 4px; }
/* Every face is regular weight only, so emphasis comes from the ink, not a fake bold. */
strong { font-weight: 400; color: var(--ink); }
p { text-wrap: pretty; }

/* The small uppercase mono label used for every caption and kicker. */
.site-nav, .label, footer, .testmode, .intro h3, .columns h3, .forms .aside > h3, th, summary {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.testmode {
  background: var(--tape);
  color: var(--ink);
  padding: 6px 16px;
  text-align: center;
}

.page {
  max-width: 1488px;
  min-height: 100svh;
  margin: auto;
  padding: 48px 16px;
  display: flex;
  flex-direction: column;
}
.page--wide { max-width: 1680px; padding-top: 32px; }

/* Masthead: the logo, the date beside it in green, and the nav. */
.masthead {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 48px;
  padding-bottom: 32px;
  border-bottom: 1.5px solid var(--ink);
}
.home { display: block; width: 240px; }
.home h1 { margin: 0; }
.home img { display: block; width: 100%; height: auto; }
.page--wide .home { width: 200px; }
.page--wide .masthead { padding-bottom: 20px; }
.hand-note {
  width: 100%;
  margin: 0;
  align-self: flex-start;
  font-family: var(--sans);
  font-size: 22px;
  line-height: 40px;
  color: var(--accent);
}
.hand-note span { font-size: 20px; line-height: 28px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 32px; padding-bottom: 6px; }
.site-nav a { color: inherit; text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 24fr) minmax(0, 32fr);
  gap: 48px 72px;
  align-items: start;
  padding-top: 64px;
}
main:has(> .admin) { display: block; }
main > .intro:only-child { grid-column: 1 / -1; }

/* Type */
h2, h3 { margin: 0; font-weight: 400; }
h2 {
  margin-bottom: 20px;
  font-family: var(--sans);
  font-size: 32px;
  line-height: 48px;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.intro p, .card p { margin: 0 0 16px; max-width: 38em; color: var(--graphite); }
.intro h3 { margin: 40px 0 12px; }
.big, .intro p.big {
  max-width: none;
  margin-bottom: 24px;
  font-family: var(--sans);
  font-size: 24px;
  line-height: 36px;
  color: var(--ink);
}
.intro strong, .card > p strong { background: linear-gradient(transparent 62%, var(--tape) 62%); }
.muted { color: var(--muted); }
.intro p.fine, .card p.fine, .fine {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}
.aside { border-top: 1px dashed var(--rule); margin-top: 32px; padding-top: 16px; }
/* Invite codes and enrol links are long and unbroken. */
.aside p, .card > p, .agent-list li > div { min-width: 0; overflow-wrap: anywhere; }
.intro .aside > h3:first-child { margin-top: 4px; }
.forms > .aside { margin-top: 0; }
.forms .aside > h3 { margin: 4px 0 12px; }
.intro form + p { margin-top: 16px; }

/* A strip of tape over the page. */
.intro p.flash, .card p.flash {
  width: fit-content;
  margin: 0 0 32px;
  padding: 8px 16px;
  background: var(--tape);
  color: var(--ink);
  transform: rotate(-0.6deg);
}
.status--error, .card p.status--error, .card p.error, .intro p.error {
  margin: 0 0 24px;
  padding: 2px 0 2px 14px;
  border-left: 2.5px solid var(--warn);
  color: var(--warn);
}

/* Lists ruled in dashes, like the speakers under each track. */
.rules { list-style: none; padding: 0; margin: 0 0 16px; max-width: 38em; color: var(--graphite); }
.rules li { padding: 12px 0; border-top: 1px dashed var(--rule); }

/* Numbered notes, the numeral in its own column like the site's three questions. */
.ways { list-style: none; padding: 0; margin: 0 0 8px; max-width: 38em; }
.ways li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 20px; margin-bottom: 20px; }
.ways li > :not(.numeral) { grid-column: 2; }
.ways p { margin: 0; }
.ways p + p { margin-top: 12px; }
.ways strong { display: block; background: none; margin-bottom: 4px; font-family: var(--sans); font-size: 20px; line-height: 40px; color: var(--accent); }
.numeral { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; font-size: 20px; line-height: 24px; }
.scribble { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: var(--accent); pointer-events: none; }

/* Home: a statement across the top, then the two forms side by side. */
.lede p { max-width: 42em; }
.lede p.big { max-width: none; }

/* Panels */
.forms { display: grid; gap: 48px; align-items: start; min-width: 0; }
.card { min-width: 0; padding: 24px; border: 1.5px solid var(--ink); background: var(--plate); scroll-margin-top: 24px; }
.card > h3 { margin: 0 0 16px; font-family: var(--sans); font-size: 30px; line-height: 48px; color: var(--accent); }

/* Fields: a mono label over a line ruled in ink. */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.field { display: block; margin: 0 0 24px; min-width: 0; }
.label { display: block; }
.label em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--muted); }
.hint { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 20px; }
.error { display: block; margin-top: 6px; color: var(--warn); font-size: 13px; line-height: 20px; }
.page input:not([type='checkbox']):not([type='radio']), textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 4px;
  padding: 6px 0;
  appearance: none;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  line-height: 24px;
  outline: 2px solid transparent;
}
/* Ruled like a notepad, with text sitting on the lines. `local` keeps the lines under the
   text as it scrolls; the last line stays put, in the same ink as every other field. */
textarea {
  --baseline: var(--ink);
  --baseline-weight: 1.5px;
  --ruling: var(--rule);
  padding: 0;
  margin-top: 8px;
  border: 0;
  resize: vertical;
  line-height: 28px;
  background:
    linear-gradient(var(--baseline), var(--baseline)) 0 calc(100% - 3px) / 100% var(--baseline-weight) no-repeat scroll,
    repeating-linear-gradient(transparent 0 24px, var(--ruling) 24px 25px, transparent 25px 28px) local;
}
::placeholder { color: var(--muted); opacity: 0.7; }
.page input:not([type='checkbox']):not([type='radio']):hover { border-color: var(--muted); }
textarea:hover { --baseline: var(--muted); }
.page input:not([type='checkbox']):not([type='radio']):focus-visible { border-color: var(--accent); box-shadow: 0 1.5px 0 var(--accent); }
textarea:focus-visible { --baseline: var(--accent); --baseline-weight: 3px; --ruling: var(--accent); outline-color: transparent; }
.page .has-error input:not([type='checkbox']):not([type='radio']) { border-color: var(--warn); }
.has-error textarea { --baseline: var(--warn); }
input:-webkit-autofill { -webkit-text-fill-color: var(--ink); transition: background-color 100000s; }

.check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 4px 0 0; accent-color: var(--accent); flex-shrink: 0; }
fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
fieldset.mode { display: flex; flex-wrap: wrap; gap: 0 24px; }
fieldset.mode legend { width: 100%; margin-bottom: 10px; padding: 0; }
.honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }


/* Buttons. The main action gets a box drawn around it, like the site's "Send it". */
button { border-radius: 0; cursor: pointer; }
.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 200px;
  min-height: 76px;
  padding: 10px 32px;
  border: 0;
  background: none;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1;
  transition: transform 150ms;
}
.cta:hover { color: var(--accent-deep); transform: rotate(-1deg); }
.cta:focus-visible { outline-offset: 6px; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin-top: 8px; }
.submit-row .fine, .card .submit-row p.fine { flex: 1 1 200px; margin: 0; }
.aside .cta, section > form > .cta { margin-top: 4px; }

/* The working buttons, for lists and admin. */
.small {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 10px;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--plate);
  font-size: 13px;
  line-height: 20px;
}
.small:hover { border-color: var(--accent-deep); background: var(--accent-deep); }
.small.ghost { border-color: var(--rule); background: transparent; color: var(--ink); }
.small.ghost:hover { border-color: var(--ink); background: var(--wash); }
form.inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }

.card p.error, .intro p.error { font-size: 15px; line-height: 25px; }
.agent-list { list-style: none; padding: 0; margin: 0 0 16px; }
.card form + .agent-list, .card form + p.fine { margin-top: 28px; }
.agent-list li { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px dashed var(--rule); }

footer {
  margin-top: 96px;
  padding-top: 20px;
  border-top: 1px dashed var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  color: var(--muted);
}
footer a { color: inherit; }
footer a:hover { color: var(--accent); }
/* Caps would misprint the address. */
footer a[href^='mailto:'] { text-transform: none; letter-spacing: 0; font-size: 14px; }

/* Admin: the same paper, packed tighter. */
.admin h2 { margin: 64px 0 20px; padding-bottom: 6px; border-bottom: 1.5px solid var(--ink); font-size: 26px; }
.admin h2 .muted { margin-left: 6px; font-family: var(--mono); font-size: 15px; }
.admin > p.fine { margin: 0 0 16px; }
.app-card > .fine, td .fine { margin-top: 2px; }
.stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 40px; font-size: 13px; line-height: 20px; color: var(--graphite); }
.stats .n { margin-right: 6px; font-family: var(--sans); font-size: 24px; line-height: 44px; color: var(--accent); }
.fine form.inline { margin-left: 6px; }
.warn { color: var(--warn); }
.tag { display: inline-block; margin-left: 6px; padding: 0 6px; background: var(--tape); color: var(--ink); font-size: 12px; line-height: 20px; }
.tag.warn { background: var(--warn-wash); color: var(--warn); }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
.columns > div { min-width: 0; }
.columns h3 { margin-bottom: 12px; }
.app-card { margin-bottom: 16px; padding: 16px 18px; border: 1px solid var(--rule); background: var(--plate); font-size: 14px; line-height: 22px; }
.app-card header { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 16px; }
.app-card header .fine { margin: 0 0 0 auto; }
.pitch { white-space: pre-wrap; max-width: 70ch; color: var(--graphite); overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; font-size: 13px; }
td .actions { margin-top: 0; }
.page input.mini:not([type='checkbox']):not([type='radio']) { display: inline-block; width: 72px; height: 30px; padding: 2px 4px; margin: 0 0 0 4px; font-size: 14px; }
form.note { display: flex; gap: 8px; margin-top: 10px; min-width: 220px; }
td > form.note:first-child { margin-top: -6px; }
.page form.note input:not([type='checkbox']):not([type='radio']) { height: 30px; padding: 2px 0; margin: 0; font-size: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px dashed var(--rule); }
th { padding-top: 0; font-size: 12px; font-weight: 400; color: var(--muted); border-bottom: 1px solid var(--ink); }
td.pitch { max-width: 40ch; }
.nowrap { white-space: nowrap; }
details { margin-top: 24px; }
summary { cursor: pointer; color: var(--accent); }
details .row { padding: 8px 0; border-bottom: 1px dashed var(--rule); font-size: 13px; }
.card.comp { max-width: 720px; }
.filter { margin-bottom: 4px; }
.filter .check { margin-bottom: 8px; }

@media (min-width: 640px) {
  .page { padding: 48px 32px; }
  .masthead { padding-bottom: 48px; }
  .home { width: 432px; }
  .hand-note { width: auto; font-size: 26px; }
  .card { padding: 40px; }
  .card > h3 { font-size: 36px; line-height: 56px; }
  h2 { font-size: 44px; line-height: 64px; }
  .big, .intro p.big { font-size: 28px; line-height: 42px; }
}

@media (min-width: 1024px) {
  .page { padding: 96px 48px; }
  .page--wide { padding-top: 32px; padding-bottom: 48px; }
  main { padding-top: 96px; }
  main:has(> .admin) { padding-top: 40px; }
  footer { margin-top: 144px; }
  .page--wide footer { margin-top: 96px; }
  /* 18fr and 38fr are the site's grid. */
}

@media (min-width: 1280px) {
  .big, .intro p.big { font-size: 30px; line-height: 44px; }
  .lede p.big { font-size: 36px; line-height: 50px; }
}

@media (min-width: 1440px) {
  .page--wide .home { width: 200px; }
  .hand-note { position: absolute; top: 4px; left: 560px; }
}

@media (max-width: 1023.98px) {
  main { display: flex; flex-direction: column; }
  main > * { width: 100%; }
  .admin { overflow-x: auto; }
}

@media (max-width: 759.98px) {
  .field-row, .columns { grid-template-columns: 1fr; }
  .agent-list li { flex-direction: column; align-items: flex-start; }
  .ways li { grid-template-columns: 1fr; gap: 8px; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .cta { transition: none; }
  .cta:hover { transform: none; }
}
