/* 蔣昊的實作筆記 — round 2: dark stage chrome, light reading sheet */
:root {
  --stage: #131417;
  --stage-2: #1b1c20;
  --stage-3: #24252b;
  --line-d: rgba(255, 255, 255, .09);
  --text-d: #f3f2ee;
  --text-d2: #a7a6a1;
  --gold: #f2c46d;
  --gold-ink: #1d1606;
  --paper: #f6f5f1;
  --ink: #1d1d1f;
  --ink-2: #4b4b51;
  --ink-3: #85847f;
  --line: #e3e1da;
  --danger: #c0392b;
  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Heiti TC", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --col: 700px;
  --hue: #f2c46d;
}
.hue-ai { --hue: #7c95ff; }
.hue-events { --hue: #f2c46d; }
.hue-magic { --hue: #c18cff; }
.hue-speaking { --hue: #5fd3ae; }
.hue-work { --hue: #ff9670; }
.hue-story { --hue: #ef7aa0; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font: 17px/1.75 var(--sans); color: var(--text-d); background: var(--stage); -webkit-font-smoothing: antialiased; letter-spacing: .01em; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }
.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }
.small { font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: rgba(19, 20, 23, .94); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.top.is-scrolled { border-bottom-color: var(--line-d); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 17px/1 var(--serif); text-decoration: none; letter-spacing: .04em; }
.brand img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.nav { display: flex; align-items: center; gap: 24px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--text-d2); transition: color .2s; }
.nav a:hover, .nav a[aria-current] { color: var(--text-d); }
.nav-icon { display: inline-flex; }
.nav .btn { color: var(--gold-ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 48px; padding: 0 26px; border-radius: 12px; background: var(--gold); color: var(--gold-ink); font: 700 16px/1 var(--sans); text-decoration: none; border: 0; cursor: pointer; transition: transform .25s var(--ease), filter .2s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn-full { width: 100%; }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; opacity: .85; font-weight: 600; }
.btn-ghost:hover { opacity: 1; filter: none; }
.btn-danger { background: var(--danger); color: #fff; }
.link { color: var(--gold); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* hero */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(700px 520px at 74% 38%, rgba(242, 160, 80, .22), transparent 70%); }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 24px; min-height: min(780px, calc(100vh - 64px)); }
.hero-copy { padding: 72px 0; }
.hero-hi { font-size: 17px; color: var(--text-d2); margin-bottom: 22px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.hero-hi span { color: var(--gold); }
.hero-title { font: 900 clamp(34px, 4.6vw, 62px)/1.22 var(--serif); letter-spacing: .02em; text-wrap: balance; }
.hero-lead { max-width: 32em; margin-top: 26px; font-size: clamp(16px, 1.6vw, 19px); color: var(--text-d2); line-height: 1.85; }
.hero-act { display: flex; align-items: center; gap: 26px; margin-top: 38px; flex-wrap: wrap; }
.hero-photo { justify-self: end; width: min(440px, 100%); position: relative; margin: 48px 0; border-radius: 28px; overflow: hidden; border: 1px solid var(--line-d); box-shadow: 0 40px 80px -40px rgba(242, 150, 70, .45); }
.hero-photo img { width: 100%; height: auto; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 70%, rgba(19, 20, 23, .55)); pointer-events: none; }
.hero-copy > * { animation: rise .9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-photo { animation: fade 1.2s .1s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* sections */
.sec { padding-top: clamp(64px, 9vw, 112px); }
.sec-title { font: 700 clamp(24px, 3vw, 32px)/1.35 var(--serif); margin-bottom: 30px; letter-spacing: .02em; }
.empty { color: var(--text-d2); padding: 24px 0; list-style: none; }

/* scroll reveal (only for elements below the fold; see site.js) */
.reveal.pending { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

/* cards */
.cards { list-style: none; display: grid; gap: 22px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card a { display: flex; flex-direction: column; height: 100%; background: var(--stage-2); border: 1px solid var(--line-d); border-radius: 18px; overflow: hidden; text-decoration: none; transition: transform .35s var(--ease), border-color .25s; }
.card a:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .22); }
.cover { position: relative; aspect-ratio: 16 / 10; padding: 20px 22px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--hue) 42%, transparent), transparent 62%), linear-gradient(160deg, #26272d, #18191d); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .35)); pointer-events: none; }
.cover-cat { position: relative; z-index: 1; align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--hue); background: rgba(0, 0, 0, .35); padding: 3px 10px; border-radius: 999px; }
.cover-title { position: relative; z-index: 1; font: 700 clamp(19px, 1.7vw, 23px)/1.45 var(--serif); color: #fff; text-wrap: balance; }
.card-body { padding: 16px 22px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-sum { color: var(--text-d2); font-size: 15px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body time { margin-top: auto; font-size: 13px; color: var(--text-d2); opacity: .8; }

/* topics */
.topics { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.topic { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 22px 24px; border-radius: 16px; background: var(--stage-2); border: 1px solid var(--line-d); text-decoration: none; position: relative; overflow: hidden; transition: transform .35s var(--ease), border-color .25s; }
.topic::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: var(--hue); }
.topic:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .22); }
.topic b { font: 700 20px/1.4 var(--serif); }
.topic span { grid-column: 1; color: var(--text-d2); font-size: 15px; }
.topic i { grid-column: 2; grid-row: 1; font-style: normal; color: var(--text-d2); font-size: 14px; align-self: center; }

/* bento about */
.bento { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; grid-template-rows: auto auto; gap: 16px; }
.bento > * { background: var(--stage-2); border: 1px solid var(--line-d); border-radius: 20px; }
.bento-photo { grid-row: span 2; overflow: hidden; background: #2a2b30; }
.bento-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.bento-time, .bento-now, .bento-letter { padding: 26px 28px; }
.timeline { list-style: none; display: grid; gap: 18px; margin-bottom: 20px; }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: baseline; }
.timeline b { font: 700 22px/1 var(--serif); color: var(--gold); }
.timeline span { color: var(--text-d2); font-size: 15px; }
.bento-now { grid-row: span 2; }
.bento-now h3 { font-size: 16px; margin-bottom: 14px; }
.bento-now ul { list-style: none; display: grid; gap: 14px; }
.bento-now li { display: grid; gap: 2px; padding-top: 14px; border-top: 1px solid var(--line-d); }
.bento-now li:first-child { border-top: 0; padding-top: 0; }
.bento-now b { font-size: 15px; }
.bento-now span { font-size: 14px; color: var(--text-d2); line-height: 1.65; }
.bento-letter p { font: 600 18px/1.8 var(--serif); }
.bento-letter cite { display: block; margin-top: 12px; font-style: normal; color: var(--gold); font-weight: 600; }

/* join band */
.join-band { margin-top: clamp(64px, 9vw, 112px); padding: clamp(40px, 6vw, 64px); border-radius: 28px; text-align: center; border: 1px solid var(--line-d);
  background: radial-gradient(60% 120% at 50% 0%, rgba(242, 196, 109, .2), transparent 70%), var(--stage-2); }
.join-band h2 { font: 700 clamp(22px, 3vw, 30px)/1.4 var(--serif); }
.band-act { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 26px; flex-wrap: wrap; }

/* page hero (dark band) */
.page-hero, .post-hero { position: relative; isolation: isolate; overflow: hidden; }
.page-hero::before, .post-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px 300px at 85% 0%, color-mix(in srgb, var(--hue) 26%, transparent), transparent 70%); }
.page-hero-in { padding: 64px 0 56px; max-width: 820px; }
.post-hero-in { padding: 56px 0 52px; max-width: 820px; }
.back { display: inline-block; font-size: 14px; color: var(--hue); text-decoration: none; margin-bottom: 18px; font-weight: 600; }
.back::before { content: "‹ "; }
.title { font: 700 clamp(30px, 4.4vw, 48px)/1.3 var(--serif); letter-spacing: .02em; text-wrap: balance; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--text-d2); margin-top: 16px; line-height: 1.8; }
.post-hero .meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; color: var(--text-d2); font-size: 14px; }
.post-hero .meta img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.post-hero .meta span:first-of-type { color: var(--text-d); font-weight: 600; }
.about-hero { display: grid; grid-template-columns: 1fr 240px; align-items: end; gap: 32px; max-width: none; }
.about-hero img { border-radius: 20px; height: 300px; width: 100%; object-fit: cover; object-position: 50% 15%; }
.nf { padding-bottom: 80px; }
.nf .btn { margin-top: 28px; }

/* light reading sheet */
.sheet { background: var(--paper); color: var(--ink); padding: 56px 0 80px; }
.sheet a { color: inherit; }
.sheet .btn, .join-card .btn, .wall .btn { color: var(--gold-ink); }
.join-card .link, .wall .link { color: var(--gold); }
.post-grid { display: grid; grid-template-columns: minmax(0, var(--col)) 320px; justify-content: space-between; gap: 56px; align-items: start; }
.prose { max-width: var(--col); }
.sheet > .prose { padding: 0; }
.body, .prose > p, .prose > ul { font-size: 18px; line-height: 1.95; color: #26262a; }
.body p, .prose > p { margin-bottom: 1.25em; }
.body h2, .prose > h2 { font: 700 26px/1.4 var(--serif); margin: 2.1em 0 .8em; color: var(--ink); scroll-margin-top: 90px; }
.body h3 { font-size: 19px; margin: 1.6em 0 .5em; }
.body ul, .body ol, .prose > ul { padding-left: 1.3em; margin-bottom: 1.25em; }
.body li { margin-bottom: .35em; }
.body blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold); font: 600 20px/1.7 var(--serif); }
.body blockquote p { margin: 0; }
.body code { font-size: .9em; background: #ebe9e3; padding: 2px 6px; border-radius: 6px; }
.body pre { background: #ebe9e3; padding: 16px; border-radius: 12px; overflow: auto; margin-bottom: 1.25em; }
.body pre code { background: none; padding: 0; }
.body a { color: #8a5a00; text-underline-offset: 3px; }
.body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose .sign { font: 600 20px var(--serif); }

/* workflow blocks */
.overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 1.6em 0; border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; }
.overview > div { padding: 18px 20px; border-left: 1px solid var(--line); }
.overview > div:first-child { border-left: 0; }
.overview dt { font-size: 13px; font-weight: 700; color: #8a5a00; margin-bottom: 4px; }
.overview dd { font-size: 15px; line-height: 1.7; color: var(--ink); }
.body ol.steps { list-style: none; padding: 10px 28px; margin: 1.4em 0 1.8em; background: var(--stage); color: var(--text-d); border-radius: 20px; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 20px 0; border-top: 1px solid var(--line-d); margin: 0; }
.steps li:first-child { border-top: 0; }
.step-n { font: 700 24px/1.2 var(--serif); color: var(--gold); }
.steps h3 { font-size: 17px; margin: 0 0 4px; color: #fff; }
.steps p { margin: 0 !important; font-size: 16px; line-height: 1.8; color: var(--text-d2); }
.callout { margin: 1.2em 0; padding: 16px 20px 16px 52px; border-radius: 14px; position: relative; font-size: 16px; line-height: 1.8; }
.callout b { display: block; font-size: 14px; margin-bottom: 2px; }
.callout p { margin: 0 !important; }
.callout::before { content: "!"; position: absolute; left: 18px; top: 17px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 800 13px/1 var(--sans); }
.callout.warn { background: #fdf0e1; color: #5a3708; }
.callout.warn::before { background: #e8913a; color: #fff; }
.callout.note { background: #ecefe9; color: #2f3a2a; }
.callout.note::before { content: "i"; background: #6b8f5a; color: #fff; }

/* table of contents */
.toc h2 { font-size: 14px; font-weight: 700; color: var(--ink-3); margin-bottom: 10px; }
.toc ol { list-style: none; counter-reset: ch; display: grid; gap: 2px; }
.toc li { counter-increment: ch; display: grid; grid-template-columns: 30px 1fr; font-size: 15px; line-height: 1.6; padding: 7px 0; border-top: 1px solid var(--line); }
.toc li:first-child { border-top: 0; }
.toc li::before { content: counter(ch, decimal-leading-zero); color: #8a5a00; font-weight: 700; font-variant-numeric: tabular-nums; }
.toc a { text-decoration: none; }
.toc a:hover { color: #8a5a00; }
.toc li.locked { color: var(--ink-3); }
.toc li.locked span::after { content: ""; display: inline-block; width: 11px; height: 11px; margin-left: 6px; vertical-align: -1px; opacity: .55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Crect x='1.5' y='5' width='9' height='6.5' rx='1.5' fill='%2385847f'/%3E%3Cpath d='M3.5 5V3.5a2.5 2.5 0 0 1 5 0V5' fill='none' stroke='%2385847f' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat center / contain; }
.post > .toc, .inline-toc { margin-bottom: 36px; padding: 20px 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.inline-toc .toc { padding: 0; border: 0; }
.side-toc { position: sticky; top: 96px; }
.side-toc .toc { padding: 20px 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
@media (min-width: 1025px) { .post-grid:has(.side-toc) .inline-toc { display: none; } }

/* sticky join card */
.join-card { position: sticky; top: 96px; padding: 26px 24px; border-radius: 22px; background: var(--stage); color: var(--text-d); display: grid; gap: 12px; box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .55); }
.join-card h2 { font: 700 21px/1.4 var(--serif); }
.join-card p { color: var(--text-d2); font-size: 15px; }
.join-card .link { justify-self: center; }
.locked-list { list-style: none; display: grid; gap: 6px; margin-bottom: 6px; }
.locked-list li { font-size: 14px; line-height: 1.5; padding-left: 18px; position: relative; color: var(--text-d); }
.locked-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 2px; background: var(--gold); opacity: .8; }

/* member wall */
.is-gated { position: relative; }
.is-gated::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 150px; background: linear-gradient(rgba(246, 245, 241, 0), var(--paper)); pointer-events: none; }
.wall { margin-top: 8px; padding: 40px 36px; border-radius: 24px; background: var(--stage); color: var(--text-d); text-align: center; }
.wall h2 { font: 700 26px/1.4 var(--serif); }
.wall > p { color: var(--text-d2); margin: 10px 0 22px; }
.wall-locked { display: none; text-align: left; margin-bottom: 24px; gap: 6px; }
.wall-locked .small { color: var(--text-d2); }
.wall-act { display: flex; justify-content: center; align-items: center; gap: 24px; flex-wrap: wrap; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.tags a { font-size: 14px; padding: 4px 12px; border-radius: 999px; background: #ebe9e3; color: var(--ink-2); text-decoration: none; }
.tags a:hover { background: #e2dfd6; }
.preview-bar { position: sticky; top: 64px; z-index: 10; background: var(--gold); color: var(--gold-ink); text-align: center; padding: 8px; font-size: 14px; font-weight: 700; }

/* auth */
.auth-page { position: relative; isolation: isolate; padding: clamp(40px, 7vw, 88px) 0 96px; }
.auth-page::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px 400px at 20% 20%, rgba(242, 196, 109, .14), transparent 70%); }
.auth-grid { display: grid; grid-template-columns: 1fr 460px; gap: clamp(32px, 6vw, 88px); align-items: center; }
.auth-side { display: grid; gap: 14px; max-width: 460px; }
.auth-side .auth-quote + .small { margin-top: 18px; }
.auth-side .small { color: var(--text-d2); }
.auth-quote { font: 700 clamp(26px, 3.4vw, 40px)/1.4 var(--serif); text-wrap: balance; }
.from-post { padding: 22px 24px; border-radius: 18px; background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--hue) 30%, transparent), transparent 65%), var(--stage-2); border: 1px solid var(--line-d); display: grid; gap: 6px; }
.from-post span { font-size: 13px; color: var(--hue); font-weight: 600; }
.from-post b { font: 700 21px/1.45 var(--serif); }
.auth-card { background: var(--paper); color: var(--ink); border-radius: 26px; padding: clamp(28px, 4vw, 40px); }
.auth-card .title { font-size: clamp(26px, 3vw, 32px); }
.from-inline { display: none; margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.from-inline b { color: var(--ink); }
.form { display: grid; gap: 18px; margin-top: 26px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field input, .search input { height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 17px; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .search input:focus { outline: none; border-color: #c99a3c; box-shadow: 0 0 0 4px rgba(242, 196, 109, .3); }
.field.has-err input { border-color: var(--danger); }
.field-err { display: block; font-style: normal; font-size: 14px; color: var(--danger); margin-top: 2px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 14px; color: var(--ink-2); align-items: start; line-height: 1.7; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: #b8862b; }
.check a { color: #8a5a00; }
.check.has-err { color: var(--danger); }
.err, .ok { margin-top: 18px; padding: 12px 16px; border-radius: 12px; font-size: 15px; }
.err { background: #fbe9e7; color: var(--danger); }
.ok { background: #f3ead6; color: #6b4a07; }
.alt { margin-top: 22px; font-size: 15px; color: var(--ink-2); }
.alt a { color: #8a5a00; font-weight: 600; }
.auth-card .btn { margin-top: 4px; }
.search { display: flex; gap: 10px; margin-top: 24px; max-width: 640px; }
.search input { flex: 1; border-color: transparent; }
.count { color: var(--text-d2); font-size: 14px; margin-bottom: 16px; }

/* member page */
.me { max-width: var(--col); }
.h3 { font-size: 17px; font-weight: 700; margin: 36px 0 12px; }
.me .h3:first-of-type { margin-top: 0; }
.rows { list-style: none; }
.rows a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; }
.rows a:hover span { color: #8a5a00; }
.rows time { color: var(--ink-3); font-size: 14px; white-space: nowrap; }
.sheet .empty { color: var(--ink-3); }
.inline-form { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-2); }
.inline-form .grow { flex: 1; min-width: 200px; }
.me-foot { display: flex; gap: 16px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); align-items: start; flex-wrap: wrap; }
.danger summary { cursor: pointer; color: var(--danger); font-size: 15px; height: 48px; display: flex; align-items: center; }
.danger form { display: grid; gap: 14px; margin-top: 10px; max-width: 360px; color: var(--ink-2); font-size: 15px; }

/* hover tips */
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -4px); background: #000; color: #fff; font-size: 13px; font-weight: 500; line-height: 1.4; padding: 6px 10px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s var(--ease); z-index: 40; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

/* footer */
.foot { border-top: 1px solid var(--line-d); margin-top: clamp(64px, 9vw, 112px); }
body:has(main > .sheet:last-child) .foot { margin-top: 0; }
main > .join-band:last-child { margin-bottom: 0; }
.foot-in { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 32px 0 44px; color: var(--text-d2); font-size: 14px; }
.foot-brand { font: 700 16px var(--serif); color: var(--text-d); }
.foot nav { display: flex; gap: 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text-d); }
.sheet + .join-band { margin-top: clamp(48px, 7vw, 80px); }

/* ===== round 3 ===== */
.nav-links { display: flex; gap: 22px; }
.mnav { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pill { display: inline-block; margin-left: 12px; vertical-align: middle; font: 600 13px/1 var(--sans); padding: 6px 10px; border-radius: 999px; background: rgba(242, 196, 109, .16); color: var(--gold); letter-spacing: .02em; }
.topics-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topic-big { padding: 34px 32px; min-height: 160px; align-content: start; background: radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--hue) 20%, transparent), transparent 60%), var(--stage-2); }
.topic-big b { font-size: 26px; }
.bento-bg { grid-column: 2; padding: 26px 28px; }
.bento-bg h3, .bento-now h3 { font-size: 16px; margin-bottom: 10px; }
.bento-bg p { color: var(--text-d2); font-size: 15px; margin-bottom: 14px; }
.bg-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.bg-links a { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-d); text-decoration: none; font-size: 14px; transition: border-color .2s; }
.bg-links a:hover { border-color: var(--hue); }
.bg-links i { font-style: normal; color: var(--text-d2); font-size: 13px; }
.offer { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); padding: clamp(28px, 5vw, 52px); border-radius: 28px; background: var(--stage-2); border: 1px solid var(--line-d); align-items: start; }
.offer .sec-title { margin-bottom: 14px; }
.offer-lead { color: var(--text-d2); margin-bottom: 26px; }
.offer-list { list-style: none; display: grid; gap: 16px; }
.offer-list li { display: grid; gap: 4px; padding: 18px 20px; border-radius: 16px; background: var(--stage-3); }
.offer-list b { font-size: 17px; }
.offer-list span { color: var(--text-d2); font-size: 15px; line-height: 1.7; }
.offer-alt { background: radial-gradient(60% 120% at 0% 0%, rgba(124, 149, 255, .14), transparent 70%), var(--stage-2); }
.sub-band { padding: clamp(32px, 5vw, 56px); border-radius: 28px; border: 1px solid var(--line-d); background: radial-gradient(60% 120% at 50% 0%, rgba(242, 196, 109, .18), transparent 70%), var(--stage-2); }
.sub-band > p { color: var(--text-d2); max-width: 36em; margin: -14px 0 22px; }
.sub-form { display: grid; gap: 14px; max-width: 620px; }
.sub-row { display: flex; gap: 10px; align-items: end; }
.sub-row .field { flex: 1; }
.sub-row .btn { flex: none; }
.offer .sub-form, .sub-band .sub-form { color: var(--text-d); }
.offer .field > span, .sub-band .field > span { color: var(--text-d2); }
.offer .check, .sub-band .check { color: var(--text-d2); }
.offer .check a, .sub-band .check a { color: var(--gold); }
.sub-box { margin-top: 48px; padding: 28px 28px 24px; border-radius: 22px; background: #fff; border: 1px solid var(--line); }
.sub-box h2 { font: 700 22px/1.4 var(--serif); }
.sub-box > p { color: var(--ink-2); font-size: 15px; margin: 6px 0 16px; }
.side-sub { margin-top: 14px; padding: 18px 20px; border-radius: 18px; background: var(--stage); color: var(--text-d); display: grid; gap: 8px; }
.side-sub p { color: var(--text-d2); font-size: 14px; }
.downloads { margin-top: 40px; padding: 22px 24px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.downloads h2 { font-size: 16px; margin-bottom: 10px; }
.downloads ul { list-style: none; display: grid; gap: 10px; }
.downloads li { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.demo-tag { font-style: normal; margin-left: 8px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f3ead6; color: #6b4a07; }
.training { display: grid; grid-template-columns: 1fr 480px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.training-info .sec-title { margin-top: 36px; font-size: 22px; margin-bottom: 16px; }
.training-info .sec-title:first-child { margin-top: 0; }
.speaker { display: flex; gap: 16px; align-items: center; color: var(--text-d2); }
.speaker img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.muted-d { color: var(--text-d2); }
.training .auth-card { position: sticky; top: 88px; }
.topics-pick { border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topics-pick legend { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; width: 100%; }
.pick input { position: absolute; opacity: 0; }
.pick span { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 15px; cursor: pointer; transition: background .2s, border-color .2s; }
.pick input:checked + span { background: var(--stage); border-color: var(--stage); color: #fff; }
.pick input:focus-visible + span { outline: 2px solid #c99a3c; outline-offset: 2px; }
.field textarea { padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; resize: vertical; color: var(--ink); }
.field textarea:focus { outline: none; border-color: #c99a3c; box-shadow: 0 0 0 4px rgba(242, 196, 109, .3); }
.done-msg { color: var(--ink-2); margin: 14px 0 22px; line-height: 1.8; }
.auth-card .title .pill { font-size: 12px; }
.auth-side .pill { margin: 0; justify-self: start; }

@media (max-width: 1024px) {
  .wall-locked { display: inline-grid; }
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .post-grid > aside { display: none; }
  .offer { grid-template-columns: 1fr; }
  .cards-3, .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-photo { grid-row: span 1; aspect-ratio: 4 / 5; }
  .bento-now { grid-row: auto; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 40px); }
  .nav { gap: 16px; font-size: 14px; }
  .hide-sm { display: none; }
  .nav-links { display: none; }
  .mnav { display: block; border-top: 1px solid var(--line-d); }
  .mnav .wrap { display: flex; gap: 18px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
  .mnav a { flex: none; font-size: 14px; color: var(--text-d2); text-decoration: none; }
  .mnav a[aria-current] { color: var(--gold); }
  .topics-2, .offer, .training { grid-template-columns: 1fr; }
  .bento-bg { grid-column: auto; }
  .sub-row { flex-direction: column; align-items: stretch; }
  .training .auth-card { position: static; }
  .brand { font-size: 15px; }
  .hero-in { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .hero-photo { order: -1; justify-self: stretch; width: 100%; margin: 20px 0 8px; border-radius: 22px; }
  .hero-photo img { aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 22%; }
  .hero-copy { padding: 8px 0 48px; }
  .cards-3, .topics, .bento { grid-template-columns: 1fr; }
  .bento-photo { aspect-ratio: 4 / 3; }
  .overview { grid-template-columns: 1fr; }
  .overview > div { border-left: 0; border-top: 1px solid var(--line); }
  .overview > div:first-child { border-top: 0; }
  .body ol.steps { padding: 6px 20px; }
  .steps li { grid-template-columns: 40px 1fr; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .from-inline { display: block; }
  .auth-quote { font-size: 22px; }
  .about-hero { grid-template-columns: 1fr; }
  .about-hero img { height: 260px; }
  .wall { padding: 32px 22px; }
  .foot-in { grid-template-columns: 1fr; gap: 10px; }
  .rows a { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal.pending { opacity: 1; transform: none; }
}

/* ===== round 5: media in articles ===== */
.body figure.media { margin: 1.8em 0; }
.body figure.media img, .body figure.media video { display: block; width: 100%; height: auto; border-radius: 14px; background: #ebe9e3; box-shadow: 0 0 0 1px var(--line); }
.body figure.media figcaption { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--ink-3); }
.body figure.is-video video { aspect-ratio: 16 / 9; object-fit: contain; background: #111; }
.media-flag { display: inline-block; margin-bottom: 8px; padding: 3px 10px; border-radius: 999px; background: #fbe9e7; color: var(--danger); font-size: 13px; font-weight: 700; }
.media-missing { color: var(--danger); font-size: 14px; }
.file-inline { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.file-inline span { font-weight: 600; }

/* ===== round 7: left-hand library column (category, article, search) ===== */
.wrap-wide { width: min(1320px, 100% - 48px); }
.lib-grid { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 48px; align-items: start; }
.lib-grid > .cards, .lib-grid > div { min-width: 0; }
.sec.lib-grid { padding-top: 40px; }
.wrap-wide.page-hero-in, .wrap-wide.post-hero-in { max-width: none; }
.wrap-wide.page-hero-in > *, .wrap-wide.post-hero-in > * { max-width: 820px; }
.wrap-wide.page-hero-in { padding: 56px 0 40px; }
.post-grid.has-lib { grid-template-columns: 232px minmax(0, var(--col)) 280px; gap: 48px; }
.lib { --l-text: var(--text-d2); --l-strong: var(--text-d); --l-line: var(--line-d); --l-field: var(--stage-2); --l-hover: rgba(255, 255, 255, .06); --l-mark: var(--hue);
  position: sticky; top: 88px; max-height: calc(100dvh - 112px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--l-line) transparent; font-size: 14px; line-height: 1.5; }
.sheet .lib { --l-text: var(--ink-2); --l-strong: var(--ink); --l-line: var(--line); --l-field: #fff; --l-hover: rgba(0, 0, 0, .045); --l-mark: #8a5a00; }
.lib-t { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lib-toggle { display: none; }
.lib-search { position: relative; display: block; margin-bottom: 18px; color: var(--l-text); }
.lib-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.lib-search input { width: 100%; height: 38px; padding: 0 12px 0 36px; border: 1px solid var(--l-line); border-radius: 10px; background: var(--l-field); color: var(--l-strong); font: inherit; transition: border-color .2s, box-shadow .2s; }
.lib-search input::placeholder { color: var(--l-text); opacity: .8; }
.lib-search input:focus { outline: none; border-color: #c99a3c; box-shadow: 0 0 0 3px rgba(242, 196, 109, .28); }
.lib-cat { border-top: 1px solid var(--l-line); }
.lib-cat:first-child { border-top: 0; }
.lib-cat summary { display: flex; align-items: center; gap: 9px; padding: 11px 6px; cursor: pointer; list-style: none; color: var(--l-strong); font-weight: 700; font-size: 15px; border-radius: 8px; transition: background .2s; -webkit-user-select: none; user-select: none; }
.lib-cat summary::-webkit-details-marker { display: none; }
.lib-cat summary:hover { background: var(--l-hover); }
.lib-cat summary span { flex: 1; }
.lib-cat summary em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--l-text); font-variant-numeric: tabular-nums; }
.lib-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hue); flex: none; }
.lib-chev { flex: none; color: var(--l-text); transition: transform .3s var(--ease); }
.lib-cat[open] > summary .lib-chev { transform: rotate(90deg); }
.lib-cat ul { list-style: none; display: grid; gap: 1px; padding: 0 0 12px; }
.lib-cat li a { display: block; padding: 7px 10px 7px 22px; border-radius: 8px; color: var(--l-text); text-decoration: none; position: relative; transition: background .2s, color .2s; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.lib-cat li a:hover { background: var(--l-hover); color: var(--l-strong); }
.lib-cat li a[aria-current] { color: var(--l-strong); font-weight: 700; background: var(--l-hover); }
.lib-cat li a[aria-current]::before { content: ""; position: absolute; left: 9px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--l-mark); }
.lib-cat .lib-all { font-size: 13px; }
.sheet .lib a { color: var(--l-text); }
.sheet .lib a:hover, .sheet .lib a[aria-current] { color: var(--l-strong); }
@media (min-width: 1025px) and (max-width: 1280px) {
  .post-grid.has-lib { grid-template-columns: 232px minmax(0, var(--col)); justify-content: start; }
  .post-grid.has-lib > aside:not(.lib) { display: none; }
  .post-grid.has-lib:has(.side-toc) .inline-toc { display: block; }
  .lib-grid .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .lib-grid, .post-grid.has-lib { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .post-grid > aside.lib { display: block; }
  .lib { position: static; max-height: none; overflow: visible; border: 1px solid var(--l-line); border-radius: 14px; background: var(--l-field); }
  .lib-toggle { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; font-weight: 700; font-size: 15px; color: var(--l-strong); cursor: pointer; }
  .lib-t:focus-visible + .lib-toggle { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 14px; }
  .lib-t:checked + .lib-toggle .lib-chev { transform: rotate(90deg); }
  .lib-body { display: none; padding: 4px 12px 10px; border-top: 1px solid var(--l-line); }
  .lib-t:checked ~ .lib-body { display: block; }
  .lib-search { margin: 12px 0; }
  .lib-search input { background: transparent; }
}
@media (max-width: 760px) { .wrap-wide { width: calc(100% - 40px); } }

/* ===== round 8: phone and tablet pass ===== */
.btn { white-space: nowrap; }
.auth-grid > *, .training > *, .post-grid > *, .lib-grid > *, .offer > *, .bento > *, .hero-in > * { min-width: 0; }
.brand { min-width: 0; }
.foot nav { flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { white-space: nowrap; padding: 6px 0; }
.back { padding: 8px 0; margin-bottom: 10px; }
.prose, .body { overflow-wrap: anywhere; }
.body table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.body pre { max-width: 100%; overflow-x: auto; }
.sub-row .field { min-width: 0; }
.field input:not([type=checkbox]):not([type=radio]), .field textarea, .field select { width: 100%; min-width: 0; }
.auth-card .sub-row { flex-direction: column; align-items: stretch; }
@media (max-width: 1024px) {
  .foot-in { grid-template-columns: 1fr; gap: 10px; }
  .training { grid-template-columns: 1fr; }
  .training .auth-card { position: static; }
  .nav-links { display: none; }
  .mnav { display: block; border-top: 1px solid var(--line-d); }
  .mnav .wrap { display: flex; gap: 22px; overflow-x: auto; padding: 0; scrollbar-width: none; }
  .mnav .wrap::-webkit-scrollbar { display: none; }
  .mnav a { flex: none; font-size: 14px; line-height: 20px; padding: 12px 0; color: var(--text-d2); text-decoration: none; }
  .mnav a[aria-current] { color: var(--gold); }
  html { scroll-padding-top: 120px; }
  .lib { scroll-margin-top: 120px; }
}
@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .from-inline { display: block; }
}
@media (max-width: 760px) {
  .top-in { height: 56px; gap: 10px; }
  .brand { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; }
  .brand img { flex: none; }
  .nav { flex: none; gap: 6px; }
  .nav-icon { width: 40px; height: 40px; align-items: center; justify-content: center; }
  .nav-me { max-width: 4.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 40px; }
  .nav .btn-sm { height: 36px; padding: 0 14px; }
  .mnav .wrap { padding: 0; gap: 20px; }
  .mnav a { padding: 12px 0; line-height: 20px; }
  html { scroll-padding-top: 112px; }
  .sec { padding-top: 56px; }
  .sec-title { margin-bottom: 20px; }
  .page-hero-in, .wrap-wide.page-hero-in { padding: 36px 0 32px; }
  .post-hero-in { padding: 32px 0 36px; }
  .sheet { padding: 32px 0 56px; }
  .hero-act { flex-wrap: wrap; row-gap: 4px; }
  .hero-act .link, .bento .link, .wall-act .link { display: inline-flex; align-items: center; min-height: 44px; }
  .field input:not([type=checkbox]):not([type=radio]), .field textarea, .field select { width: 100%; min-width: 0; }
  .search input { flex: 1; min-width: 0; }
  .search .btn { flex: none; padding: 0 18px; }
  .brand { min-height: 40px; }
  .sub-row .field { min-width: 0; }
  .sub-box { padding: 22px 18px 20px; margin-top: 36px; }
  .downloads { padding: 18px; }
  .downloads li { flex-wrap: wrap; gap: 8px 12px; padding: 6px 0; }
  .downloads li > span { flex: 1 1 180px; min-width: 0; }
  .auth-card { padding: 24px 20px; border-radius: 22px; }
  .speaker { align-items: flex-start; }
  .speaker img { flex: none; }
  .inline-form { align-items: stretch; }
  .inline-form .grow { min-width: 0; flex: 1 1 160px; }
  .me-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .danger form { max-width: none; }
  .tags a { padding: 8px 12px; }
  .toc li { padding: 10px 0; }
  .lib-cat summary { padding: 13px 6px; }
  .lib-cat li a { padding-top: 10px; padding-bottom: 10px; }
  .lib-search input { height: 44px; font-size: 16px; }
  .post-meta, .post-hero .meta { flex-wrap: wrap; row-gap: 4px; }
  .cover-title { overflow-wrap: anywhere; }
}
@media (max-width: 360px) {
  .wrap, .wrap-wide { width: calc(100% - 32px); }
  .brand { font-size: 14px; }
}

@media (min-width: 560px) and (max-width: 760px) { .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== round 9: quieter pages — slim subscribe band, one-line footer ===== */
.sub-band { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px 40px; padding: 26px 32px; border-radius: 22px; background: var(--stage-2); }
.sub-band .sec-title { margin: 0; font-size: 22px; }
.sub-band .sub-form { max-width: none; justify-self: end; width: min(560px, 100%); gap: 10px; }
.sub-form.slim .sub-row { align-items: center; }
.sub-form.slim .field input { height: 46px; }
.sub-form.slim .btn { height: 46px; }
.sub-form.slim .check { font-size: 13px; }
.sub-box > h2 { margin-bottom: 14px; }
.side-sub { gap: 12px; }
.foot { margin-top: clamp(48px, 7vw, 88px); }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0 28px; font-size: 13px; }
.foot-brand { font: 500 13px var(--sans); color: var(--text-d2); }
@media (max-width: 760px) {
  .sub-band { grid-template-columns: 1fr; padding: 22px 20px; gap: 14px; }
  .sub-band .sub-form { justify-self: stretch; width: 100%; }
  .sub-form.slim .sub-row { flex-direction: row; align-items: center; }
  .sub-form.slim .sub-row .btn { padding: 0 16px; }
  .foot-in { flex-direction: row; }
}
