/* The ATI Portal website, theatiportal.com. 20 November 2026, Design
   Decisions 76 and 80: the plain site that replaces the React portal
   (src/App.jsx).

   The portal's colours and serif headings (App.jsx C, FOCUS_RING and
   FOCUS_EDGE), the same as blind.training's sheet, so the two read as one
   organisation. Built to her Accessibility Standards:

   - the gold focus ring on plain :focus, never :focus-visible, which hides
     it from mouse users (Standards 2 and App.jsx GLOBAL_STYLES);
   - Section 11: STANDARD BROWSER CONTROL SIZES. No min-height, min-width,
     inflated padding or inflated font size on any control, on any device.
     blind.training's sheet gives its buttons and fields 44 pixel minimums;
     this sheet deliberately does not;
   - nothing fixed in position, nothing that overlays the page. */

@font-face {
  font-family: 'Source Serif 4';
  src: url('fonts/source-serif-4-latin.woff2') format('woff2');
  font-weight: 600 700;
  font-display: swap;
}

:root {
  --ink: #1a1a2e;
  --page: #f5f0e0;
  --card: #fdfaf4;
  --card-heading: #1a3a6b;
  --card-border: rgba(184, 134, 11, 0.35);
  --nav: #2a3a6a;
  --nav-text: #f5f0e8;
  --gold: #c8983a;
  --accent: #2a5a8a;
  --muted: #5a4a3a;
  --rule: #c8b89a;
  --error: #8b1a1a;
  --error-bg: #fff0f0;
  --success: #2a5a2a;
  --success-bg: #e8f0e8;
  --field-border: #8a8378;
  --focus: #b8860b;
  --focus-edge: rgba(26, 26, 46, 0.55);
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
/* Hidden means hidden, whatever display a rule below gives the element. */
[hidden] { display: none !important; }

html { background: var(--page); }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--card-heading);
}
h1 { font-size: 2rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.45rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

/* THE FOCUS RING. The portal's gold, 3px, standing 4px away, with a dark
   edge so it shows on any background. */
:focus {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  box-shadow: 0 0 0 1px var(--focus-edge);
}
input:not([type='checkbox']):not([type='radio']):focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  background: #fff8ee;
}
h1:focus, h2:focus, h3:focus { outline-offset: 6px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  padding: 0.5rem 0.75rem;
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The honeypot, as on the portal's and blind.training's forms: off the
   screen inside an aria-hidden wrapper. Not display none, because some
   scripts skip fields that are not drawn. */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------------- the header ---------------- */
.site-header {
  background: var(--nav);
  color: var(--nav-text);
  border-bottom: 4px solid var(--gold);
}
.site-header .inner,
.site-footer .inner,
main {
  max-width: 54rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.brand {
  display: inline-block;
  margin: 1rem 0 0.25rem;
  color: var(--nav-text);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.2;
}
.brand-maker {
  display: block;
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.site-nav li { margin: 0; }
.site-nav a {
  color: var(--nav-text);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 3px;
}
.site-nav button {
  /* Sign Out is a button, because it acts; drawn like the links beside it. */
  background: transparent;
  color: var(--nav-text);
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.site-header :focus { outline-color: #ffd24a; box-shadow: none; }

/* ---------------- the page ---------------- */
main { padding-top: 2rem; padding-bottom: 3rem; }
.lead { font-size: 1.15rem; }
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

/* Buttons keep the browser's own size (Section 11); only colour and a
   visible edge are set, so a button reads as one on every background. */
button, .button {
  font: inherit;
  color: #ffffff;
  background: var(--nav);
  border: 2px solid var(--nav);
  border-radius: 4px;
  padding: 0.15em 0.6em;
  cursor: pointer;
}
.button { display: inline-block; text-decoration: none; }
button.secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
button.link {
  background: transparent;
  color: var(--accent);
  border: 0;
  padding: 0;
  text-decoration: underline;
}
button[aria-disabled='true'] { opacity: 0.7; cursor: progress; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1rem 0; }

/* ---------------- forms ---------------- */
form { margin: 0; }
.field { margin: 0 0 1rem; }
.field > label, fieldset > legend {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.hint { display: block; color: var(--muted); font-size: 0.95rem; margin: 0.25rem 0 0.5rem; }
input[type='text'], input[type='email'], input[type='password'], input[type='search'],
input[type='tel'], input[type='number'], select, textarea {
  font: inherit;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid var(--field-border);
  border-radius: 4px;
  padding: 0.15em 0.35em;
  max-width: 100%;
}
input[type='text'], input[type='email'], input[type='password'], input[type='search'], input[type='tel'] { width: 26rem; }
textarea { width: 100%; }
input[aria-invalid='true'], select[aria-invalid='true'], textarea[aria-invalid='true'] {
  border-color: var(--error);
  border-width: 3px;
}
input[readonly] { background: #f0ebe0; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.choice { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; }
.choice label { font-weight: 400; }
.show-password { margin-left: 0.5rem; }

.message {
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border: 2px solid;
  border-left-width: 6px;
}
.message.error { color: var(--error); background: var(--error-bg); border-color: var(--error); }
.message.success { color: var(--success); background: var(--success-bg); border-color: var(--success); }
.message.info { color: var(--ink); background: var(--card); border-color: var(--gold); }
.message:empty { display: none; }
.message p:last-child { margin-bottom: 0; }

/* A dialog, as the Windows app has them (CLAUDE.md, Dialogs): the
   browser's own dialog element. A tall one fits the screen and scrolls. */
dialog {
  color: var(--ink);
  background: #ffffff;
  border: 2px solid var(--nav);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  width: min(36rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
dialog h2 { margin-top: 0.5rem; }

/* A list of files or classes: one per line, in a column (Standards 12a). */
.records { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.records li { margin: 0; padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
.records .detail { color: var(--muted); font-size: 0.95rem; margin-left: 0.5rem; }
.records li .choice { display: inline-flex; margin: 0 0.5rem 0 0; }
/* A checked file reads as checked, whole: a bar down its leading edge and a
   tint behind it (Standards 12c). The background changes and nothing moves. */
.records li { border-left: 4px solid transparent; padding-left: 0.5rem; }
.records li.ticked { border-left-color: var(--accent); background: #e6eef6; }
#lib-actions p { margin: 0; }

table { border-collapse: collapse; margin: 1rem 0; }
th, td { text-align: left; padding: 0.25rem 0.75rem 0.25rem 0; border-bottom: 1px solid var(--rule); }
caption { text-align: left; font-weight: 700; }

/* ---------------- the footer ---------------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

@media (max-width: 40rem) {
  input[type='text'], input[type='email'], input[type='password'], input[type='search'], input[type='tel'] { width: 100%; }
}
@media (forced-colors: active) {
  :focus { outline: 3px solid Highlight; box-shadow: none; }
  button, .button { border: 2px solid ButtonText; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-nav, .skip-link, .site-footer ul { display: none; }
  body { background: #ffffff; color: #000000; }
}
