/* AAJPM — static mockup stylesheet (HTML + CSS only, no JavaScript).
   Palette and fonts come from 'doc/Palette & polices.html'. */

:root {
  /* Base palette */
  --bg:          #121210;  /* main background */
  --surface:     #48432F;  /* secondary surface */
  --text:        #F1EFE4;  /* main text */
  --muted:       #A8A390;  /* secondary text */
  --accent:      #E0A84A;  /* links, buttons, highlights */

  /* Derived helpers */
  --surface-2:   #24221B;  /* in-between surface (cards, hover) */
  --border:      #3A3627;
  --accent-hover:#ECBC68;
  --on-accent:   #121210;

  /* Muted tricolore: decorative details only (not for text) */
  --bleu:        #3B5B8C;
  --rouge:       #A23B2A;

  /* Fonts */
  --title:   "Cinzel", "Trajan Pro", Georgia, serif;                 /* mottos, site title */
  --heading: "GFS Didot", "Didot", "Bodoni 72", Georgia, serif;      /* headings */
  --font:    "Libre Baskerville", Baskerville, Georgia, serif;       /* body */
  --quote:   "IM Fell DW Pica", "Libre Baskerville", Georgia, serif; /* period quotations */
  --ui:      system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 4px;
  --wrap: 1120px;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
}
main { flex: 1; padding-top: 44px; padding-bottom: 72px; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--heading); font-weight: 400; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5vw, 2.9rem); margin: 0 0 14px; }
h2 { color: var(--accent); font-size: 1.85rem; margin: 0 0 10px; }
h3 { font-size: 1.35rem; margin: 0 0 8px; }
p { margin: 0 0 1em; }
.sc { font-variant: small-caps; letter-spacing: .03em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 760px; }
section { margin-top: 56px; }
.home > section { margin-top: 0; }

.lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 28px; max-width: 68ch; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

.tricolore {
  height: 4px;
  background: linear-gradient(90deg, var(--bleu) 0 33.33%, var(--text) 33.33% 66.66%, var(--rouge) 66.66%);
  opacity: .85;
}

.ornement { display: flex; align-items: center; gap: 14px; justify-content: center; color: var(--accent); margin: 40px 0; }
.ornement::before, .ornement::after { content: ""; height: 1px; width: 90px; background: var(--surface); }

/* ---------- Header: banner ---------- */

.site-header { background: var(--surface); }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }

.brand { display: flex; align-items: center; gap: 14px; color: var(--text); min-width: 0; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand-logo {
  flex: none;
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
  box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 4px var(--surface);
  font-family: var(--title); font-weight: 700; font-size: 1.5rem; color: var(--accent);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-acronym { font-family: var(--title); font-weight: 700; font-size: 1.3rem; letter-spacing: .16em; line-height: 1.2; }
.brand-acronym span { color: var(--accent); }
.brand-name { font-family: var(--heading); font-size: .98rem; line-height: 1.3; color: var(--text); opacity: .85; }
.brand:hover .brand-logo { border-color: var(--accent-hover); color: var(--accent-hover); }

.account { flex: none; display: flex; align-items: center; gap: 12px; }
.profile { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg); color: var(--accent);
  font-family: var(--ui); font-weight: 600; font-size: .8rem; letter-spacing: .04em;
}
.profile-info { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.2; }
.profile-name { font-family: var(--ui); font-size: .88rem; font-weight: 600; }

/* ---------- Header: menu (CSS-only hamburger) ---------- */

.site-nav { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.site-nav .wrap { position: relative; }
.nav-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nav-burger { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: -14px; }
.nav-list a {
  display: block; padding: 13px 14px 11px;
  color: var(--text);
  font-family: var(--ui); font-size: .86rem; letter-spacing: .04em;
  border-bottom: 2px solid transparent;
}
.nav-list a:hover { color: var(--accent); text-decoration: none; }
.nav-list a.active { color: var(--accent); border-bottom-color: var(--accent); }
.nav-list .nav-admin { margin-left: auto; }

@media (max-width: 880px) {
  .nav-burger {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; cursor: pointer; user-select: none;
    font-family: var(--ui); font-size: .86rem; letter-spacing: .04em;
  }
  .nav-burger .bars, .nav-burger .bars::before, .nav-burger .bars::after {
    display: block; width: 22px; height: 2px; background: var(--text); border-radius: 1px;
    transition: transform .15s, background .15s;
  }
  .nav-burger .bars { position: relative; }
  .nav-burger .bars::before, .nav-burger .bars::after { content: ""; position: absolute; left: 0; }
  .nav-burger .bars::before { top: -7px; }
  .nav-burger .bars::after  { top: 7px; }
  .nav-burger .current { color: var(--accent); }
  .nav-burger .current::before { content: "· "; color: var(--muted); }
  .nav-toggle:focus-visible + .nav-burger { outline: 2px solid var(--accent); outline-offset: 2px; }
  .nav-toggle:checked + .nav-burger .bars { background: transparent; }
  .nav-toggle:checked + .nav-burger .bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked + .nav-burger .bars::after  { transform: translateY(-7px) rotate(-45deg); }

  .nav-list { display: none; flex-direction: column; margin: 0; padding: 0 0 10px; }
  .nav-toggle:checked ~ .nav-list { display: flex; }
  .nav-list a { padding: 10px 12px; border-bottom: 0; border-left: 2px solid transparent; }
  .nav-list a.active { border-left-color: var(--accent); background: var(--bg); }
  .nav-list .nav-admin { margin-left: 0; }
}

@media (max-width: 560px) {
  .brand-logo { width: 44px; height: 44px; font-size: 1.2rem; }
  .brand-acronym { font-size: 1.1rem; }
  .brand-name { font-size: .8rem; }
  .profile-info { display: none; }
}

/* ---------- Footer ---------- */

.site-footer { background: var(--surface); padding: 26px 0; font-size: .88rem; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.site-footer .mock-note { flex-basis: 100%; font-family: var(--ui); font-size: .75rem; opacity: .7; }

/* ---------- Buttons, tags ---------- */

.btn {
  display: inline-block; padding: 10px 22px; border-radius: var(--radius);
  font-family: var(--ui); font-weight: 600; font-size: .85rem; letter-spacing: .03em; line-height: 1.4;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--muted); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--text); color: var(--text); }
.site-header .btn-secondary:hover { background: var(--bg); }
.btn-danger { background: transparent; color: var(--text); border-color: var(--rouge); }
.btn-danger:hover { background: var(--rouge); color: var(--text); }
.btn-small { padding: 5px 12px; font-size: .76rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }

.tag {
  display: inline-block; font-family: var(--ui); font-size: .72rem; line-height: 1.6;
  padding: 2px 10px; border-radius: 999px;
  background: var(--surface); color: var(--text); white-space: nowrap;
}
.tag.accent { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.tag.outline { background: transparent; border: 1px solid var(--muted); color: var(--muted); }
a.tag:hover { text-decoration: none; background: var(--accent); color: var(--on-accent); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Cards, quotes ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card {
  background: var(--surface-2); border: 1px solid var(--border); border-top: 2px solid var(--surface);
  border-radius: var(--radius); padding: 24px; transition: border-color .15s;
}
.card:hover { border-color: var(--surface); border-top-color: var(--accent); }
.card p { color: var(--muted); font-size: .93rem; }
.card > :last-child { margin-bottom: 0; }
.card .price { font-family: var(--heading); font-size: 1.5rem; color: var(--accent); margin: 0 0 8px; white-space: nowrap; }
.card .price small { font-family: var(--ui); font-size: .75rem; color: var(--muted); }

blockquote {
  margin: 32px 0; padding: 26px 32px; background: var(--surface-2);
  border-left: 3px solid var(--accent); border-radius: var(--radius);
}
blockquote p { font-family: var(--quote); font-style: italic; font-size: 1.4rem; line-height: 1.5; margin: 0 0 12px; }
blockquote cite { font-style: normal; color: var(--muted); font-size: .9rem; }

/* ---------- Home ---------- */

.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: auto 1fr;
  grid-template-areas: "intro aside" "articles aside";
  gap: 48px 56px;
}
.home-intro { grid-area: intro; }
.home-aside { grid-area: aside; align-self: start; }
.home-articles { grid-area: articles; margin-top: 0; }
.devise { font-family: var(--title); font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); font-size: .85rem; margin: 0 0 18px; }
.devise b { color: var(--accent); font-weight: 500; }
.home-intro p { max-width: 62ch; }

@media (max-width: 920px) {
  .home { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "intro" "aside" "articles"; gap: 40px; }
}

.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; }
.section-head h2 { margin: 0; }
.section-head a { font-family: var(--ui); font-size: .82rem; }

