/* ===========================================================================
   ResearchForge — hand-drawn "notebook + stickers" theme
   ---------------------------------------------------------------------------
   Every selector, id, class and CSS custom property that app.js relies on is
   preserved (see the header comment block below). Only the *look* changes.

   Hooks the JavaScript depends on — do not rename or remove:
     .panel / .panel.active      panel switching          (display:none / block)
     #nav button.active          active nav item
     .badge ok|warn|bad|info|grey   status pills
     .banner ok|warn|bad         banner variants (#banner uses inline display)
     .toast / .toast.show ok|bad toast visibility
     .modal-backdrop / .open     modal visibility
     .chip.selectable.on         adapter selection
     .record.selected            selected record
     .progress > div             job progress fill
     .log, .kv, .chips, .chip, .table-wrap, .row, .row.tight,
     .muted, .small, .tiny, .mono, .section-status, .grid2,
     .close, .passage, .where, .actions, .meta
     var(--bad) var(--warn) var(--panel-2)   used in inline styles from app.js
   =========================================================================== */

:root {
  /* --- surfaces ---------------------------------------------------------- */
  --paper: #fffdf6;
  --panel: #fffdf6;
  --panel-2: #f6efe1;

  /* --- ink -------------------------------------------------------------- */
  --ink: #1a1a1f;
  --border: #1a1a1f;
  --text: #1a1a1f;
  --muted: #7a7164;

  /* --- accents ---------------------------------------------------------- */
  --accent: #6d28d9;
  --accent-dim: #7c3aed;
  --sun: #ffd84d;
  --lime: #c9f45b;
  --coral: #ff7a9c;
  --sky: #7dd3fc;
  --hi: #ffe98a;

  /* --- semantics (tints + ink for readable sticker badges) -------------- */
  --ok: #0e8a4f;
  --ok-tint: #ddf7e6;
  --warn: #b45309;
  --warn-tint: #fff0d1;
  --bad: #dc2626;
  --bad-tint: #ffe2e4;
  --info: #1d4ed8;
  --info-tint: #e0eaff;
  --grey: #6b6259;
  --grey-tint: #efeae1;

  /* --- geometry --------------------------------------------------------- */
  --radius: 8px;
  --header-h: 60px;
  --shadow-1: 2px 2px 0 rgba(26, 26, 31, .85);
  --shadow-2: 3px 3px 0 rgba(26, 26, 31, .16);
  --shadow-3: 4px 4px 0 rgba(26, 26, 31, .18);

  /* hand-drawn "wobbly" corner radii — the core sketch trick */
  --wobble: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --wobble-alt: 15px 225px 15px 255px / 225px 15px 255px 15px;
  --wobble-sm: 14px 5px 16px 6px / 6px 15px 5px 17px;
  --wobble-xs: 10px 4px 11px 4px / 4px 10px 4px 11px;

  /* --- type ------------------------------------------------------------- */
  --font-doodle: "Shantell Sans", "Comic Sans MS", "Segoe Print", "Bradley Hand", cursive;
  --font-hand: "Caveat", "Segoe Script", "Bradley Hand", cursive;
  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, "Courier New", monospace;
}

/* faint dot-grid paper */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.55;
  background-color: var(--paper);
  background-image: radial-gradient(#e6dcc9 1.15px, transparent 1.15px);
  background-size: 22px 22px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--lime); color: var(--ink); }

code, pre, .mono { font-family: var(--font-mono); font-size: 12.5px; }
code {
  background: var(--panel-2);
  border: 1px solid rgba(26, 26, 31, .14);
  border-radius: var(--wobble-xs);
  padding: 0 4px;
}

a { color: var(--accent); text-decoration: underline wavy rgba(109, 40, 217, .45); text-underline-offset: 3px; }
a:hover { color: var(--ink); background: var(--lime); text-decoration-color: var(--ink); }

/* ---------------------------------------------------------------- header -- */
header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
  padding: 0 18px;
  background: var(--ink);
  color: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: hidden;
}

