/* Withinward site. One dark world, gold as the single accent, ivory only for book pages. */
:root {
  --void: #05040d;
  --deep: #090818;
  --layer: #0e0c1c;
  --card: #131128;
  --lifted: #1a1830;
  --line: rgba(255, 255, 255, 0.07);
  --gline: rgba(201, 168, 76, 0.22);
  --ink: #ede8f8;
  --ink2: #c4bad8;
  --ink3: #b0a8c8;
  --dim: #8b80b3;
  --gold: #c9a84c;
  --gold2: #e8c97a;
  --teal: #5fbfb0;
  --violet: #9b7fe8;
  --rose: #c47a8a;
  --paper: #f1ece0;
  --paper2: #e7e0d0;
  --pink: #1d1a2e;
  --pgold: #8a6d1f;
  --pmute: #5d5668;
  --f-display: 'Cormorant Garamond', Georgia, serif;
  --f-label: 'Cinzel', Georgia, serif;
  --f-body: 'DM Sans', system-ui, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
img, svg, canvas { max-width: 100%; }
a { color: var(--gold2); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
#stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.6; width: 100%; height: 100%; }

.gutter {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 1080px; margin: 0 auto; }
.narrow { max-width: 720px; margin: 0 auto; }

/* ribbon and nav */
.ribbon {
  text-align: center;
  font-family: var(--f-label);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
  border-bottom: 1px solid var(--gline);
  padding: 8px 16px;
}
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(5, 4, 13, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in { max-width: 1180px; margin: 0 auto; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.mark i { font-style: normal; color: var(--gold); font-size: 18px; }
.mark b { font-family: var(--f-label); font-weight: 400; font-size: 13px; letter-spacing: 0.4em; text-transform: uppercase; }
.links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.links a { white-space: nowrap; font-family: var(--f-label); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink3); text-decoration: none; padding: 6px 0; }
.links a:hover, .links a[aria-current="page"] { color: var(--gold); }
.links a.cta { color: var(--gold); border: 1px solid var(--gline); padding: 9px 18px; }
.links a.cta:hover { background: rgba(201, 168, 76, 0.1); }
.burger { display: none; background: none; border: 1px solid var(--line); color: var(--ink); width: 44px; height: 44px; font-size: 18px; cursor: pointer; }
@media (max-width: 1100px) {
  .burger { display: block; }
  .links { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 0; background: var(--void); border-bottom: 1px solid var(--line); padding: 8px max(16px, env(safe-area-inset-left, 0px)) 16px; }
  .links.open { display: flex; }
  .links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .links a.cta { margin-top: 12px; text-align: center; }
}

/* type */
.eyebrow { font-family: var(--f-label); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin: 0 0 18px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 300; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 7vw, 76px); letter-spacing: -0.01em; }
h2 { font-size: clamp(32px, 4.6vw, 52px); margin-bottom: 18px; }
h3 { font-size: 26px; margin-bottom: 8px; }
h1 em, h2 em { font-style: italic; color: var(--gold2); }
p { margin: 0 0 16px; }
.lede { font-size: 19px; color: var(--ink2); max-width: 640px; }
.small { font-size: 14px; color: var(--dim); }
.gold { color: var(--gold2); }

/* sections */
.sec { padding-block: 88px; }
.sec.alt { background: linear-gradient(180deg, rgba(14, 12, 28, 0.85), rgba(9, 8, 24, 0.85)); border-block: 1px solid var(--line); }
.head { margin-bottom: 44px; max-width: 700px; }
.center { text-align: center; margin-inline: auto; }
.center .lede { margin-inline: auto; }

.hero { padding-block: 96px 72px; text-align: center; }
.hero h1 { max-width: 900px; margin: 0 auto 24px; }
.hero .lede { margin: 0 auto 34px; }
.btns { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.btn { display: inline-block; font-family: var(--f-label); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; text-decoration: none; padding: 17px 30px; border: 1px solid rgba(201, 168, 76, 0.5); color: var(--gold); background: transparent; cursor: pointer; transition: background 0.25s, color 0.25s; }
.btn:hover { background: rgba(201, 168, 76, 0.12); color: var(--ink); }
.btn.solid { background: var(--gold); color: var(--void); border-color: var(--gold); }
.btn.solid:hover { background: var(--gold2); color: var(--void); }
.btn.quiet { border-color: var(--line); color: var(--ink3); }

.ticker { overflow: hidden; border-block: 1px solid var(--line); padding: 14px 0; margin-top: 60px; }
.ticker div { display: flex; gap: 34px; width: max-content; animation: slide 60s linear infinite; font-family: var(--f-label); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker div { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } html { scroll-behavior: auto; } }

/* grids and cards */
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); padding: 28px; min-width: 0; }
.card.gl { border-color: var(--gline); }
.card h3 { font-size: 24px; }
.card p:last-child { margin-bottom: 0; }
.label { font-family: var(--f-label); font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 12px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); }
.step { padding: 28px 24px; border-right: 1px solid var(--line); min-width: 0; }
.step:last-child { border-right: 0; }
.step .n { font-family: var(--f-display); font-size: 44px; color: var(--gold); line-height: 1; display: block; margin-bottom: 14px; }
.step h3 { font-size: 22px; }
.step p { font-size: 15px; color: var(--ink2); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .step:nth-child(2) { border-right: 0; } .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } .step { border-right: 0; border-bottom: 1px solid var(--line); } .step:last-child { border-bottom: 0; } }

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.pill { display: inline-block; font-family: var(--f-label); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gline); padding: 4px 10px; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink2); }
ul.plain li:last-child { border-bottom: 0; }
ul.tick li { padding-left: 24px; position: relative; }
ul.tick li::before { content: '\2726'; position: absolute; left: 0; color: var(--gold); font-size: 12px; top: 13px; }

