/* The platform's own stylesheet: everywhere a course is not open.
 *
 * **Every value with a brand in it is a custom property the tenant publishes**
 * (`tenancy/theme.py`, `D-2026-08-25-brand-typography`). What is written here is structure
 * -- how a form is laid out, what a card's radius is, how much air a heading gets -- which
 * is implementation and travels with the code, exactly as the component library's own rule
 * has it (file 01 §3.7).
 *
 * A colour or a typeface appearing literally in this file is the defect WP-042 exists to
 * remove, and `tests/test_tenancy.py` greps for one.
 */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--slate-type-family);
  font-size: var(--slate-type-body);
  font-weight: var(--slate-weight-regular);
  line-height: 1.55;
  color: var(--slate-color-ink);
  background: var(--slate-color-ground);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* A deployment with no tenant is unbranded on purpose and says so. Nothing is needed to
   make that happen: with no custom properties published, every `var(--slate-...)` above is
   invalid at computed-value time and the property falls back to the browser's own -- which
   is exactly the bare page this whole file exists to replace, showing itself only when
   there is genuinely no tenant to draw. */

a { color: var(--slate-color-accent); }
a:hover { color: var(--slate-color-ink); }

.bar {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 5vw, 3rem);
  border-bottom: 1px solid var(--slate-color-panel);
  background: var(--slate-color-white);
}
.wordmark {
  font-weight: var(--slate-weight-bold);
  font-size: var(--slate-type-lead);
  letter-spacing: -0.015em;
  color: var(--slate-color-ink);
  text-decoration: none;
}
.bar-end { margin-left: auto; }
.tagline { color: var(--slate-color-tertiaryText); font-size: var(--slate-type-label); }

.sheet {
  flex: 1 1 auto;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 6vw, 3.5rem) clamp(1.25rem, 5vw, 3rem);
}
.narrow { max-width: 26rem; }

h1 {
  font-size: var(--slate-type-title);
  font-weight: var(--slate-weight-bold);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
}
h2 {
  font-size: var(--slate-type-section);
  font-weight: var(--slate-weight-semibold);
  line-height: 1.25;
  margin: 2.25rem 0 0.75rem;
}
p { margin: 0 0 1rem; }
.lede { font-size: var(--slate-type-lead); color: var(--slate-color-secondaryText); }
.quiet-text { color: var(--slate-color-secondaryText); }
.small { font-size: var(--slate-type-label); color: var(--slate-color-tertiaryText); }

/* ---- the card a form sits in ------------------------------------------------ */

.card {
  background: var(--slate-color-white);
  border: 1px solid var(--slate-color-panel);
  border-radius: 14px;
  box-shadow: var(--slate-elevation-raised);
  padding: clamp(1.25rem, 4vw, 2rem);
}
.card + .card { margin-top: 1.25rem; }

form p { margin: 0 0 1.1rem; }
label { display: block; font-weight: var(--slate-weight-semibold); margin-bottom: 0.35rem; }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--slate-color-ink);
  background: var(--slate-color-ground);
  border: 1px solid var(--slate-color-panel);
  border-radius: 9px;
}
input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--slate-color-accentLight);
  outline-offset: 2px;
}
.helptext, ul.helptext { font-size: var(--slate-type-label); color: var(--slate-color-tertiaryText); }
ul.helptext { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.errorlist {
  margin: 0 0 0.75rem; padding: 0.6rem 0.85rem; list-style: none;
  border-radius: 9px;
  background: var(--slate-color-highlight);
  border: 1px solid var(--slate-color-accentPale);
  color: var(--slate-color-ink);
}

button, .button {
  display: inline-block;
  font: inherit;
  font-weight: var(--slate-weight-semibold);
  padding: 0.7rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--slate-color-accent);
  color: var(--slate-color-white);
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { background: var(--slate-color-ink); color: var(--slate-color-white); }
button.quiet {
  background: transparent;
  color: var(--slate-color-secondaryText);
  border-color: var(--slate-color-panel);
  padding: 0.4rem 0.9rem;
  font-size: var(--slate-type-label);
}
button.quiet:hover { background: var(--slate-color-panel); color: var(--slate-color-ink); }

/* ---- lists of things a student owns ----------------------------------------- */

.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--slate-color-panel);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: baseline;
}
.rows li:last-child { border-bottom: 0; }
.rows .when { margin-left: auto; color: var(--slate-color-secondaryText); font-size: var(--slate-type-label); }
.rows .ended { color: var(--slate-color-tertiaryText); }
.empty { color: var(--slate-color-tertiaryText); }

.fault {
  padding: 0.9rem 1.1rem;
  border-radius: 9px;
  border: 1px dashed currentColor;
  margin-bottom: 1.5rem;
}

.foot {
  padding: 1.5rem clamp(1.25rem, 5vw, 3rem);
  border-top: 1px solid var(--slate-color-panel);
  color: var(--slate-color-tertiaryText);
}

