/* The Natty Trader · SFC website. White and mint with ink type. One family, Inter (self-hosted, OFL licence in /fonts). */
@font-face { font-family: 'Inter'; src: url('/fonts/Inter.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
/* Arial sized to match Inter, so text doesn't jump when the web font arrives */
@font-face { font-family: 'Inter Fallback'; src: local('Arial'); size-adjust: 107.12%; ascent-override: 90.44%; descent-override: 22.52%; line-gap-override: 0%; }
:root {
  --sans: 'Inter', 'Inter Fallback', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --ink: #0C1A13; --ink2: #24352C; --sub: #56675E; --muted: #66756D;
  --green: #10B464; --green2: #0A7D45; --green-dk: #08703E; --green3: #22D07F; --mint: #DDF6E7; --mint2: #F1FAF5;
  --red: #EF4444; --red2: #B42323; --redsoft: #FDE4E2; --amber: #F59E0B; --amber2: #92400E; --ambersoft: #FEF1D6;
  --bg: #FAFCFB; --line: rgba(12, 26, 19, .09); --line2: rgba(12, 26, 19, .16);
  --r: 16px; --r-sm: 12px;
  --sh: 0 1px 2px rgba(12, 26, 19, .04), 0 8px 24px -16px rgba(12, 26, 19, .18);
  --sh-lg: 0 2px 4px rgba(12, 26, 19, .05), 0 22px 48px -26px rgba(12, 26, 19, .30);
  --ease: cubic-bezier(.22, 1, .36, 1);
  /* type scale: fluid between a 320px phone and a 1440px desktop */
  --fs-display: clamp(2.25rem, 1.5rem + 2.8vw, 3.75rem);
  --fs-display-sm: clamp(2rem, 1.4rem + 2vw, 3rem);
  --fs-title: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem);
  --fs-title-sm: clamp(1.5rem, 1.2rem + .9vw, 1.875rem);
  --fs-h2: clamp(1.375rem, 1.2rem + .6vw, 1.625rem);
  --fs-lead: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.6 var(--sans); color: var(--ink); background: var(--bg); min-height: 100vh;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-kerning: normal; }
h1, h2, h3, h4 { text-wrap: balance; overflow-wrap: break-word; }
p, li, dd, figcaption { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 2px solid var(--green2); outline-offset: 2px; }
.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.muted { color: var(--sub); } .small { font-size: 13px; } .center { text-align: center; } .pt0 { padding-top: 0 !important; }
.num-t { font-variant-numeric: tabular-nums lining-nums; }
.k { display: block; font-size: 14px; font-weight: 600; color: var(--green2); margin-bottom: 6px; }

/* type */
.display, .title, .sec-h { font-weight: 700; color: var(--ink); }
.display { font-size: var(--fs-display); line-height: 1.06; letter-spacing: -.028em; margin: 0 0 22px; max-width: 16ch; }
.display.sm { font-size: var(--fs-display-sm); line-height: 1.1; letter-spacing: -.025em; max-width: 22ch; }
.title { font-size: var(--fs-title); line-height: 1.12; letter-spacing: -.022em; margin: 0 0 16px; max-width: 24ch; }
.title.sm { font-size: var(--fs-title-sm); line-height: 1.15; }
.lead { font-size: var(--fs-lead); color: var(--sub); line-height: 1.6; margin: 0 0 28px; max-width: 58ch; }
.lead.narrow { max-width: 64ch; }
.center .display, .center .title, .center .lead { margin-inline: auto; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 22px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1.25; text-align: center; transition: background-color .2s, border-color .2s, color .2s; }
.btn:active { transform: translateY(1px); }
.btn-green { background: var(--green2); color: #fff; }
.btn-green:hover { background: var(--green-dk); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #24352C; }
.btn-ghost { background: #fff; border-color: var(--line2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-red { background: var(--red2); color: #fff; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-row.center { justify-content: center; }

/* header */
.top { position: sticky; top: 0; z-index: 50; background: rgba(250, 252, 251, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand b { display: block; font-weight: 700; font-size: 17px; letter-spacing: -.015em; line-height: 1.1; white-space: nowrap; }
.brand small { display: block; font-size: 12.5px; font-weight: 500; color: var(--sub); white-space: nowrap; }
.logo-mark { width: 38px; height: 38px; flex: none; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a:not(.btn) { padding: 8px 13px; border-radius: 999px; font-weight: 500; font-size: 15px; color: var(--ink2); transition: background-color .2s, color .2s; }
.nav a:not(.btn):hover { background: rgba(12, 26, 19, .05); color: var(--ink); }
.nav a.on { background: var(--mint); color: var(--green2); font-weight: 600; }
.nav .btn { margin-left: 10px; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 12px; flex-direction: column; justify-content: center; align-items: center; gap: 6px; flex: none; }
.menu-btn span { width: 22px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .3s var(--ease); }
.menu-open .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* cards + common */
.card { background: #fff; border-radius: var(--r); box-shadow: var(--sh); border: 1px solid var(--line); }
a.card { transition: border-color .2s, box-shadow .25s; }
a.card:hover { border-color: rgba(10, 125, 69, .35); box-shadow: var(--sh-lg); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge.continuation, .badge.green { background: var(--mint); color: var(--green2); }
.badge.reversal, .badge.red { background: var(--redsoft); color: var(--red2); }
.badge.formation, .badge.amber { background: var(--ambersoft); color: var(--amber2); }
.badge.ink { background: var(--ink); color: #fff; }
.chip-sm { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 8px; background: var(--mint2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink2); font-variant-numeric: tabular-nums; }
.input { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; font: inherit; font-size: 16px; color: var(--ink);
  transition: border-color .2s, box-shadow .2s; outline: none; }
textarea.input { padding: 13px 16px; resize: vertical; line-height: 1.55; }
.input:focus { border-color: var(--green2); box-shadow: 0 0 0 4px rgba(16, 180, 100, .15); }
.input::placeholder { color: #85928B; }
select.input { appearance: none; padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230C1A13' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button { min-height: 40px; padding: 0 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line2); font-weight: 600; font-size: 14px; color: var(--ink2); transition: background-color .2s, border-color .2s, color .2s; }
.tabs button:hover { border-color: var(--ink); color: var(--ink); }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink2); }
.ticks .ic { color: var(--green2); margin-top: 4px; stroke-width: 2.6; }

/* hero */
.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.hero-h { max-width: none; font-size: clamp(2.25rem, 1.45rem + 3vw, 4rem); }
.hero-h span { display: block; }
.hero-chart { padding: 18px 18px 14px; position: relative; overflow: hidden; }
.hc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.hc-status { font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--mint2); color: var(--sub); transition: background-color .3s, color .3s; text-align: right; }
.hc-status.good { background: var(--mint); color: var(--green2); }
.hc-status.bad { background: var(--redsoft); color: var(--red2); }
.hc-status.wait { background: var(--ambersoft); color: var(--amber2); }
.hc-svg { width: 100%; height: auto; display: block; }
.hc-cond { stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: 7 6; opacity: .7; }
.hc-cond-t { font-size: 12.5px; font-weight: 600; fill: var(--ink2); }
.hc-label { font-size: 13px; font-weight: 700; }
.hc-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.hc-step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--sub); padding: 9px 10px; border-radius: 10px; background: var(--mint2); transition: background-color .35s, color .35s; }
.hc-step b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #fff; color: var(--sub); flex: none; }
.hc-step.on { background: var(--ink); color: #fff; }
.hc-step.on b { background: var(--green); color: #fff; }

/* sections */
.sec { padding: 88px 0; }
.sec.tint { background: var(--mint2); border-block: 1px solid var(--line); }
.sec-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: 32px; flex-wrap: wrap; }
.sec-top .title { margin-bottom: 10px; }
.sec-top .lead { margin: 0; }
.four { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.four li { padding: 24px; }
.four .num { font-weight: 600; font-size: 14px; color: var(--green2); font-variant-numeric: tabular-nums; }
.four b { display: block; font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; margin: 10px 0 8px; }
.four p { margin: 0; color: var(--sub); font-size: 15px; }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0 28px; }
.cmp { padding: 24px; }
.cmp.red { background: #FFFBFA; border-color: rgba(180, 35, 35, .16); }
.cmp.green { background: #F8FCFA; border-color: rgba(10, 125, 69, .2); }
.cmp p { margin: 14px 0 0; color: var(--ink2); }
.compare.big .cmp { padding: 28px; }
.compare.big .cmp p { font-size: 17px; }
.cmp-end { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-weight: 600; }
.cmp.red .cmp-end { color: var(--red2); } .cmp.green .cmp-end { color: var(--green2); }
.parts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.part { padding: 20px 16px 14px; }
.part h3 { margin: 0 0 12px; font-weight: 700; font-size: 18px; line-height: 1.25; letter-spacing: -.01em; }
.ch-link { display: flex; align-items: center; gap: 10px; padding: 8px; margin: 0 -8px; border-radius: 8px; font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--ink2); transition: background-color .2s; }
.ch-link:hover { background: var(--mint2); color: var(--ink); }
.ch-link span { font-size: 12.5px; font-weight: 600; color: var(--green2); width: 20px; flex: none; font-variant-numeric: tabular-nums; }
.done-dot { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line2); flex: none; }
.is-done .done-dot { background: var(--green); border-color: var(--green); }
.pat-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px; }
.pchip { padding: 18px; display: grid; gap: 6px; align-content: start; }
.pchip .badge { justify-self: start; }
.pchip b { font-size: 17px; font-weight: 600; margin-top: 4px; line-height: 1.3; }
.pchip span:last-child { color: var(--sub); font-size: 14px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.free-card, .join-card { padding: 36px; }
.free-card p, .join-card > p { color: var(--ink2); font-size: 17px; margin: 0 0 24px; }

/* grade widget */
.grade { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); overflow: hidden; margin: 24px 0 28px; }
.grade-qs { padding: 20px; display: grid; gap: 6px; }
.gq { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; cursor: pointer; transition: background-color .2s; font-weight: 500; color: var(--ink2); }
.gq:hover { background: var(--mint2); }
.gq input { position: absolute; opacity: 0; pointer-events: none; }
.gq .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line2); display: grid; place-items: center; flex: none; margin-top: 1px; transition: background-color .2s, border-color .2s; }
.gq .box .ic { width: 15px; height: 15px; color: #fff; stroke-width: 3.2; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .25s var(--ease); }
.gq input:checked + .box { background: var(--green2); border-color: var(--green2); }
.gq input:checked + .box .ic { opacity: 1; transform: none; }
.gq input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(16, 180, 100, .25); }
.grade-out { background: var(--ink); color: #fff; padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.grade-out .k { color: var(--green3); }
.grade-letter { font-weight: 700; font-size: 104px; line-height: 1; letter-spacing: -.04em; transition: color .3s; }
.grade-letter.A { color: var(--green3); } .grade-letter.B { color: #FBBF24; } .grade-letter.C { color: #F87171; }
.grade-yes { color: rgba(255, 255, 255, .72); font-weight: 500; margin-bottom: 14px; }
.grade-yes b { color: #fff; font-weight: 700; }
.grade-look { margin: 0 0 8px; color: rgba(255, 255, 255, .78); }
.grade-act { margin: 0; font-weight: 600; font-size: 18px; line-height: 1.4; }
.bump { animation: bump .45s var(--ease); }
@keyframes bump { 0% { transform: scale(.85); opacity: .4; } 100% { transform: none; opacity: 1; } }

/* laws */
.laws { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.laws li { padding: 22px; }
.law-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: var(--green2); font-weight: 700; font-size: 14px; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.laws b { display: block; font-size: 17px; font-weight: 600; line-height: 1.3; margin-bottom: 8px; }
.laws p { margin: 0; color: var(--sub); font-size: 15px; }

/* page hero */
.page-hero { padding: 60px 0 40px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin-bottom: 18px; }
.crumb { font-size: 14px; font-weight: 500; color: var(--sub); }
a.crumb:hover { color: var(--green2); }
.crumb-sep { margin: 0 8px; color: var(--muted); }
.progress { display: flex; align-items: center; gap: 18px; padding: 16px 20px; max-width: 560px; }
.prog-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--mint); overflow: hidden; }
.prog-bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 99px; transition: width .8s var(--ease); }
.progress span { font-weight: 600; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* learn index */
.part-row { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; padding: 32px 0; border-top: 1px solid var(--line); }
.part-intro h2 { font-weight: 700; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 8px; }
.part-intro p { color: var(--sub); margin: 0; font-size: 15px; }
.ch-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 14px; align-content: start; }
.ch-card { padding: 20px; display: grid; gap: 4px; position: relative; align-content: start; }
.ch-card .ch-n { font-weight: 700; font-size: 26px; letter-spacing: -.02em; color: var(--green2); line-height: 1; margin-bottom: 10px; font-variant-numeric: lining-nums tabular-nums; }
.ch-card b { font-size: 17px; font-weight: 600; line-height: 1.3; padding-right: 18px; }
.ch-card .ch-sub { color: var(--sub); font-size: 14px; }
.ch-card .done-dot { position: absolute; top: 20px; right: 20px; width: 12px; height: 12px; }
.groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.group { padding: 20px; display: grid; gap: 6px; align-content: start; }
.g-n { font-size: 13px; font-weight: 600; color: var(--green2); }
.group b { font-size: 17px; font-weight: 600; line-height: 1.3; }
.group p { margin: 0; color: var(--ink2); font-size: 14px; }
.g-meta { font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 4px; }

/* chapter */
.ch-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 92px; display: grid; gap: 2px; }
.toc a { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--sub); padding: 7px 12px; border-left: 2px solid var(--line); transition: color .2s, border-color .2s; }
.toc a:hover, .toc a.on { color: var(--ink); border-left-color: var(--green2); }
.toc .mark-done { margin-top: 18px; justify-self: start; }
.mark-done.done { background: var(--mint); color: var(--green2); border-color: transparent; }
.prose { max-width: 760px; }
.prose > p { font-size: 17px; line-height: 1.75; color: var(--ink2); margin: 0 0 20px; max-width: 68ch; }
.prose b { color: var(--ink); font-weight: 600; }
.updated { margin: -8px 0 0; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal-nav a { font-size: 15px; font-weight: 500; color: var(--sub); padding: 4px 0; }
.legal-nav a:hover { color: var(--ink); }
.legal-nav a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--green2); }
.legal .sec-h { margin-top: 40px; }
.legal .sec-h:first-child { margin-top: 0; }
.legal a, .pay-fine a { color: var(--green2); text-decoration: underline; text-underline-offset: 3px; }
.legal .bul li { line-height: 1.65; }
.sec-h { font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -.01em; margin: 52px 0 14px; scroll-margin-top: 92px; }
.sec-h:first-child { margin-top: 0; }
.rule { margin: 24px 0 28px; padding: 18px 22px; border-radius: 14px; background: #F1FAF5; border: 1px solid rgba(10, 125, 69, .18); }
.rule span { font-size: 13px; font-weight: 600; color: var(--green2); }
.rule p { margin: 4px 0 0; font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.rule.red { background: #FFF7F6; border-color: rgba(180, 35, 35, .18); }
.rule.red span { color: var(--red2); }
.quote { margin: 32px 0; padding: 0; font-weight: 600; font-size: clamp(1.375rem, 1.15rem + .8vw, 1.75rem); line-height: 1.3; letter-spacing: -.01em; color: var(--ink); max-width: 32ch; }
.quote::before { content: ''; display: block; width: 40px; height: 2px; background: var(--green); margin-bottom: 16px; }
.bul { padding-left: 22px; margin: 0 0 24px; font-size: 17px; color: var(--ink2); max-width: 68ch; }
.bul li { margin-bottom: 8px; padding-left: 4px; }
.bul li::marker { color: var(--green2); font-weight: 700; }
.steps { list-style: none; padding: 0; margin: 18px 0 30px; display: grid; gap: 10px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; background: #fff; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); }
.steps .n { width: 30px; height: 30px; border-radius: 50%; background: var(--mint); color: var(--green2); font-weight: 700; display: grid; place-items: center; flex: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.steps b { font-size: 16px; font-weight: 600; }
.steps p { margin: 3px 0 0; color: var(--sub); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 34px; }
.stats div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 12px; text-align: center; }
.stats b { display: block; font-weight: 700; font-size: 36px; letter-spacing: -.02em; color: var(--ink); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.stats span { font-size: 14px; color: var(--sub); font-weight: 500; }
.loop { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px; padding: 22px; margin: 26px 0; font-weight: 600; font-size: 16px; }
.loop span { padding: 8px 16px; border-radius: 999px; background: var(--mint2); border: 1px solid var(--line); }
.loop span:nth-child(3) { background: var(--ink); color: #fff; border-color: var(--ink); }
.loop .ic { color: var(--green2); }
.tbl-wrap { overflow-x: auto; margin: 18px 0 30px; border-radius: 14px; border: 1px solid var(--line); background: #fff; box-shadow: var(--sh); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; padding: 12px 16px; background: var(--mint2); font-size: 13px; font-weight: 600; color: var(--ink2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink2); line-height: 1.5; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.first { font-weight: 600; color: var(--ink); }
.tbl.cheat td.first a { color: var(--green2); }
.tbl.cheat td.first a:hover { text-decoration: underline; }
.fig { margin: 22px 0 30px; }
.fig.narrow { max-width: 600px; }
.fig-zoom { display: block; width: 100%; padding: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--sh); cursor: zoom-in; transition: border-color .2s; }
.fig-zoom:hover { border-color: rgba(10, 125, 69, .35); }
.fig-zoom img { width: 100%; height: auto; }
.fig figcaption { font-size: 14.5px; color: var(--sub); margin-top: 10px; line-height: 1.55; }
.credit { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.fig-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 22px 0 8px; }
.fig-pair .fig { margin: 0 0 22px; }
.ch-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 60px; }
.ch-nav a { padding: 18px 20px; display: grid; gap: 2px; }
.ch-nav span { font-size: 13px; color: var(--green2); font-weight: 600; }
.ch-nav b { font-size: 17px; font-weight: 600; line-height: 1.3; }
.ch-nav .next { text-align: right; }

/* diagrams */
.diagram { padding: 18px 18px 14px; margin: 22px 0 30px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption { font-size: 14px; color: var(--sub); margin-top: 8px; }
.d-kick { font-size: 13px; font-weight: 600; fill: var(--green2); }
.d-num { font-size: 14px; font-weight: 700; fill: var(--ink); text-anchor: middle; }
.d-note { font-size: 13px; font-weight: 600; fill: var(--ink2); }
.d-small { font-size: 13px; fill: var(--sub); font-weight: 500; }
.d-zone { fill: rgba(16, 180, 100, .09); stroke: rgba(16, 180, 100, .4); stroke-dasharray: 5 4; }
.d-zone.red { fill: rgba(239, 68, 68, .07); stroke: rgba(239, 68, 68, .4); }
.d-target { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 8 6; }
.d-tag circle { fill: var(--ink); }
.d-tag text { fill: #fff; font-size: 12px; font-weight: 700; text-anchor: middle; }
.d-lab { font-size: 13px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 4px; }

/* patterns */
.pattern { padding: 28px; margin: 34px 0 24px; scroll-margin-top: 92px; }
.pat-head { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; }
.pat-tag { font-size: 14px; font-weight: 500; color: var(--sub); }
.pattern h2 { font-weight: 700; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; margin: 12px 0 14px; }
.pattern dl { margin: 0; display: grid; }
.pat-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.pat-row dt { font-size: 14px; font-weight: 600; color: var(--ink); padding-top: 1px; }
.pat-row dd { margin: 0; color: var(--ink2); font-size: 16px; }
.juny-steps { margin: 0; padding-left: 20px; }
.juny-steps li { margin-bottom: 4px; }
.juny-steps li::marker { font-weight: 700; color: var(--green2); }
.pat-grid { display: grid; gap: 28px; }
.pat-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.pat-item .pattern { margin: 0; }
.pat-item .fig, .pat-item .diagram { margin: 0; position: sticky; top: 92px; }
.pat-item[hidden] { display: none; }

/* glossary */
.gl-tools { display: grid; gap: 14px; max-width: 900px; }
.gl-tools .input { min-height: 54px; font-size: 17px; padding-left: 20px; }
.gl-group { margin-bottom: 10px; }
.gl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 12px; }
.gl-item { display: flex; gap: 16px; padding: 18px; align-items: flex-start; }
.gl-n { width: 34px; height: 34px; border-radius: 10px; background: var(--mint); color: var(--green2); font-weight: 700; display: grid; place-items: center; flex: none; font-size: 13px; font-variant-numeric: tabular-nums; }
.gl-item b { font-size: 16px; font-weight: 600; }
.gl-item p { margin: 3px 0 0; color: var(--sub); font-size: 15px; }
.gl-item[hidden], .gl-group[hidden] { display: none; }
mark { background: #C8F3DA; color: inherit; border-radius: 4px; padding: 0 2px; }

/* mentorship */
.track-tabs { margin-top: 6px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 920px; }
.plans[hidden] { display: none; }
.plan { padding: 32px; position: relative; display: flex; flex-direction: column; animation: bump .5s var(--ease); }
.plan.best { border: 2px solid var(--green2); box-shadow: var(--sh-lg); }
.plan-flag { position: absolute; top: -13px; right: 24px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px; }
.price { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 4px; }
.price b { font-size: 52px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.price span { font-weight: 600; color: var(--sub); font-size: 14px; letter-spacing: .04em; }
.per { color: var(--sub); margin: 0 0 22px; font-size: 14px; font-weight: 500; }
.plan .ticks { flex: 1; }
.plan .perk { color: var(--ink); }
.plan .perk b { font-weight: 600; }
.compare-tbl { max-width: 920px; margin-top: 34px; }
.compare-tbl td { text-align: center; }
.compare-tbl td.first { text-align: left; }
.note { max-width: 920px; margin-top: 40px; padding: 40px 44px; }
.note p { font-size: 18px; line-height: 1.7; color: var(--ink2); margin: 0 0 16px; max-width: 64ch; }
.note .sign { font-weight: 600; font-size: 22px; letter-spacing: -.01em; color: var(--ink); margin-top: 22px; }
.disclaimer { font-size: 13.5px; color: var(--sub); line-height: 1.6; max-width: 820px; }
.disclaimer.in { margin: 20px 0 0 !important; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px !important; }

.plan-ask { display: block; margin-top: 12px; text-align: center; font-size: 14px; font-weight: 500; color: var(--sub); }
.plan-ask:hover { color: var(--green2); text-decoration: underline; }
.pay-line { max-width: 920px; margin: 18px 0 0; font-size: 14.5px; color: var(--sub); }

/* checkout */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 420px); justify-content: start; gap: 24px; align-items: start; }
.pay-form .row2 { margin-bottom: 2px; }
.methods { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.methods legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 8px; }
.method { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; cursor: pointer; transition: border-color .2s, background-color .2s; }
.method:hover { border-color: rgba(12, 26, 19, .4); }
.method:has(input:checked) { border-color: var(--green2); background: var(--mint2); box-shadow: 0 0 0 1px var(--green2) inset; }
.method input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green2); }
.m-body { display: grid; gap: 2px; }
.m-body b { font-size: 15.5px; font-weight: 600; }
.m-body span { font-size: 13.5px; color: var(--sub); line-height: 1.45; }
.m-amt { font-weight: 700; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pay-fine { margin: 0; font-size: 13px; color: var(--sub); line-height: 1.5; }
.summary { padding: 26px; position: sticky; top: 92px; }
.summary-h { margin: 0 0 6px; font-size: 20px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.summary .price b { font-size: 40px; }
.summary .ticks { margin-bottom: 0; font-size: 15px; }
.notice { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--ambersoft); color: var(--amber2); font-weight: 500; max-width: 64ch; }
.pay-done { padding-bottom: 96px; }
.pay-done .badge { margin-bottom: 18px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.form { padding: 30px; display: grid; gap: 16px; }
.form label { display: grid; gap: 7px; font-weight: 600; font-size: 14px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hp { position: absolute !important; left: -9999px; }
.form-msg { margin: 0; font-weight: 600; min-height: 1.4em; }
.form-msg.ok { color: var(--green2); } .form-msg.err { color: var(--red2); }
.contact-side { display: grid; gap: 14px; }
.contact-side .card { padding: 22px; }
.contact-side p { margin: 0 0 14px; color: var(--ink2); }
.contact-side .big { font-size: 18px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.placeholder { color: var(--muted); font-weight: 500; }

/* footer */
.foot { padding: 56px 0 36px; border-top: 1px solid var(--line); background: #fff; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 30px; margin-bottom: 28px; }
.foot h4 { margin: 6px 0 12px; font-size: 14px; font-weight: 600; color: var(--ink); }
.foot-grid > div > a:not(.brand) { display: block; padding: 4px 0; color: var(--sub); font-weight: 500; font-size: 15px; }
.foot-grid > div > a:not(.brand):hover { color: var(--green2); }
.foot .muted { max-width: 380px; margin: 14px 0; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.socials a { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line2); font-weight: 600; font-size: 14px; transition: border-color .2s; }
.socials a:hover { border-color: var(--ink); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8, 18, 13, .86); display: grid; place-items: center; padding: 30px; animation: fade .25s; backdrop-filter: blur(6px); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; background: #fff; box-shadow: 0 40px 100px rgba(0, 0, 0, .5); }
.lightbox button { position: absolute; top: 18px; right: 22px; width: 46px; height: 46px; border-radius: 50%; background: #fff; font-size: 26px; line-height: 1; }
@keyframes fade { from { opacity: 0; } }

/* ───────────── responsive ───────────── */
@media (max-width: 1100px) {
  .parts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .four, .laws, .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav a:not(.btn) { padding: 8px 10px; }
}
@media (max-width: 900px) {
  .menu-btn { display: flex; }
  .nav { position: fixed; inset: 68px 0 auto 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 20px 22px; gap: 2px;
    border-bottom: 1px solid var(--line); box-shadow: var(--sh-lg); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform .3s var(--ease), opacity .3s; }
  .menu-open .nav { transform: none; opacity: 1; pointer-events: auto; }
  .nav a:not(.btn) { padding: 12px 14px; font-size: 17px; border-radius: 10px; }
  .nav .btn { margin: 10px 0 0; }
  .hero-grid, .split, .contact-grid, .grade, .pat-item, .checkout-grid { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .pat-item .fig, .pat-item .diagram { position: static; }
  .hero { padding: 44px 0 64px; }
  .hero-grid { gap: 40px; }
  .ch-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .toc { position: static; display: none; }
  .toc .mark-done { display: inline-flex; }
  .part-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .compare, .fig-pair, .plans, .row2 { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
  .sec { padding: 64px 0; }
  .page-hero { padding: 44px 0 32px; }
}
@media (max-width: 600px) {
  .wrap { width: min(1200px, 100% - 32px); }
  .parts, .four, .laws, .groups { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats b { font-size: 34px; }
  .pat-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pattern { padding: 22px; }
  .note { padding: 28px 22px; }
  .note p { font-size: 17px; }
  .free-card, .join-card, .plan, .summary { padding: 24px; }
  .method { padding: 13px 14px; gap: 10px; grid-template-columns: auto minmax(0, 1fr); }
  .m-amt { grid-column: 2; }
  .compare.big .cmp { padding: 22px; }
  .price b { font-size: 48px; }
  .grade-letter { font-size: 92px; }
  .hc-foot { grid-template-columns: minmax(0, 1fr); }
  .sec { padding: 56px 0; }
  .ch-nav { grid-template-columns: minmax(0, 1fr); }
  .ch-nav .next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .rv { opacity: 1; transform: none; } }

/* ═════════════════════════ COMMUNITY APP ═════════════════════════ */
body.community .foot { display: none; }
.app { width: min(1340px, 100% - 32px); margin: 0 auto; padding: 22px 0 40px; min-height: calc(100vh - 72px); }
.app-loading { display: grid; place-items: center; height: 60vh; }
.spin { width: 38px; height: 38px; border-radius: 50%; border: 3.5px solid var(--mint); border-top-color: var(--green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr) 310px; gap: 22px; align-items: start; }
.shell.wide { grid-template-columns: 240px minmax(0, 1fr); }

/* sidebar */
.side { position: sticky; top: 94px; display: flex; flex-direction: column; gap: 4px; }
.side a, .side button.navb { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 14px; font-weight: 600; font-size: 15.5px; color: var(--ink2); transition: background .2s, color .2s; position: relative; text-align: left; }
.side a:hover, .side button.navb:hover { background: rgba(255, 255, 255, .8); }
.side a.on { background: #fff; color: var(--ink); box-shadow: var(--sh); }
.side a.on .ic { color: var(--green); }
.side .ic { width: 22px; height: 22px; }
.side .cnt { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--red2); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.side .cnt[hidden] { display: none; }
.side .btn { margin: 10px 0 16px; }
.me-card { margin-top: 16px; padding: 12px; display: flex; align-items: center; gap: 10px; }
.side .me-card .who { min-width: 0; flex: 1; display: block; padding: 0; background: none; box-shadow: none; }
.me-card b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card span { font-size: 13px; color: var(--sub); }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--sub); transition: background .2s, color .2s; flex: none; }
.icon-btn:hover { background: var(--mint2); color: var(--ink); }
.icon-btn .ic { width: 20px; height: 20px; }

/* avatars */
.av { width: 44px; height: 44px; border-radius: 50%; flex: none; position: relative; display: grid; place-items: center; font-weight: 600; color: #fff; font-size: 16px; overflow: visible; }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.av.s { width: 34px; height: 34px; font-size: 13px; } .av.xs { width: 28px; height: 28px; font-size: 11px; }
.av.l { width: 64px; height: 64px; font-size: 22px; } .av.xl { width: 112px; height: 112px; font-size: 40px; border: 5px solid #fff; box-shadow: var(--sh); }
.av .dot { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--green3); border: 2.5px solid #fff; }
.av.xl .dot { width: 22px; height: 22px; right: 6px; bottom: 6px; border-width: 4px; }
.g0 { background: #0A7D45; } .g1 { background: #1E7F8A; }
.g2 { background: #24352C; } .g3 { background: #3D7A2E; }
.g4 { background: #0F7461; } .g5 { background: #B45309; }
.role-tag { display: inline-flex; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600; align-items: center; vertical-align: 2px; margin-left: 4px; }

/* center column */
.col-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.col-head h1 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.feed-tabs { display: flex; gap: 6px; background: rgba(255, 255, 255, .75); padding: 5px; border-radius: 999px; border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.feed-tabs button { height: 36px; padding: 0 15px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--sub); white-space: nowrap; transition: all .25s var(--ease); }
.feed-tabs button.on { background: var(--ink); color: #fff; }
.feed-tabs button:hover:not(.on) { color: var(--ink); }
.new-posts { position: sticky; top: 86px; z-index: 5; display: flex; justify-content: center; margin-bottom: -10px; pointer-events: none; }
.new-posts button { pointer-events: auto; background: var(--green2); color: #fff; font-weight: 600; font-size: 14px; padding: 9px 18px; border-radius: 999px; box-shadow: var(--sh-lg); animation: drop .5s var(--ease); }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } }

/* composer */
.composer { padding: 18px; margin-bottom: 18px; }
.composer.drag { outline: 3px dashed var(--green); outline-offset: -6px; }
.cmp-row { display: flex; gap: 12px; }
.cmp-row textarea { flex: 1; border: 0; outline: 0; resize: none; font: inherit; font-size: 17px; min-height: 52px; padding: 10px 2px; color: var(--ink); background: transparent; line-height: 1.5; }
.kind-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px 56px; }
.kind-row button { height: 32px; padding: 0 13px; border-radius: 999px; border: 1.5px solid var(--line2); font-weight: 600; font-size: 13px; color: var(--sub); transition: all .2s; }
.kind-row button.on[data-kind=finding] { background: var(--mint); border-color: var(--green); color: var(--green2); }
.kind-row button.on[data-kind=trade] { background: var(--ink); border-color: var(--ink); color: #fff; }
.kind-row button.on[data-kind=question] { background: var(--ambersoft); border-color: var(--amber); color: var(--amber2); }
.trade-fields { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; margin: 0 0 10px 56px; }
.trade-fields .input { height: 42px; border-radius: 12px; font-size: 14px; }
.dir { display: flex; gap: 4px; background: var(--mint2); border-radius: 12px; padding: 4px; border: 1px solid var(--line); }
.dir button { height: 32px; padding: 0 14px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--sub); }
.dir button.on.long { background: var(--green2); color: #fff; } .dir button.on.short { background: var(--red2); color: #fff; }
.previews { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 10px 56px; }
.previews:empty { display: none; }
.pv { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--mint2); animation: bump .4s var(--ease); }
.pv img, .pv video { width: 100%; height: 100%; object-fit: cover; }
.pv button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(12, 26, 19, .75); color: #fff; font-size: 15px; line-height: 1; }
.pv .vid { position: absolute; left: 6px; bottom: 6px; background: rgba(12, 26, 19, .75); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.cmp-foot { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; margin-left: 56px; }
.cmp-foot .hint { font-size: 12.5px; color: var(--muted); margin-right: auto; padding-left: 4px; }
.cmp-foot .count { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.upbar { height: 4px; border-radius: 4px; background: var(--mint); overflow: hidden; margin: 10px 0 0 56px; }
.upbar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }

/* post */
.post { padding: 18px 18px 8px; margin-bottom: 16px; animation: rise .5s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.post.gone { animation: out .35s var(--ease) forwards; }
@keyframes out { to { opacity: 0; transform: scale(.97); } }
.p-head { display: flex; gap: 12px; align-items: center; }
.p-who { min-width: 0; flex: 1; line-height: 1.3; }
.p-who b { font-size: 15.5px; letter-spacing: -.01em; }
.p-who b:hover { text-decoration: underline; }
.p-who .meta { font-size: 13.5px; color: var(--muted); }
.p-body { margin: 12px 0 2px; font-size: 16.5px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; color: var(--ink2); }
.p-body .tag { color: var(--green2); font-weight: 600; cursor: pointer; }
.p-body .tag:hover { text-decoration: underline; }
.p-trade { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dirpill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #fff; }
.dirpill.long { background: var(--green2); } .dirpill.short { background: var(--red2); }
.media { display: grid; gap: 4px; margin-top: 14px; border-radius: 16px; overflow: hidden; }
.media.n1 { grid-template-columns: 1fr; } .media.n2 { grid-template-columns: 1fr 1fr; }
.media.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; } .media.n3 > :first-child { grid-row: span 2; }
.media.n4 { grid-template-columns: 1fr 1fr; }
.media > * { background: #EEF5F1; min-height: 0; }
.media img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; max-height: 560px; }
.media.n1 img { object-fit: contain; background: #F3F8F5; max-height: 620px; }
.media.n2 img, .media.n4 img { aspect-ratio: 1; } .media.n3 img { aspect-ratio: auto; height: 100%; }
.media video { width: 100%; max-height: 620px; background: #000; }
.p-actions { display: flex; gap: 4px; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.act { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 13px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--sub); transition: background .2s, color .2s; }
.act:hover { background: var(--mint2); color: var(--ink); }
.act .ic { width: 20px; height: 20px; }
.act.liked { color: var(--red); }
.act.liked .ic { fill: var(--red); animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.35); } }
.act.more { margin-left: auto; }
.menu { position: absolute; z-index: 30; background: #fff; border-radius: 14px; box-shadow: var(--sh-lg); border: 1px solid var(--line); padding: 6px; min-width: 170px; animation: drop .25s var(--ease); }
.menu button { display: flex; width: 100%; padding: 10px 12px; border-radius: 9px; font-weight: 700; font-size: 14px; text-align: left; gap: 10px; align-items: center; }
.menu button:hover { background: var(--mint2); }
.menu button.danger { color: var(--red2); }
.comments { border-top: 1px solid var(--line); margin-top: 6px; padding: 12px 0 8px; display: grid; gap: 12px; animation: rise .35s var(--ease); }
.cm { display: flex; gap: 10px; align-items: flex-start; }
.cm-bubble { background: var(--mint2); border-radius: 4px 16px 16px 16px; padding: 9px 13px; flex: 1; min-width: 0; }
.cm-bubble b { font-size: 13.5px; }
.cm-bubble .t { font-size: 12px; color: var(--muted); margin-left: 6px; }
.cm-bubble p { margin: 2px 0 0; font-size: 15px; white-space: pre-wrap; word-wrap: break-word; color: var(--ink2); }
.cm .icon-btn { width: 30px; height: 30px; }
.cm-form { display: flex; gap: 10px; align-items: center; }
.cm-form .input { height: 42px; border-radius: 999px; font-size: 14.5px; }
.cm-form .btn { height: 42px; }
.empty { text-align: center; padding: 50px 24px; color: var(--sub); }
.empty b { display: block; color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 14px 0 6px; }
.empty .ic { width: 44px; height: 44px; color: var(--green); }
.more-btn { display: flex; justify-content: center; margin: 10px 0 30px; }

/* rail */
.rail { position: sticky; top: 94px; display: grid; gap: 14px; }
.rail .card { padding: 18px; }
.rail h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--ink); }
.pulse { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.pulse b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.pulse span { font-size: 12px; color: var(--sub); font-weight: 500; }
.pulse .live b { color: var(--green); }
.online { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-list button { height: 30px; padding: 0 11px; border-radius: 999px; background: var(--mint2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--green2); }
.tag-list button:hover { background: var(--mint); }
.law-card { background: var(--ink) !important; color: #fff; }
.law-card h3 { color: var(--green3) !important; }
.law-card b { font-size: 19px; letter-spacing: -.02em; line-height: 1.3; display: block; }
.law-card p { color: rgba(255, 255, 255, .7); margin: 6px 0 0; font-size: 14px; }
.rules-list { margin: 0; padding-left: 18px; color: var(--ink2); font-size: 14px; display: grid; gap: 5px; }
.rules-list li::marker { color: var(--green); font-weight: 700; }
.mini-user { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.mini-user b { font-size: 14px; display: block; line-height: 1.2; }
.mini-user span { font-size: 12.5px; color: var(--muted); }

/* auth */
.auth { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 40px 0; }
.auth-pitch .display { margin-bottom: 18px; }
.auth-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.auth-feats div { background: rgba(255, 255, 255, .8); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.auth-feats b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.auth-feats .ic { color: var(--green); width: 20px; height: 20px; }
.auth-feats p { margin: 5px 0 0; font-size: 14px; color: var(--sub); }
.auth-card { padding: 30px; }
.auth-card .tabs { margin-bottom: 20px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.auth-card .note2 { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

/* profile */
.prof { overflow: hidden; margin-bottom: 18px; }
.prof-cover { height: 150px; background: var(--mint); position: relative; }
.prof-body { padding: 0 26px 24px; margin-top: -56px; position: relative; }
.prof-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.prof-top .cta-row { padding-bottom: 6px; }
.prof h1 { margin: 12px 0 0; font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.prof .handle { color: var(--muted); font-weight: 500; }
.prof .bio { margin: 12px 0 0; color: var(--ink2); font-size: 16px; white-space: pre-wrap; }
.prof .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.prof-stats { display: flex; gap: 26px; margin-top: 18px; flex-wrap: wrap; }
.prof-stats div b { font-size: 20px; font-weight: 700; margin-right: 5px; font-variant-numeric: tabular-nums; }
.prof-stats div span { color: var(--sub); font-size: 14px; font-weight: 500; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.media-grid a { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--mint2); position: relative; }
.media-grid img, .media-grid video { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.media-grid a:hover img { transform: scale(1.05); }
.media-grid .vid { position: absolute; left: 8px; bottom: 8px; background: rgba(12, 26, 19, .75); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.edit-form { padding: 24px; display: grid; gap: 14px; margin-bottom: 18px; }
.edit-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.av-edit { display: flex; align-items: center; gap: 14px; }

/* members */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.member { padding: 20px; display: grid; justify-items: center; text-align: center; gap: 4px; transition: transform .3s var(--ease), box-shadow .3s; }
.member:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.member b { margin-top: 8px; font-size: 16px; }
.member .handle { font-size: 13px; color: var(--muted); }
.member p { font-size: 13.5px; color: var(--sub); margin: 6px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.member .stat { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.member .cta-row { justify-content: center; }
.search-in { max-width: 380px; height: 44px; border-radius: 999px; }

/* notifications */
.notes-list { padding: 6px; }
.note-row { display: flex; gap: 12px; align-items: center; padding: 13px 14px; border-radius: 14px; transition: background .2s; }
.note-row:hover { background: var(--mint2); }
.note-row.unread { background: #F1FBF5; }
.note-row .txt { flex: 1; min-width: 0; font-size: 15px; color: var(--ink2); }
.note-row .txt b { color: var(--ink); }
.note-row .snip { display: block; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-row .when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.note-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; position: absolute; right: -6px; bottom: -6px; border: 2.5px solid #fff; }
.note-ic .ic { width: 13px; height: 13px; color: #fff; stroke-width: 3; }
.note-ic.like { background: var(--red); } .note-ic.comment { background: var(--green); } .note-ic.follow { background: var(--ink); }

/* messages */
.chat { display: grid; grid-template-columns: 310px minmax(0, 1fr); height: calc(100vh - 140px); min-height: 520px; overflow: hidden; padding: 0; }
.convos { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.convos-head { padding: 18px 18px 10px; }
.convos-head h2 { margin: 0 0 12px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.convos-head .input { height: 42px; border-radius: 999px; font-size: 14px; }
.convo-list { overflow-y: auto; padding: 6px 8px 10px; flex: 1; }
.convo { display: flex; gap: 11px; align-items: center; padding: 11px 10px; border-radius: 14px; transition: background .2s; width: 100%; text-align: left; }
.convo:hover { background: var(--mint2); }
.convo.on { background: var(--mint); }
.convo .info { min-width: 0; flex: 1; }
.convo b { font-size: 14.5px; display: block; }
.convo .last { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.convo.unread .last { color: var(--ink); font-weight: 700; }
.convo .ucnt { min-width: 20px; height: 20px; border-radius: 99px; background: var(--green); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.thread { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.thread-head .who { flex: 1; }
.thread-head b { display: block; font-size: 16px; }
.thread-head span { font-size: 13px; color: var(--muted); }
.thread-head .online-t { color: var(--green2); font-weight: 700; }
.msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.msg { max-width: 72%; padding: 10px 14px; border-radius: 18px; font-size: 15.5px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; animation: msgin .3s var(--ease); align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; color: var(--ink2); }
.msg.mine { align-self: flex-end; background: var(--green2); color: #fff; border: 0; border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.msg img { border-radius: 12px; max-height: 300px; margin: 2px 0 4px; cursor: zoom-in; }
.msg video { border-radius: 12px; max-height: 320px; margin: 2px 0 4px; }
.msg .tm { display: block; font-size: 11px; opacity: .6; margin-top: 3px; text-align: right; }
@keyframes msgin { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.day-sep { align-self: center; font-size: 12px; font-weight: 700; color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 4px 12px; border-radius: 99px; margin: 12px 0 8px; }
.seen { align-self: flex-end; font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.typing { align-self: flex-start; display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); padding: 12px 14px; border-radius: 18px; border-bottom-left-radius: 6px; margin-top: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.msg-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); background: #fff; }
.msg-form textarea { flex: 1; min-height: 44px; max-height: 140px; border-radius: 22px; padding: 11px 16px; resize: none; }
.msg-form .btn { height: 44px; width: 44px; padding: 0; }
.attach-pv { padding: 8px 16px 0; background: #fff; display: flex; gap: 8px; }
.attach-pv:empty { display: none; }
.attach-pv .pv { width: 70px; }
.chat-empty { flex: 1; display: grid; place-items: center; text-align: center; padding: 30px; color: var(--sub); }

/* admin */
.admin-list { display: grid; gap: 10px; }
.admin-item { padding: 16px 18px; }
.admin-item .top-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.admin-item p { margin: 8px 0 10px; white-space: pre-wrap; color: var(--ink2); }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: grid; gap: 10px; max-width: 360px; }
.toast { background: var(--ink); color: #fff; padding: 13px 16px; border-radius: 14px; box-shadow: var(--sh-lg); font-weight: 500; font-size: 14.5px; display: flex; gap: 10px; align-items: center; animation: drop .35s var(--ease); cursor: pointer; }
.toast.err { background: var(--red2); }
.toast .av { width: 30px; height: 30px; font-size: 12px; }

/* mobile app */
.mob-bar { display: none; }
@media (max-width: 1180px) { .shell { grid-template-columns: 220px minmax(0, 1fr); } .rail { display: none; } }
@media (max-width: 860px) {
  .shell, .shell.wide { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .app { padding-bottom: 96px; }
  .mob-bar { display: flex; position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 60; background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); border-radius: 22px; box-shadow: var(--sh-lg); border: 1px solid var(--line); justify-content: space-around; padding: 8px; }
  .mob-bar a { display: grid; place-items: center; width: 52px; height: 48px; border-radius: 14px; color: var(--sub); position: relative; }
  .mob-bar a.on { background: var(--mint); color: var(--green2); }
  .mob-bar .ic { width: 24px; height: 24px; }
  .mob-bar .cnt { position: absolute; top: 4px; right: 6px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--red2); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
  .mob-bar .cnt[hidden] { display: none; }
  .auth { grid-template-columns: 1fr; padding: 10px 0; }
  .chat { grid-template-columns: 1fr; height: calc(100vh - 190px); }
  .chat.has-thread .convos { display: none; }
  .chat:not(.has-thread) .thread { display: none; }
  .kind-row, .trade-fields, .previews, .cmp-foot, .upbar { margin-left: 0; }
  .trade-fields { grid-template-columns: 1fr 1fr; }
  .trade-fields .dir { grid-column: 1 / -1; }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
}
body.community .top .wrap { width: min(1340px, 100% - 32px); }
