/* ============================================================
   unfoldr wireframe kit — lo-fi sketch primitives
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --paper: #ffffff;
  --paper-2: #f7f7f5;
  --ink: #0F172A;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --rule: #e2e8f0;
  --yellow: #FCD34D;
  --yellow-soft: #fef3c7;
  --blue: #2563EB;
  --blue-soft: #dbeafe;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --pink-soft: #fce7f3;
  --hand: 'Inter', system-ui, -apple-system, sans-serif;
  --hand-tight: 'Inter', system-ui, sans-serif;
  --display: 'Inter', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #f1f5f9;
  color: var(--ink);
  font-family: var(--hand);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}

body::before { content: none; }

.page {
  position: relative;
  width: 1440px;
  margin: 32px auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  overflow: hidden;
  z-index: 1;
}

/* screen label — clean, no rotation */
.tape {
  position: absolute;
  top: 14px;
  left: 20px;
  background: var(--ink);
  color: white;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 4;
  text-transform: uppercase;
}
.tape.blue { background: var(--blue); }
.tape.right { left: auto; right: 20px; }

/* annotation callouts — clean, structured */
.note {
  position: absolute;
  font-family: var(--hand);
  font-size: 11px;
  font-weight: 500;
  color: var(--blue);
  line-height: 1.3;
  z-index: 5;
  pointer-events: none;
  background: var(--blue-soft);
  border: 1px solid var(--blue);
  padding: 4px 8px;
  border-radius: 4px;
  max-width: 240px;
}
.note::before { content: ""; }
.note.red { color: var(--red); background: var(--red-soft); border-color: var(--red); }
.note.no-arrow::before { content: ""; }

/* app chrome ----------------------------------------------- */
.appshell { display: flex; min-height: 920px; }

.sidebar {
  width: 240px;
  border-right: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar .logo {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 16px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 12px;
  font-family: var(--hand);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.logo-mark {
  width: 28px; height: 28px;
  background: var(--yellow);
  border: 1px solid #d4a017;
  border-radius: 6px;
  display: grid; place-items: center;
  font-family: var(--hand);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.nav-section {
  font-family: var(--hand);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink-3);
  text-transform: uppercase;
  padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  font-family: var(--hand);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 6px;
  cursor: pointer;
}
.nav-item .ico {
  width: 16px; height: 16px;
  border-radius: 4px;
  display: grid; place-items: center;
  font-size: 10px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.nav-item.active {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15,23,42,.06);
}
.nav-item.active .ico { color: var(--blue); }
.nav-item .count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 500;
}

.topbar {
  height: 56px;
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center;
  padding: 0 20px;
  gap: 14px;
  background: var(--paper);
}
.search {
  flex: 1;
  max-width: 480px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 7px 12px;
  font-family: var(--hand);
  color: var(--ink-3);
  font-size: 13px;
  background: var(--paper-2);
  display: flex; align-items: center; gap: 8px;
}
.search::before { content: "⌕"; font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.topbar .spacer { flex: 1; }
.topbar .icon-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  display: grid; place-items: center;
  font-family: var(--hand-tight);
  font-size: 13px;
  background: var(--paper);
  color: var(--ink-2);
}
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--yellow);
  display: grid; place-items: center;
  font-family: var(--hand);
  font-weight: 600;
  font-size: 12px;
  color: var(--ink);
}

.workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
}
.main {
  flex: 1;
  padding: 28px 32px 40px;
  position: relative;
}

