/* Six Figure Months — SOP Library. Tokens match sixfiguremonths.com */
:root {
  --bg:        #07080a;
  --bg-2:      #0d0f12;
  --card:      #111317;
  --gold:      #d9b36c;
  --gold-2:    #f1d9a4;
  --gold-dim:  rgba(217,179,108,0.08);
  --white:     #f5f6fa;
  --muted:     rgba(245,246,250,0.56);
  --soft:      rgba(245,246,250,0.78);
  --faint:     rgba(245,246,250,0.32);
  --border:    rgba(245,246,250,0.08);
  --border-2:  rgba(217,179,108,0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; background: var(--bg); }
body {
  background: var(--bg); color: var(--white);
  font-family: 'DM Sans', sans-serif; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  min-height: 100vh; display: flex; flex-direction: column;
}
body > main { flex: 1; }
h1, h2, h3, h4 { font-family: 'Plus Jakarta Sans', sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: rgba(217,179,108,0.35); }

.sfm-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

/* ---------- NAV ---------- */
.sfm-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(7,8,10,0.72); border-bottom: 1px solid var(--border);
}
.sfm-nav .sfm-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.sfm-logo { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.sfm-logo-mark {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #0a0a0a; font-size: 12px; font-weight: 800; display: grid; place-items: center; letter-spacing: -0.02em;
}
.sfm-logo .sub { color: var(--faint); font-weight: 500; font-size: 13px; margin-left: 2px; }
.nav-search {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 14px; border-radius: 100px;
  border: 1px solid var(--border); background: rgba(245,246,250,0.03);
  color: var(--muted); font-size: 13.5px; transition: border-color .2s, color .2s;
}
.nav-search:hover { border-color: var(--border-2); color: var(--white); }
.nav-search kbd { font-family: inherit; font-size: 11px; border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; color: var(--faint); }
@media (max-width: 640px) {
  .sfm-logo .sub, .nav-search span, .nav-search kbd { display: none; }
  .nav-search { padding: 9px; }
}

/* ---------- BUTTONS ---------- */
.sfm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0.01em;
  padding: 14px 26px; border-radius: 100px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #0a0a0a;
  box-shadow: 0 10px 40px rgba(217,179,108,0.22), inset 0 1px 0 rgba(255,255,255,0.4);
  transition: transform .2s ease, box-shadow .2s ease;
}
.sfm-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 50px rgba(217,179,108,0.32), inset 0 1px 0 rgba(255,255,255,0.4); }
.sfm-btn-sm { padding: 10px 20px; font-size: 13px; }
.sfm-btn .arr { transition: transform .2s ease; }
.sfm-btn:hover .arr { transform: translateX(3px); }
.ghost-btn {
  padding: 9px 18px; border-radius: 100px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border); color: var(--soft); transition: border-color .2s, color .2s;
}
.ghost-btn:hover { border-color: var(--border-2); color: var(--gold-2); }
.dl-btn { display: inline-flex; align-items: center; gap: 8px; }
.link-btn { font-size: 12px; color: var(--faint); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--gold-2); }

/* ---------- HERO ---------- */
.sfm-hero { position: relative; padding: 72px 0 48px; text-align: center; overflow: hidden; }
.sfm-hero::before {
  content: ''; position: absolute; inset: -20% -10% auto -10%; height: 720px;
  background:
    radial-gradient(ellipse 50% 45% at 50% 30%, rgba(217,179,108,0.16), transparent 70%),
    radial-gradient(ellipse 35% 30% at 20% 10%, rgba(217,179,108,0.06), transparent 70%);
  pointer-events: none;
}
.sfm-hero::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 20%, transparent 75%);
  opacity: 0.5; pointer-events: none;
}
.sfm-hero .sfm-wrap { position: relative; z-index: 1; }
/* Phones: fade the top edge of the hero into the page colour, so the flat-colour gap
   iOS shows when you pull down past the top blends in instead of looking like a bar. */
