/* Forma - programme ledger theme
   Theme lock: single dark forest palette across the whole page.
   Shape lock: radius 0 everywhere. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/artifacts/forma-frontend--v1--s3-alternative-direction--glm-5.3-flash--taste--2026-09-17T10-22-05-183Z/assets/fonts/space-grotesk-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/artifacts/forma-frontend--v1--s3-alternative-direction--glm-5.3-flash--taste--2026-09-17T10-22-05-183Z/assets/fonts/space-grotesk-500.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/artifacts/forma-frontend--v1--s3-alternative-direction--glm-5.3-flash--taste--2026-09-17T10-22-05-183Z/assets/fonts/space-grotesk-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/artifacts/forma-frontend--v1--s3-alternative-direction--glm-5.3-flash--taste--2026-09-17T10-22-05-183Z/assets/fonts/ibm-plex-mono-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/artifacts/forma-frontend--v1--s3-alternative-direction--glm-5.3-flash--taste--2026-09-17T10-22-05-183Z/assets/fonts/ibm-plex-mono-500.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #142018;          /* deep forest ground */
  --panel: #1b2b21;        /* raised row ground */
  --panel-2: #223529;      /* hover ground */
  --line: rgba(236, 234, 217, 0.16);
  --line-strong: rgba(236, 234, 217, 0.32);
  --bone: #ecead9;         /* primary text */
  --bone-dim: #a8b1a0;     /* secondary text */
  --amber: #e8a83e;        /* single accent */
  --amber-ink: #1d1506;
  --font-sans: "Space Grotesk", "Avenir Next", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --shell: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -48px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--amber);
  color: var(--amber-ink);
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bone);
  text-decoration: none;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.01em;
}
.wordmark-dot {
  width: 9px;
  height: 9px;
  background: var(--amber);
}
.header-note {
  font-size: 12px;
  color: var(--bone-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  padding-top: clamp(48px, 7vh, 84px);
  padding-bottom: clamp(40px, 6vh, 72px);
}
.hero-copy { padding-bottom: 8px; }
.hero-title {
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 15em;
}
.hero-sub {
  margin-top: 24px;
  max-width: 46ch;
  color: var(--bone-dim);
  font-size: 17px;
}
.hero-actions { margin-top: 32px; }

.hero-figure {
  position: relative;
}
.hero-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(14px, 14px);
  border: 1px solid var(--line-strong);
  pointer-events: none;
}
.hero-figure img {
  position: relative;
  width: 100%;
  height: clamp(300px, 46vh, 460px);
  object-fit: cover;
  background: var(--panel);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 13px 22px;
  border: 1px solid var(--bone);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-solid {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
}
.btn-solid:hover { background: var(--bone); border-color: var(--bone); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--bone); }
.btn-ghost:hover { background: var(--bone); color: var(--ink); }
.btn-ghost[aria-pressed="true"] {
  background: var(--bone);
  border-color: var(--bone);
  color: var(--ink);
}
.btn:active { transform: translateY(1px); }

/* ---------- programme ---------- */

.programme { padding-top: 8px; padding-bottom: 96px; }
.programme-head { max-width: 60ch; }
.section-title {
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.015em;
}
.section-sub { margin-top: 10px; color: var(--bone-dim); }

.toolbar {
  margin-top: 36px;
  padding: 20px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: end;
  gap: 20px;
  flex-wrap: wrap;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.field-input {
  font: inherit;
  color: var(--bone);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 10px 14px;
  min-width: 240px;
}
.field-input::placeholder { color: rgba(168, 177, 160, 0.78); }
.field-select { min-width: 180px; appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--bone) 50%),
    linear-gradient(135deg, var(--bone) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.btn-saved { align-self: end; }
.count {
  margin-left: auto;
  font-size: 12px;
  color: var(--bone-dim);
  align-self: end;
  padding-bottom: 12px;
}

/* ledger rows */

.ledger { list-style: none; }
.row { border-bottom: 1px solid var(--line); }
.ledger li:first-child .row { border-top: 0; }

.row-btn {
  display: grid;
  grid-template-columns: 96px 88px minmax(0, 1fr) 110px;
  gap: clamp(16px, 2.4vw, 32px);
  align-items: center;
  width: 100%;
  padding: 22px 12px;
  text-align: left;
  transition: background-color 160ms ease;
}
.row-btn:hover { background: var(--panel); }
.row-btn:hover .row-title { color: var(--amber); }

.row-date {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
  color: var(--bone-dim);
}
.row-date strong {
  display: block;
  color: var(--bone);
  font-weight: 500;
  font-size: 14px;
}

.row-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  background: var(--panel-2);
}