/* crayon scribble glued under the header */
header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: repeating-linear-gradient(
    -45deg,
    var(--sun) 0 12px,
    var(--coral) 12px 24px,
    var(--lime) 24px 36px,
    var(--sky) 36px 48px
  );
}

header h1 {
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: 21px;
  margin: 0;
  letter-spacing: .4px;
  color: var(--sun);
  transform: rotate(-1.2deg);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
  flex: 0 0 auto;
}

header .tagline {
  font-family: var(--font-hand);
  font-size: 16px;
  color: var(--lime);
  transform: rotate(-.6deg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 0 1 auto;
}
header .spacer { flex: 1; }

/* ---------------------------------------------------------------- layout -- */
.layout { display: flex; min-height: calc(100vh - var(--header-h)); align-items: flex-start; }

aside {
  width: 244px;
  flex: 0 0 244px;
  padding: 14px 10px 24px;
  border-right: 2px dashed rgba(26, 26, 31, .22);
  position: sticky;
  top: var(--header-h);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

main { flex: 1; padding: 20px 24px 72px; min-width: 0; }

/* ------------------------------------------------------------------- nav -- */
nav button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 11px;
  margin-bottom: 5px;
  background: transparent;
  color: var(--muted);
  border: 2px solid transparent;
  border-radius: var(--wobble-sm);
  cursor: pointer;
  font-family: var(--font-doodle);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.25;
}
nav button:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: rgba(26, 26, 31, .2);
  transform: rotate(-.5deg);
}
nav button.active {
  background: var(--sun);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: var(--shadow-1);
  transform: rotate(-.8deg);
}
nav button.active:hover { background: var(--lime); }

/* ----------------------------------------------------------------- panels -- */
.panel { display: none; }
.panel.active { display: block; animation: pop-in .22s ease-out; }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(5px) rotate(-.2deg); }
  to { opacity: 1; transform: none; }
}

h2 {
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.15;
  margin: 0 0 8px;
  color: var(--ink);
  text-decoration: underline wavy var(--coral);
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
}

h3 {
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: 17px;
  margin: 20px 0 9px;
  color: var(--ink);
  background: linear-gradient(transparent 62%, var(--hi) 62% 94%, transparent 94%);
  display: inline-block;
}

h4 { font-weight: 800; }

.sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; max-width: 92ch; }

/* ------------------------------------------------------------------ cards -- */
.card {
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: var(--wobble);
  padding: 15px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-3);
}
.card.tight { padding: 11px 13px; }

/* --------------------------------------------------------------- controls -- */
label {
  display: block;
  font-family: var(--font-doodle);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .2px;
  color: var(--ink);
  opacity: .8;
  margin-bottom: 5px;
}

textarea, input[type=text], input[type=number], input[type=search], select {
  width: 100%;
  background: var(--paper);
  color: var(--text);
  border: 2px solid var(--ink);
  border-radius: var(--wobble-xs);
  padding: 8px 11px;
  font-size: 13px;
  font-family: inherit;
  box-shadow: var(--shadow-1);
}
textarea { resize: vertical; min-height: 88px; }
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 2px 2px 0 var(--accent);
  background: #fff;
}
::placeholder { color: #a89e8d; }
select { cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; vertical-align: -2px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 130px; min-width: 120px; }
.row.tight > * { flex: 1 1 auto; min-width: 0; }
.row.tight { align-items: center; }

/* ---------------------------------------------------------------- buttons -- */
button.btn {
  background: var(--sun);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--wobble-xs);
  padding: 7px 15px;
  cursor: pointer;
  font-family: var(--font-doodle);
  font-weight: 700;
  font-size: 13px;
  box-shadow: var(--shadow-1);
  transform: rotate(-.4deg);
  transition: transform .06s ease, box-shadow .06s ease, background .12s;
}
button.btn:hover { background: var(--lime); transform: rotate(-1deg); }
button.btn:active { transform: translate(2px, 2px) rotate(-.4deg); box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
button.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: var(--shadow-1); }
button.btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