.hero-fade { display: none; }
@media (max-width: 760px) {
  .hero-fade { display: block; position: absolute; left: 0; right: 0; top: 0; height: 120px; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, var(--bg) 0%, rgba(7,8,10,0.85) 25%, rgba(7,8,10,0) 100%); }
}
.sfm-logo-img { display: block; width: 180px; max-width: 50%; height: auto; margin: 0 auto 28px; }
.sfm-logo-img { animation: logoIn 1.6s cubic-bezier(.22, .61, .36, 1) .15s both; }
@keyframes logoIn {
  from { opacity: 0; transform: translateY(-28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sfm-badge {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border-2); background: var(--gold-dim); border-radius: 100px;
  padding: 7px 16px 7px 12px; font-size: 12.5px; font-weight: 500; letter-spacing: 0.04em; color: var(--gold-2);
  margin-bottom: 28px;
}
.sfm-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: sfmPulse 2.2s ease-in-out infinite; }
@keyframes sfmPulse {
  0%   { box-shadow: 0 0 0 0 rgba(217,179,108,0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(217,179,108,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,179,108,0); }
}
.sfm-hero h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 800; line-height: 1.06; letter-spacing: -0.035em; max-width: 900px; margin: 0 auto 22px; }
.gold { background: linear-gradient(120deg, var(--gold-2) 10%, var(--gold) 60%, #b98e45); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sfm-sub { font-size: clamp(16px, 2vw, 18.5px); font-weight: 300; color: var(--muted); max-width: 640px; margin: 0 auto 36px; }
.sfm-sub strong { color: var(--white); font-weight: 500; }
@media (max-width: 385px) { .sfm-sub { font-size: 15px; letter-spacing: -0.005em; } }


.hero-search {
  max-width: 620px; margin: 0 auto; position: relative;
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--border-2); border-radius: 100px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  color: var(--gold);
  transition: box-shadow .2s, border-color .2s;
}
.hero-search:focus-within { border-color: var(--gold); box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 4px rgba(217,179,108,0.12); }
.hero-search input { flex: 1; min-width: 0; height: 56px; background: none; border: 0; outline: 0; color: var(--white); font: inherit; font-size: 16px; }
.hero-search input::placeholder { color: var(--faint); }

/* ---------- LIBRARY ---------- */
.library { padding-bottom: 96px; }
.cat { padding-top: 56px; }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.cat-head p { color: var(--muted); font-size: 14.5px; }
.sfm-eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); display: flex; align-items: center; gap: 12px;
}
.sfm-eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--gold); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.sop-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px; border-radius: 18px;
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--border);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.sop-card:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(217,179,108,0.06); }
.sop-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pill { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); border: 1px solid var(--border-2); background: var(--gold-dim); border-radius: 100px; padding: 3px 10px; }
.card-progress { font-size: 11.5px; color: var(--faint); }
.card-progress.done { color: var(--gold); }
.sop-card h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
.sop-card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.sop-card-meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--faint); padding-top: 12px; border-top: 1px solid var(--border); }
.sop-card-meta .arr { margin-left: auto; color: var(--gold); transition: transform .2s; }
.sop-card:hover .arr { transform: translateX(3px); }
.cat-empty { color: var(--faint); font-size: 14.5px; padding: 22px; border: 1px dashed var(--border); border-radius: 18px; text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }
mark { background: rgba(217,179,108,0.25); color: var(--gold-2); border-radius: 3px; padding: 0 2px; }

/* ---------- SECTION TILES ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .tiles { grid-template-columns: 1fr; } }
.tile {
  display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--border);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.tile:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(217,179,108,0.08); }
.tile-cover {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden;
  background: radial-gradient(ellipse 70% 70% at 30% 20%, rgba(217,179,108,0.28), transparent 70%), var(--bg-2);
}
.tile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.tile:hover .tile-cover img { transform: scale(1.04); }
.tile-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(13,15,18,0.9)); }
.tile-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.tile-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tile h3 { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.tile-count { flex-shrink: 0; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); }
.tile p { color: var(--muted); font-size: 14.5px; flex: 1; }
.tile-cta { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 13.5px; color: var(--gold); padding-top: 12px; border-top: 1px solid var(--border); }
.tile-cta .arr { display: inline-block; transition: transform .2s; }
.tile:hover .tile-cta .arr { transform: translateX(4px); }

/* ---------- SECTION PAGE ---------- */
.section-hero { position: relative; overflow: hidden; padding: 40px 0 48px; border-bottom: 1px solid var(--border); }
.section-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.section-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 15%, rgba(7,8,10,0.55) 60%, rgba(7,8,10,0.2)), linear-gradient(0deg, var(--bg), transparent 55%); }
.section-hero .sfm-wrap { position: relative; z-index: 1; }
.section-hero .back { display: inline-block; color: var(--muted); font-size: 13.5px; margin-bottom: 56px; transition: color .2s; }
.section-hero .back:hover { color: var(--gold-2); }
.section-hero h1 { font-size: clamp(36px, 5.4vw, 60px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; margin: 16px 0 14px; }
.section-hero .lede { max-width: 560px; }
.section-hero .sfm-badge { margin: 4px 0 0; }
.section-hero + .library { padding-top: 40px; }

/* ---------- SOP PAGE ---------- */
.read-bar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.read-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.sop-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 96px; }
.toc { position: sticky; top: 32px; align-self: start; max-height: calc(100vh - 64px); overflow: auto; font-size: 13.5px; }
.toc .back { display: inline-block; color: var(--muted); margin-bottom: 28px; transition: color .2s; }
.toc .back:hover { color: var(--gold-2); }
.toc-title { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.toc ol { list-style: none; border-left: 1px solid var(--border); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); line-height: 1.4; transition: color .2s, border-color .2s; }
.toc li.d3 a { padding-left: 26px; font-size: 12.5px; }
.toc li a:hover { color: var(--white); }
.toc li a.active { color: var(--gold-2); border-left-color: var(--gold); }

