/* ===========================================================
   Ammar Alzaiem — assessment register
   Ground: cool sage ledger stock. Ink: green-biased near-black.
   Accent: oxide red, spent only on numerals, stamps, active state.
   =========================================================== */

/* ---- Tokens: light is the base, all colours defined here ---- */
:root {
  --paper:      #E9EBE6;
  --surface:    #F3F4F0;
  --surface-2:  #DFE2DB;
  --ink:        #1A211E;
  --ink-2:      #5A645F;
  --ink-3:      #8B948D;
  --rule:       #C4C9C1;
  --rule-soft:  #D5D9D1;
  --grid:       #DCE0D8;
  --oxide:      #A83A22;
  --oxide-soft: #E3D2CB;

  --st-current:  #1F5C4A;
  --st-progress: #8A6212;
  --st-done:     #5A645F;

  --display: "Archivo", "Archivo Narrow", "Helvetica Neue", Arial, sans-serif;
  --body:    "Spectral", Georgia, "Times New Roman", serif;
  --mono:    "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --rail: 252px;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 64ch;

  color-scheme: light;
}

/* System dark — must not fire when the viewer explicitly chose light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #131714;
    --surface:    #1A1F1B;
    --surface-2:  #232925;
    --ink:        #E5E8E0;
    --ink-2:      #9DA69D;
    --ink-3:      #6E776F;
    --rule:       #2E352F;
    --rule-soft:  #242A25;
    --grid:       #1A1F1B;
    --oxide:      #E0734E;
    --oxide-soft: #3A2720;

    --st-current:  #6FB598;
    --st-progress: #D4A843;
    --st-done:     #9DA69D;

    color-scheme: dark;
  }
}

/* Explicit dark choice wins over a light OS */
:root[data-theme="dark"] {
  --paper:      #131714;
  --surface:    #1A1F1B;
  --surface-2:  #232925;
  --ink:        #E5E8E0;
  --ink-2:      #9DA69D;
  --ink-3:      #6E776F;
  --rule:       #2E352F;
  --rule-soft:  #242A25;
  --grid:       #1A1F1B;
  --oxide:      #E0734E;
  --oxide-soft: #3A2720;

  --st-current:  #6FB598;
  --st-progress: #D4A843;
  --st-done:     #9DA69D;

  color-scheme: dark;
}

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

html { background: var(--paper); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(to right,  var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--oxide);
  outline-offset: 3px;
  border-radius: 1px;
}

/* =======================  SHELL  ======================= */

.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------------------  LEFT RAIL  --------------------- */

.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: clamp(1.75rem, 3vw, 2.75rem) 1.5rem clamp(1.5rem, 3vw, 2rem) var(--pad);
  border-right: 1px solid var(--rule);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  overflow-y: auto;
}

.rail__name {
  font-family: var(--display);
  font-variation-settings: "wdth" 70, "wght" 800;
  font-size: 1.85rem;
  line-height: 0.96;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}

.rail__role {
  font-family: var(--mono);
  font-size: 0.64rem;
  line-height: 1.6;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0.7rem 0 0;
}

