/* =========================================================
   THE WORKFLOW VAULT · clean minimal stylesheet (v5)
   Handhold-inspired · white + ink · pastel orb · top nav
   ========================================================= */

:root {
  --bg:        #FCFCFE;   /* near-white */
  --bg-elev:   #FFFFFF;   /* secondary button surface */
  --bg-card:   #FFFFFF;   /* cards */
  --bg-input:  #FFFFFF;   /* white inputs */
  --code-bg:   #F4F5F8;   /* cool light */

  --primary:   #15171E;   /* ink (buttons, key accents) */
  --primary-2: #2C2F3A;   /* lighter ink (hover) */
  --primary-3: #15171E;
  --accent:    #15171E;
  --accent-2:  #15171E;
  --accent-hover: #2C2F3A;
  --blush:     #EDEEF2;   /* cool selected / hover */
  --blush-soft:#F5F6F8;

  --text:      #15171E;   /* near-black */
  --text-dim:  #565C6A;   /* cool gray */
  --text-mute: #8A909E;

  --border:    #E9EAEF;
  --border-2:  #D9DBE2;

  --good:      #3E8E6E;   /* muted green */
  --bad:       #C0483B;   /* muted red */

  --radius:    16px;
  --radius-sm: 8px;
  --shadow:    0 1px 2px rgba(20,22,40,0.04), 0 12px 32px rgba(20,22,60,0.07);
  --shadow-sm: 0 1px 2px rgba(20,22,40,0.05), 0 5px 16px rgba(20,22,60,0.05);
  --sidebar-w: 272px;

  /* schedule category accents (muted, distinct on white) */
  --cat-role1:  #4F7CF5; /* blue */
  --cat-role2:  #8B5CF0; /* violet */
  --cat-role3:  #14B8A6; /* teal */
  --cat-care:   #E0A23C; /* amber */
  --cat-deep:   #E05670; /* rose */
  --cat-admin:  #E07A3D; /* orange */
  --cat-buffer: #9AA1AE; /* gray */
  /* split / double-duty: two-tone stripe so divided attention reads as divided */
  --cat-split:  repeating-linear-gradient(45deg, #4F7CF5 0 5px, #E0A23C 5px 10px);
  --cat-split1: repeating-linear-gradient(45deg, #4F7CF5 0 5px, #E0A23C 5px 10px);
  --cat-split2: repeating-linear-gradient(45deg, #8B5CF0 0 5px, #E0A23C 5px 10px);
  --cat-split3: repeating-linear-gradient(45deg, #14B8A6 0 5px, #E0A23C 5px 10px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); overflow-x: hidden; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: transparent;
  color: var(--text);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ambient gradient orbs (Handhold-style), warm palette, fixed behind all content */
body::before, body::after { content: ""; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(48px); }
body::before { width: 64vw; height: 64vw; max-width: 820px; max-height: 820px; top: -22vw; right: -10vw; opacity: 0.55; background: radial-gradient(circle at 38% 38%, #FFE0CC, #E7DBFF 55%, transparent 72%); animation: orbA 24s ease-in-out infinite; }
body::after { width: 54vw; height: 54vw; max-width: 680px; max-height: 680px; bottom: -18vw; left: 2vw; opacity: 0.5; background: radial-gradient(circle at 50% 50%, #D7E7FF, #F0E4FF 58%, transparent 76%); animation: orbB 30s ease-in-out infinite; }
@keyframes orbA { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-4vw, 3vw) scale(1.08); } }
@keyframes orbB { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(5vw, -3vw) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; } }

a { color: var(--primary); text-decoration: none; border-bottom: 1px solid rgba(21,23,30,0.22); transition: border-color 0.15s, color 0.15s; }
a:hover { color: var(--accent-hover); border-color: var(--accent-hover); }

h1, h2, h3, h4 { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif; line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; color: var(--text); }
h1 { font-size: 2.6rem; }
h2 { font-size: 1.7rem; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
p  { color: var(--text-dim); }
strong { font-weight: 600; color: var(--text); }
em { font-style: italic; }
code { font-family: 'DM Mono', ui-monospace, Menlo, Consolas, monospace; background: var(--code-bg); padding: 0.08rem 0.4rem; border-radius: 4px; font-size: 0.9em; color: var(--text); }

/* ---------- App layout: top navigation (Handhold-style) ---------- */
.layout { display: block; min-height: 100vh; }

/* the markup's "sidebar" element is now the top navigation bar */
.sidebar {
  position: sticky; top: 0; z-index: 40; width: 100%; height: auto;
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1rem;
  background: rgba(255,255,255,0.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0.7rem clamp(1rem, 4vw, 2.4rem);
}
.brand { display: flex; align-items: center; gap: 0.6rem; padding: 0; margin: 0 auto 0 0; border-bottom: none; }
.brand .logo { width: 32px; height: 32px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; font-family: 'DM Sans', sans-serif; font-weight: 700; color: #fff; font-size: 0.95rem; }
.brand .name { font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 0.98rem; color: var(--text); letter-spacing: -0.01em; }
.brand .name small { display: none; }

.nav-list { list-style: none; display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px; margin: 0; align-items: center; }
.nav-list a {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.75rem;
  border-radius: 999px; color: var(--text-dim); font-weight: 600; font-size: 0.86rem;
  border-bottom: none; transition: background 0.13s, color 0.13s;
}
.nav-list a:hover { background: var(--blush-soft); color: var(--text); }
.nav-list a.active { background: var(--primary); color: #fff; }
.nav-list a .num {
  width: 19px; height: 19px; flex: 0 0 19px; border-radius: 5px;
  display: grid; place-items: center; font-size: 0.66rem; font-weight: 700;
  font-family: 'DM Mono', monospace; background: transparent; color: var(--text-mute);
  border: 1px solid var(--border-2);
}
.nav-list a.active .num { color: #fff; border-color: rgba(255,255,255,0.5); }
.nav-list a.done .num { color: var(--good); border-color: var(--good); }
.nav-list a, .nav-list a:hover, .nav-list a.active { text-decoration: none; }
.nav-sep, .nav-sep-li { display: none; }
.sidebar-foot { display: none; }

/* thin progress bar at the very top, above the nav */
.progress-top { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: #ECEDF1; z-index: 60; }
.progress-top-fill { height: 100%; background: var(--primary); width: 0; transition: width 0.35s ease; }

/* ---------- Main ---------- */
.main { display: block; min-width: 0; }
.topbar { display: none; }
.menu-btn { display: none !important; }
.progress-meta, .progress-track { display: none; }

.content { padding: 2.8rem clamp(1.1rem, 4vw, 2.4rem) 6rem; max-width: 940px; width: 100%; margin: 0 auto; }

.page-head { margin-bottom: 2rem; }
.eyebrow { color: var(--primary); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.eyebrow::before { content: ""; display: inline-block; width: 20px; height: 2px; background: var(--primary); vertical-align: middle; margin-right: 0.5rem; transform: translateY(-2px); }
.page-head h1 { margin: 0.5rem 0 0.7rem; font-size: clamp(2.4rem, 4vw, 3.2rem); }
.page-head .lede { font-size: 1.12rem; max-width: 66ch; color: var(--text-dim); }

/* personalization banner */
.persona-banner {
  display: flex; align-items: flex-start; gap: 0.8rem;
  background: var(--blush-soft); border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin-bottom: 2rem; font-size: 0.98rem; color: var(--text);
}
.persona-banner .pico { font-size: 1.15rem; line-height: 1.3; }
.persona-banner.warn { border-left-color: var(--primary); background: var(--blush); }

/* ---------- Cards / sections ---------- */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem; margin-bottom: 1.8rem; box-shadow: var(--shadow-sm); }
.card.tight { padding: 1.2rem 1.3rem; }
.section-tag { display: inline-block; color: var(--primary); font-weight: 600; font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.6rem; }
.section-tag::before { content: ""; display: inline-block; width: 16px; height: 2px; background: var(--primary); vertical-align: middle; margin-right: 0.45rem; transform: translateY(-2px); }
.hint { color: var(--text-mute); font-size: 0.92rem; margin-bottom: 1.1rem; }
.hidden { display: none !important; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.3rem; }
.field > label, .field-label { display: block; font-weight: 600; font-size: 0.95rem; color: var(--text); margin-bottom: 0.45rem; }
.field .sub { color: var(--text-mute); font-weight: 400; font-size: 0.85rem; }
input[type="text"], input[type="number"], textarea, select {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 0.72rem 0.9rem; font-family: inherit; font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 92px; line-height: 1.6; }
textarea.lg { min-height: 150px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(196,98,45,0.16); }
input::placeholder, textarea::placeholder { color: var(--text-mute); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }

/* radio / level pills */
.radio-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-pill span { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: #fff; font-weight: 500; font-size: 0.92rem; color: var(--text-dim); cursor: pointer; transition: all 0.13s; }
.radio-pill input:checked + span { background: var(--blush); border-color: var(--primary); color: var(--text); font-weight: 600; }
.radio-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(196,98,45,0.2); }
.radio-pill.lvl-high  input:checked + span { background: #E4EEE7; border-color: var(--good); color: #2f5238; }
.radio-pill.lvl-med   input:checked + span { background: #F6ECD8; border-color: var(--cat-care); color: #7a5a18; }
.radio-pill.lvl-low   input:checked + span { background: #F1DED8; border-color: var(--cat-deep); color: #7a2e1d; }
.radio-pill.lvl-unp   input:checked + span { background: var(--blush); border-color: var(--cat-role3); color: #5a4a6b; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; background: #fff; color: var(--text); border: 1px solid var(--border-2); padding: 0.7rem 1.3rem; border-radius: 12px; font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 0.92rem; cursor: pointer; transition: transform 0.13s, box-shadow 0.15s, background 0.13s, border-color 0.13s, color 0.13s; line-height: 1.2; }
.btn:hover { background: var(--blush-soft); border-color: var(--border-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0.5px); }
.btn-primary, .btn-accent { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(20,22,40,0.18); }
.btn-primary:hover, .btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(20,22,40,0.26); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--primary); padding-left: 0.4rem; padding-right: 0.4rem; }
.btn-ghost:hover { background: transparent; color: var(--accent-hover); text-decoration: underline; }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.84rem; }
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 0.4rem; }
.toast-ok { color: var(--good) !important; border-color: var(--good) !important; }

/* ---------- Code / prompt blocks (field-note / recipe card) ---------- */
.codeblock { position: relative; background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 1.1rem 1.15rem; margin: 0.6rem 0 0.4rem; }
.codeblock pre { white-space: pre-wrap; word-break: break-word; font-family: 'DM Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 0.86rem; line-height: 1.65; color: var(--text); }
.codeblock em, .codeblock i { font-family: 'DM Sans', sans-serif; font-style: italic; color: var(--text-dim); }
.codeblock .copy-btn { position: absolute; top: 0.6rem; right: 0.6rem; background: transparent; border: none; color: var(--primary); font-weight: 600; padding: 0.25rem 0.5rem; }
.codeblock .copy-btn:hover { background: rgba(196,98,45,0.1); text-decoration: none; }
.bracket { color: var(--primary); font-weight: 600; }

/* ---------- Output card (BUILD SPEC) ---------- */
.output-card { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); }
.output-card h3 { color: var(--primary); font-family: 'DM Sans', sans-serif; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.82rem; margin-bottom: 1.1rem; font-weight: 700; }
.spec-line { display: grid; grid-template-columns: 210px 1fr; gap: 0.9rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.spec-line:last-child { border-bottom: none; }
.spec-line .k { color: var(--text-mute); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; padding-top: 3px; }
.spec-line .v { color: var(--text); white-space: pre-wrap; font-size: 1rem; }
.spec-line .v.empty { color: var(--text-mute); font-style: italic; font-family: 'DM Sans', sans-serif; }

/* ---------- Editable lists ---------- */
.elist { display: flex; flex-direction: column; gap: 0.5rem; }
.elist .erow { display: flex; gap: 0.5rem; align-items: center; }
.elist .erow input { flex: 1; }
.elist .erow .rm { flex: 0 0 auto; width: 38px; height: 40px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--border); color: var(--text-mute); cursor: pointer; font-size: 1.05rem; }
.elist .erow .rm:hover { color: var(--bad); border-color: var(--bad); }

/* ---------- Dynamic role cards ---------- */
.role-card { background: var(--blush-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.2rem 1.3rem; margin-bottom: 1.1rem; }
.role-card .role-tag { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.7rem; }
.role-card .role-tag .swatch { width: 12px; height: 12px; border-radius: 3px; }

/* ---------- Module 2 schedule ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; margin-bottom: 1.1rem; }
.legend .palette-btn { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.75rem; border-radius: 99px; cursor: pointer; border: 1px solid var(--border); background: #fff; font-size: 0.84rem; font-weight: 500; color: var(--text-dim); transition: all 0.12s; }
.legend .palette-btn .dot { width: 12px; height: 12px; border-radius: 3px; }
.legend .palette-btn.active { border-color: var(--primary); color: var(--text); background: var(--blush); font-weight: 600; }

.schedule { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.sched-row { display: grid; grid-template-columns: 90px 1fr; border-bottom: 1px solid var(--border); }
.sched-row:last-child { border-bottom: none; }
.sched-row .time { padding: 0.5rem 0.75rem; font-size: 0.78rem; color: var(--text-mute); font-weight: 500; font-family: 'DM Mono', monospace; border-right: 1px solid var(--border); display: flex; align-items: center; background: #fff; }
.sched-row .block { padding: 0.5rem 0.85rem; cursor: pointer; min-height: 38px; display: flex; align-items: center; font-size: 0.86rem; font-weight: 500; color: #4A443E; transition: filter 0.1s; background: #fff; }
.sched-row .block:hover { filter: brightness(0.97); }
.block.cat-empty  { background: #fff; color: var(--text-mute); }
.block.cat-empty:hover { background: var(--blush-soft); }
.block.cat-role1  { background: #EAF0FE; box-shadow: inset 4px 0 0 var(--cat-role1); }
.block.cat-role2  { background: #F0EAFD; box-shadow: inset 4px 0 0 var(--cat-role2); }
.block.cat-role3  { background: #E2F6F3; box-shadow: inset 4px 0 0 var(--cat-role3); }
.block.cat-care   { background: #FBF1DF; box-shadow: inset 4px 0 0 var(--cat-care); }
.block.cat-deep   { background: #FCE8EC; box-shadow: inset 4px 0 0 var(--cat-deep); }
.block.cat-admin  { background: #FBEDE2; box-shadow: inset 4px 0 0 var(--cat-admin); }
.block.cat-buffer { background: #F1F2F4; box-shadow: inset 4px 0 0 var(--cat-buffer); }
.block.cat-split,
.block.cat-split1 { background: repeating-linear-gradient(45deg, #EAF0FE 0 9px, #FBF1DF 9px 18px); box-shadow: inset 4px 0 0 var(--cat-role1); }
.block.cat-split2 { background: repeating-linear-gradient(45deg, #F0EAFD 0 9px, #FBF1DF 9px 18px); box-shadow: inset 4px 0 0 var(--cat-role2); }
.block.cat-split3 { background: repeating-linear-gradient(45deg, #E2F6F3 0 9px, #FBF1DF 9px 18px); box-shadow: inset 4px 0 0 var(--cat-role3); }

.authority { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.authority .col h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.authority .col.self h3 { color: var(--good); }
.authority .col.deliberate h3 { color: var(--primary); }

/* ---------- Module 4: priority sorter ---------- */
.prio-group { margin-top: 1.2rem; }
.prio-group h4 { font-family: 'DM Sans', sans-serif; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.5rem; }
.prio-group.now h4 { color: var(--cat-deep); }
.prio-group.soon h4 { color: var(--primary); }
.prio-group.later h4 { color: var(--text-mute); }
.prio-item { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.55rem 0.75rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 0.4rem; }
.prio-item input[type="checkbox"] { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--primary); flex: 0 0 auto; }
.prio-item label { font-size: 0.95rem; color: var(--text); cursor: pointer; }
.prio-item.checked label { text-decoration: line-through; color: var(--text-mute); }

/* ritual / index card */
.ritual-card { background: #fff; border-radius: var(--radius); padding: 1.9rem; color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.ritual-card.indexcard { background: var(--blush-soft); border: 1px dashed var(--primary); }
.ritual-card h3 { color: var(--primary); font-family: 'DM Sans', sans-serif; font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.ritual-card .big { font-family: 'DM Sans', sans-serif; font-size: 1.4rem; font-weight: 600; margin: 0.3rem 0 1.1rem; color: var(--text); }
.ritual-phase { margin-bottom: 1.1rem; }
.ritual-phase .ph { color: var(--primary); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.35rem; }
.ritual-phase ol { margin: 0; padding-left: 1.2rem; }
.ritual-phase ol li { margin-bottom: 0.3rem; color: var(--text-dim); }

/* checklist */
.checklist { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.checklist li { display: flex; gap: 0.6rem; align-items: center; }
.checklist input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); flex: 0 0 auto; }
.checklist label { color: var(--text-dim); }

/* daily template */
.daily-zone { background: var(--blush-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.daily-zone .zh { font-family: 'DM Sans', sans-serif; font-weight: 600; color: var(--primary); font-size: 1rem; margin-bottom: 0.7rem; }
.daily-slot { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.45rem; }
.daily-slot .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: 0 0 auto; }

/* ---------- stars ---------- */
.star-row { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.5rem; }
.star-row .day { width: 44px; font-weight: 600; font-size: 0.88rem; color: var(--text-dim); }
.stars { display: flex; gap: 4px; }
.stars .star { font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--border-2); transition: transform 0.08s, color 0.1s; user-select: none; }
.stars .star:hover { transform: scale(1.12); }
.stars .star.on { color: var(--primary); }

.step-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--primary); color: #fff; font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 1rem; margin-right: 0.7rem; }
.step-head { display: flex; align-items: center; gap: 0.2rem; }
.step-head .mins { margin-left: auto; font-size: 0.8rem; color: var(--text-mute); font-weight: 500; }
.yn { display: inline-flex; gap: 0.4rem; }

/* ---------- Onboarding ---------- */
.onb-wrap { max-width: 760px; margin: 0; padding: 2.8rem 2.4rem 6rem; }
.onb-hero { text-align: left; margin-bottom: 2.4rem; }
.onb-hero .kicker { color: var(--primary); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.82rem; }
.onb-hero .kicker::before { content: ""; display: inline-block; width: 20px; height: 2px; background: var(--primary); vertical-align: middle; margin-right: 0.5rem; transform: translateY(-2px); }
.onb-hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin: 0.8rem 0; line-height: 1.06; letter-spacing: -0.035em; }
.onb-hero h1 .grad { color: var(--primary); }
.onb-hero p { font-size: 1.15rem; color: var(--text-dim); max-width: 60ch; }

.onb-q { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem 1.7rem; margin-bottom: 1.3rem; box-shadow: var(--shadow-sm); }
.onb-q .qnum { color: var(--primary); font-weight: 600; font-size: 0.76rem; letter-spacing: 0.08em; }
.onb-q .qtext { font-family: 'DM Sans', sans-serif; font-size: 1.22rem; font-weight: 600; margin: 0.25rem 0 1.1rem; line-height: 1.35; }
.onb-q .qsub { color: var(--text-mute); font-weight: 400; font-size: 0.88rem; font-family: 'DM Sans', sans-serif; }

.opt-grid { display: grid; gap: 0.6rem; }
.opt-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.opt-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.opt {
  position: relative; cursor: pointer; border: 1px solid var(--border); background: var(--bg-input);
  border-radius: var(--radius-sm); padding: 0.85rem 1rem; font-weight: 500; font-size: 0.95rem;
  color: var(--text-dim); transition: all 0.12s; display: flex; align-items: center; gap: 0.6rem;
}
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt .ic { font-size: 1.1rem; }
.opt:hover { border-color: var(--primary); color: var(--text); background: #fff; }
.opt.selected { background: var(--blush); border-color: var(--primary); color: var(--text); font-weight: 600; }
.opt.selected::after { content: "✓"; margin-left: auto; color: var(--good); font-weight: 700; }

.onb-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 1.8rem; gap: 1rem; }
.onb-note { color: var(--text-mute); font-size: 0.85rem; }

/* ---------- module grid (cards) ---------- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; margin-top: 1.3rem; }
.module-card { display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: transform 0.13s, box-shadow 0.15s, border-color 0.15s; color: var(--text); box-shadow: var(--shadow-sm); }
.module-card:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: var(--shadow); color: var(--text); }
.module-card .mc-num { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--primary); color: #fff; font-family: 'DM Sans', sans-serif; font-weight: 600; margin-bottom: 0.9rem; }
.module-card h3 { margin-bottom: 0.35rem; }
.module-card p { font-size: 0.93rem; }
.module-card .arrow { color: var(--primary); font-weight: 600; font-size: 0.88rem; margin-top: 0.8rem; display: inline-block; border: none; }

.steps-list { counter-reset: s; list-style: none; display: grid; gap: 0.8rem; }
.steps-list li { counter-increment: s; position: relative; padding-left: 2.6rem; color: var(--text-dim); }
.steps-list li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 7px; background: var(--blush); color: var(--primary); font-weight: 700; display: grid; place-items: center; font-size: 0.85rem; font-family: 'DM Mono', monospace; }

.callout { border-left: 3px solid var(--primary); background: var(--blush-soft); padding: 1rem 1.2rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.2rem 0; }
.connect-box { display: flex; gap: 0.7rem; align-items: flex-start; background: #fff; border: 1px dashed var(--cat-role2); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; margin-top: 1.1rem; font-size: 0.92rem; color: var(--text-dim); }
.connect-box .connect-ic { font-size: 1.15rem; line-height: 1.3; flex: 0 0 auto; }
.connect-box strong { color: var(--text); }
.callout p { color: var(--text-dim); margin: 0; }
.divider { height: 1px; background: var(--border); margin: 2rem 0; border: none; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag { background: var(--bg-input); border: 1px solid var(--border); border-radius: 99px; padding: 0.25rem 0.75rem; font-size: 0.8rem; color: var(--text-dim); }

/* ---------- Cowork step cards / folder diagram ---------- */
.step-card { display: flex; gap: 1.1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; margin-bottom: 1.1rem; box-shadow: var(--shadow-sm); }
.step-card .scn { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 9px; background: var(--primary); display: grid; place-items: center; font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 1.1rem; color: #fff; }
.step-card .scbody { flex: 1; min-width: 0; }
.step-card h3 { margin-bottom: 0.5rem; }

.folder-tree { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 1.15rem 1.25rem; font-family: 'DM Mono', monospace; font-size: 0.88rem; line-height: 1.85; color: var(--text-dim); white-space: pre; overflow-x: auto; }
.folder-tree .fdir { color: var(--primary); font-weight: 500; }
.folder-tree .ffile { color: var(--cat-role2); }
.folder-tree .fnote { color: var(--text-mute); }

.cheat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 0.9rem; }
.cheat { background: var(--blush-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem 1.1rem; }
.cheat .ct { font-family: 'DM Sans', sans-serif; font-weight: 600; color: var(--primary); font-size: 0.95rem; margin-bottom: 0.4rem; }
.cheat p, .cheat li { font-size: 0.9rem; color: var(--text-dim); }

/* agents at-a-glance reference */
.agent-ref { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-top: 0.6rem; }
.agent-ref-row { display: grid; grid-template-columns: 170px 1fr 220px; gap: 1rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); align-items: baseline; }
.agent-ref-row:last-child { border-bottom: none; }
.agent-ref-row.head { background: var(--blush-soft); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mute); font-weight: 600; }
.agent-ref-row .ar-name { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 1.02rem; }
.agent-ref-row .ar-name small { display: block; font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 0.72rem; color: var(--primary); text-transform: none; letter-spacing: 0; margin-top: 2px; }
.agent-ref-row .ar-what { color: var(--text-dim); font-size: 0.93rem; }
.agent-ref-row .ar-say code { white-space: normal; }
@media (max-width: 880px) { .agent-ref-row { grid-template-columns: 1fr; gap: 0.3rem; padding: 1rem; } .agent-ref-row.head { display: none; } }

.model-row { display: grid; grid-template-columns: 110px 1fr; gap: 0.9rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.model-row:last-child { border-bottom: none; }
.model-row .mname { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 1.05rem; }
.model-row .mname.haiku { color: var(--cat-admin); }
.model-row .mname.sonnet { color: var(--cat-care); }
.model-row .mname.opus { color: var(--primary); }

/* deploy details */
.deploy-tabs { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.6rem; }
.deploy-tabs details { background: var(--blush-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 1rem; }
.deploy-tabs summary { cursor: pointer; padding: 0.75rem 0; font-weight: 600; font-size: 0.92rem; list-style: none; color: var(--text); }
.deploy-tabs summary::-webkit-details-marker { display: none; }
.deploy-tabs summary::before { content: "▸ "; color: var(--primary); }
.deploy-tabs details[open] summary::before { content: "▾ "; }
.deploy-tabs details > *:not(summary) { padding-bottom: 0.9rem; }
.deploy-tabs ol, .deploy-tabs ul { padding-left: 1.2rem; color: var(--text-dim); font-size: 0.92rem; }

.agent-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.3rem; }
.agent-head .badge { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.25rem 0.6rem; border-radius: 99px; background: var(--blush); color: var(--primary); }
.file-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 0.85rem; background: var(--blush-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 0.5rem; flex-wrap: wrap; }
.file-row .fname { font-family: 'DM Mono', monospace; font-size: 0.85rem; color: var(--text); }
.file-row .fdesc { color: var(--text-mute); font-size: 0.85rem; flex: 1; min-width: 140px; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .sidebar { padding: 0.6rem 1rem; gap: 0.4rem 0.6rem; }
  .nav-list { gap: 3px; }
  .nav-list a { padding: 0.35rem 0.6rem; font-size: 0.82rem; }
  .grid-2, .grid-3, .authority, .opt-grid.cols-2, .opt-grid.cols-3 { grid-template-columns: 1fr; }
  .spec-line { grid-template-columns: 1fr; gap: 0.1rem; }
  .content, .onb-wrap { padding: 1.8rem 1.2rem 4.5rem; }
  .scrim { display: none !important; }
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; color: #111; }
  .sidebar, .topbar, .menu-btn, .btn, .btn-row, .scrim, .no-print, .persona-banner, .progress-top { display: none !important; }
  .main, .content { display: block; max-width: 100%; padding: 0; }
  .card, .output-card, .step-card, .ritual-card { box-shadow: none; border: 1px solid #ccc; background: #fff; color: #111; page-break-inside: avoid; }
  .output-card h3, .spec-line .k, .section-tag { color: #C4622D; }
  .spec-line .v, p, label { color: #111; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