.row-main { min-width: 0; }
.row-title {
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.01em;
  transition: color 160ms ease;
}
.row-meta {
  margin-top: 4px;
  font-size: 14px;
  color: var(--bone-dim);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.row-saved-flag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid var(--amber);
  padding: 2px 7px;
}
.tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-dim);
  border: 1px solid var(--line-strong);
  padding: 4px 9px;
}
.row-price {
  text-align: right;
  font-family: var(--font-mono);
}
.row-price strong {
  display: block;
  font-size: 20px;
  font-weight: 500;
}
.row-price span {
  font-size: 12px;
  color: var(--bone-dim);
}

.empty {
  padding: 72px 0 24px;
  text-align: center;
}
.empty-title { font-weight: 700; font-size: 22px; }
.empty-sub { margin: 10px auto 24px; max-width: 44ch; color: var(--bone-dim); }

/* ---------- detail dialog ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 16, 12, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 40px);
}
.overlay[hidden] { display: none; }

.dialog {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  width: min(980px, 100%);
  max-height: min(720px, calc(100vh - 32px));
  background: var(--ink);
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.detail-figure { position: relative; min-height: 100%; }
.detail-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--panel);
}
.detail-body {
  padding: clamp(24px, 3vw, 40px);
  overflow-y: auto;
}
.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.btn-close { padding: 9px 16px; font-size: 13px; }
.detail-title {
  margin-top: 18px;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.015em;
}
.facts {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--line);
}
.fact {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  padding-right: 12px;
}
.fact dt {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.fact dd { margin-top: 5px; font-size: 14px; }
.detail-text {
  margin-top: 26px;
  color: var(--bone);
  max-width: 52ch;
  font-size: 16px;
  line-height: 1.65;
}
.detail-actions { margin-top: 28px; }
#save-item[aria-pressed="true"] {
  background: transparent;
  border-color: var(--bone);
  color: var(--bone);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
}
.footer-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 36px;
  flex-wrap: wrap;
}
.footer-mark { font-weight: 700; font-size: 18px; }
.footer-note { font-size: 12px; color: var(--bone-dim); letter-spacing: 0.04em; }

/* ---------- mobile ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; align-items: start; padding-top: 36px; }
  .hero-figure { order: 2; }
  .hero-figure img { height: 300px; }
  .header-note { display: none; }
  .row-btn {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb main price"
      "date main price";
    gap: 6px 16px;
    padding: 18px 4px;
  }
  .row-thumb { grid-area: thumb; width: 72px; height: 72px; }
  .row-date { grid-area: date; align-self: end; }
  .row-main { grid-area: main; }
  .row-price { grid-area: price; align-self: center; }
  .row-price strong { font-size: 17px; }
  .row-saved-flag { margin-top: 6px; }
  .count { margin-left: 0; width: 100%; padding-bottom: 0; }
  .field-input { min-width: 0; width: 100%; }
  .field { width: 100%; }
  .field-select { width: 100%; }
  .btn-saved { align-self: stretch; width: 100%; }
  .toolbar { gap: 14px; }

  .overlay { padding: 0; align-items: stretch; }
  .dialog {
    grid-template-columns: 1fr;
    grid-template-rows: 220px 1fr;
    width: 100%;
    max-height: none;
    height: 100%;
    border: 0;
  }
  .detail-figure img { height: 220px; }
  .facts { grid-template-columns: 1fr 1fr; }
}