button.btn.ghost { background: var(--paper); color: var(--ink); }
button.btn.ghost:hover { background: var(--panel-2); }
button.btn.danger { background: var(--bad-tint); border-color: var(--ink); color: var(--bad); }
button.btn.danger:hover { background: var(--coral); color: var(--ink); }
button.btn.small { padding: 4px 10px; font-size: 12px; }
button.btn.small.ghost { font-weight: 600; }

a.btn { display: inline-block; text-decoration: none; }
a.btn:hover { background: var(--lime); color: var(--ink); text-decoration: none; }
a.btn.ghost:hover { background: var(--panel-2); }

/* ----------------------------------------------------------------- tables -- */
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1.5px solid #efe7d6; vertical-align: top; }
th {
  font-family: var(--font-doodle);
  font-weight: 700;
  color: var(--ink);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2.5px solid var(--ink);
  white-space: nowrap;
}
tbody tr:nth-child(even) { background: rgba(246, 239, 225, .5); }
tbody tr:hover { background: var(--hi); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; margin-bottom: 4px; }

/* ----------------------------------------------------------------- badges -- */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--wobble-xs);
  font-family: var(--font-doodle);
  font-weight: 700;
  font-size: 11px;
  border: 2px solid var(--ink);
  white-space: nowrap;
  box-shadow: 1.5px 1.5px 0 rgba(26, 26, 31, .8);
}
.badge.ok { color: var(--ok); background: var(--ok-tint); }
.badge.warn { color: var(--warn); background: var(--warn-tint); }
.badge.bad { color: var(--bad); background: var(--bad-tint); }
.badge.info { color: var(--info); background: var(--info-tint); }
.badge.grey { color: var(--grey); background: var(--grey-tint); }

/* header badges sit on ink — soften the outline so they read as stickers */
header .badge { box-shadow: none; border-color: var(--paper); flex: 0 0 auto; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }

/* --------------------------------------------------------------- progress -- */
.progress {
  height: 16px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--wobble-xs);
  overflow: hidden;
  margin: 10px 0;
  box-shadow: var(--shadow-1);
}
.progress > div {
  height: 100%;
  background: repeating-linear-gradient(-45deg, var(--sun) 0 8px, var(--lime) 8px 16px);
  transition: width .3s;
}

/* ------------------------------------------------------------------- logs -- */
pre.log {
  background: #14141a;
  color: #d8f36a;
  border: 2px solid var(--ink);
  border-radius: var(--wobble-sm);
  padding: 12px;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  box-shadow: var(--shadow-2);
}

/* ---------------------------------------------------------------- banners -- */
.banner {
  background: var(--panel-2);
  border: 2px solid var(--ink);
  border-left: 9px solid var(--accent);
  border-radius: var(--wobble-sm);
  padding: 11px 13px;
  margin-bottom: 16px;
  font-size: 12.5px;
  box-shadow: var(--shadow-2);
}
.banner.warn { border-left-color: var(--warn); background: var(--warn-tint); }
.banner.bad { border-left-color: var(--bad); background: var(--bad-tint); }
.banner.ok { border-left-color: var(--ok); background: var(--ok-tint); }

/* -------------------------------------------------------------------- kv --- */
.kv { display: grid; grid-template-columns: 190px 1fr; gap: 5px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }

/* ----------------------------------------------------------------- chips --- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: flex-start; }
.chip {
  display: inline-block;
  background: var(--paper);
  border: 2px solid rgba(26, 26, 31, .55);
  border-radius: var(--wobble-xs);
  padding: 2px 9px;
  font-family: var(--font-doodle);
  font-weight: 600;
  font-size: 11.5px;
  color: var(--ink);
  cursor: default;
}
.chips .chip:nth-child(even) { transform: rotate(.8deg); }
.chips .chip:nth-child(odd) { transform: rotate(-.8deg); }
.chip.selectable { cursor: pointer; }
.chip.selectable:hover { background: var(--hi); border-color: var(--ink); }
.chip.selectable.on {
  background: var(--lime);
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: var(--shadow-1);
  transform: rotate(-1.2deg);
}

/* ---------------------------------------------------------------- records -- */
.record {
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: var(--wobble-alt);
  padding: 11px 13px;
  margin-bottom: 11px;
  box-shadow: var(--shadow-2);
  transition: transform .08s ease, box-shadow .08s ease;
}
.record:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-3); }
.record h4 {
  margin: 0 0 6px;
  font-family: var(--font-doodle);
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}
.record .meta { color: var(--muted); font-size: 12px; margin-bottom: 7px; }
/* the first meta row is a set of pills; the second is a flowing sentence */
.record .meta .chip,
.record .meta .badge { margin: 0 4px 3px 0; }
.record .actions { margin-top: 9px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.record.selected { border-color: var(--accent); border-width: 3px; box-shadow: 3px 3px 0 var(--accent); }

/* -------------------------------------------------------------- details ---- */
details { margin-top: 9px; }
summary { cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 700; font-family: var(--font-doodle); }
summary:hover { color: var(--ink); background: var(--hi); }

/* --------------------------------------------------------------- passages -- */
.passage {
  background: #fffbe6;
  border: 2px solid var(--ink);
  border-left: 8px solid var(--sun);
  border-radius: var(--wobble-xs);
  padding: 8px 11px;
  margin: 8px 0;
  font-size: 12px;
}
.passage .where { color: var(--muted); font-size: 11px; margin-top: 5px; }

/* ----------------------------------------------------------------- modal --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 31, .62);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 44px 20px;
  z-index: 50;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  position: relative;
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: var(--wobble);
  width: 100%;
  max-width: 940px;
  padding: 22px;
  box-shadow: 7px 7px 0 rgba(26, 26, 31, .5);
}
/* strip of washi tape across the top */
.modal::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 128px;
  height: 26px;
  margin-left: -64px;
  background: rgba(255, 216, 77, .82);
  border-left: 2px dashed rgba(26, 26, 31, .28);
  border-right: 2px dashed rgba(26, 26, 31, .28);
  transform: rotate(-2.4deg);
}
.modal .close { float: right; }

/* ----------------------------------------------------------------- toast --- */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 60;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-left: 9px solid var(--accent);
  border-radius: var(--wobble-sm);
  padding: 12px 16px;
  max-width: 440px;
  display: none;
  font-size: 12.5px;
  box-shadow: var(--shadow-3);
}
.toast.show { display: block; animation: slide-in .25s ease-out; }
.toast.bad { border-left-color: var(--bad); background: var(--bad-tint); }
.toast.ok { border-left-color: var(--ok); background: var(--ok-tint); }

@keyframes slide-in {
  from { opacity: 0; transform: translateX(24px) rotate(1.5deg); }
  to { opacity: 1; transform: rotate(-.8deg); }
}

