:root {
  --bg: #FAF9F6;
  --ink: #1C1B18;
  --ink-soft: #4A4841;
  --accent: #6B7353;
  --accent-soft: #EDEFE7;
  --line: #E4E1D8;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 40px; }

/* Nav */
.nav-wrap { max-width: 1100px; margin: 0 auto; padding: 32px 40px; display: flex; justify-content: space-between; align-items: center; position: relative; }
.logo { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.logo img { display: block; }
.nav-links { display: flex; gap: 36px; font-size: 14px; color: var(--ink-soft); align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink-soft); }
.nav-links a.active { color: var(--ink); font-weight: 500; }
.nav-cta { background: var(--ink); color: var(--bg); padding: 10px 20px; border-radius: 4px; font-size: 14px; text-decoration: none; white-space: nowrap; }
.nav-links a.nav-cta { color: var(--bg); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; z-index: 200; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 780px) {
  .nav-wrap { padding: 22px 24px; flex-wrap: nowrap; }
  .nav-toggle { display: block; order: 3; }
  .nav-links {
    position: fixed; top: 0; right: -280px; width: 260px; height: 100%;
    background: var(--bg); flex-direction: column; align-items: flex-start;
    padding: 90px 28px 28px; gap: 26px; box-shadow: -8px 0 24px rgba(0,0,0,0.08);
    transition: right .25s ease; z-index: 150; font-size: 16px;
  }
  .nav-links.open { right: 0; }
  .nav-links .nav-cta { margin-top: 6px; }
  .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(28,27,24,0.35); z-index: 140; }
  .nav-overlay.open { display: block; }
  .logo span, .logo { font-size: 17px; }
}