/* ---------- Article lists ---------- */

.post { padding: 24px 0; border-bottom: 1px solid var(--border); }
.post:first-of-type { border-top: 1px solid var(--border); }
.post-meta { font-family: var(--ui); font-size: .78rem; letter-spacing: .04em; color: var(--muted); margin: 0 0 6px; }
.post h3 { font-size: 1.5rem; }
.post h3 a { color: var(--text); }
.post h3 a:hover { color: var(--accent); text-decoration: none; }
.post p { color: var(--muted); font-size: .95rem; max-width: 70ch; }
.post-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0; }
.post-foot .more { margin-left: auto; font-family: var(--ui); font-size: .82rem; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 36px; font-family: var(--ui); font-size: .85rem; }
.pagination a, .pagination span { min-width: 36px; padding: 6px 10px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.pagination .disabled { color: var(--muted); opacity: .5; }

/* ---------- Article page ---------- */

.breadcrumb { font-family: var(--ui); font-size: .8rem; color: var(--muted); margin: 0 0 22px; }
.prose p, .prose ul, .prose ol { max-width: 68ch; }
.prose h2 { margin-top: 40px; }
.prose > h2:first-child { margin-top: 0; }
.prose li { margin-bottom: 6px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-family: var(--ui); font-size: .82rem; color: var(--muted); margin: 0 0 30px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.doc-link {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin: 12px 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
}
.doc-link:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.doc-link .doc-type {
  flex: none; padding: 6px 8px; border: 1px solid var(--rouge); border-radius: 2px;
  font-family: var(--ui); font-size: .7rem; font-weight: 700; letter-spacing: .08em;
}
.doc-link .doc-info { display: flex; flex-direction: column; line-height: 1.4; }
.doc-link .doc-info small { color: var(--muted); font-family: var(--ui); font-size: .76rem; }
.article-nav { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .92rem; }

/* ---------- Mini calendar (home) ---------- */

.panel { background: var(--surface-2); border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: var(--radius); padding: 20px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.panel-head h2 { font-size: 1.35rem; margin: 0; color: var(--text); }
.panel-head a { font-family: var(--ui); font-size: .78rem; }

.mini-cal { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: var(--ui); font-size: .82rem; text-align: center; }
.mini-cal th { padding: 4px 0 8px; color: var(--muted); font-weight: 600; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.mini-cal td { padding: 2px 0; }
.mini-cal td > * { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; }
.mini-cal .out { color: var(--muted); opacity: .45; }
.mini-cal a { color: var(--accent); font-weight: 700; border: 1px solid var(--accent); }
.mini-cal a:hover { background: var(--accent); color: var(--on-accent); text-decoration: none; }
.mini-cal a.past { color: var(--muted); border-color: var(--muted); font-weight: 400; }
.mini-cal .today { background: var(--text); color: var(--bg); font-weight: 700; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-family: var(--ui); font-size: .72rem; color: var(--muted); }
.cal-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.cal-legend .l-today::before { background: var(--text); }
.cal-legend .l-event::before { border: 1px solid var(--accent); }

.upcoming { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--border); }
.upcoming li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.upcoming li:last-child { border-bottom: 0; padding-bottom: 0; }
.upcoming .what { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.upcoming .what a { color: var(--text); font-size: .95rem; }
.upcoming .what a:hover { color: var(--accent); text-decoration: none; }
.upcoming .what small { font-family: var(--ui); font-size: .76rem; color: var(--muted); margin-top: 3px; }

/* Date badge shared by the home list and the calendar page */
.date-badge {
  flex: none; width: 52px; height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); line-height: 1;
}
.date-badge .d { font-family: var(--heading); font-size: 1.5rem; color: var(--accent); }
.date-badge .m { font-family: var(--ui); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 4px; }

/* ---------- Calendar page ---------- */

.cal-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin: 0 0 18px; }
.cal-toolbar .month { display: flex; align-items: center; gap: 10px; }
.cal-toolbar .month h2 { margin: 0; min-width: 7.5em; text-align: center; color: var(--text); }
.cal-arrow {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--muted); border-radius: var(--radius); color: var(--text); font-family: var(--ui); font-size: 1.6rem; line-height: 1; padding-bottom: 4px;
}
.cal-arrow:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.cal-toolbar .year { margin-left: auto; display: flex; align-items: center; gap: 8px; font-family: var(--ui); font-size: .82rem; color: var(--muted); }

.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--surface-2); border: 1px solid var(--border); }
.cal-grid th {
  padding: 8px; background: var(--surface); color: var(--text);
  font-family: var(--ui); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; text-align: left;
}
.cal-grid th abbr { text-decoration: none; }
.cal-grid td { height: 104px; padding: 6px; vertical-align: top; border: 1px solid var(--border); }
.cal-grid .num { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 13px; font-family: var(--ui); font-size: .82rem; }
.cal-grid .out { background: var(--bg); }
.cal-grid .out .num { color: var(--muted); opacity: .5; }
.cal-grid .today { box-shadow: inset 0 0 0 1px var(--accent); }
.cal-grid .today .num { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.cal-grid .ev {
  display: block; margin-top: 4px; padding: 3px 6px;
  background: var(--surface); color: var(--text); border-left: 2px solid var(--accent); border-radius: 2px;
  font-family: var(--ui); font-size: .72rem; line-height: 1.35;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.cal-grid .ev:hover { background: var(--accent); color: var(--on-accent); text-decoration: none; }
.cal-grid .ev.past { border-left-color: var(--muted); color: var(--muted); }
.cal-grid .ev.past:hover { color: var(--on-accent); }

@media (max-width: 720px) {
  .cal-grid td { height: 58px; padding: 4px; text-align: center; }
  .cal-grid th { text-align: center; padding: 8px 2px; }
  .cal-grid .ev {
    display: block; width: 10px; height: 10px; margin: 5px auto 0; padding: 0;
    border: 0; border-radius: 50%; background: var(--accent); font-size: 0;
  }
  .cal-grid .ev.past { background: var(--muted); }
  .cal-toolbar .month h2 { font-size: 1.5rem; }
}

.event { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 16px; }
.event:first-of-type { border-top: 1px solid var(--border); }
.event:target { background: var(--surface-2); box-shadow: -16px 0 0 var(--surface-2), 16px 0 0 var(--surface-2); }
.event-body { min-width: 0; }
.event-body h3 { font-size: 1.45rem; margin-bottom: 4px; }
.event-meta { font-family: var(--ui); font-size: .82rem; color: var(--muted); margin: 0 0 10px; }
.event-body p { max-width: 68ch; }
.event-body .event-meta { max-width: none; }
.event-body > :last-child { margin-bottom: 0; }
.event.past { opacity: .6; }

/* ---------- Timeline (Marat page) ---------- */

.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; border-left: 2px solid var(--surface); }
.timeline li { position: relative; padding: 0 0 24px 8px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -34px; top: 9px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--bleu);
}
.timeline li.key::before { border-color: var(--rouge); background: var(--rouge); }
.timeline .date { font-family: var(--heading); color: var(--accent); font-size: 1.15rem; }
.timeline p { margin: 2px 0 0; max-width: 64ch; }

