/* Meet the Schools 2027
   Follows bridge/from-advisor/meet-the-schools-2027/STYLE-GUIDE.md.
   One sheet of cream paper, two inks, hairline rules. No shadows, pills, chips, blobs or icons.
   Corners are 2px at most. The packet preview is the only framed element. */

@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Onest";
  src: url("/static/fonts/onest-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --paper: #FBFAE5;
  --paper-raised: #FFFEF6;
  --ink: #032859;          /* 13.7:1 on paper */
  --ink-soft: #3E4F6E;     /*  7.8:1 on paper */
  --rule: #D9D6BD;         /* decorative hairlines only */
  --field-border: #7A7860; /*  4.25:1 on paper, 4.43:1 on paper-raised */
  --error: #8A2E1F;        /*  8.0:1 on paper */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 62ch;
  --form: 34rem;
  --gutter: 24px;
}
@media (min-width: 760px) { :root { --gutter: 48px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-weight: 400; font-size: 1.125rem; line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }

/* ---------- type ---------- */
h1, h2, h3, .display, .brand {
  font-family: var(--serif); font-weight: 400; color: var(--ink); letter-spacing: 0;
  font-optical-sizing: auto; font-variation-settings: "SOFT" 50, "WONK" 0;
}
.display { font-size: 2.4rem; line-height: 1.0; margin: 0 0 .4em; }
h1 { font-size: 2.25rem; line-height: 1.1; margin: 0 0 .45em; }
h2 { font-size: 1.5rem; line-height: 1.2; margin: 2em 0 .5em; }
h3 { font-size: 1.25rem; line-height: 1.25; margin: 1.5em 0 .4em; }
h1 + h2, h2:first-child, h3:first-child { margin-top: 0; }
@media (min-width: 760px) { .display { font-size: 3.25rem; } }
p, ul, ol, dl { margin: 0 0 1em; }
.lead { font-size: 1.25rem; line-height: 1.5; max-width: var(--measure); }
.small { font-size: .9375rem; line-height: 1.5; color: var(--ink-soft); }
.soft { color: var(--ink-soft); }
.strong-line { font-weight: 600; }
strong, b { font-weight: 600; }
.prose { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .35em; }

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
    transition: color 120ms ease, background-color 120ms ease; }
a:visited { color: var(--ink); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- layout ---------- */
.page { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--rule); }
@media (min-width: 760px) { .section { padding: 96px 0; } }
.section.first { padding-top: 40px; }
@media (min-width: 760px) { .section.first { padding-top: 64px; } }
.with-art { display: grid; gap: 32px; align-items: start; }
.with-art .art { width: 60%; max-width: 440px; }
@media (min-width: 900px) {
  .with-art { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 64px; }
  .with-art .art { width: 100%; order: 2; }
  .with-art.art-left { grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); }
  .with-art.art-left .art { order: 0; }
}
.form-col { max-width: var(--form); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 16px; }
.skip:focus, .skip:visited:focus { left: 8px; color: var(--paper); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 16px; } .mt2 { margin-top: 32px; } .mt3 { margin-top: 48px; }
.mb0 { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }

/* ---------- header and footer ---------- */
.site-header { padding: 20px 0 8px; }
.site-header .page { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; }
.brand { font-size: 1.375rem; line-height: 1.2; text-decoration: none; padding: 8px 0; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 20px; font-size: 1rem; }
.site-nav a { text-decoration: none; padding: 10px 0; display: inline-block; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.site-footer { margin-top: 32px; }
.site-footer .page > div { border-top: 1px solid var(--rule); padding: 24px 0 40px; }
.site-footer p { font-size: .9375rem; line-height: 1.5; color: var(--ink-soft); margin: 0 0 .35em; }
.site-footer a, .site-footer a:visited { color: var(--ink-soft); }

/* ---------- buttons and actions ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 2px;
  font: 500 1.0625rem/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color 120ms ease;
}
.button:visited { color: var(--paper); }
.button:hover { background: #0B3A78; color: var(--paper); text-decoration: none; }
.button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 599px) { .button { width: 100%; } }
.linkbutton { background: none; border: 0; padding: 10px 0; font: inherit; color: var(--ink); cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; min-height: 44px; text-align: left; }
.linkbutton:hover { text-decoration-thickness: 2px; }
.linkbutton.danger { color: var(--error); }
.actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.next { margin-top: 16px; color: var(--ink-soft); font-size: .9375rem; line-height: 1.5; max-width: var(--measure); }
form.inline { display: inline; }

/* ---------- forms ---------- */
.field { margin: 0 0 28px; }
.field.has-error { border-left: 3px solid var(--error); padding-left: 14px; }
label, .label, legend { display: block; font: 500 1rem/1.4 var(--sans); color: var(--ink); margin: 0 0 4px; padding: 0; }
.optional { font-weight: 400; color: var(--ink-soft); }
.help { display: block; font-size: .9375rem; line-height: 1.5; color: var(--ink-soft); margin: 0 0 8px; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=password], input[type=search], input[type=number], select, textarea {
  display: block; width: 100%; min-height: 52px; padding: 12px 14px;
  background: var(--paper-raised); color: var(--ink); border: 1px solid var(--field-border); border-radius: 2px;
  font: 400 1.125rem/1.4 var(--sans);
}
textarea { min-height: 140px; line-height: 1.55; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 2px; }
input[type=file] { display: block; width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--ink); padding: 10px 0; }
input[type=file]::file-selector-button { font: 500 1rem var(--sans); color: var(--ink); background: var(--paper-raised);
  border: 1px solid var(--field-border); border-radius: 2px; padding: 10px 16px; margin-right: 12px; cursor: pointer; }
