/* diadem v2: one small design system. Phone first. */
:root {
  --ink: #17121F; --ink-2: #4B4458; --muted: #7A7287; --line: #ECE6DA; --paper: #FBF8F2; --card: #FFFFFF;
  --purple: #5B2BD6; --purple-2: #3B1F7A; --lav: #F2EDFC; --gold: #E0A526; --gold-soft: #FFF4DB; --gold-ink: #7A4E00;
  --green: #1E7A3A; --green-soft: #E5F4E9; --rose: #B4234A;
  --serif: "Fraunces", Georgia, serif; --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 20px; --shadow: 0 1px 2px rgba(23,18,31,.04), 0 8px 24px rgba(23,18,31,.06);
  --hero: radial-gradient(900px 320px at 85% -10%, rgba(224,165,38,.28), transparent 60%), linear-gradient(140deg, #22133D 0%, #3B1F7A 50%, #5B2BD6 100%);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: -0.015em; line-height: 1.15; margin: 0; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #B9A6E8; outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font-weight: 650; font-size: 15px; white-space: nowrap; transition: transform .1s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-2); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #D6CCBA; }
.btn-onhero { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.45); color: #fff; }
.btn-white { background: #fff; color: var(--purple-2); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(251,248,242,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.logo { display: flex; min-height: 44px; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.logo img { width: 28px; height: 28px; }
.logo small { color: var(--muted); font-weight: 500; font-size: inherit; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: #F1ECE2; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.signin.is-in { font-family: var(--mono); font-size: 13px; }
@media (max-width: 720px) {
  .top { backdrop-filter: none; background: var(--paper); }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; justify-content: space-around; background: #fff; border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 30; }
  .nav a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; text-align: center; font-size: 13px; padding: 10px 4px; }
  .top .wrap { padding-left: 16px; padding-right: 16px; }
  body { padding-bottom: 64px; }
  .top-actions .btn-dark { display: none; }
}

/* Sections */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 4vw, 34px); }
.section-head p { color: var(--ink-2); margin-top: 6px; }
.more { color: var(--purple); font-weight: 650; display: inline-flex; min-height: 44px; align-items: center; }
.eyebrow { font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--purple); }