.sop { max-width: 760px; }
.sop-head { padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px solid var(--border); }
.sop-head .sfm-eyebrow { margin-bottom: 16px; }
.sop-head h1 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 16px; }
.lede { font-size: 18px; font-weight: 300; color: var(--muted); margin-bottom: 20px; }
.sop-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--faint); margin-bottom: 24px; }
.sop-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.progress { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.progress-track { width: 120px; height: 6px; border-radius: 6px; background: rgba(245,246,250,0.07); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 6px; transition: width .3s ease; }
.progress-label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

@media (max-width: 960px) {
  .sop-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; }
  .toc { position: static; max-height: none; margin-bottom: 8px; }
  .toc-title, .toc ol { display: none; }
  .toc .back { margin-bottom: 20px; }
  .progress { margin-left: 0; width: 100%; }
  .progress-track { flex: 1; }
}

/* ---------- PROSE ---------- */
.prose { color: var(--soft); font-size: 16.5px; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { color: var(--white); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-top: 2.2em; }
.prose h3 { color: var(--white); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin-top: 1.8em; }
.prose h4 { color: var(--white); font-size: 16px; font-weight: 700; margin-top: 1.5em; }
.prose h2, .prose h3, .prose h4 { position: relative; }
.prose .anchor { position: absolute; left: -1.1em; color: var(--gold); opacity: 0; transition: opacity .2s; font-weight: 400; }
.prose :is(h2,h3,h4):hover .anchor { opacity: .7; }
.prose strong { color: var(--white); font-weight: 700; }
.prose a { color: var(--gold-2); text-decoration: underline; text-decoration-color: var(--border-2); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--gold); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--gold); }
.prose ol > li::marker { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: .92em; }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }
.prose img { max-width: 100%; border-radius: 14px; border: 1px solid var(--border); }
.prose :not(pre) > code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: rgba(245,246,250,0.06); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; color: var(--gold-2); }