.rail__hr { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* index */
.index { display: flex; flex-direction: column; }

.index__item {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.46rem 0;
  text-decoration: none;
  border-top: 1px solid var(--rule-soft);
  color: var(--ink-2);
  transition: color 0.18s ease;
}
.index__item:last-child { border-bottom: 1px solid var(--rule-soft); }

.index__num {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  transition: color 0.18s ease;
}

.index__label {
  font-family: var(--display);
  font-variation-settings: "wdth" 82, "wght" 600;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.index__item:hover { color: var(--ink); }
.index__item[aria-current="true"] { color: var(--oxide); }
.index__item[aria-current="true"] .index__num { color: var(--oxide); }

/* rail footer */
.rail__foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.55rem; }

.rail__links { display: flex; flex-wrap: wrap; gap: 0.3rem 0.85rem; }

.rail__link {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.rail__link:hover { color: var(--oxide); border-color: var(--oxide); }

.rail__loc {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* theme toggle */
.toggle {
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  align-self: flex-start;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.toggle:hover { color: var(--oxide); border-color: var(--oxide); }

/* ---------------------  MAIN  --------------------- */

.main {
  padding: clamp(1.75rem, 3vw, 2.75rem) var(--pad) 6rem;
  /* centred in the track beside the rail — equal whitespace either side */
  width: 100%;
  max-width: calc(1000px + var(--pad) * 2);
  margin-inline: auto;
}

.section { padding: 0 0 clamp(2.75rem, 5vw, 4.25rem); }

.section__head {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 1.5rem;
}

.section__num {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--oxide);
  font-variant-numeric: tabular-nums;
}

.section__title {
  font-family: var(--display);
  font-variation-settings: "wdth" 72, "wght" 800;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
}

.section__note {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: auto;
  text-align: right;
  max-width: 22ch;
  line-height: 1.5;
}

/* prose */
.prose { max-width: var(--measure); display: flex; flex-direction: column; gap: 1rem; }
.prose p { margin: 0; }
.prose p:first-child { font-size: 1.1rem; line-height: 1.62; }

/* -----------------  REGISTER (ruled rows)  ----------------- */

.register { display: flex; flex-direction: column; }

.entry {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 0.4rem 2rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--rule);
}
.entry:last-child { border-bottom: 1px solid var(--rule); }

.entry__gutter { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }

.entry__period {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.entry__body { max-width: var(--measure); }

.entry__title {
  font-family: var(--display);
  font-variation-settings: "wdth" 88, "wght" 700;
  font-size: 1.12rem;
  line-height: 1.2;
  margin: 0;
  letter-spacing: 0.005em;
}

.entry__org {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--oxide);
  margin: 0.35rem 0 0;
}
.entry__meta { color: var(--ink-3); }

.points { margin: 0.7rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.points li { position: relative; padding-left: 1.05rem; font-size: 0.96rem; }
.points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.68em;
  width: 0.5rem; height: 1px;
  background: var(--ink-3);
}

/* status chip */
.chip {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.chip--current  { color: var(--st-current); }
.chip--progress { color: var(--st-progress); }
.chip--done     { color: var(--st-done); }

/* -----------------  ASSESSMENTS  ----------------- */

.assessments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.assess {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 1.35rem 1.4rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.assess__top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }

.assess__target {
  font-family: var(--display);
  font-variation-settings: "wdth" 86, "wght" 700;
  font-size: 1.02rem;
  line-height: 1.18;
  margin: 0;
}

.assess__period {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.assess__env {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--oxide);
  margin: -0.4rem 0 0;
}

.assess__summary { margin: 0; font-size: 0.93rem; line-height: 1.6; color: var(--ink-2); }

.field { display: flex; flex-direction: column; gap: 0.38rem; }

.field__label {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 0.25rem;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0; padding: 0; list-style: none; }

.tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  padding: 0.16rem 0.42rem;
  background: var(--surface-2);
  color: var(--ink-2);
}
.tag--tool { background: transparent; border: 1px solid var(--rule); }

.assess__link {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--oxide);
  text-decoration: none;
  border-bottom: 1px solid var(--oxide-soft);
  align-self: flex-start;
  padding-bottom: 1px;
}
.assess__link:hover { border-color: var(--oxide); }

/* -----------------  CREDENTIALS  ----------------- */

.creds { display: flex; flex-direction: column; }

.cred {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9.5rem;
  gap: 1rem 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}
.cred:last-child { border-bottom: 1px solid var(--rule); }

.cred__kind {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.cred__name {
  font-family: var(--display);
  font-variation-settings: "wdth" 80, "wght" 750;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.14;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0.4rem 0 0;
  text-wrap: balance;
}

.cred__issuer {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--oxide);
  margin: 0.4rem 0 0;
}

.cred__detail { margin: 0.7rem 0 0; max-width: var(--measure); font-size: 0.95rem; color: var(--ink-2); }

.cred__modules { margin-top: 0.9rem; }

.cred__aside { display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; }

/* the one flourish: a struck stamp, used only on in-progress awards */
.stamp {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--oxide);
  border: 2px solid var(--oxide);
  padding: 0.4rem 0.6rem;
  text-align: center;
  line-height: 1.35;
  transform: rotate(-6deg);
  opacity: 0.85;
}
.stamp small { display: block; font-size: 0.82em; letter-spacing: 0.1em; opacity: 0.75; font-weight: 400; }

.cred__verify {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--oxide);
  text-decoration: none;
  border-bottom: 1px solid var(--oxide-soft);
  padding-bottom: 1px;
}
.cred__verify:hover { border-color: var(--oxide); }

/* -----------------  MATRIX  ----------------- */

.matrix { display: flex; flex-direction: column; }

.matrix__row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0.5rem 2rem;
  padding: 0.95rem 0;
  border-top: 1px solid var(--rule-soft);
  align-items: start;
}
.matrix__row:last-child { border-bottom: 1px solid var(--rule-soft); }

.matrix__label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 0.22rem;
}

/* -----------------  CONTACT  ----------------- */

.contact { display: flex; flex-direction: column; gap: 1.5rem; max-width: var(--measure); }
.contact p { margin: 0; font-size: 1.05rem; }

.contact__grid { display: flex; flex-wrap: wrap; gap: 1.75rem 2.5rem; }

.contact__item { display: flex; flex-direction: column; gap: 0.3rem; }