/* Home hero */
.hero { background: var(--hero); color: #fff; }
.hero .wrap { padding-top: 64px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(38px, 7vw, 68px); max-width: 820px; }
.hero h1 em { font-style: normal; color: #F6CD6A; }
.hero p { margin-top: 18px; max-width: 620px; font-size: 18px; color: #EAE3FA; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.step b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--lav); color: var(--purple-2); margin-bottom: 12px; }
.step h3 { font-size: 20px; margin-bottom: 6px; }
.step p { color: var(--ink-2); font-size: 15px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } .hero .wrap { padding-top: 44px; padding-bottom: 44px; } }

/* Avatars */
.av { flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 16px; background: linear-gradient(145deg, #F6E7C1, var(--gold)); color: var(--purple-2); font-family: var(--serif); font-weight: 700; }
.av { position: relative; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; }
.av img:not([src]), .av img[src=""] { display: none; }
.av-48 { width: 48px; height: 48px; font-size: 22px; border-radius: 14px; }
.av-64 { width: 64px; height: 64px; font-size: 28px; }
.av-112 { width: 112px; height: 112px; font-size: 52px; border-radius: 28px; border: 4px solid rgba(255,255,255,.9); }
.av.mono { background: var(--lav); }

/* Person cards */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(23,18,31,.05), 0 14px 32px rgba(23,18,31,.09); }
.pcard-top { display: flex; align-items: center; gap: 12px; }
.pcard h3 { font-size: 19px; }
.pcard .line { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--lav); color: var(--purple-2); }
.tag-gold { background: var(--gold-soft); color: var(--gold-ink); }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-grey { background: #EFEBE3; color: var(--ink-2); }

/* Work cards */
.works { display: flex; flex-direction: column; gap: 14px; }
.wcard { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow); }
.wcard:hover h3 { color: var(--purple); }
.wmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.wcard h3 { font-size: 22px; transition: color .15s; }
.wcard p { color: var(--ink-2); font-size: 15px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wcover { width: 148px; height: 104px; border-radius: 14px; -o-object-fit: cover; object-fit: cover; border: 1px solid var(--line); }
@media (max-width: 600px) { .wcard { grid-template-columns: 1fr; padding: 18px; } .wcover { width: 100%; height: 150px; order: -1; } .wcard h3 { font-size: 20px; } }

/* Person page */
.phero { background: var(--hero); color: #fff; }
.phero .wrap { padding-top: 40px; padding-bottom: 32px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 24px; align-items: center; }
.phero h1 { font-size: clamp(34px, 6vw, 52px); }
.phero .ticker { display: inline-flex; margin-left: 10px; vertical-align: middle; padding: 4px 10px; border-radius: 999px; font: 700 13px var(--sans); background: rgba(224,165,38,.22); border: 1px solid rgba(246,215,140,.55); color: #FBE7B5; }
.phero .xlink { display: inline-flex; margin-left: 12px; vertical-align: middle; padding: 7px; border-radius: 999px; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.phero .xlink:hover { background: rgba(255,255,255,.14); }
.phero .line { margin-top: 10px; color: #EAE3FA; max-width: 640px; font-size: 17px; }
.phero .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; font-size: 14px; color: #D8CDF3; }
.phero .meta a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.phero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.unclaimed-banner { background: var(--gold-soft); color: var(--gold-ink); font-size: 14px; }
.unclaimed-banner .wrap { padding-top: 12px; padding-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.unclaimed-banner a { font-weight: 700; text-decoration: underline; }
@media (max-width: 760px) { .phero .wrap { grid-template-columns: 1fr; gap: 16px; } .phero .actions .btn { flex: 1; } }
.cols { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 28px; align-items: start; padding-top: 28px; padding-bottom: 64px; }
.side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
@media (max-width: 960px) { .cols { grid-template-columns: minmax(0,1fr); } .side { position: static; } }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.box h2 { font-size: 20px; margin-bottom: 12px; }
.box p { color: var(--ink-2); font-size: 15px; }
.box .note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.proj { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.proj:first-of-type { border-top: 0; padding-top: 0; }
.proj-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--lav); display: grid; place-items: center; font-size: 19px; }
.proj b { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.proj span { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: f; }
.flow li { counter-increment: f; display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: 14px; color: var(--ink-2); }
.flow li::before { content: counter(f); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--lav); color: var(--purple-2); font-weight: 800; font-size: 13px; }
.flow b { color: var(--ink); display: block; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filters a { min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px; background: #F1ECE2; color: var(--ink-2); font-weight: 650; font-size: 14px; }
.filters a[aria-current="page"] { background: var(--ink); color: #fff; }
.filters .n { opacity: .6; font-weight: 600; }
.empty { background: var(--card); border: 1px dashed #D9CFBE; border-radius: var(--r); padding: 28px; text-align: center; color: var(--ink-2); }
.empty a { color: var(--purple); font-weight: 650; }
.src { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.src:first-child { border-top: 0; }
.src a.t { font-weight: 650; }
.src small { color: var(--muted); }
.src small a { text-decoration: underline; }

/* Reader */
.reader { display: grid; grid-template-columns: minmax(0, 720px) 240px; gap: 48px; justify-content: center; padding-top: 32px; padding-bottom: 80px; }
.reader-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--purple); font-weight: 650; font-size: 14px; }
.reader h1 { font-size: clamp(32px, 5.5vw, 50px); margin: 12px 0 14px; }
.reader .dek { font-size: 19px; color: var(--ink-2); line-height: 1.55; }
.byline { display: flex; align-items: center; gap: 12px; margin: 22px 0 28px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline .who { flex: 1; min-width: 0; font-size: 14px; }
.byline .who b { display: block; font-size: 15px; }
.byline .who span { color: var(--muted); }
.toc { position: sticky; top: 88px; font-size: 13.5px; }
.toc h2 { font: 650 14px var(--sans); color: var(--muted); margin-bottom: 10px; }
.toc a { display: block; padding: 6px 10px; border-left: 2px solid var(--line); color: var(--ink-2); line-height: 1.35; }
.toc a:hover { color: var(--purple); border-color: var(--purple); }
.toc-phone { display: none; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.toc-phone summary { min-height: 48px; display: flex; align-items: center; padding: 0 16px; font-weight: 650; cursor: pointer; }
.toc-phone nav { padding: 0 8px 12px; }
.toc-phone a { display: block; padding: 8px; color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 1000px) { .reader { grid-template-columns: minmax(0, 720px); } .toc { display: none; } .toc-phone { display: block; } }
.end-card { margin-top: 48px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 16px; align-items: center; }
@media (max-width: 600px) { .end-card { grid-template-columns: auto minmax(0,1fr); } .end-card .btn { grid-column: 1 / -1; } }

/* Prose (rendered Markdown) */
.prose { font-size: 17.5px; line-height: 1.75; color: #2A2433; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 30px; margin-top: 1.9em; text-transform: none; }
.prose h3 { font-size: 23px; margin-top: 1.6em; }
.prose h4 { font: 700 18px var(--sans); margin-top: 1.4em; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 84px; }
.prose a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.prose .work-heading-link { display: none; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--gold); color: var(--ink-2); }
.prose .work-callout { padding: 14px 18px; border-radius: 14px; border: 0; background: var(--lav); }
.prose .work-callout-warning, .prose .work-callout-caution { background: var(--gold-soft); }
.prose code { font: 0.86em var(--mono); background: #F1ECE2; padding: .1em .35em; border-radius: 6px; }
.prose pre { margin: 0; padding: 16px 18px; border-radius: 14px; background: #1C1726; color: #EDE8F7; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose .work-table-scroll, .prose .work-code-scroll { overflow-x: auto; border-radius: 14px; }
.prose .work-table-scroll { border: 1px solid var(--line); background: #fff; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
.prose th { text-align: left; background: #F6F2EA; font-weight: 650; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; min-width: 120px; }
.prose figure { margin: 1.6em 0; }
.prose img { border-radius: 14px; border: 1px solid var(--line); }
.prose figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose .footnotes { font-size: 14.5px; color: var(--ink-2); }
.prose .katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.prose .task-list-item { list-style: none; margin-left: -1.3em; }
@media (max-width: 600px) { .prose { font-size: 17px; } .prose h2 { font-size: 25px; } .prose h3 { font-size: 20px; } }

/* Dialogs and toast */
dialog.sheet { border: 0; border-radius: 24px; padding: 26px; width: min(92vw, 420px); box-shadow: 0 24px 60px rgba(20,10,40,.3); }
dialog.sheet::backdrop { background: rgba(20,10,40,.45); }
dialog.sheet h2 { font-size: 26px; margin-bottom: 8px; }
dialog.sheet p { color: var(--ink-2); margin-bottom: 16px; }
dialog.sheet .stack { display: flex; flex-direction: column; gap: 10px; }
dialog.wallet-missing { border: 0; border-radius: 24px; padding: 26px; width: min(92vw, 420px); box-shadow: 0 24px 60px rgba(20,10,40,.3); }
dialog.wallet-missing::backdrop { background: rgba(20,10,40,.45); }
dialog.wallet-missing h2 { font-size: 26px; margin: 0 0 8px; }
dialog.wallet-missing p { color: var(--ink-2); margin: 0 0 16px; }
.wallet-missing-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
#diadem-toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14.5px; box-shadow: 0 12px 30px rgba(20,10,40,.25); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 1000; }
#diadem-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Forms (publish) */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 650; font-size: 14px; }
.field input, .field textarea, .field select { font: 16px var(--sans); padding: 12px 14px; border: 1px solid #DDD3C2; border-radius: 12px; background: #fff; color: var(--ink); }
.field textarea { min-height: 280px; font-family: var(--mono); font-size: 14.5px; line-height: 1.6; }
.field small { font-weight: 400; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; background: #F1ECE2; font-weight: 650; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg input:checked + span { color: #fff; }
.seg label:has(input:checked) { background: var(--ink); color: #fff; }
.status { min-height: 24px; font-size: 14px; color: var(--ink-2); }

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: 24px; }
.foot .wrap { padding-top: 28px; padding-bottom: 36px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; color: var(--muted); font-size: 13.5px; }
.foot nav { display: flex; gap: 16px; }
.foot nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink-2); font-weight: 600; }

/* ---------- /berlian ---------- */
.bl-addr { font-family: var(--mono); font-size: 13px; color: #D5CAEF; }
.bl-soon { opacity: .85; cursor: default; }
.bl-block { padding: 56px 0 8px; }
.bl-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--purple); }
.bl-big { font-family: var(--serif); font-size: 34px; line-height: 1.15; letter-spacing: -0.015em; margin: 8px 0 12px; max-width: 760px; }
.bl-lead { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 760px; margin: 0; }
.bl-thesis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.bl-thesis .card p { color: var(--ink-2); line-height: 1.55; font-size: 15px; margin: 0; }
.bl-num { font-family: var(--serif); font-size: 28px; color: var(--purple); font-weight: 700; }
.bl-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 16px; margin-top: 28px; }
.bl-proj { padding: 22px; border-radius: 24px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.bl-proj-top { display: flex; align-items: center; gap: 12px; }
.bl-proj-ico { width: 44px; height: 44px; border-radius: 14px; background: var(--lav); display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }
.bl-proj h3 { font-family: var(--serif); font-size: 21px; font-weight: 700; margin: 0; }
.bl-url { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.bl-proj p { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.bl-proj dl { margin: 4px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 12px; }
.bl-proj dt { color: var(--muted); }
.bl-proj dd { margin: 0; font-weight: 600; }
.bl-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.bl-chip-live { background: #E3F4E7; color: var(--green); }
.bl-chip-build { background: var(--lav); color: var(--purple-deep); }
.bl-chip-research { background: var(--gold-soft); color: var(--gold-text); }
.bl-flow { margin-top: 28px; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 24px; overflow-x: auto; }
.bl-flow svg { min-width: 760px; width: 100%; height: auto; display: block; }
.bl-rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 28px; }
.bl-rules h3 { font-family: var(--serif); font-size: 22px; margin: 0; }
.bl-rules ul { margin: 0; padding-left: 20px; }
.bl-rules li { margin: 6px 0; line-height: 1.55; color: var(--ink-2); font-size: 15px; }
.bl-table { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 24px; margin-top: 28px; }
.bl-ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.bl-ledger th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bl-ledger td { padding: 14px 12px; border-bottom: 1px solid var(--line); }
.bl-empty td { color: var(--muted); text-align: center; padding: 28px 12px; }
.bl-cta { margin: 56px 0 0; border-radius: 28px; background: var(--hero); color: #fff; padding: 40px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.bl-cta h2 { font-family: var(--serif); font-size: 30px; max-width: 620px; line-height: 1.2; margin: 0; color: #fff; }
.bl-cta p { color: #E3DAF7; margin: 8px 0 0; max-width: 620px; line-height: 1.55; }
.bl-foot { padding: 40px 0 60px; color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0; }
.bl-page .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.bl-page .card h3 { margin-bottom: 8px; }

/* Featured artifacts */
.featured { margin-bottom: 26px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.featured-h { grid-column: 1 / -1; font-size: 24px; }
.art { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.art-main { grid-column: 1 / -1; background: linear-gradient(135deg, #1C1430, #3B1F7A); color: #fff; border: 0; }
.art.art-main p { color: #E3DAF7; }
.art-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.art h3 { font-size: 22px; }
.art p { color: var(--ink-2); font-size: 15px; }
.art-play summary { list-style: none; width: -moz-fit-content; width: fit-content; }
.art-play summary::-webkit-details-marker { display: none; }
.art-play[open] summary { margin-bottom: 12px; }
.art-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.art-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.art-main .note, .art-main .note a { color: #D5CAEF; }
@media (max-width: 600px) { .featured { grid-template-columns: 1fr; } .art-frame { aspect-ratio: 4 / 3; } }

.token { background: var(--card); border-bottom: 1px solid var(--line); }
.token-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) minmax(0,.8fr); gap: 28px; align-items: center; padding-top: 20px; padding-bottom: 20px; }
.token h2 { font-size: 20px; margin-bottom: 10px; }
.token h3 { font: 700 13px var(--sans); color: var(--muted); margin-bottom: 6px; }
.token small { color: var(--muted); font-size: 12.5px; }
.token-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.token-ca { margin-top: 10px; font: 500 12.5px var(--mono, monospace); color: var(--ink-2); overflow-wrap: anywhere; }
.token-chart .spark { height: 84px; margin-top: 0; }
.token-chart { min-width: 0; }
.token-gravity { min-width: 0; overflow-wrap: anywhere; }
.token-gravity table { width: 100%; font-size: 12px; border-collapse: collapse; }
.token-gravity th, .token-gravity td { text-align: left; padding: 5px 4px; }
.token-gravity ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.token-gravity li { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .token-grid { grid-template-columns: 1fr; gap: 16px; } .token-actions .btn { flex: 1; } }
.store { margin-bottom: 20px; }
.store-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.store-head h2 { margin: 0; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.store-item { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.store-item .t, .store-item > b { font: 700 16px var(--sans); color: var(--ink); }
.store-item p { margin: 0; font-size: 14px; }
.store-item .btn { margin-top: auto; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 0; }
.facts dt { font-size: 12.5px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 700; font-size: 17px; }
.spark { width: 100%; height: 56px; margin-top: 12px; }
.attach { display: flex; flex-direction: column; gap: 10px; }
.attach input { font-family: var(--mono); font-size: 13px; }

/* Project directory, project pages and shared artifact cards. */
.project-page, .project-page *, .project-directory-page, .project-directory-page *, .person-featured, .person-featured * { min-width: 0; }
.project-hero { background: var(--hero); color: #fff; }
.project-hero-inner { padding-top: 54px; padding-bottom: 54px; }
.project-brand { display: flex; gap: 24px; align-items: flex-start; }
.project-logo { width: 100px; height: 100px; border-radius: 25px; display: grid; place-items: center; flex: none;
  background: #fff; color: var(--purple-2); font: 700 60px var(--serif); overflow: hidden; }
.project-logo img { width: 74%; height: 74%; -o-object-fit: contain; object-fit: contain; }
.project-intro h1 { font-size: clamp(35px, 6vw, 58px); margin: 8px 0 12px; }
.project-intro > p { font-size: 18px; color: #EEE7FA; max-width: 700px; }

.project-hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; }
.project-no-site { padding: 10px 0; color: #DDD2F5; font-size: 14px; }
.project-content { padding-bottom: 60px; }
.project-section { padding: 42px 0 8px; scroll-margin-top: 80px; }
.project-section .section-head { margin-bottom: 18px; }
.project-section-lead { color: var(--ink-2); margin: 0 0 14px; }
.project-members { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(270px,100%),1fr)); gap: 14px; }
.project-member { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 13px; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--shadow); }
.project-member-avatar { width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden;
  border-radius: 16px; background: var(--gold-soft); font: 700 25px var(--serif); color: var(--purple-2); }
.project-member-avatar img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; }
.project-member strong { display: block; font-size: 16px; color: var(--ink); }
.project-member small { display: block; font-size: 13px; color: var(--muted); }
.project-member-line { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.project-member-cta { color: var(--purple); display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; font-size: 13px; }
.artifact-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,280px),1fr)); gap: 16px; }
.artifact-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line);
  border-radius: var(--r); background: #fff; box-shadow: var(--shadow); }
.artifact-embed { width: 100%; min-width: 0; background: var(--lav); }
.embed-stage { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--purple-2); }
.embed-poster { position: absolute; inset: 0; display: block; width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; }
.embed-play { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 1; max-width: calc(100% - 28px); }
.embed-play:active { transform: translate(-50%,1px); }
.embed-unavailable { position: absolute; bottom: 14px; left: 14px; right: 14px; background: rgba(23,18,31,.80);
  color: #fff; border-radius: 10px; padding: 8px 10px; font-size: 12px; text-align: center; }
.embed-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; z-index: 2; }
.embed-options { padding: 6px 14px 9px; display: flex; flex-wrap: wrap; align-items: center; -moz-column-gap: 14px; column-gap: 14px; row-gap: 3px;
  background: #F8F5FE; font-size: 13px; }
.embed-open, .embed-reset { min-height: 44px; display: inline-flex; align-items: center; border: 0; background: none;
  padding: 0; font-weight: 700; font-size: 13px; color: var(--purple); }
.embed-help, .embed-pending { color: var(--ink-2); font-size: 12px; }
.embed-reset[hidden], .embed-play[hidden] { display: none; }
.artifact-info { display: flex; flex-direction: column; gap: 9px; padding: 19px; flex: 1; }
.artifact-info h3 { font-size: 22px; }
.artifact-info p { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.artifact-links { display: flex; gap: 10px 18px; flex-wrap: wrap; margin-top: auto; }
.artifact-links a { display: inline-flex; min-height: 44px; align-items: center; font-size: 14px; color: var(--purple); font-weight: 700; }
.project-filters a { min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
.manifesto-block { background: linear-gradient(125deg,#F3EDFF,#FFF8EB); border: 1px solid #DED1F3;
  padding: clamp(22px, 4vw, 36px); border-radius: 24px; }
.manifesto-block h2 { font-size: 32px; margin: 6px 0 15px; }
.manifesto-block h3 { font-size: 23px; margin: 10px 0; }
.manifesto-block p { color: var(--ink-2); max-width: 730px; margin-bottom: 12px; }
.manifesto-pending { font-size: 14px; }
.project-not-found { padding-top: 72px; padding-bottom: 72px; }
.project-not-found h1 { margin-bottom: 12px; }
.project-directory-hero { background: var(--hero); color: #fff; }
.project-directory-hero .wrap { padding-top: 60px; padding-bottom: 58px; }

.project-directory-hero h1 { margin: 10px 0 12px; font-size: clamp(42px,6vw,64px); }
.project-directory-hero p { max-width: 720px; color: #E9DFF8; font-size: 18px; }
.project-directory { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); gap: 16px; }
.project-directory-card { display: flex; flex-direction: column; padding: 24px; background: #fff; border: 1px solid var(--line);
  border-radius: 22px; box-shadow: var(--shadow); }
.project-directory-mark { width: 58px; height: 58px; background: var(--lav); border-radius: 17px; display: grid;
  place-items: center; color: var(--purple-2); font: 700 29px var(--serif); overflow: hidden; margin-bottom: 16px; }
.project-directory-mark img { width: 34px; height: 34px; -o-object-fit: contain; object-fit: contain; }
.project-directory-card h2 { font-size: 24px; margin-bottom: 9px; }
.project-directory-card h2 a { display: inline-flex; align-items: center; min-height: 44px; }
.project-directory-card h2 a:hover { color: var(--purple); }
.project-directory-card p { color: var(--ink-2); font-size: 14px; flex: 1; }
.project-directory-links { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 14px; }
.project-directory-links a { color: var(--purple); font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }
.person-featured { padding-top: 0; padding-bottom: 6px; margin-bottom: 20px; }
.artifact-featured-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.person-project-row { border-top: 1px solid var(--line); display: grid; grid-template-columns: 42px minmax(0,1fr);
  gap: 10px; align-items: center; padding: 12px 0; min-height: 65px; }
.person-project-row strong { display: block; color: var(--ink); font-size: 14px; }
.person-project-row:hover strong { color: var(--purple); }
.person-project-row small { display: block; color: var(--muted); line-height: 1.4; font-size: 12px; }
.person-project-mark { width: 40px; height: 40px; display: grid; place-items: center; background: var(--lav);
  border-radius: 12px; color: var(--purple-2); font: 700 18px var(--serif); }

@media (max-width: 720px) {
  .project-page .wrap, .project-directory-page .wrap { padding-left: 16px; padding-right: 16px; }
  .project-hero-inner, .project-directory-hero .wrap { padding-top: 36px; padding-bottom: 38px; }
  .project-brand { flex-direction: column; gap: 14px; }
  .project-logo { width: 72px; height: 72px; border-radius: 20px; font-size: 44px; }
  .project-intro h1 { margin-top: 2px; }
  .project-intro > p { font-size: 16px; }
  .project-section { padding-top: 32px; }
  .artifact-featured-grid { grid-template-columns: 1fr; }
  .project-members { grid-template-columns: 1fr; }
  .project-hero-links .btn { white-space: normal; text-align: center; }
}

.project-directory-page .project-directory { padding-top: 34px; padding-bottom: 56px; }
.project-directory-page .project-directory-hero h1 { margin: 0; }
.project-page .project-section > h2 { margin: 0 0 18px; font-size: clamp(26px,4vw,34px); }
.project-page .project-members, .project-page .artifact-grid, .project-page .works { margin-top: 16px; }
.project-page .project-member-info { min-width: 0; overflow-wrap: anywhere; align-self: center; }
.project-page .project-member { min-height: 88px; }
.project-page .project-member strong { overflow-wrap: anywhere; }
.project-page .project-member:focus-visible, .project-directory-card a:focus-visible { outline-offset: 3px; }
.project-page .project-filters { flex-wrap: wrap; max-width: 100%; margin-top: 12px; }
.project-page .project-filters a { overflow-wrap: anywhere; }
.person-featured .person-artifact-grid { grid-template-columns: repeat(auto-fit,minmax(min(200px,100%),1fr)); margin-top: 0; }
.artifact-card { min-width: 0; overflow-wrap: anywhere; }
.artifact-card .embed-stage { isolation: isolate; }
.artifact-card .embed-stage:has(iframe) .embed-poster { visibility: hidden; }
.artifact-card .embed-options:empty { display: none; }
@media (max-width: 720px) {
  .project-directory-page .project-directory { padding-top: 22px; padding-bottom: 40px; }
  .project-directory-card { padding: 18px; }
  .project-page .project-hero-links .btn { min-height: 44px; }
  .project-page .project-content { padding-bottom: 36px; }
  .person-featured .person-artifact-grid { grid-template-columns: 1fr; }
}

/* Project browsing has no coin-specific footer copy. */
body:has(.project-page, .project-directory-page) .foot a[href="/berlian"],
body:has(.project-page, .project-directory-page) .foot p { display: none; }

/* Books: covers on the person page, one streamed chapter on each reader URL. */
.person-books { margin: 28px 0 34px; }
.person-books h2 { font-size: 28px; margin-bottom: 16px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(158px, 100%), 1fr)); gap: 20px; }
.book-card { display: block; min-width: 0; overflow-wrap: anywhere; }
.book-card:focus-visible { outline-offset: 4px; }
.book-cover { background: var(--purple); color: #fff; aspect-ratio: 2 / 3; border-radius: 5px 12px 12px 5px; overflow: hidden;
  box-shadow: inset 7px 0 rgba(0,0,0,.13), 1px 6px 12px rgba(35,20,60,.16); display: flex; align-items: center; padding: 16px; }
.book-cover > img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; }
.book-cover:has(img) { padding: 0; }
.book-cover > span { color: #fff; overflow-wrap: anywhere; font: 650 clamp(18px,2vw,24px)/1.23 var(--serif); }
.book-card strong { display: block; margin-top: 10px; font-size: 15px; line-height: 1.35; }
.book-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.book-layout { display: grid; max-width: 1360px; grid-template-columns: minmax(190px, 260px) minmax(0, 1fr); gap: clamp(24px,4vw,64px); padding-top: 36px; padding-bottom: 90px; }
.book-contents { position: sticky; top: 90px; max-height: calc(100dvh - 108px); overflow-y: auto; align-self: start; }
.book-contents .book-author { font-size: 13px; color: var(--muted); }
.book-contents h2 { font-size: 22px; line-height: 1.22; margin: 8px 0 16px; }
.book-contents nav { display: flex; flex-direction: column; }
.book-contents nav a, .book-contents nav span { display: block; overflow-wrap: anywhere; padding: 10px 12px; min-height: 44px; font-size: 13px; line-height: 1.5; border-left: 2px solid transparent; }
.book-contents nav a[aria-current="page"] { color: var(--purple-2); border-color: var(--purple); background: var(--lav); font-weight: 700; }
.book-download { display: inline-flex; align-items: center; min-height: 44px; margin-top: 20px; color: var(--purple); font-weight: 650; }
.book-main { min-width: 0; }
.book-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; min-height: 44px; }
.book-bar > a, .book-bar > button { display: inline-flex; align-items: center; min-height: 44px; }
.book-bar .book-back { color: var(--muted); margin-right: auto; }
.book-bar .book-download-mobile { display: none; }
.book-columns-toggle { border: 1px solid var(--line); background: white; border-radius: 10px; padding: 8px 13px; font-size: 13px; }
.book-mobile-contents { display: none; }
.book-heading .book-name { display: block; color: var(--purple-2); font-size: 14px; margin-bottom: 8px; }
.book-heading .book-chapter-number { color: var(--muted); font-size: 13px; }
.book-heading h1 { font-size: clamp(32px, 4vw, 52px); margin-top: 6px; overflow-wrap: anywhere; }
.book-progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 28px 0 36px; }
.book-progress div { height: 100%; background: var(--purple); }
.book-text { max-width: 740px; min-height: 35vh; overflow-wrap: anywhere; }
.book-text img { max-width: 100%; height: auto; }
.book-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 45px; padding-top: 18px; }
.book-pager a { min-height: 44px; padding: 9px; color: var(--purple); font-weight: 700; }
.book-pager > :last-child { justify-self: end; }
.book-pager > span { color: var(--muted); font-size: 13px; }
.book-pdf-only h2 { font-size: 22px; margin: 16px 0; }
.book-pdf-only ol { padding-left: 22px; }
.book-pdf-only li { padding: 5px 0; overflow-wrap: anywhere; }
.book-pdf-only a { min-height: 44px; display: inline-flex; align-items: center; color: var(--purple); }
@media (min-width: 1400px) {
  .book-text.book-columns { max-width: none; -moz-column-count: 2; column-count: 2; -moz-column-gap: 54px; column-gap: 54px; -moz-column-rule: 1px solid var(--line); column-rule: 1px solid var(--line); }
  .book-text.book-columns h2, .book-text.book-columns h3, .book-text.book-columns img { -moz-column-break-after: avoid; break-after: avoid; }
}
@media (max-width: 720px) {
  .book-layout { grid-template-columns: minmax(0, 1fr); padding-left: 16px; padding-right: 16px; padding-top: 18px; gap: 0; }
  .book-contents { display: none; }
  .book-bar { margin-bottom: 20px; gap: 8px; }
  .book-bar .book-download-mobile { display: inline-flex; margin-left: auto; font-size: 13px; }
  .book-bar .book-back { display: none; }
  .book-columns-toggle { display: none !important; }
  .book-mobile-contents { display: block; }
  .book-mobile-contents > summary { display: flex; align-items: center; cursor: pointer; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; font-weight: 650; font-size: 14px; }
  .book-mobile-contents[open] > summary { position: fixed; top: 76px; left: 16px; z-index: 61;
    width: min(300px, calc(88vw - 32px)); background: var(--paper); border: 0; font-size: 18px; }
  .book-mobile-contents[open]::before { content: ""; position: fixed; inset: 0; z-index: 59; background: rgba(18,12,35,.5); }
  .book-mobile-contents > nav { display: none; }
  .book-mobile-contents[open] > nav { display: flex; flex-direction: column; position: fixed; left: 0; top: 66px; bottom: 0; z-index: 60; overflow-y: auto;
    width: min(340px, 88vw); max-width: 100vw; padding: 78px 16px 90px; background: var(--paper); box-shadow: 4px 0 32px rgba(18,12,35,.25); }
  .book-mobile-contents nav a { display: flex; align-items: center; min-height: 44px; padding: 10px; border-radius: 8px; overflow-wrap: anywhere; }
  .book-mobile-contents nav a[aria-current="page"] { color: var(--purple); background: var(--lav); font-weight: 700; }
  .book-text { width: 100%; max-width: 100%; -moz-column-count: 1 !important; column-count: 1 !important; }
  .book-heading h1 { font-size: 32px; }
  .book-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .person-books { margin: 22px 0 32px; }
}
/* Owner controls stay attached to the person's work, not in a separate admin screen. */
.top-actions { position: relative; }
.reader-menu { position: absolute; right: 0; top: calc(100% + 12px); min-width: 180px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 35; }
.reader-menu[hidden], .photo-crop[hidden] { display: none !important; }
.reader-menu a, .reader-menu button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 8px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: 600 15px var(--sans); text-align: left; }
.reader-menu a:hover, .reader-menu button:hover { background: var(--lav); }
.owner-editor { padding-top: 18px; padding-bottom: 12px; }
.owner-editor summary { display: inline-flex; list-style: none; cursor: pointer; }
.owner-editor summary::-webkit-details-marker { display: none; }
.owner-editor form { max-width: 520px; margin-top: 14px; }
.owner-editor .field textarea { min-height: 110px; font-family: var(--sans); font-size: 16px; }
.owner-editor .field input[type="file"] { width: 100%; max-width: 100%; }
.photo-crop { display: grid; gap: 10px; max-width: 320px; }
.photo-crop canvas { display: block; width: min(100%, 240px); aspect-ratio: 1; border-radius: 12px; background: var(--lav); }
.photo-crop input[type="range"] { min-height: 44px; padding: 0; border: none; accent-color: var(--purple); }
.owner-work { border-radius: var(--r); min-width: 0; }
.owner-work .wcard { border-radius: var(--r) var(--r) 0 0; }
.owner-work-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r) var(--r); background: var(--card); }
.owner-work-actions .btn { flex: 0 0 auto; min-height: 44px; padding: 0 14px; }
@media (max-width: 600px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .owner-editor .box { padding: 16px; }
  .owner-work-actions .btn { flex: 1; padding: 0 10px; }
  .filters a { min-height: 44px; }
}

/* The profile X icon is a true phone-size touch target. */
.phero .xlink { width: 44px; height: 44px; padding: 0; align-items: center; justify-content: center; }
/* Shared person page: market, store, apps, books, writing. */
.person-page { --r: 14px; }
.profile-hero { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); }
.profile-hero .wrap { padding-top: 38px; padding-bottom: 30px; gap: 20px; }
.profile-hero h1 { font-size: clamp(28px,4vw,42px); }
.profile-hero .av-112 { width: 72px; height: 72px; border-radius: 20px; font-size: 36px; border: 1px solid var(--line); }
.profile-hero .ticker { background: var(--lav); color: var(--purple-2); border: 0; }
.profile-hero .xlink { color: var(--muted); border-color: var(--line); }
.profile-hero .btn-white { color: white; background: var(--ink); }
.profile-hero .btn-onhero { color: var(--ink); background: transparent; border-color: #d5cdbf; }
.profile-nav { display: flex; gap: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.profile-nav a { flex: none; display: flex; align-items: center; min-height: 56px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.profile-nav a:hover { color: var(--purple); }
.profile-content { padding-bottom: 70px; }
.profile-market { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(260px,1fr); gap: 44px; padding: 32px 0 38px; border-bottom: 1px solid var(--line); scroll-margin-top: 85px; }
.profile-market h2 { font: 650 16px var(--sans); }
.profile-market .section-head { margin-bottom: 20px; min-height: 28px; }
.profile-market .more { min-height: 28px; font-size: 13px; }
.profile-market .facts { margin-bottom: 16px; }
.profile-market .facts dd { font: 600 20px var(--sans); font-variant-numeric: tabular-nums; }
.profile-market .token-chart { position: relative; }
.profile-market .token-chart .token-actions { position: absolute; top: 0; right: 0; gap: 3px; margin: 0; }
.profile-market .token-chart .btn { min-height: 30px; padding: 0 11px; font-size: 11px; border-radius: 7px; border-color: transparent; background: transparent; color: var(--muted); }
.profile-market .token-chart .btn[aria-pressed="true"] { color: var(--ink); background: #eee8dd; }
.profile-market .spark { height: 160px; padding-top: 35px; color: var(--purple); background: repeating-linear-gradient(to bottom, transparent 0, transparent 39px, var(--line) 40px); }
.chart-values { min-height: 32px; font-size: 13px; padding-right: 140px; }
.profile-holders { min-width: 0; border-left: 1px solid var(--line); padding-left: 30px; }
.profile-holders h2 { margin-bottom: 22px; }
.holders-scroll { max-height: 250px; overflow: auto; }
.profile-holders table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.profile-holders th { text-align: left; color: var(--muted); font-weight: 500; }
.profile-holders td, .profile-holders th { padding: 10px 0; border-bottom: 1px solid var(--line); }
.profile-holders td:not(:first-child), .profile-holders th:not(:first-child) { text-align: right; }
.profile-holders small { font-size: 11px; color: var(--muted); display: block; margin-top: 12px; }
.profile-section { padding: 34px 0; margin: 0; border-bottom: 1px solid var(--line); scroll-margin-top: 85px; }
.profile-section > .section-head, .profile-section > .store-head { margin-bottom: 22px; }
.profile-section h2 { font-size: 26px; }
.section-empty { color: #b4ab9b; padding: 12px 0; font-size: 18px; }
.profile-section .store-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.profile-section .store-item { background: #fff; border-radius: 12px; padding: 22px; gap: 12px; min-height: 150px; }
.profile-section .store-item p { color: var(--ink-2); line-height: 1.5; }
.profile-section .store-item .t, .profile-section .store-item > b { font: 650 19px/1.35 var(--serif); }
.profile-section .store-item .t:hover { color: var(--purple); }
.profile-apps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.profile-app { display: flex; align-items: flex-start; gap: 14px; padding: 20px; border: 1px solid var(--line); background: white; border-radius: 12px; min-width: 0; }
.profile-app > div { min-width: 0; }
.profile-app h3 { font: 650 16px var(--sans); overflow-wrap: anywhere; }
.profile-app p { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.app-mark { display: grid; place-items: center; flex: none; width: 40px; height: 40px; background: var(--lav); border-radius: 10px; color: var(--purple); font: 600 22px var(--serif); }
.profile-section .book-grid { grid-template-columns: repeat(auto-fill,minmax(155px,190px)); }
.profile-section .artifact-card { box-shadow: none; }
.profile-writing .wcard { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 20px 0; }
.profile-writing .works { gap: 0; }
.profile-writing .wcard:last-child { border-bottom: 0; }
.profile-writing .wcard h3 { font-size: 23px; }
.profile-writing .filters a { background: transparent; border: 1px solid var(--line); }
.profile-writing .filters a[aria-current="page"] { background: var(--ink); border-color: var(--ink); }
.profile-management summary { cursor: pointer; font-size: 14px; color: var(--muted); }
@media(max-width:760px) {
  .profile-hero .wrap { grid-template-columns: auto minmax(0,1fr); padding-top: 24px; padding-bottom: 24px; gap: 14px; }
  .profile-hero .actions { grid-column: 1 / -1; }
  .profile-nav { gap: 22px; }
  .profile-nav a { min-height: 50px; font-size: 12px; }
  .profile-market { grid-template-columns: minmax(0,1fr); gap: 28px; padding-top: 26px; }
  .profile-holders { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
  .profile-section .store-grid, .profile-apps { grid-template-columns: minmax(0,1fr); }
  .profile-section { padding: 28px 0; }
  .profile-section .book-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-writing .wcard { grid-template-columns: minmax(0,1fr) auto; }
  .profile-writing .wcover { width: 72px; height: 72px; order: initial; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }


/* Shared faceted work browsing. Separate card links avoid nested anchors. */
.cols > div { min-width: 0; }
.wcard { display: block; min-width: 0; }
.wcard-main { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; min-height: 44px; }
.wcard-main:focus-visible { outline-offset: 4px; }
.wcard-projects { display: flex; flex-wrap: wrap; gap: 0 14px; margin-top: 6px; }
.wcard-projects a { display: inline-flex; align-items: center; min-height: 44px; color: var(--purple-2); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.wcard-projects a:hover { text-decoration: underline; }
.latest-page { max-width: 820px; padding: 40px 20px 72px; }
.latest-page h1 { font-size: clamp(32px,5vw,48px); margin: 8px 0 18px; }
.filters, .project-page .project-filters { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: thin; max-width: 100%; min-width: 0; padding: 0 0 5px; margin-bottom: 10px; }
.filters a, .project-page .project-filters a { flex: 0 0 auto; white-space: nowrap; min-height: 44px; scroll-snap-align: start; }
@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .latest-page { padding-left: 16px; padding-right: 16px; }
  .wcard-main { grid-template-columns: minmax(0,1fr); }
  .wcard-main .wcover { width: 100%; height: 150px; }
  .filters { margin-right: 0; }
}