/* Checklists */
.prose ul.checklist { list-style: none; padding: 0; display: grid; gap: 8px; }
.prose li.task {
  position: relative; display: block;
  padding: 14px 16px 14px 52px; border-radius: 12px; margin: 0;
  background: rgba(245,246,250,0.025); border: 1px solid var(--border);
  transition: border-color .2s, background .2s;
}
.prose li.task:hover { border-color: var(--border-2); }
.prose li.task.done { background: var(--gold-dim); border-color: var(--border-2); }
.prose li.task.done > :not(input) { color: var(--muted); }
.prose li.task > ul, .prose li.task > ol, .prose li.task > p { margin: .4em 0 0; }
.prose li.task > input.step { position: absolute; left: 16px; top: 14px; }
input.step {
  appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin-top: 2px;
  border-radius: 7px; border: 1.5px solid var(--border-2); background: transparent; cursor: pointer;
  display: grid; place-items: center; transition: all .2s;
}
input.step:hover { border-color: var(--gold); }
input.step:checked { background: linear-gradient(135deg, var(--gold-2), var(--gold)); border-color: transparent; }
input.step:checked::after { content: ''; width: 6px; height: 11px; border: solid #0a0a0a; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }

/* Callouts */
.callout { padding: 16px 18px; border-radius: 12px; border: 1px solid var(--border); background: rgba(245,246,250,0.03); border-left: 3px solid var(--faint); }
.callout > * + * { margin-top: .6em; }
.callout-tip, .callout-why, .callout-example { border-left-color: var(--gold); background: var(--gold-dim); }
.callout-warning, .callout-important { border-left-color: #e0806a; background: rgba(224,128,106,0.07); }

/* Code / templates */
.sfm-code { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.sfm-code-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--border); background: rgba(245,246,250,0.02); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.copy-btn { font-size: 12px; font-weight: 500; letter-spacing: .02em; text-transform: none; padding: 4px 12px; border-radius: 100px; border: 1px solid var(--border-2); color: var(--gold-2); transition: background .2s; }
.copy-btn:hover { background: var(--gold-dim); }
.sfm-code pre { padding: 16px 18px; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; line-height: 1.65; color: var(--soft); white-space: pre-wrap; word-break: break-word; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose th { text-align: left; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-2); background: rgba(217,179,108,0.05); }
.prose th, .prose td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }

/* View as doc */
.doc-view { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: #2a2c31; }
.doc-status { padding: 48px 20px; text-align: center; color: var(--muted); font-size: 14.5px; background: var(--bg-2); }
.doc-pages { overflow: hidden; }
.doc-pages .docx-wrapper { background: #2a2c31; padding: 16px; box-sizing: border-box; }
.doc-pages .docx-wrapper > section.docx { flex-shrink: 0; }
.doc-pages .docx-wrapper > section.docx { margin: 0 auto 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.45); }
.doc-pages .docx-wrapper > section.docx:last-child { margin-bottom: 0; }
.doc-pages.pdf { display: grid; gap: 12px; padding: 12px; }
.doc-pages.pdf canvas { display: block; width: 100%; height: auto; background: #fff; border-radius: 2px; box-shadow: 0 10px 40px rgba(0,0,0,0.45); }
.doc-mode .toc-title, .doc-mode .toc ol { display: none; }

/* Pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--border); }
.pager a { padding: 18px 20px; border-radius: 14px; border: 1px solid var(--border); font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; transition: border-color .2s; }
.pager a:hover { border-color: var(--border-2); }
.pager a small { display: block; font-family: 'DM Sans', sans-serif; font-weight: 400; font-size: 12px; color: var(--faint); margin-bottom: 4px; }
.pager .next { text-align: right; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } }

/* ---------- SEARCH MODAL ---------- */
.search-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: rgba(7,8,10,0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.search-modal.open { display: flex; }
.search-box { width: 100%; max-width: 620px; background: var(--card); border: 1px solid var(--border-2); border-radius: 18px; box-shadow: 0 40px 120px rgba(0,0,0,0.7); overflow: hidden; }
.search-box input { width: 100%; height: 58px; padding: 0 20px; background: none; border: 0; border-bottom: 1px solid var(--border); outline: 0; color: var(--white); font: inherit; font-size: 16px; }
.search-box input::placeholder { color: var(--faint); }
.search-list { max-height: 50vh; overflow: auto; padding: 8px; }
.search-list a { display: block; padding: 12px 14px; border-radius: 10px; }
.search-list a.sel, .search-list a:hover { background: var(--gold-dim); }
.search-list a b { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; }
.search-list a small { color: var(--faint); font-size: 12.5px; }
.search-list .none { padding: 18px 14px; color: var(--faint); font-size: 14px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 120; padding: 10px 18px; border-radius: 100px; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #0a0a0a; font-weight: 700; font-size: 13.5px; transition: all .25s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- FOOTER ---------- */
.sfm-foot { border-top: 1px solid var(--border); padding: 28px 0; font-size: 12.5px; color: var(--faint); }
.sfm-foot .sfm-wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- PRINT ---------- */
@media print {
  :root { --white: #111; --soft: #222; --muted: #444; --faint: #666; --border: #ddd; --border-2: #c9a45a; --gold-dim: #faf5ea; --bg-2: #f7f7f7; }
  body { background: #fff; color: #111; }
  .sfm-nav, .toc, .sop-actions, .pager, .sfm-foot, .read-bar, .copy-btn, .anchor { display: none !important; }
  .sop-layout { display: block; padding: 0; }
  .sop { max-width: none; }
  .prose li.task { break-inside: avoid; }
}

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