.contact__k {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.contact__v {
  font-family: var(--display);
  font-variation-settings: "wdth" 88, "wght" 600;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.contact__v:hover { color: var(--oxide); border-color: var(--oxide); }

.colophon {
  margin-top: 3.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* -----------------  REVEAL  ----------------- */

.reveal { opacity: 0; transform: translateY(10px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.55s ease, transform 0.55s ease; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .stamp { transform: none; }
}

/* =======================  RESPONSIVE  ======================= */

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }

  .rail {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: clamp(1.5rem, 5vw, 2rem) var(--pad) 1.25rem;
    gap: 1.25rem;
  }

  .rail__name { font-size: clamp(2rem, 11vw, 3rem); }

  /* index becomes a scrolling strip */
  .index {
    flex-direction: row;
    overflow-x: auto;
    gap: 1.25rem;
    padding-bottom: 0.35rem;
    scrollbar-width: thin;
  }
  .index__item {
    grid-template-columns: auto;
    border-top: 0;
    padding: 0;
    flex: 0 0 auto;
    gap: 0.15rem;
  }
  .index__item:last-child { border-bottom: 0; }
  .index__num { display: block; }

  .rail__foot { margin-top: 0; }

  .section__note { margin-left: 0; text-align: left; max-width: 100%; flex-basis: 100%; }
  .section__head { flex-wrap: wrap; }

  .entry, .cred, .matrix__row { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }

  .entry__gutter { flex-direction: row; align-items: center; gap: 0.7rem; }

  .cred__aside { align-items: flex-start; }
  .stamp { align-self: flex-start; }

  .assessments { grid-template-columns: minmax(0, 1fr); }
}

/* =======================  PRINT  ======================= */

@media print {
  :root { --paper: #fff; --ink: #000; --ink-2: #333; --ink-3: #555; --rule: #bbb; --surface: #fff; --oxide: #000; }
  body { background: #fff; font-size: 10pt; }
  .shell { display: block; }
  .rail { height: auto; position: static; border: 0; border-bottom: 2px solid #000; }
  .toggle, .index { display: none; }
  .section { break-inside: avoid; padding-bottom: 1.25rem; }
  .assess, .entry, .cred { break-inside: avoid; }
  .reveal { opacity: 1; transform: none; }
}

/* ===========================================================
   EDIT MODE (editor.js) — a tool layer over the document.
   Only ever visible when the page is opened with #edit.
   =========================================================== */

.ed__bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.6rem var(--pad);
  background: var(--surface);
  border-top: 2px solid var(--oxide);
  box-shadow: 0 -8px 24px -18px rgba(0, 0, 0, 0.6);
}

body.editing { padding-bottom: 4.5rem; }

.ed__status {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ed__status--dirty { color: var(--oxide); }

.ed__spacer { flex: 1 1 auto; }

.ed__btn {
  appearance: none;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.ed__btn:hover { color: var(--ink); border-color: var(--ink-3); }

.ed__btn--primary { color: var(--oxide); border-color: var(--oxide); }
.ed__btn--primary:hover { background: var(--oxide); color: var(--surface); border-color: var(--oxide); }

/* ---- per-section control strip ---- */

.ed__secbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: -0.9rem 0 1.25rem;
}

.ed__ctrl {
  appearance: none;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.5rem;
  background: var(--surface);
  color: var(--ink-3);
  border: 1px solid var(--rule);
  cursor: pointer;
  line-height: 1.4;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.ed__ctrl:hover { color: var(--oxide); border-color: var(--oxide); }
.ed__ctrl--primary { color: var(--oxide); border-color: var(--oxide); }

/* ---- per-item controls ---- */

.ed__item { position: relative; }

.ed__itembar {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.75rem;
  opacity: 0.45;
  transition: opacity 0.15s ease;
}
.ed__item:hover .ed__itembar,
.ed__item:focus-within .ed__itembar { opacity: 1; }

.assess .ed__itembar { margin-top: auto; padding-top: 0.75rem; }

.ed__addsection {
  appearance: none;
  display: block;
  width: 100%;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 1rem;
  margin-top: 1rem;
  background: transparent;
  color: var(--ink-3);
  border: 1px dashed var(--rule);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.ed__addsection:hover { color: var(--oxide); border-color: var(--oxide); }

/* ---- modal ---- */

.ed__backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1rem, 5vh, 3rem) 1rem;
  background: rgba(10, 14, 11, 0.55);
  overflow-y: auto;
}

.ed__modal {
  width: min(620px, 100%);
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
}

.ed__modalhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--ink);
}

.ed__modaltitle {
  font-family: var(--display);
  font-variation-settings: "wdth" 78, "wght" 750;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}

.ed__x {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ed__x:hover { color: var(--oxide); }

.ed__modalbody {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 62vh;
  overflow-y: auto;
}

.ed__modalfoot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--rule);
}

.ed__field { display: flex; flex-direction: column; gap: 0.35rem; }

.ed__label {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.ed__input {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 0.5rem 0.6rem;
  width: 100%;
}
.ed__input:focus-visible { outline: 2px solid var(--oxide); outline-offset: 1px; }
.ed__input--area { resize: vertical; }
.ed__input--code { font-size: 0.72rem; line-height: 1.45; }

.ed__hint { margin: 0; font-size: 0.9rem; color: var(--ink-2); }

/* ---- the "you're looking at a draft" marker ---- */

.ed__pill {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 55;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--oxide);
  background: var(--surface);
  border: 1px solid var(--oxide);
  padding: 0.45rem 0.65rem;
  text-decoration: none;
}
.ed__pill:hover { background: var(--oxide); color: var(--surface); }

@media print {
  .ed__bar, .ed__secbar, .ed__itembar, .ed__addsection, .ed__backdrop, .ed__pill { display: none !important; }
  body.editing { padding-bottom: 0; }
}