.error-text { color: var(--error); font-size: 1rem; line-height: 1.45; margin: 8px 0 0; }
fieldset { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
.pair { display: grid; gap: 0 20px; }
@media (min-width: 600px) { .pair { grid-template-columns: 1fr 1fr; } }

/* checkbox and radio rows: native controls, square, whole row is the target */
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; margin: 0; flex: 0 0 22px; accent-color: var(--ink); }
input[type=checkbox] { border-radius: 2px; }
.choice { display: flex; gap: 14px; align-items: flex-start; padding: 11px 0; min-height: 44px; cursor: pointer;
  font: 400 1.125rem/1.45 var(--sans); margin: 0; }
.choice input { margin-top: 2px; }
.choices-cols { display: grid; gap: 0 24px; }
@media (min-width: 640px) { .choices-cols { grid-template-columns: 1fr 1fr; } }

/* error summary */
.error-summary { border-left: 3px solid var(--error); padding: 4px 0 4px 18px; margin: 0 0 32px; }
.error-summary:focus { outline: none; }
.error-summary h2 { font-size: 1.25rem; margin: 0 0 .4em; color: var(--error); }
.error-summary ul { margin: 0; padding-left: 1.1em; }
.error-summary a, .error-summary a:visited { color: var(--error); }

/* ---------- notices ---------- */
.notice { border-left: 3px solid var(--ink); padding: 2px 0 2px 18px; margin: 0 0 24px; max-width: var(--measure); }
.notice.problem { border-left-color: var(--error); }
.notice.problem, .notice.problem a { color: var(--error); }
.notice p:last-child { margin-bottom: 0; }

/* ---------- lists ---------- */
.rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.rows > li { border-bottom: 1px solid var(--rule); padding: 20px 0; }
.row-title { font-family: var(--serif); font-variation-settings: "SOFT" 50, "WONK" 0; font-weight: 400;
  font-size: 1.25rem; line-height: 1.3; margin: 0; }
.row-title a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.row-title a:hover { text-decoration-thickness: 2px; }
.facts-line { color: var(--ink-soft); font-size: .9375rem; line-height: 1.5; margin: 4px 0 0; }

/* school picker row with nested roles */
.pick-row > .choice { padding: 0; }
.pick-row > .choice .row-title { margin-top: -3px; }
.nested { list-style: none; margin: 12px 0 0 11px; padding: 0 0 0 24px; border-left: 1px solid var(--rule); }
.nested .choice { padding: 8px 0; font-size: 1.0625rem; }
.summary { margin-top: 32px; max-width: var(--measure); }

/* simple definition list for facts */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 1em; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: 8px; } }

/* status sentence: optional 8px filled square before "Sent" */
.status { margin: 6px 0 0; }
.sent-mark { display: inline-block; width: 8px; height: 8px; background: var(--ink); margin-right: 8px; vertical-align: 2px; }

/* ---------- the packet preview: the one framed element ---------- */
.packet { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 2px; padding: 32px; max-width: 46rem; }
@media (max-width: 599px) { .packet { padding: 20px; } }
.packet h2 { margin: 1.6em 0 .4em; font-size: 1.25rem; }
.packet .packet-name { font-family: var(--serif); font-variation-settings: "SOFT" 50, "WONK" 0; font-size: 2rem; line-height: 1.1; margin: 0 0 .2em; }
.packet ul { padding-left: 1.2em; }

/* ---------- FAQ: plain question and answer list ---------- */
.faq dl { margin: 0; border-top: 1px solid var(--rule); max-width: var(--measure); }
.faq dt { font-weight: 500; padding: 20px 0 6px; }
.faq dd { margin: 0; padding: 0 0 20px; border-bottom: 1px solid var(--rule); }
.faq dd p:last-child { margin-bottom: 0; }

/* ---------- admin tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 500; color: var(--ink-soft); }
.admin-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0 0 32px; font-size: 1rem; }
.admin-links a { padding: 10px 0; display: inline-block; }
.admin-links a[aria-current="page"] { text-decoration-thickness: 2px; font-weight: 500; }
.counts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); max-width: 40rem; }
.counts li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.counts b { font-family: var(--serif); font-weight: 400; font-size: 1.375rem; }

/* ---------- sponsor logos (About page only) ---------- */
.sponsor-logos { max-width: 420px; margin: 8px 0 0; }

/* ---------- style guide page ---------- */
.swatch-row { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.swatch { width: 48px; height: 48px; border: 1px solid var(--field-border); border-radius: 2px; }
.sw-paper { background: #FBFAE5; } .sw-raised { background: #FFFEF6; } .sw-ink { background: #032859; }
.sw-soft { background: #3E4F6E; } .sw-rule { background: #D9D6BD; } .sw-field { background: #7A7860; } .sw-error { background: #8A2E1F; }
.demo-focus { outline: 2px solid var(--ink); outline-offset: 2px; }
.art-grid { display: grid; gap: 32px; }
@media (min-width: 700px) { .art-grid { grid-template-columns: 1fr 1fr; } }
.art-grid figure { margin: 0; }
.art-grid figcaption { font-size: .9375rem; color: var(--ink-soft); margin-top: 8px; }

@media print {
  .site-header, .site-footer, .no-print, .admin-links { display: none !important; }
  body, html { background: #fff; }
  .packet { border: 0; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.flashes { padding-top: 32px; }
.flashes + .section.first, .flashes ~ * .section.first { padding-top: 24px; }
.foot-links { font-size: .9375rem; line-height: 1.5; color: var(--ink-soft); }
.foot-links .linkbutton { min-height: 0; padding: 0; font-size: inherit; color: var(--ink-soft); }
.choice .row-title, .choice .facts-line { display: block; }