/* ------------------------------------------------------------------ misc --- */
.section-status { font-size: 11.5px; margin-bottom: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* -------------------------------------------------------------- scrollbar -- */
* { scrollbar-width: thin; scrollbar-color: rgba(26, 26, 31, .38) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(26, 26, 31, .32);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(26, 26, 31, .55); background-clip: content-box; }

/* ------------------------------------------------------- responsive ------- */
@media (max-width: 1000px) {
  .grid2 { grid-template-columns: 1fr; }
  .layout { flex-direction: column; }
  aside {
    width: 100%;
    flex: none;
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 2px dashed rgba(26, 26, 31, .22);
    padding-bottom: 14px;
  }
  nav { display: flex; flex-wrap: wrap; gap: 5px; }
  nav button { display: inline-block; width: auto; margin-right: 0; margin-bottom: 0; }
  header { gap: 8px; padding: 0 12px; }
  header .tagline { font-size: 14px; }
  main { padding: 16px 14px 64px; }
}

@media (max-width: 620px) {
  header .tagline { display: none; }
  header h1 { font-size: 18px; }
}

/* --------------------------------------------------- reduced motion ------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .chip, .chips .chip, nav button.active, header h1, button.btn,
  .record:hover, nav button:hover { transform: none !important; }
}

/* ===========================================================================
   NEW SHELL — landing page · workspace gate · dashboard · record profile
   Nothing above this line was changed in behaviour; everything below only
   adds the new surfaces. All class names used by app.js still resolve.
   =========================================================================== */

/* ------------------------------------------------------- view switching -- */
.view { display: none; }
.view.active { display: block; }

/* long-hand spacer so `.spacer` also works outside the header */
.spacer { flex: 1 1 auto; }

/* oversized call-to-action buttons */
button.btn.btn-xl, a.btn.btn-xl {
  padding: 12px 26px;
  font-size: 16.5px;
  border-width: 3px;
  border-radius: var(--wobble-sm);
  letter-spacing: .2px;
}

/* ------------------------------------------------------------ nav groups -- */
.nav-title {
  display: block;
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--muted);
  opacity: .9;
  margin: 15px 0 6px 5px;
}
.nav-title:first-child { margin-top: 0; }

/* =============================== LANDING PAGE ============================ */
.land-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 26px;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}
.land-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
}
.land-top-links { display: flex; gap: 20px; margin-left: auto; }
.land-top-links a {
  font-family: var(--font-doodle);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
}
.land-top-links a:hover { background: var(--lime); }

.land-hero {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 46px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 26px 44px;
}
.land-eyebrow {
  display: inline-block;
  font-family: var(--font-doodle);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  background: var(--ink);
  color: var(--sun);
  padding: 5px 13px;
  border-radius: var(--wobble-xs);
  transform: rotate(-.8deg);
}
.land-hero h1 {
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: clamp(42px, 6.6vw, 84px);
  line-height: .98;
  letter-spacing: -1.6px;
  margin: 18px 0 20px;
  color: var(--ink);
}
.land-hero h1 em {
  font-style: normal;
  display: inline-block;
  background: var(--sun);
  padding: 0 12px;
  border: 3px solid var(--ink);
  border-radius: var(--wobble-xs);
  transform: rotate(-2deg);
  box-shadow: var(--shadow-1);
}
.land-lede { font-size: 17px; line-height: 1.6; max-width: 62ch; margin: 0 0 12px; }
.land-lede-strong { font-weight: 800; color: var(--ink); }
.land-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 14px; align-items: center; }
.land-micro { font-size: 12.5px; color: var(--muted); margin: 0; }

.land-hero-art { position: relative; }
.art {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid var(--ink);
  border-radius: var(--wobble);
  background: var(--panel-2);
  box-shadow: 7px 7px 0 rgba(26, 26, 31, .3);
}
.art.broken { display: none; }
.art-hero { transform: rotate(1.2deg); }
.land-sticker {
  position: absolute;
  bottom: -17px;
  left: -10px;
  background: var(--lime);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-xs);
  padding: 6px 15px;
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: 14px;
  transform: rotate(-4deg);
  box-shadow: var(--shadow-1);
}

.land-strip { max-width: 1240px; margin: 0 auto; padding: 4px 26px 0; }
.land-strip-label {
  display: block;
  font-family: var(--font-doodle);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 10px;
}

.land-section { max-width: 1240px; margin: 0 auto; padding: 48px 26px; scroll-margin-top: 76px; }
.land-h2 {
  font-size: clamp(28px, 3.7vw, 46px);
  line-height: 1.05;
  letter-spacing: -.8px;
  text-decoration: none;
  margin-bottom: 12px;
}
.land-sub { font-size: 16px; color: var(--muted); max-width: 80ch; margin: 0 0 28px; }