/* headings ------------------------------------------------- */
.h1 {
  font-family: var(--hand);
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.h1 .squiggle {
  display: inline-block;
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 1px;
}
.h2 {
  font-family: var(--hand);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.h3 {
  font-family: var(--hand);
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 6px;
  color: var(--ink);
}
.muted { color: var(--ink-2); font-size: 13px; }
.tiny { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: .04em; font-weight: 500; }

/* boxes ---------------------------------------------------- */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 14px;
  position: relative;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.card.dashed { border-style: dashed; box-shadow: none; background: var(--paper-2); }
.card.tinted { background: #fffbeb; border-color: #fde68a; }
.card.blue-tinted { background: #eff6ff; border-color: #bfdbfe; }

.row { display: flex; gap: 14px; }
.col { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* buttons -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-family: var(--hand);
  font-size: 13px;
  font-weight: 500;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.btn.primary { background: var(--blue); color: white; border-color: var(--blue); }
.btn.accent { background: var(--yellow); border-color: #d4a017; color: var(--ink); }
.btn.ghost { box-shadow: none; background: transparent; border-color: transparent; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.lg { padding: 10px 20px; font-size: 14px; font-weight: 600; }

/* chips ---------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  background: var(--paper);
  color: var(--ink-2);
  letter-spacing: .02em;
  font-weight: 500;
  white-space: nowrap;
}
.chip.yellow { background: var(--yellow); border-color: #d4a017; color: var(--ink); }
.chip.yellow-soft { background: var(--yellow-soft); border-color: #fcd34d; color: #854d0e; }
.chip.blue { background: var(--blue); color: white; border-color: var(--blue); }
.chip.blue-soft { background: var(--blue-soft); border-color: #93c5fd; color: #1e40af; }
.chip.green-soft { background: var(--green-soft); border-color: #86efac; color: #166534; }
.chip.pink-soft { background: var(--pink-soft); border-color: #f9a8d4; color: #9d174d; }

/* form controls -------------------------------------------- */
.field {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--paper);
  font-family: var(--hand);
  font-size: 13px;
  color: var(--ink-2);
}
.field.lg { padding: 10px 12px; font-size: 14px; }
.field.area { min-height: 96px; }

.label {
  font-family: var(--hand);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 4px;
  display: block;
}

/* dashed placeholder boxes -------------------------------- */
.placeholder {
  border: 1px dashed var(--ink-3);
  background: var(--paper-2);
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  padding: 12px;
  text-align: center;
}

/* progress bars ------------------------------------------- */
.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.bar > span {
  display: block; height: 100%;
  background: var(--yellow);
}
.bar.blue > span { background: var(--blue); }
.bar.green > span { background: var(--green); }

/* lined writing area (faux notebook) */
.lined {
  background: repeating-linear-gradient(transparent 0 23px, rgba(0,0,0,.12) 23px 24px);
  padding: 0 0 0 0;
  min-height: 100px;
}

/* tab bar */
.tabs {
  display: flex; gap: 20px;
  border-bottom: 1px solid var(--rule);
  padding: 0 2px;
}
.tab {
  font-family: var(--hand);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 2px 10px;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.tab.active {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--blue);
}

/* mini avatar circle */
.av {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--yellow-soft);
  color: #854d0e;
  display: grid; place-items: center;
  font-family: var(--hand);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.av.b { background: var(--blue-soft); color: #1e40af; }
.av.g { background: var(--green-soft); color: #166534; }
.av.p { background: var(--pink-soft); color: #9d174d; }
.av.sm { width: 22px; height: 22px; font-size: 10px; }
.av.lg { width: 38px; height: 38px; font-size: 13px; }

/* arrow scribbles ---------------------------------------- */
.arrow {
  position: absolute;
  pointer-events: none;
  z-index: 5;
}

.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-s { gap: 8px; }
.gap-m { gap: 14px; }
.gap-l { gap: 22px; }
.mt-s { margin-top: 8px; }
.mt-m { margin-top: 16px; }
.mt-l { margin-top: 28px; }
.mb-s { margin-bottom: 8px; }
.mb-m { margin-bottom: 16px; }
.mb-l { margin-bottom: 24px; }

/* back-to-index link */
.back-strip {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 99;
  background: var(--ink);
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--hand);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(15,23,42,.2);
}
.back-strip:hover { background: var(--blue); }

/* divider */
.divider {
  height: 0;
  border-top: 1px solid var(--rule);
  margin: 12px 0;
}

/* drop shadow lift for hero placeholders */
.lift { box-shadow: 0 8px 24px rgba(15,23,42,.08); }

/* color swatch dot */
.dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--rule); display: inline-block; vertical-align: middle; }

/* highlight */
mark.hl {
  background: var(--yellow-soft);
  color: var(--ink);
  padding: 0 3px;
  border-radius: 2px;
}
mark.hl-blue {
  background: var(--blue-soft);
  color: var(--ink);
  padding: 0 3px;
  border-radius: 2px;
}