/* Hero */
.hero { padding: 80px 0 100px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.root-frame {
  width: 100%; aspect-ratio: 4/5;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.root-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
h1 {
  font-family: 'Fraunces', serif;
  font-size: 46px;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.hero p.sub { font-size: 17px; color: var(--ink-soft); margin-bottom: 32px; max-width: 440px; }
.btn-primary {
  background: var(--ink); color: var(--bg); padding: 14px 26px; border-radius: 4px;
  text-decoration: none; font-size: 15px; font-weight: 500; display: inline-block; margin-right: 12px; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.btn-secondary {
  color: var(--ink); padding: 14px 10px; text-decoration: none; font-size: 15px; font-weight: 500;
  border-bottom: 1.5px solid var(--ink); display: inline-block;
}

/* Page header (non-homepage) */
.page-header { padding: 70px 0 60px; text-align: center; }
.page-header h1 { font-size: 40px; }
.page-header p.sub { max-width: 560px; margin: 0 auto; font-size: 16px; }

/* Stakes / dark band */
.stakes { background: var(--ink); color: var(--bg); padding: 70px 0; }
.stakes .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.stakes h2 { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 500; line-height: 1.3; }
.stakes p { color: #C9C7BE; font-size: 15px; line-height: 1.7; }

/* Ladder */
.ladder { padding: 100px 0; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head .eyebrow { text-align: center; }
.section-head h2 { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 500; }
.ladder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.rung {
  border: 1px solid var(--line); border-radius: 12px; padding: 32px 26px;
  background: #fff; display: flex; flex-direction: column;
}
.rung-num {
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 50%;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.rung h3 { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.rung .tag { font-size: 12px; color: var(--ink-soft); font-family: 'IBM Plex Mono', monospace; margin-bottom: 14px; display: block; }
.rung p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }
.rung .price { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-family: 'Fraunces', serif; font-size: 19px; font-weight: 600; }
.rung .price span { font-family: 'Inter', sans-serif; font-size: 12px; color: var(--ink-soft); font-weight: 400; display: block; margin-top: 2px; }
.rung ul { list-style: none; margin: 14px 0 0; padding: 0; }
.rung ul li { font-size: 13.5px; color: var(--ink-soft); padding-left: 16px; position: relative; margin-bottom: 6px; line-height: 1.5; }
.rung ul li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }

/* Toolkit strip (homepage) */
.toolkit-strip { background: var(--accent-soft); padding: 60px 0; }
.toolkit-strip .wrap { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.toolkit-strip h3 { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 500; margin-bottom: 8px; }
.toolkit-strip p { color: var(--ink-soft); font-size: 14.5px; max-width: 480px; }

/* Toolkit page cards */
.tk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 20px 0 100px; }
.tk-card { border: 1px solid var(--line); border-radius: 14px; padding: 40px 34px; background: #fff; }
.tk-card.featured { border-color: var(--accent); background: var(--accent-soft); }
.tk-card h3 { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 600; margin-bottom: 4px; }
.tk-card .price { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 600; margin: 14px 0 4px; }
.tk-card .price span { font-family: 'Inter', sans-serif; font-size: 13px; color: var(--ink-soft); font-weight: 400; }
.tk-card ul { list-style: none; margin: 22px 0 26px; padding: 0; }
.tk-card ul li { font-size: 14.5px; color: var(--ink-soft); padding-left: 18px; position: relative; margin-bottom: 10px; line-height: 1.5; }
.tk-card ul li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }

/* Login box */
.login-box { max-width: 420px; margin: 0 auto 80px; border: 1px solid var(--line); border-radius: 14px; padding: 36px; background: #fff; text-align: center; }
.login-box h3 { font-family: 'Fraunces', serif; font-size: 20px; margin-bottom: 8px; }
.login-box p { font-size: 14px; color: var(--ink-soft); margin-bottom: 20px; }
.login-box input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 12px; font-family: 'Inter', sans-serif; font-size: 14px; }
.login-box .btn-primary { width: 100%; text-align: center; margin: 0; }

/* About page */
.about-hero { padding: 80px 0 60px; display: grid; grid-template-columns: 1fr 220px; gap: 50px; align-items: start; }
.about-photo { width: 220px; height: 220px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.about-body p { font-size: 15.5px; color: var(--ink-soft); line-height: 1.75; margin-bottom: 18px; }
.credentials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.credential-tag { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--accent); border: 1px solid var(--accent); border-radius: 20px; padding: 6px 14px; }

/* Footer */
footer { padding: 60px 0 40px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; }
footer .logo { font-size: 16px; }
footer p { font-size: 13px; color: var(--ink-soft); }

/* ===== Members Dashboard ===== */
.dash-header { padding: 50px 0 30px; display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:16px; }
.dash-header h1 { font-size: 28px; }
.dash-header .sub-line { color: var(--ink-soft); font-size: 14px; }
.btn-ghost { border:1px solid var(--line); background:#fff; color:var(--ink); padding:9px 16px; border-radius:4px; font-size:13.5px; text-decoration:none; cursor:pointer; font-family:'Inter',sans-serif; }

.guide-banner { border:1px solid var(--accent); background:var(--accent-soft); border-radius:12px; margin-bottom:36px; overflow:hidden; }
.guide-banner summary { cursor:pointer; padding:16px 20px; font-family:'Fraunces', serif; font-weight:600; font-size:15px; list-style:none; display:flex; justify-content:space-between; align-items:center; }
.guide-banner summary::-webkit-details-marker { display:none; }
.guide-banner summary::after { content:'+'; font-family:'Inter',sans-serif; font-size:20px; color:var(--accent); }
.guide-banner[open] summary::after { content:'−'; }
.guide-banner .guide-body { padding:0 20px 20px; font-size:14px; color:var(--ink-soft); line-height:1.7; }
.guide-steps { display:flex; gap:14px; flex-wrap:wrap; margin-top:12px; }
.guide-steps .g-step { background:#fff; border:1px solid var(--line); border-radius:8px; padding:10px 14px; font-size:12.5px; flex:1; min-width:150px; }
.guide-steps .g-step b { display:block; font-family:'IBM Plex Mono',monospace; color:var(--accent); font-size:10px; text-transform:uppercase; margin-bottom:3px; }

.quick-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 44px; }
.q-card { border:1px solid var(--line); border-radius:12px; padding:22px; background:#fff; text-decoration:none; color:var(--ink); display:flex; flex-direction:column; gap:6px; transition:border-color .15s; }
.q-card:hover { border-color:var(--accent); }
.q-card .q-icon { width:30px; height:30px; border-radius:50%; background:var(--accent-soft); display:flex; align-items:center; justify-content:center; font-family:'IBM Plex Mono',monospace; color:var(--accent); font-size:12px; margin-bottom:8px; }
.q-card h4 { font-family:'Fraunces', serif; font-size:15.5px; font-weight:600; }
.q-card p { font-size:12.5px; color:var(--ink-soft); margin:0; }
.q-card .q-tag { font-family:'IBM Plex Mono',monospace; font-size:10px; color:var(--accent); text-transform:uppercase; margin-top:auto; padding-top:8px; }
.q-card.disabled { opacity:0.55; pointer-events:none; }

.two-col { display:grid; grid-template-columns: 1.4fr 1fr; gap:28px; margin-bottom:60px; }
@media (max-width:820px){ .two-col{ grid-template-columns:1fr; } .quick-grid{ grid-template-columns:1fr 1fr; } }

.explainer-box { border:1px solid var(--line); border-radius:12px; padding:24px; background:#fff; }
.explainer-box h3 { font-family:'Fraunces',serif; font-size:16px; margin-bottom:10px; }
.explainer-box p { font-size:13.5px; color:var(--ink-soft); margin-bottom:10px; }
.explainer-row { display:flex; gap:10px; align-items:flex-start; margin-bottom:8px; font-size:12.5px; }
.explainer-row .e-tag { font-family:'IBM Plex Mono',monospace; font-size:10px; color:var(--accent); border:1px solid var(--accent); border-radius:10px; padding:2px 8px; white-space:nowrap; }

.ai-reassure { border:1px dashed var(--accent); border-radius:10px; padding:14px 16px; font-size:12.5px; color:var(--ink-soft); margin-top:12px; background:var(--accent-soft); }

.tips-card { border:1px solid var(--line); border-radius:12px; padding:22px; background:#fff; }
.tips-card h3 { font-family:'Fraunces',serif; font-size:16px; margin-bottom:4px; }
.tips-card .tips-sub { font-size:11.5px; color:var(--ink-soft); margin-bottom:14px; }
.tip-item { border-top:1px solid var(--line); padding:12px 0; }
.tip-item:first-of-type { border-top:none; padding-top:0; }
.tip-item h5 { font-size:13px; margin-bottom:4px; }
.tip-item p { font-size:12px; color:var(--ink-soft); margin:0; }
.tip-item a { font-size:11px; color:var(--accent); }

/* Notepad slideout */
#notepad-toggle { position:fixed; bottom:24px; right:24px; background:var(--ink); color:var(--bg); border:none; border-radius:50px; padding:13px 20px; font-family:'Inter',sans-serif; font-size:13.5px; font-weight:500; cursor:pointer; box-shadow:0 4px 14px rgba(0,0,0,0.18); z-index:50; }
#notepad-panel { position:fixed; top:0; right:-380px; width:360px; height:100%; background:#fff; border-left:1px solid var(--line); box-shadow:-6px 0 20px rgba(0,0,0,0.08); z-index:60; transition:right .25s ease; display:flex; flex-direction:column; padding:24px; }
#notepad-panel.open { right:0; }
#notepad-panel h3 { font-family:'Fraunces',serif; font-size:17px; margin-bottom:4px; }
#notepad-panel .np-sub { font-size:11.5px; color:var(--ink-soft); margin-bottom:14px; }
#notepad-panel textarea { flex:1; border:1px solid var(--line); border-radius:8px; padding:14px; font-family:'Inter',sans-serif; font-size:13.5px; resize:none; line-height:1.6; }
#notepad-panel .np-status { font-size:11px; color:var(--accent); margin-top:8px; min-height:16px; }
#notepad-close { position:absolute; top:20px; right:20px; background:none; border:none; font-size:18px; cursor:pointer; color:var(--ink-soft); }

/* Additional mobile layout fixes — kept at end of file so they win over earlier base rules */
@media (max-width: 780px) {
  .ladder-grid { grid-template-columns: 1fr; gap: 20px; }
  .tk-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero { grid-template-columns: 1fr; padding: 40px 0 60px; }
  h1 { font-size: 32px; }
  .page-header h1 { font-size: 28px; }
}
