/* =========================================================================
   Vedatricks Partner Network — UI
   shadcn/ui component language in plain CSS, on the vedatricks.com (Astro,
   Sep 2026) brand tokens: Manrope Variable, ink #1a1a1a, night #0b0f0a,
   green #7bc142 with ink-on-green CTAs, 1280px container, fluid gutter.
   ========================================================================= */

@font-face { font-family: "Manrope Variable"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(../fonts/manrope-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope Variable"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(../fonts/manrope-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Brand (mirrors vedatricks.com) */
  --ink: #1a1a1a; --ink-2: #3a3a3a; --ink-3: #6b6b6b;
  --line: #ebebeb; --line-strong: #dcdedb;
  --bg: #ffffff; --bg-off: #f1f3ef; --bg-soft: #fafafa;
  --green: #7bc142; --green-hover: #6fb437; --green-dark: #3f7318; --green-soft: #e8f5da;
  --green-tint: #7bc1421f; --green-line: #7bc14252; --mint: #18cb96;
  --night: #0b0f0a; --night-2: #141a12; --night-ink: #f4f6f2; --night-muted: #a9b2a5; --night-line: #ffffff24;

  /* shadcn semantic tokens */
  --background: var(--bg); --foreground: var(--ink);
  --card: #ffffff; --card-foreground: var(--ink);
  --muted: var(--bg-off); --muted-foreground: var(--ink-3);
  --primary: var(--green); --primary-foreground: var(--ink);
  --secondary: var(--bg-off); --secondary-foreground: var(--ink);
  --accent: var(--green-soft); --accent-foreground: var(--green-dark);
  --destructive: #c4321f; --destructive-soft: #fdecea;
  --success: #2f7d1e; --success-soft: var(--green-soft);
  --warning: #9a5b00; --warning-soft: #fdf1dc;
  --info: #1f5b99; --info-soft: #e8f0fa;
  --border: var(--line); --input: var(--line-strong); --ring: var(--green);

  --radius-sm: 10px; --radius-md: 14px; --radius-lg: 20px; --radius-xl: 28px; --radius-pill: 999px;
  --shadow-sm: 0 1px 2px #1a1a1a0f, 0 1px 1px #1a1a1a0a;
  --shadow-card: 0 1px 2px #1a1a1a0a, 0 10px 24px -14px #1a1a1a29;
  --shadow-card-hover: 0 2px 4px #1a1a1a0d, 0 22px 44px -18px #1a1a1a38;
  --shadow-lg: 0 24px 48px #1a1a1a1f, 0 8px 16px #1a1a1a0f;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --font-sans: "Manrope Variable", "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --container: 1280px; --gutter: clamp(20px, 4vw, 56px);
  --header-h: 72px; --side-w: 264px; --top-h: 64px;
  --pad: clamp(16px, 3vw, 32px);   /* app content padding */
  --gap: clamp(14px, 1.6vw, 20px); /* grid gaps */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { margin: 0; font-family: var(--font-sans); font-size: 15px; line-height: 1.6; color: var(--ink-2); background: var(--background); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { color: var(--foreground); margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--green-dark); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--green-soft); color: var(--ink); }
.ic { width: 18px; height: 18px; flex: none; }
.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted-foreground); }
.small { font-size: 13px; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Brand lock-up ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { display: block; height: 38px; width: auto; }
.brand__tag { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: var(--radius-pill);
  color: var(--green-dark); background: var(--green-soft); border: 1px solid var(--green-line); line-height: 1; }
.on-night .brand__tag { color: var(--green); background: #7bc1421a; border-color: #7bc14247; }

/* ---------- Button (shadcn: default / secondary / outline / ghost / destructive / link) ---------- */
.btn { --h: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 20px;
  border-radius: var(--radius-pill); border: 1px solid transparent; font: inherit; font-size: 14.5px; font-weight: 700; line-height: 1;
  white-space: nowrap; text-decoration: none; cursor: pointer; user-select: none;
  background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-sm);
  transition: background .18s var(--ease), color .18s, border-color .18s, box-shadow .18s, transform .06s; }
.btn:hover { background: var(--green-hover); }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; }
.btn--ghost { background: var(--card); color: var(--foreground); border-color: var(--input); box-shadow: none; }   /* outline */
.btn--ghost:hover { background: var(--muted); }
.btn--secondary { background: var(--secondary); color: var(--secondary-foreground); box-shadow: none; }
.btn--secondary:hover { background: #e7eae4; }
.btn--dark { background: var(--night); color: var(--night-ink); }
.btn--dark:hover { background: #1c241a; }
.btn--danger { background: var(--card); color: var(--destructive); border-color: #f1c9c3; box-shadow: none; }
.btn--danger:hover { background: var(--destructive-soft); }
.btn--sm { --h: 34px; padding: 0 13px; font-size: 13px; }
.btn--sm .ic { width: 15px; height: 15px; }
.btn--block { width: 100%; }
.btn[disabled], .btn:disabled { opacity: .5; pointer-events: none; }
.on-night .btn--ghost { background: transparent; color: var(--night-ink); border-color: #ffffff3d; }
.on-night .btn--ghost:hover { background: #ffffff14; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--green-dark); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Form (shadcn input / select / textarea / checkbox / label) ---------- */
.field { display: block; margin: 0 0 18px; }
.field > span { display: block; font-size: 13.5px; font-weight: 600; color: var(--foreground); margin-bottom: 7px; }
.field small { display: block; color: var(--muted-foreground); margin-top: 6px; font-size: 12.5px; line-height: 1.5; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=datetime-local],
input[type=number], input[type=url], input[type=file], select, textarea {
  width: 100%; height: 42px; padding: 0 13px; font: inherit; font-size: 14.5px; color: var(--foreground);
  background: var(--card); border: 1px solid var(--input); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s; }
input[type=file] { padding: 8px 10px; height: auto; }
textarea { height: auto; min-height: 110px; padding: 11px 13px; line-height: 1.55; resize: vertical; }
select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input::placeholder, textarea::placeholder { color: #9a9d98; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px var(--green-tint); }
input:disabled, select:disabled, textarea:disabled, fieldset:disabled input, fieldset:disabled textarea, fieldset:disabled select { background: var(--bg-soft); color: var(--muted-foreground); cursor: not-allowed; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.check input { margin: 2px 0 0; width: 17px; height: 17px; accent-color: var(--green-dark); flex: none; }
.grid2 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips label { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 1px solid var(--input); border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; cursor: pointer; background: var(--card); transition: background .15s, border-color .15s; }
.chips label:has(input:checked) { background: var(--accent); border-color: var(--green-line); color: var(--accent-foreground); }
.chips input { accent-color: var(--green-dark); margin: 0; }

/* ---------- Alert / flash ---------- */
.flash { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid; font-size: 14px; font-weight: 600; }
.flash--success { background: var(--success-soft); color: var(--success); border-color: var(--green-line); }
.flash--error { background: var(--destructive-soft); color: var(--destructive); border-color: #f1c9c3; }
.flash--info { background: var(--info-soft); color: var(--info); border-color: #c9dbf1; }
.app .main > .flash { margin: 16px var(--pad) 0; }

/* ---------- Badge ---------- */
.badge, .role { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 700;
  white-space: nowrap; border: 1px solid transparent; background: var(--muted); color: var(--muted-foreground); line-height: 1; vertical-align: middle; }
.badge--ok { background: var(--success-soft); color: var(--success); border-color: var(--green-line); }
.badge--info { background: var(--info-soft); color: var(--info); border-color: #c9dbf1; }
.badge--warn { background: var(--warning-soft); color: var(--warning); border-color: #f3dcb1; }
.badge--bad { background: var(--destructive-soft); color: var(--destructive); border-color: #f1c9c3; }
.role--gp { background: #f0eafb; color: #5b2fae; border-color: #dccff5; }
.role--mp { background: var(--info-soft); color: var(--info); border-color: #c9dbf1; }
.role--rs { background: var(--green-soft); color: var(--green-dark); border-color: var(--green-line); }
.role--is { background: #fff1e0; color: #9a5300; border-color: #f6dbb7; }
.role--house { background: var(--night); color: var(--night-ink); }

/* =========================================================================
   Public site
   ========================================================================= */
.pub-nav { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: var(--night); color: var(--night-ink); border-bottom: 1px solid var(--night-line); }
.pub-nav__in { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 20px; }
.pub-nav nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.pub-nav nav a:not(.btn) { color: #dfe4dc; text-decoration: none; font-weight: 600; font-size: 15px; transition: color .15s; }
.pub-nav nav a:not(.btn):hover { color: #fff; }
@media (max-width: 820px) { .pub-nav nav a:not(.btn) { display: none; } .brand img { height: 34px; } }

.hero { position: relative; overflow: hidden; background: var(--night); color: var(--night-ink); padding: clamp(64px, 10vw, 136px) 0 clamp(64px, 9vw, 120px); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 480px at 85% 10%, #7bc14229, transparent 60%), radial-gradient(700px 400px at 10% 110%, #18cb961a, transparent 60%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(#ffffff0a 1px, transparent 1px), linear-gradient(90deg, #ffffff0a 1px, transparent 1px); background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%); }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(38px, 6.2vw, 76px); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; max-width: 15ch; margin-bottom: 24px; }
.hero h1 span { color: var(--green); }
.hero p.lead { font-size: clamp(17px, 1.9vw, 21px); line-height: 1.55; max-width: 60ch; color: #d5dbd1; margin: 0 0 34px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__cta .btn { --h: 52px; padding: 0 28px; font-size: 16px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--night-line); font-size: 14px; color: var(--night-muted); }
.hero__facts b { color: #fff; font-weight: 700; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--green-dark); margin-bottom: 16px; }
.hero .eyebrow { color: var(--night-muted); }

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--alt { background: var(--bg-off); }
.section h2 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; max-width: 22ch; margin-bottom: 18px; }
.section p.sub { font-size: 17.5px; max-width: 62ch; margin: 0 0 44px; color: var(--ink-2); }
.steps { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: s; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-card); }
.step::before { counter-increment: s; content: "0" counter(s); display: block; font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--green-dark); margin-bottom: 18px; }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { margin: 0; font-size: 14.5px; }
.roles { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.rolecard { border-radius: var(--radius-xl); padding: 30px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-card); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.rolecard:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.rolecard h3 { font-size: 23px; margin: 16px 0 6px; }
.rolecard ul { margin: 14px 0 0; padding: 0; list-style: none; font-size: 14.5px; }
.rolecard li { position: relative; padding-left: 24px; margin-bottom: 9px; }
.rolecard li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 12px; height: 7px; border-left: 2px solid var(--green-dark); border-bottom: 2px solid var(--green-dark); transform: rotate(-45deg); }
.rolecard .who { font-size: 14px; color: var(--muted-foreground); margin: 0; }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 40px; font-weight: 700; color: var(--foreground); font-size: 14.5px; }
.chain .node { padding: 9px 16px; border-radius: var(--radius-pill); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.chain .arr { color: var(--green-dark); }
.principles { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); margin-top: 40px; }
.principle { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: var(--radius-md); background: var(--card); border: 1px solid var(--border); }
.principle .ic { color: var(--green-dark); width: 20px; height: 20px; margin-top: 2px; padding: 9px; box-sizing: content-box; background: var(--green-soft); border-radius: var(--radius-sm); }
.principle strong { display: block; color: var(--foreground); margin-bottom: 4px; font-size: 15.5px; }
.principle p { margin: 0; font-size: 14px; }
.faq { max-width: 880px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq summary { font-weight: 700; color: var(--foreground); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; flex: none; margin-right: 4px; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { margin: 12px 0 0; max-width: 72ch; }
.apply { display: grid; gap: clamp(28px, 4vw, 56px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .apply { grid-template-columns: .9fr 1.1fr; } .apply > div:first-child { position: sticky; top: calc(var(--header-h) + 32px); } }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: clamp(22px, 3vw, 36px); box-shadow: var(--shadow-card); }
.pub-foot { background: var(--night); color: var(--night-muted); padding: clamp(56px, 7vw, 88px) 0 36px; font-size: 14px; }
.pub-foot a { color: #dfe4dc; text-decoration: none; }
.pub-foot a:hover { color: #fff; text-decoration: underline; }
.pub-foot h4 { color: #fff; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 12px; }
.pub-foot p { line-height: 1.7; }
.pub-foot__grid { display: grid; gap: 36px; grid-template-columns: 1fr; margin-bottom: 44px; }
@media (min-width: 820px) { .pub-foot__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.pub-foot .brand img { height: 44px; margin-bottom: 16px; }
.pub-foot__fine { font-size: 12.5px; color: #8a9386; border-top: 1px solid var(--night-line); padding-top: 22px; margin: 0; max-width: 92ch; line-height: 1.6; }

/* Auth / invite */
.auth { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: clamp(28px, 6vw, 72px) 16px; background: var(--bg-off); }
.auth__card { width: 100%; max-width: 460px; }
.auth__card h1 { font-size: 26px; letter-spacing: -.025em; }
.auth__card .lead { margin: 0 0 24px; color: var(--muted-foreground); }
.invitecard { width: 100%; max-width: 640px; }
.inviter { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius-md); background: var(--accent); border: 1px solid var(--green-line); margin-bottom: 24px; font-size: 14.5px; }
.inviter .avatar { background: var(--card); }
.terms-summary { font-size: 14px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 20px; margin: 0 0 24px; }
.terms-summary ul { margin: 8px 0 0; padding-left: 18px; }
.terms-summary li { margin-bottom: 4px; }
.pwmeter { height: 5px; border-radius: 3px; background: var(--muted); margin-top: 8px; overflow: hidden; }
.pwmeter i { display: block; height: 100%; width: 0; background: var(--destructive); transition: width .2s, background .2s; }

/* =========================================================================
   App shell (partner PWA + admin) — shadcn sidebar layout
   ========================================================================= */
.app { background: var(--bg-soft); }
.shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 1024px) { .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); } }
.side { display: none; position: sticky; top: 0; height: 100vh; background: var(--card); border-right: 1px solid var(--border); padding: 20px 14px 16px; flex-direction: column; }
@media (min-width: 1024px) { .side { display: flex; } }
.side .brand { padding: 2px 10px 22px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.side .brand img { height: 34px; }
.side__label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9a9d98; padding: 14px 12px 6px; }
.side__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; padding-top: 6px; }
.side__nav a { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; transition: background .15s, color .15s; }
.side__nav a .ic { color: var(--ink-3); }
.side__nav a:hover { background: var(--muted); color: var(--foreground); }
.side__nav a.is-active { background: var(--accent); color: var(--accent-foreground); }
.side__nav a.is-active .ic { color: var(--accent-foreground); }
.side__nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: var(--radius-pill); background: var(--green); color: var(--ink); font-size: 11px; font-weight: 800; }
.side__me { display: flex; gap: 11px; align-items: center; padding: 14px 8px 2px; margin-top: 8px; border-top: 1px solid var(--border); min-width: 0; }
.side__me div:last-child { min-width: 0; }
.side__me strong { display: block; color: var(--foreground); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__me small { display: block; color: var(--muted-foreground); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green-dark); font-weight: 800; font-size: 14px; flex: none; border: 1px solid var(--green-line); }

.main { min-width: 0; padding-bottom: 92px; }
@media (min-width: 1024px) { .main { padding-bottom: 40px; } }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--top-h); padding: 0 var(--pad);
  padding-top: env(safe-area-inset-top); background: #ffffffd9; backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.top__title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top__mark { display: block; width: 32px; height: 32px; flex: none; }
@media (min-width: 1024px) { .top__mark { display: none; } }
.top h1 { font-size: 18px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__actions { display: flex; gap: 4px; }
.iconbtn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); color: var(--ink-2); transition: background .15s; }
.iconbtn:hover { background: var(--muted); }
.iconbtn .dot { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--destructive); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }
.content { padding: var(--pad); max-width: calc(var(--container) + 2 * 32px); }
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.pagehead p { margin: 0; color: var(--muted-foreground); }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: #ffffffeb; backdrop-filter: blur(12px); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 1024px) { .bottombar { display: none; } }
.bottombar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 8px; color: var(--muted-foreground); text-decoration: none; font-size: 11px; font-weight: 700; }
.bottombar a.is-active { color: var(--green-dark); }
.bottombar a.is-active .ic { background: var(--accent); border-radius: var(--radius-pill); padding: 3px 14px; box-sizing: content-box; }

/* ---------- Card ---------- */
.card { background: var(--card); color: var(--card-foreground); border: 1px solid var(--border); border-radius: var(--radius-md); padding: clamp(18px, 2vw, 24px); margin-bottom: var(--gap); box-shadow: var(--shadow-card); }
.card > h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.card > h2 a.small { font-weight: 600; }
.card > h2 form { display: inline; }
.cards { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .cards--2 { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); } }
.cards > .card, .cards > div > .card:last-child { margin-bottom: 0; }
.cards > div { display: flex; flex-direction: column; gap: var(--gap); }
.cards > div > .card { margin-bottom: 0; }
.stats { display: grid; gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--gap); }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-card); }
.stat span { display: block; font-size: 13px; color: var(--muted-foreground); font-weight: 600; margin-top: 6px; }
.stat b { display: block; font-size: 28px; font-weight: 800; color: var(--foreground); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- Table ---------- */
.tablewrap { overflow-x: auto; margin: 0 calc(-1 * clamp(18px, 2vw, 24px)); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; height: 40px; padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--muted-foreground); border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--bg-soft); }
.t th:first-child, .t td:first-child { padding-left: clamp(18px, 2vw, 24px); }
.t th:last-child, .t td:last-child { padding-right: clamp(18px, 2vw, 24px); }
.t td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.t tbody tr { transition: background .12s; }
.t tbody tr:hover { background: #fafbf9; }
.t tr:last-child td { border-bottom: 0; }
.t td.actions { white-space: nowrap; text-align: right; }
.t td.actions form { display: inline-block; margin-left: 4px; }
.t a.rowlink { color: var(--foreground); font-weight: 700; text-decoration: none; }
.t a.rowlink:hover { color: var(--green-dark); text-decoration: underline; }
.empty { text-align: center; padding: 32px 12px; color: var(--muted-foreground); }
.empty .ic { display: block; margin: 0 auto 10px; width: 40px; height: 40px; padding: 10px; color: var(--ink-3); background: var(--muted); border-radius: 50%; box-sizing: border-box; }

/* Toolbar / filters / pager */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: var(--gap); }
.toolbar form { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; align-items: center; }
.toolbar input, .toolbar select { height: 36px; width: auto; flex: 1 1 170px; font-size: 13.5px; }
.toolbar select { flex: 0 1 180px; }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; padding-top: 18px; font-size: 13.5px; color: var(--muted-foreground); }
.pager a { font-weight: 600; text-decoration: none; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted-foreground); font-weight: 600; }
.kv dd { margin: 0; color: var(--foreground); min-width: 0; overflow-wrap: anywhere; }

/* Onboarding checklist */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; padding-bottom: 0; }
.checklist .tick { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--line-strong); color: var(--ink); background: var(--card); }
.checklist .done .tick { background: var(--green); border-color: var(--green); }
.checklist .now .tick { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-tint); }
.checklist .tick .ic { width: 14px; height: 14px; stroke-width: 3; }
.checklist strong { display: block; color: var(--foreground); font-size: 14.5px; }
.checklist .done strong { color: var(--ink-3); }
.checklist small { color: var(--muted-foreground); font-size: 13px; }
.checklist .go { margin-left: auto; flex: none; }
.progress { height: 6px; background: var(--muted); border-radius: 3px; overflow: hidden; margin: 0 0 8px; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: 3px; transition: width .4s var(--ease); }

/* Chain + tree */
.upline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.upline .node { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius-pill); background: var(--muted); font-weight: 600; color: var(--foreground); border: 1px solid var(--border); }
.upline .node.me { background: var(--accent); color: var(--accent-foreground); border-color: var(--green-line); }
.upline .sep { color: var(--ink-3); }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 16px; padding-left: 18px; border-left: 2px solid var(--green-soft); }
.tree li { padding: 5px 0; }
.tree .tn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.tree .tn strong { color: var(--foreground); }
.tree .tn .meta { color: var(--muted-foreground); font-size: 12.5px; margin-left: auto; }

/* Feed (notifications, announcements) */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.feed li:first-child { padding-top: 0; }
.feed li:last-child { border-bottom: 0; padding-bottom: 0; }
.feed li.unread { position: relative; padding-left: 16px; }
.feed li.unread::before { content: ""; position: absolute; left: 0; top: 21px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.feed li.unread:first-child::before { top: 7px; }
.feed > li > strong, .feed > li > a > strong { color: var(--foreground); display: block; }
.feed .prose strong { color: var(--foreground); }
.feed time { font-size: 12px; color: var(--muted-foreground); }
.prose p { margin: 0 0 10px; } .prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; } .prose li { margin-bottom: 4px; }
.prose h2 { font-size: 21px; margin: 6px 0 10px; letter-spacing: -.02em; } .prose h3 { font-size: 16px; margin: 22px 0 8px; } .prose h2 + p, .prose h3 + p { margin-top: 0; }
.feed .prose h2 { font-size: 16px; } .feed .prose h3 { font-size: 15px; margin-top: 12px; }
.soon { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.soon .card { margin: 0; }
.soon .card > .ic { color: var(--green-dark); width: 22px; height: 22px; padding: 10px; box-sizing: content-box; background: var(--green-soft); border-radius: var(--radius-sm); margin-bottom: 14px; }
.soon h3 { font-size: 16px; margin-bottom: 6px; }
.soon p { font-size: 14px; margin: 0; color: var(--muted-foreground); }
.section .soon .card { box-shadow: none; }
.sharebox { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px; background: var(--accent); border: 1px solid var(--green-line); border-radius: var(--radius-md); margin-bottom: var(--gap); }
.sharebox input { flex: 1 1 260px; height: 36px; font-size: 13px; font-family: var(--font-mono); }
.preview-frame { display: block; width: 100%; height: 680px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-off); }
.highlight { border-color: var(--green-line); box-shadow: 0 0 0 3px var(--green-tint), var(--shadow-card); }