@media (max-width: 30rem) {
  .bar { flex-wrap: wrap; }
  .tagline { display: none; }
}

/* The contact form's honeypot. Off-screen rather than `display: none` -- some bots skip
   what is display:none, and almost none skip what merely sits outside the viewport. Paired
   with `aria-hidden` and a negative tab index in the template, so nobody using a screen
   reader or a keyboard ever meets it. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* The public contact form is the widest thing in a `.narrow` column. */
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--slate-color-ink);
  background: var(--slate-color-ground);
  border: 1px solid var(--slate-color-panel);
  border-radius: 9px;
  resize: vertical;
}

.foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline; }
.footlinks { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footlinks a { color: var(--slate-color-secondaryText); text-decoration: none; }
.footlinks a:hover { color: var(--slate-color-ink); text-decoration: underline; }
.foot small { margin-left: auto; }

/* A published document: terms, refunds, privacy. Prose, so it gets a measure. */
.document { max-width: 34rem; }
.document h1 { margin-bottom: 1.25rem; }
.document h2 { font-size: var(--slate-type-lead); }
.document ul { padding-left: 1.25rem; }
.document li { margin-bottom: 0.35rem; }
.document table { border-collapse: collapse; width: 100%; margin: 0 0 1.25rem; }
.document th, .document td {
  text-align: left; padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--slate-color-panel);
  vertical-align: top;
}
.document th { font-weight: var(--slate-weight-semibold); }

/* Something the person needs to read before trying again. */
.notice {
  padding: 0.75rem 1rem; margin: 0 0 1rem;
  border-left: 3px solid var(--slate-color-accent);
  background: var(--slate-color-panel);
}
.field-error { display: block; margin-top: 0.25rem; font-size: var(--slate-type-small); }

/* ---------------------------------------------------------------- the storefront */

/* A grid whose cards are all the same shape, which is what the format's 16:9 card slot
   is for: "a catalogue of images at nine different shapes looks amateur no matter how
   the page is built" (file 01 5.1). */
.cards { list-style: none; padding: 0; display: grid; gap: 2rem;
         grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.course-card img { width: 100%; height: auto; aspect-ratio: 16 / 9;
                   object-fit: cover; border-radius: 4px; display: block; }
.course-card a { text-decoration: none; color: inherit; }
.course-card a:hover h2 { text-decoration: underline; }
.course-card h2 { font-size: var(--slate-type-lead); margin: 0.75rem 0 0.25rem; }
.course-card p { margin: 0.25rem 0; }

.price .amount { font-size: var(--slate-type-lead); }
.price .term { color: var(--slate-color-secondaryText); }

.product { max-width: 44rem; }
.product-head h1 { margin-bottom: 0.25rem; }
.cover { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
         border-radius: 4px; margin: 1.5rem 0; display: block; }
.buybox { padding: 1.25rem 1.5rem; background: var(--slate-color-panel);
          border-radius: 4px; margin-bottom: 2rem; }
.buybox p { margin: 0 0 0.5rem; }
.buybox p:last-child { margin-bottom: 0; }
.runtime { color: var(--slate-color-secondaryText); }
.about, .outline, .shots, .publisher { margin-bottom: 2.5rem; }
.outcomes, .modules ul { padding-left: 1.25rem; }
.modules { padding-left: 1.25rem; }
.modules h3 { font-size: 1rem; margin: 1rem 0 0.35rem; }
.shots img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
             border-radius: 4px; margin-bottom: 1rem; display: block; }
.publisher { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.instructor { width: 6rem; height: 6rem; border-radius: 50%; object-fit: cover; }
.publisher p { margin: 0; }

/* The sample plays in the real player, so the frame is the stage's shape. */
.stage-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 4px;
               background: var(--slate-color-panel); }
.preview-link { font-weight: var(--slate-weight-semibold); }

/* ---- the operator's screens (WP-036): structure only, every value the tenant's -------- */

.rail { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0 0 1.5rem;
        padding-bottom: 0.75rem; border-bottom: 1px solid var(--slate-color-panel); }
.rail a { text-decoration: none; }
.flash { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.flash li { padding: 0.6rem 0.9rem; border-radius: 6px; background: var(--slate-color-panel); }
.flash li.error { color: var(--slate-color-accent); }
.grid { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.5rem; }
.grid th, .grid td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem;
                     border-bottom: 1px solid var(--slate-color-panel); }
.grid th { font-weight: var(--slate-weight-bold); font-size: var(--slate-type-label);
           color: var(--slate-color-secondaryText); }
.grid tr.refused td { color: var(--slate-color-secondaryText); }
.grid .ended { color: var(--slate-color-tertiaryText); }
.inline { display: inline-flex; gap: 0.5rem; align-items: center; margin: 0.25rem 0.5rem 0.25rem 0; }
.inline input[type=number] { width: 5rem; }
.danger { margin-top: 1rem; }
.danger summary { cursor: pointer; color: var(--slate-color-accent); }