.land-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); gap: 20px; }
.land-card {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-sm);
  padding: 16px 16px 18px;
  box-shadow: var(--shadow-3);
}
.land-card:nth-child(odd) { transform: rotate(-.5deg); }
.land-card:nth-child(even) { transform: rotate(.5deg); }
.land-card .art { margin-bottom: 14px; }
.land-card h3 {
  font-size: 19px;
  background: linear-gradient(transparent 60%, var(--lime) 60% 95%, transparent 95%);
}
.land-card p { margin: 9px 0 0; font-size: 14.5px; }

/* the 10-stage background pipeline */
.pipe {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(316px, 1fr));
  gap: 22px 20px;
}
.pipe-step {
  position: relative;
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-sm);
  padding: 18px 16px 16px 22px;
  box-shadow: var(--shadow-3);
}
.pipe-step:nth-child(odd) { transform: rotate(-.35deg); }
.pipe-step:nth-child(even) { transform: rotate(.35deg); }
.pipe-num {
  position: absolute;
  top: -15px;
  left: -13px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--sun);
  border: 3px solid var(--ink);
  border-radius: 50% 44% 56% 48%;
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: 17px;
  box-shadow: var(--shadow-1);
}
.pipe-step h4 {
  font-family: var(--font-doodle);
  font-size: 17.5px;
  font-weight: 800;
  margin: 2px 0 7px;
  color: var(--ink);
}
.pipe-step p { margin: 0; font-size: 13.5px; line-height: 1.55; }
.pipe-mod {
  display: inline-block;
  margin-top: 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--panel-2);
  border: 1.5px dashed var(--ink);
  border-radius: var(--wobble-xs);
  padding: 1px 9px;
}

.land-honesty {
  background: var(--panel);
  border: 4px solid var(--ink);
  border-radius: var(--wobble);
  padding: 30px 32px 26px;
  box-shadow: 9px 9px 0 rgba(26, 26, 31, .26);
}
.land-quote {
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: clamp(20px, 2.7vw, 31px);
  line-height: 1.25;
  background: var(--sun);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-xs);
  padding: 16px 20px;
  margin: 0 0 22px;
  transform: rotate(-.6deg);
  box-shadow: var(--shadow-1);
}
.land-wont { margin: 0; padding-left: 22px; font-size: 15px; }
.land-wont li { margin-bottom: 7px; }

.land-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 26px 44px;
  border-top: 3px dashed rgba(26, 26, 31, .3);
  font-size: 12.5px;
}

/* =============================== WORKSPACE GATE ========================== */
#view-app.ready .gate { display: none; }
#view-app:not(.ready) #app-header,
#view-app:not(.ready) .layout { display: none; }

.gate { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 44px 20px; }
.gate-card {
  width: 100%;
  max-width: 580px;
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: var(--wobble);
  padding: 30px 32px 26px;
  box-shadow: 9px 9px 0 rgba(26, 26, 31, .32);
}
.gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: 15px;
  background: var(--ink);
  color: var(--sun);
  padding: 5px 13px;
  border-radius: var(--wobble-xs);
  transform: rotate(-1deg);
}
.gate-title { font-size: 34px; text-decoration: none; margin: 18px 0 8px; }
.gate-sub { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }

/* ================================ DASHBOARD ============================== */
.dash-head { margin-bottom: 20px; }
.dash-hi { font-size: clamp(30px, 4.4vw, 46px); text-decoration: none; margin-bottom: 5px; letter-spacing: -.8px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-sm);
  padding: 15px 17px;
  box-shadow: var(--shadow-3);
}
.tile:nth-child(4n+1) { background: #fff8d6; transform: rotate(-.7deg); }
.tile:nth-child(4n+2) { background: #eafbe0; transform: rotate(.6deg); }
.tile:nth-child(4n+3) { background: #e6f2ff; transform: rotate(-.5deg); }
.tile:nth-child(4n+4) { background: #ffeaf1; transform: rotate(.8deg); }
.tile-num {
  display: block;
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: var(--ink);
}
.tile-label {
  display: block;
  font-family: var(--font-doodle);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--muted);
  margin-top: 7px;
}

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.dash-primary { background: #fffbe8; }

.dash-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
button.dash-example {
  font-family: var(--font-doodle);
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  background: var(--paper);
  border: 2px dashed rgba(26, 26, 31, .45);
  border-radius: var(--wobble-xs);
  padding: 7px 13px;
  cursor: pointer;
  color: var(--ink);
  box-shadow: none;
}
button.dash-example:hover { background: var(--hi); border-style: solid; border-color: var(--ink); transform: rotate(-.6deg); }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(164px, 1fr)); gap: 12px; }
button.quick-card {
  font-family: inherit;
  text-align: left;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-sm);
  padding: 13px 15px;
  cursor: pointer;
  box-shadow: var(--shadow-2);
  color: var(--ink);
  transition: transform .08s ease, box-shadow .08s ease, background .12s;
}
button.quick-card:hover { background: var(--lime); transform: translate(-2px, -2px); box-shadow: var(--shadow-3); }
.qc-title { display: block; font-family: var(--font-doodle); font-weight: 800; font-size: 15px; }
.qc-note { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.mini-pipe { list-style: none; padding: 0; margin: 0 0 12px; counter-reset: step; }
.mini-pipe li {
  position: relative;
  font-size: 13px;
  padding: 6px 0 6px 32px;
  border-bottom: 1.5px dashed rgba(26, 26, 31, .16);
  color: var(--ink);
}
.mini-pipe li:last-child { border-bottom: none; }
.mini-pipe li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 7px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 50% 44% 56% 48%;
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: 11px;
}

/* ============================= RECORD PROFILE ============================ */
.record-topbar { margin-bottom: 16px; }
.rec-head {
  background: #fffbe8;
  border: 3px solid var(--ink);
  border-radius: var(--wobble);
  padding: 22px 24px 20px;
  box-shadow: var(--shadow-3);
  margin-bottom: 16px;
}
.rec-kind {
  display: inline-block;
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--ink);
  color: var(--sun);
  padding: 4px 12px;
  border-radius: var(--wobble-xs);
  transform: rotate(-1deg);
}
.rec-title {
  font-family: var(--font-doodle);
  font-weight: 800;
  font-size: clamp(25px, 3.5vw, 40px);
  line-height: 1.1;
  letter-spacing: -.7px;
  margin: 14px 0 10px;
  color: var(--ink);
}
.rec-sub { font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.rec-linkrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ===================== responsive additions (new shell) ================== */
@media (max-width: 1000px) {
  .nav-title { flex: 1 0 100%; margin: 10px 0 2px 2px; }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .land-hero { grid-template-columns: 1fr; gap: 28px; padding: 34px 20px 30px; }
  .land-top { padding: 10px 16px; }
  .land-top-links { display: none; }
  .land-section, .land-strip, .land-foot { padding-left: 20px; padding-right: 20px; }
  .land-honesty { padding: 24px 20px 20px; }
}

@media (max-width: 620px) {
  .tile-num { font-size: 32px; }
  .gate-card { padding: 22px 20px; }
  .gate-title { font-size: 27px; }
  .land-hero h1 { letter-spacing: -1px; }
}

/* keep the new decorative tilts out of the way when motion is reduced */
@media (prefers-reduced-motion: reduce) {
  .art-hero, .pipe-step, .pipe-step:nth-child(odd), .pipe-step:nth-child(even),
  .land-card, .land-card:nth-child(odd), .land-card:nth-child(even),
  .tile, .tile:nth-child(4n+1), .tile:nth-child(4n+2), .tile:nth-child(4n+3), .tile:nth-child(4n+4),
  .land-quote, .land-hero h1 em, .land-sticker, .land-eyebrow, .gate-badge, .rec-kind,
  button.quick-card:hover, button.dash-example:hover { transform: none !important; }
}