/* framework tiles */
.fw { background: var(--card); border: 1px solid var(--line); padding: 26px; min-width: 0; }
.fw h3 { font-size: 26px; }
.fw .how { font-family: var(--f-label); font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--teal); display: block; margin-bottom: 10px; }
.fw dl { margin: 14px 0 0; display: grid; gap: 10px; }
.fw dt { font-family: var(--f-label); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.fw dd { margin: 2px 0 0; font-size: 15px; color: var(--ink2); }

/* faq */
details { border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; list-style: none; padding: 22px 36px 22px 0; font-family: var(--f-display); font-size: 24px; position: relative; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; position: absolute; right: 4px; top: 18px; color: var(--gold); font-size: 28px; }
details[open] summary::after { content: '\2212'; }
details .ans { padding: 0 0 24px; color: var(--ink2); max-width: 640px; }

/* forms */
label.f { display: block; font-family: var(--f-label); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin: 22px 0 8px; }
input[type=text], input[type=email], select, textarea { width: 100%; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--gline); color: var(--ink); font-family: var(--f-body); font-size: 16px; padding: 13px 14px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.chk { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0; font-size: 15px; color: var(--ink2); cursor: pointer; }
.chk input { accent-color: var(--gold); margin-top: 5px; flex: none; width: 18px; height: 18px; }
.err { color: #e87f9a; font-size: 15px; min-height: 22px; margin: 10px 0 0; }
.ed { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); color: var(--ink); padding: 22px 24px; margin-bottom: 14px; cursor: pointer; font-family: var(--f-body); font-size: 15px; font-weight: 300; line-height: 1.6; }
.ed:hover { border-color: var(--gline); }
.ed[aria-checked="true"] { border-color: var(--gold); background: rgba(201, 168, 76, 0.08); }
.ed b { display: block; font-family: var(--f-display); font-size: 26px; font-weight: 400; margin-bottom: 4px; }
.ed span.price { float: right; font-family: var(--f-label); font-size: 10px; letter-spacing: 0.18em; color: var(--gold); text-transform: uppercase; }

/* footer */
.foot { border-top: 1px solid var(--line); padding-block: 56px 48px; margin-top: 0; background: var(--deep); }
.foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .foot .cols { grid-template-columns: minmax(0, 1fr); } }
.foot a { color: var(--ink3); text-decoration: none; display: block; padding: 5px 0; font-size: 14px; }
.foot a:hover { color: var(--gold); }
.foot p { font-size: 13px; color: var(--dim); max-width: 520px; }
.foot h4 { font-family: var(--f-label); font-weight: 400; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }

/* book pages, ivory objects in the dark */
.spread { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 44px; align-items: start; padding-block: 56px; border-top: 1px solid var(--line); }
.spread:first-of-type { border-top: 0; }
@media (max-width: 860px) { .spread { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.spread .note h3 { font-size: 30px; }
.spread .note p { color: var(--ink2); font-size: 15px; }
.pages { display: grid; gap: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04); background: var(--paper); }
.pages.one { grid-template-columns: minmax(0, 1fr); max-width: 440px; }
@media (max-width: 620px) { .pages { grid-template-columns: minmax(0, 1fr); } }
.pg { background: var(--paper); color: var(--pink); padding: 38px 34px 44px; min-height: 420px; font-family: var(--f-display); font-size: 17px; line-height: 1.6; position: relative; min-width: 0; }
.pages:not(.one) .pg:first-child { border-right: 1px solid rgba(0, 0, 0, 0.1); background: linear-gradient(90deg, var(--paper), var(--paper2)); }
.pages:not(.one) .pg:last-child { background: linear-gradient(270deg, var(--paper), var(--paper2)); }
@media (max-width: 620px) { .pages:not(.one) .pg:first-child { border-right: 0; border-bottom: 1px solid rgba(0, 0, 0, 0.1); } }
.pg .run { font-family: var(--f-label); font-size: 8px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--pgold); text-align: center; margin-bottom: 26px; display: block; }
.pg h4 { font-family: var(--f-display); font-weight: 400; font-size: 28px; line-height: 1.15; margin: 0 0 14px; color: var(--pink); }
.pg p { margin: 0 0 12px; }
.pg .c { text-align: center; }
.pg .i { font-style: italic; color: var(--pmute); }
.pg .num { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-family: var(--f-label); font-size: 8px; letter-spacing: 0.2em; color: var(--pmute); }
.ledger { margin: 16px 0; border-top: 1px solid rgba(0, 0, 0, 0.18); }
.ledger div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.12); font-size: 15px; line-height: 1.45; }
.ledger b { font-family: var(--f-label); font-weight: 400; font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pgold); padding-top: 4px; }
.marks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.marks button { font-family: var(--f-label); font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; border: 1px solid rgba(0, 0, 0, 0.3); background: transparent; color: var(--pink); padding: 10px 14px; cursor: pointer; }
.marks button[aria-pressed="true"] { background: var(--pink); color: var(--paper); border-color: var(--pink); }
.marks button:focus-visible { outline: 2px solid var(--pgold); }
.badge { display: inline-block; font-family: var(--f-label); font-size: 8px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--pgold); border: 1px solid var(--pgold); padding: 3px 8px; margin-bottom: 14px; }
.draw { background: #fbf8f0; border: 1px dashed rgba(0, 0, 0, 0.35); width: 100%; aspect-ratio: 1; touch-action: none; cursor: crosshair; display: block; max-width: 300px; margin: 8px auto; }
.pg .tools { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pg .tools button { font-family: var(--f-label); font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; border: 1px solid rgba(0, 0, 0, 0.3); background: transparent; color: var(--pink); padding: 10px 14px; cursor: pointer; }
.hexline { display: flex; align-items: center; justify-content: center; gap: 14px; height: 18px; }
.hexline span { display: block; height: 7px; background: var(--pink); }
.hexline .full { width: 130px; }
.hexline .half { width: 58px; }
.hexline.old span { background: var(--pgold); }
.hexline small { font-family: var(--f-label); font-size: 8px; color: var(--pgold); width: 56px; letter-spacing: 0.1em; }
.sample-tag { display: inline-block; margin-bottom: 18px; }

/* legal and prose pages */
.prose h2 { font-size: 34px; margin: 44px 0 12px; }
.prose h3 { font-size: 24px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink2); }
.prose ul { padding-left: 20px; }

/* sealing */
.stepsLive { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.stepsLive li { padding: 16px 0 16px 38px; border-bottom: 1px solid var(--line); color: var(--dim); position: relative; transition: color 0.4s; }
.stepsLive li::before { content: '\25CB'; position: absolute; left: 6px; color: var(--dim); }
.stepsLive li.on { color: var(--ink); }
.stepsLive li.on::before { content: '\25D0'; color: var(--gold); }
.stepsLive li.done { color: var(--ink2); }
.stepsLive li.done::before { content: '\2726'; color: var(--gold); }
.proto { border: 1px dashed var(--gline); background: rgba(201, 168, 76, 0.05); padding: 22px 24px; }
.proto textarea { font-family: ui-monospace, Menlo, monospace; font-size: 11px; min-height: 160px; }
.email { background: #f7f5ef; color: #26232e; padding: 26px; font-family: var(--f-body); font-size: 15px; border-radius: 2px; }
.email .meta { font-size: 12px; color: #6b667a; border-bottom: 1px solid #ddd8cc; padding-bottom: 12px; margin-bottom: 16px; line-height: 1.5; }
.email .go { display: inline-block; background: #1d1a2e; color: #f1ece0; padding: 12px 22px; text-decoration: none; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; margin: 8px 0; }

/* cloth and foil (added Oct 22): flat navy linen board, embossed gold that shifts with light and angle.
   Material qualities only. The design of the cover is original. */
:root { --fa: 112deg; --fx: 40%; }
.foil, .mark b, .mark i, .hero h1 em, .label, .eyebrow {
  background-image: linear-gradient(var(--fa), #7a5f18 0%, #c9a84c 16%, #f4dd9a 28%, #fff4c9 34%, #d9b958 44%, #8a6d1f 58%, #c9a84c 72%, #f0d58a 84%, #8f7220 100%);
  background-size: 260% 100%;
  background-position: var(--fx) 50%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .foil, .mark b, .mark i, .hero h1 em, .label, .eyebrow { color: var(--gold2); -webkit-text-fill-color: currentColor; background: none; }
}
.cloth {
  background-color: #0f1a3a;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 3px),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .55  0 0 0 0 .8  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    radial-gradient(120% 90% at 30% 0%, #1b2c62 0%, #0f1a3a 55%, #0a1230 100%);
}
.cloth.board { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), inset 14px 0 16px -10px rgba(0, 0, 0, 0.75), inset -2px 0 0 rgba(255, 255, 255, 0.04), 0 18px 40px rgba(0, 0, 0, 0.45); }
.stamp { filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.7)) drop-shadow(0 0 1px rgba(255, 236, 170, 0.3)); }
.foilframe { position: absolute; inset: 22px; pointer-events: none; border: 2px solid transparent; border-image: linear-gradient(var(--fa), #7a5f18, #f4dd9a 30%, #fff4c9 36%, #9a7c22 55%, #e8c97a 80%, #7a5f18) 1; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.7)); }
@media (prefers-reduced-motion: reduce) { :root { --fa: 112deg; --fx: 40%; } }
