/* Student Housing Watch — one stylesheet, mobile first, high contrast, print-friendly. */
:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #3d3d3d;
  --line: #8a8a8a;
  --soft: #f3f3f0;
  --brand: #0b3d91;      /* links, buttons: 10:1 on white */
  --brand-ink: #ffffff;
  --warn-bg: #fff4d6;
  --warn-line: #8a5a00;
  --ok: #0b6b2e;
  --focus: #c2410c;
  --radius: 6px;
  --max: 48rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --text: #f2f2f2; --muted: #d0d0d0; --line: #8f8f8f; --soft: #1e1e1e;
    --brand: #9cc2ff; --brand-ink: #0b0b0b; --warn-bg: #3a2c05; --warn-line: #f0c048; --ok: #7bd99a; --focus: #ffa25c;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
img { max-width: 100%; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: .5rem 1rem; z-index: 10; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
header.site { border-bottom: 2px solid var(--text); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding-top: .75rem; padding-bottom: .75rem; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; }
nav.site ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
nav.site a { text-decoration: none; padding: .25rem 0; display: inline-block; }
nav.site a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-decoration-thickness: 3px; color: var(--text); }

main { padding: 1.5rem 0 3rem; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: .25rem 0 1rem; }
h2 { font-size: 1.3rem; line-height: 1.25; margin: 2rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
p, ul, ol { margin: 0 0 1rem; }
.lead { font-size: 1.15rem; }
.muted { color: var(--muted); }

.notice { border: 2px solid var(--warn-line); background: var(--warn-bg); border-radius: var(--radius); padding: .75rem 1rem; margin: 1rem 0; }
.notice strong { display: block; }
.privacy { border: 2px solid var(--ok); border-radius: var(--radius); padding: .75rem 1rem; font-weight: 700; }

.cta { display: grid; gap: .75rem; margin: 1.5rem 0; }
@media (min-width: 40rem) { .cta { grid-template-columns: repeat(3, 1fr); } }
.button, button {
  display: inline-block; font: inherit; font-weight: 700; cursor: pointer;
  padding: .65rem 1rem; border-radius: var(--radius); border: 2px solid var(--brand);
  background: var(--brand); color: var(--brand-ink); text-decoration: none; text-align: center; min-height: 44px;
}
.button.secondary, button.secondary { background: transparent; color: var(--brand); }
button.small { padding: .35rem .7rem; font-size: .95rem; min-height: 36px; }
.button[aria-disabled="true"] { background: var(--soft); color: var(--muted); border-color: var(--line); cursor: default; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: .98rem; }
caption { text-align: left; font-weight: 700; padding-bottom: .4rem; }
th, td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { border-bottom: 2px solid var(--text); }
.table-scroll { overflow-x: auto; }

/* Forms */
form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem 1rem; margin: 0 0 1.25rem; }
legend { font-weight: 800; padding: 0 .35rem; }
.field { margin: 0 0 .9rem; }
.field label, .label { display: block; font-weight: 700; margin-bottom: .2rem; }
.hint { display: block; color: var(--muted); font-size: .93rem; margin-bottom: .3rem; }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 2px solid var(--line); border-radius: var(--radius); padding: .5rem .6rem; min-height: 44px;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
.choices { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.choices label, .check label { font-weight: 400; display: inline-flex; gap: .4rem; align-items: center; min-height: 36px; }
input[type="radio"], input[type="checkbox"] { width: 1.15rem; height: 1.15rem; }
.grid2 { display: grid; gap: 0 1rem; }
@media (min-width: 36rem) { .grid2 { grid-template-columns: 1fr 1fr; } }
.req { color: var(--text); font-weight: 400; }
[hidden] { display: none !important; }

.item-row { border-top: 1px dashed var(--line); padding-top: .75rem; margin-top: .75rem; display: grid; gap: 0 .75rem; }
@media (min-width: 36rem) { .item-row { grid-template-columns: 2fr 1fr 1fr auto; align-items: end; } }
.item-row .field { margin-bottom: .5rem; }
.quick { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }

/* Generated documents */
.doc { border: 2px solid var(--text); border-radius: var(--radius); padding: 1rem; margin: 1.5rem 0; }
.doc h2 { margin-top: 0; }
.doc .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; }
.doc-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.55; background: var(--soft); padding: 1rem; border-radius: var(--radius); }
.doc.skipped { border-style: dashed; }
.status { font-weight: 700; }

/* Rights accordion */
details { border: 2px solid var(--text); border-radius: var(--radius); margin: 0 0 .75rem; }
summary { cursor: pointer; padding: .75rem 1rem; font-weight: 800; font-size: 1.1rem; min-height: 44px; }
details[open] summary { border-bottom: 1px solid var(--line); }
details > div { padding: .5rem 1rem 1rem; }
dl { margin: 0; }
dt { font-weight: 800; margin-top: .9rem; }
dd { margin: .2rem 0 0; }
.flag { font-weight: 800; white-space: nowrap; }
.flag.ok { color: var(--ok); }
.flag.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 4px; padding: 0 .3rem; }
.coming { display: inline-block; font-size: .85rem; font-weight: 800; border: 2px solid var(--line); border-radius: 999px; padding: 0 .55rem; margin-left: .4rem; }

footer.site { border-top: 2px solid var(--text); padding: 1.25rem 0 2rem; font-size: .95rem; }
footer.site p { margin: 0 0 .5rem; }

/* Print: hide the site chrome and the form; print documents only.
   When a "Print" button is used, body.printing-one shows only that document. */
@media print {
  :root { --bg: #fff; --text: #000; --soft: #fff; }
  body { font-size: 11.5pt; }
  header.site, footer.site, nav, .skip, form, .no-print, .doc .actions, .doc .howto, #intro, .privacy { display: none !important; }
  main { padding: 0; }
  .doc { border: 0; padding: 0; margin: 0 0 1rem; page-break-after: always; }
  .doc.skipped { display: none; }
  .doc-text { background: none; padding: 0; font-size: 11.5pt; }
  body.printing-one .doc:not(.print-target), body.printing-one .output-head { display: none !important; }
  body.printing-one .doc.print-target h2 { display: none; }
  a { color: #000; text-decoration: none; }
  details { border: 0; } details > div { padding: 0; }
}