.bio { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; align-items: start; }
.portrait { margin: 0; }
.portrait .frame {
  aspect-ratio: 4 / 5; display: grid; place-items: center; text-align: center; padding: 20px;
  background: var(--surface-2); border: 1px solid var(--surface); outline: 1px solid var(--border); outline-offset: 5px;
  color: var(--muted); font-family: var(--ui); font-size: .8rem;
}
.portrait .frame b { display: block; font-family: var(--title); font-weight: 700; font-size: 3.5rem; color: var(--surface); line-height: 1; margin-bottom: 12px; }
.portrait figcaption { margin-top: 16px; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.facts { margin: 22px 0 0; font-size: .9rem; }
.facts dt { font-family: var(--ui); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 12px; }
.facts dd { margin: 0; }
@media (max-width: 780px) {
  .bio { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .portrait .frame { max-width: 280px; }
}

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { color: var(--muted); font-family: var(--ui); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.table tbody tr:hover { background: var(--surface-2); }
.table .row-actions { white-space: nowrap; text-align: right; }
.table .row-actions .btn + .btn { margin-left: 6px; }
.table td small { display: block; color: var(--muted); font-family: var(--ui); font-size: .76rem; }

/* ---------- Forms ---------- */

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .field .label { font-family: var(--ui); font-size: .8rem; font-weight: 600; letter-spacing: .03em; }
.field .hint { font-family: var(--ui); font-size: .76rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 10px 14px; border-radius: var(--radius);
  background: var(--bg); color: var(--text); border: 1px solid var(--surface);
  font-family: var(--font); font-size: .95rem; line-height: 1.5;
}
select { font-family: var(--ui); font-size: .88rem; cursor: pointer; }
select.compact { width: auto; padding: 6px 10px; }
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 168, 74, .25); }
.field label.check { display: flex; align-items: flex-start; gap: 10px; font-family: var(--font); font-size: .9rem; font-weight: 400; letter-spacing: 0; }
.check input { margin-top: .45em; accent-color: var(--accent); }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
@media (max-width: 640px) { .form { grid-template-columns: minmax(0, 1fr); } }

.login { max-width: 440px; margin: 24px auto 0; }
.login h1 { text-align: center; }
.login .lead { text-align: center; }
.login .form { grid-template-columns: minmax(0, 1fr); }
.login .btn { width: 100%; text-align: center; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.two-col > * { margin-top: 0; }
@media (max-width: 860px) { .two-col { grid-template-columns: minmax(0, 1fr); } }

.bank { margin: 0; font-size: .93rem; }
.bank dt { font-family: var(--ui); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 12px; }
.bank dt:first-child { margin-top: 0; }
.bank dd { margin: 0; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }

/* ---------- Dashboard ---------- */

.dash-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 28px; }
.dash-head h1 { margin-bottom: 6px; }
.dash-head .lead { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat .n { font-family: var(--heading); font-size: 2.2rem; line-height: 1.1; color: var(--text); }
.stat .l { font-family: var(--ui); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat.alert { border-left: 3px solid var(--accent); }
.stat.alert .n { color: var(--accent); }
.subnav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 28px 0 0; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-family: var(--ui); font-size: .84rem; }
.dash-section { scroll-margin-top: 16px; }
.dash-section .table { min-width: 760px; } /* scrolls sideways inside .table-scroll on small screens */
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 20px; padding: 18px 20px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.inline-form .field { flex: 1 1 180px; }
.inline-form .field.role { flex: 0 1 150px; }
