/*
 * World: campus. The eight psychology courses and their hub.
 * Link after /hazen/hazen.css and set <html data-world="campus">. Each course
 * keeps its own data-accent: one colour per discipline, like the spines of a
 * pocket series.
 *
 * A place to revise: low-glare paper, blue-black ink, a red margin, and a
 * highlighter that is only ever used for what must be remembered. Colour
 * does jobs here and nothing else.
 */
@layer base {
  [data-world="campus"] {
    --w-bg-l: #f2f1ed;
    --w-bg-d: #12151b;
    --w-raise-l: #e8e6e0;
    --w-raise-d: #181c24;
    --w-surface-l: #faf9f6;
    --w-surface-d: #1e232c;
    --w-surface2-l: #dddad2;
    --w-surface2-d: #2a303b;
    --w-text-l: #1a2332;
    --w-text-d: #e9ebf0;
    --w-text2-l: #45505f;
    --w-text2-d: #b5bbc8;
    --w-text3-l: #535e6d;
    --w-text3-d: #959dac;
    --w-line: 18%;
    --w-line-strong: 46%;
    /* The red margin of a French notebook: a rule, never a fill. */
    --hz-margin: color-mix(in srgb, #ff8e77 calc(var(--hz-dark) * 100%), #d9412f);
    /* Titles are written, not carved: little flare, no volume. */
    --hz-heading-settings: "FLAR" 35, "VOLM" 0;
    --hz-display-settings: "FLAR" 55, "VOLM" 0;
    --hz-heading-weight: 700;
    --hz-display-weight: 780;
    --hz-text-display: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
    --hz-text-h1: clamp(2rem, 1.5rem + 2vw, 3rem);
    --hz-text-h2: clamp(1.5rem, 1.25rem + 1vw, 2.125rem);
    --hz-leading-body: 1.68;
    --hz-text-max: 40rem;
    --hz-radius-xs: 2px;
    --hz-radius-sm: 2px;
    --hz-radius-md: 3px;
    --hz-radius-lg: 3px;
    --hz-radius-xl: 4px;
    --hz-radius-2xl: 4px;
    --hz-radius-full: 3px;
  }
  /* Reading comfort (WCAG 1.4.12): <html data-comfort="wide"> opens the text. */
  [data-world="campus"][data-comfort="wide"] body {
    letter-spacing: 0.035em;
    word-spacing: 0.12em;
    line-height: 1.9;
  }
}
@layer components {
  /* The margin: a rail on the left of a lesson, for numbers and progress. */
  [data-world="campus"] .hz-margin {
    border-left: 2px solid var(--hz-margin);
    padding-left: clamp(1rem, 0.5rem + 2vw, 2rem);
  }
  /* A revision card: what to keep from a module, on squared card stock. */
  [data-world="campus"] .hz-fiche {
    position: relative;
    padding: clamp(1.25rem, 1rem + 1vw, 2rem);
    border: 1px solid var(--hz-line-strong);
    border-top: 6px solid var(--hz-accent);
    /* Square, like the card stock: a rounded corner bends the coloured band. */
    border-radius: 0;
    background-color: var(--hz-surface);
    background-image:
      linear-gradient(90deg, var(--hz-line) 1px, transparent 0), linear-gradient(var(--hz-line) 1px, transparent 0);
    background-size: 20px 20px;
    background-position: -1px -1px;
  }
  [data-world="campus"] .hz-fiche > :first-child {
    margin-top: 0;
  }
  /* Highlighter: key terms and definitions only. */
  [data-world="campus"] .hz-em,
  [data-world="campus"] mark {
    background-image: linear-gradient(var(--hz-accent-soft), var(--hz-accent-soft));
    background-size: 100% 78%;
    background-position: 0 60%;
    background-repeat: no-repeat;
    background-color: transparent;
    color: inherit;
    padding-inline: 0.12em;
  }
  [data-world="campus"] .hz-header {
    border-bottom: 2px solid var(--hz-text);
  }
}
