/* ==========================================================================
   XRA Link — design system v2
   Concept: the hyperlink. Link blue (unvisited) + visited violet on cool paper,
   with a highlighter yellow used only for "marked" things (owner badge, live dot,
   the active nav item). Bricolage Grotesque for display, Plus Jakarta Sans for UI.
   ========================================================================== */

@font-face {
  font-family: "Jakarta";
  src: url("../vendor/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
  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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jakarta";
  src: url("../vendor/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
  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: "Bricolage";
  src: url("../vendor/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
}

:root {
  --ink: #141a3d;
  --ink-2: #2a3160;
  --link: #2b59ff;
  --link-600: #1c45e0;
  --link-50: #eaf0ff;
  --visited: #6e44d9;
  --visited-50: #f1ebff;
  --mark: #ffd43b;
  --mark-50: #fff6cc;
  --paper: #f2f4fa;
  --surface: #ffffff;
  --text: #1a1f36;
  --muted: #5f6787;
  --line: #e3e7f2;
  --line-2: #d3d9ea;
  --ok: #138a5b;
  --danger: #d6334a;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --lift: 0 1px 2px rgba(20, 26, 61, .06), 0 8px 24px -12px rgba(20, 26, 61, .18);
  --lift-2: 0 2px 4px rgba(20, 26, 61, .06), 0 18px 40px -18px rgba(20, 26, 61, .32);
  --display: "Bricolage", "Jakarta", system-ui, sans-serif;
  --ui: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --topbar-h: 64px;
  --appnav-h: 66px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  --bs-primary: var(--link);
  --bs-primary-rgb: 43, 89, 255;
  --bs-link-color: var(--link);
  --bs-link-color-rgb: 43, 89, 255;
  --bs-link-hover-color: var(--link-600);
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--text);
  --bs-border-color: var(--line);
  --bs-font-sans-serif: var(--ui);
  --bs-border-radius: var(--r-sm);
}

*, *::before, *::after { -webkit-tap-highlight-color: transparent; }
html { scroll-padding-top: calc(var(--topbar-h) + 16px); }
body { background: var(--paper); color: var(--text); font-family: var(--ui); font-size: 15.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, .display { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; color: var(--ink); font-variation-settings: "opsz" 48; }
h5, h6 { font-family: var(--ui); font-weight: 700; color: var(--ink); }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-600); }
p a, .rich a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
::selection { background: var(--mark); color: var(--ink); }
:focus-visible { outline: 3px solid rgba(43, 89, 255, .45); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: 8px; z-index: 3000; background: #fff; padding: 8px 12px; border-radius: 8px; }
.site-main { min-height: 60vh; }
.text-muted { color: var(--muted) !important; }
.text-pre { white-space: pre-line; }
.narrow { max-width: 860px; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.avatar { border-radius: 50%; object-fit: cover; background: var(--paper); flex: 0 0 auto; }

/* ---------- buttons: press, lift, ripple ---------- */
.btn { --bs-btn-font-weight: 650; border-radius: 12px; padding: .58rem 1.05rem; position: relative; overflow: hidden; isolation: isolate;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s, color .18s, border-color .18s; }
.btn:active { transform: scale(.97); }
.btn-sm { border-radius: 10px; padding: .38rem .8rem; font-size: .86rem; }
.btn-lg { border-radius: 14px; padding: .8rem 1.4rem; font-size: 1.02rem; }
.btn-primary { --bs-btn-bg: var(--link); --bs-btn-border-color: var(--link); --bs-btn-hover-bg: var(--link-600); --bs-btn-hover-border-color: var(--link-600); --bs-btn-active-bg: var(--link-600); --bs-btn-active-border-color: var(--link-600); --bs-btn-disabled-bg: var(--link); --bs-btn-disabled-border-color: var(--link);
  box-shadow: 0 6px 16px -8px rgba(43, 89, 255, .7); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(43, 89, 255, .85); }
.btn-ink { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn-ink:hover, .btn-ink:focus { background: var(--ink-2); color: #fff; transform: translateY(-1px); }
.btn-mark { background: var(--mark); color: var(--ink); border: 1px solid #f0c419; }
.btn-mark:hover, .btn-mark:focus { background: #ffcd1a; color: var(--ink); transform: translateY(-1px); }
.btn-soft { background: var(--link-50); color: var(--link); border: 1px solid transparent; }
.btn-soft:hover { background: #dfe7ff; color: var(--link-600); }
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-outline-ink { border: 1.5px solid var(--line-2); color: var(--ink); background: #fff; }
.btn-outline-ink:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.btn-outline-primary { --bs-btn-color: var(--link); --bs-btn-border-color: var(--link); --bs-btn-hover-bg: var(--link); --bs-btn-hover-border-color: var(--link); --bs-btn-active-bg: var(--link-600); }
.btn-icon { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 0; background: transparent; color: var(--ink); font-size: 1.15rem; }
.btn-icon:hover { background: var(--paper); color: var(--ink); }
.btn-icon.btn-sm { width: 32px; height: 32px; font-size: .95rem; }
.btn-google { background: #fff; border: 1.5px solid var(--line-2); color: var(--text); display: flex; gap: .6rem; align-items: center; justify-content: center; padding: .65rem; }
.btn-google:hover { border-color: var(--ink); }
.ripple-ink { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .22; pointer-events: none; animation: ripple .6s var(--ease) forwards; z-index: -1; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 1.1em; height: 1.1em; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-soft.is-loading::after, .btn-outline-ink.is-loading::after, .btn-ghost.is-loading::after, .btn-mark.is-loading::after { border-color: rgba(43, 89, 255, .25); border-top-color: var(--link); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.form-control, .form-select { border: 1.5px solid var(--line-2); border-radius: 12px; padding: .62rem .85rem; background-color: #fff; transition: border-color .15s, box-shadow .15s; }
.form-control:focus, .form-select:focus { border-color: var(--link); box-shadow: 0 0 0 4px rgba(43, 89, 255, .12); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--danger); }
.form-label { font-weight: 650; font-size: .9rem; color: var(--ink); margin-bottom: .35rem; }
.form-text { color: var(--muted); }
.form-check-input:checked { background-color: var(--link); border-color: var(--link); }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.form-switch .form-check-label { padding-left: .3rem; padding-top: .1rem; }
.input-group-text { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: 12px; }
.input-group > .btn { border-radius: 12px; }

/* ---------- top bar (no navigation menu by design) ---------- */
.topbar { position: sticky; top: 0; z-index: 1030; height: var(--topbar-h); background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.topbar .container-xxl { height: 100%; display: flex; align-items: center; gap: .6rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.32rem; letter-spacing: -.03em; }
.brand:hover { color: var(--ink); }
.brand img { max-height: 38px; width: auto; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--ink); position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.brand-mark svg { width: 22px; height: 22px; }
.brand-name small { font-weight: 600; color: var(--link); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.badge-dot { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; border: 2px solid #fff; animation: pop .35s var(--ease); }
@keyframes pop { from { transform: scale(.3); } to { transform: scale(1); } }
.btn-avatar { padding: 2px; border: 2px solid transparent; background: none; border-radius: 50%; transition: border-color .2s; }
.btn-avatar:hover, .btn-avatar[aria-expanded="true"] { border-color: var(--link); }
.dropdown-menu { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--lift-2); padding: .4rem; animation: dropIn .18s var(--ease); }
.dropdown-item { border-radius: 9px; padding: .5rem .7rem; font-weight: 550; font-size: .92rem; }
.dropdown-item:hover { background: var(--paper); }
.dropdown-item i { color: var(--muted); width: 1.3em; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.notif-menu { width: min(380px, 94vw); padding: 0; overflow: hidden; }
.notif-list { max-height: 400px; overflow-y: auto; }
.notif-item { display: flex; gap: .7rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); color: var(--text); font-size: .9rem; transition: background .15s; }
.notif-item:hover { background: var(--paper); color: var(--text); }
.notif-item.unread { background: var(--link-50); }
.notif-item .ni-icon { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--link); flex: 0 0 auto; }
.notif-item small { color: var(--muted); display: block; }

/* ---------- mobile app navigation (sticky bottom) ---------- */
.app-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; height: calc(var(--appnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; box-shadow: 0 -8px 24px -18px rgba(20, 26, 61, .35); }
.app-nav a, .app-nav button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: .7rem; font-weight: 650; padding: 6px 0; position: relative; }
.app-nav i { font-size: 1.3rem; line-height: 1; transition: transform .2s var(--ease); }
.app-nav .active { color: var(--link); }
.app-nav .active i { transform: translateY(-2px); }
.app-nav .active::before { content: ""; position: absolute; top: -1px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--link); }
.app-nav .badge-dot { top: 0; right: calc(50% - 22px); }
.app-nav .app-fab { width: 54px; height: 54px; margin: -26px auto 0; border-radius: 18px; background: var(--link); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 22px -8px rgba(43, 89, 255, .75); transition: transform .2s var(--ease); }
.app-nav .app-fab i { font-size: 1.6rem; color: #fff; }
.app-nav .fab-wrap:active .app-fab { transform: scale(.92); }
.app-nav .fab-wrap span:last-child { margin-top: 2px; }
@media (max-width: 991.98px) {
  body { padding-bottom: calc(var(--appnav-h) + env(safe-area-inset-bottom)); }
  .toast-container { bottom: calc(var(--appnav-h) + 8px) !important; }
}
@media (min-width: 992px) { .app-nav { display: none; } }
.menu-sheet.offcanvas-bottom { height: auto; max-height: 86vh; border-radius: 24px 24px 0 0; border: 0; }
.menu-sheet .sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 10px auto 0; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.sheet-grid a { background: var(--paper); border-radius: 14px; padding: .8rem .4rem; text-align: center; color: var(--ink); font-size: .8rem; font-weight: 650; display: flex; flex-direction: column; gap: .3rem; align-items: center; }
.sheet-grid a i { font-size: 1.3rem; color: var(--link); }
.sheet-links { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .85rem; }
.sheet-links a { color: var(--muted); }

/* ---------- footer (holds the site menu) ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .7); padding: 3.5rem 0 1.6rem; font-size: .93rem; margin-top: 4rem; }
.site-footer a { color: rgba(255, 255, 255, .86); }
.site-footer a:hover { color: #fff; }
.site-footer .brand, .site-footer .brand:hover { color: #fff; }
.site-footer .brand-mark { background: var(--link); }
.footer-h { font-family: var(--ui); font-size: .82rem; font-weight: 700; color: var(--mark); margin-bottom: .9rem; }
.footer-links li { margin-bottom: .5rem; }
.footer-text { max-width: 26rem; }
.footer-cta { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r); padding: 1.2rem; }
.social { width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .08); display: inline-flex; align-items: center; justify-content: center; transition: background .2s, transform .2s; }
.social:hover { background: var(--link); transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2.4rem; padding-top: 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; }
@media (max-width: 767.98px) { .site-footer { padding-top: 2.4rem; margin-top: 2.5rem; } }

/* ---------- breadcrumbs ---------- */
.breadcrumbs-wrap { padding-top: 1rem; }
.breadcrumb { font-size: .84rem; margin-bottom: .2rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb-item.active { color: var(--ink); }

/* ---------- shared surfaces ---------- */
.card-x { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--lift); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.35rem; box-shadow: var(--lift); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.panel-head h2, .panel-head h3 { font-family: var(--ui); font-size: 1rem; font-weight: 750; margin: 0; }
.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 650; padding: .2rem .65rem; border-radius: 999px; background: var(--link-50); color: var(--link); }
.tag:hover { background: var(--link); color: #fff; }
.chip-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-links a { border: 1.5px solid var(--line-2); background: #fff; border-radius: 999px; padding: .42rem .95rem; color: var(--ink); font-size: .88rem; font-weight: 600; transition: border-color .2s, background .2s, transform .2s; }
.chip-links a:hover, .chip-links a.active { border-color: var(--link); color: var(--link); background: var(--link-50); transform: translateY(-1px); }
.empty-state { text-align: center; padding: 2.6rem 1.4rem; background: var(--surface); border: 1.5px dashed var(--line-2); border-radius: var(--r); color: var(--muted); }
.empty-state > i { font-size: 2.2rem; color: var(--link); background: var(--link-50); width: 64px; height: 64px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .8rem; }
.empty-state h2, .empty-state h3 { font-family: var(--ui); font-size: 1.08rem; color: var(--ink); }
.prompt-icon { width: 68px; height: 68px; border-radius: 22px; background: var(--link-50); color: var(--link); display: inline-flex; align-items: center; justify-content: center; font-size: 1.9rem; }
.prompt-icon.is-error { background: #fdebee; color: var(--danger); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; box-shadow: 0 0 0 0 rgba(19, 138, 91, .5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(19, 138, 91, .45); } 70% { box-shadow: 0 0 0 8px rgba(19, 138, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(19, 138, 91, 0); } }

/* ---------- owner identity ---------- */
.owner-badge { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--mark); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 1.1rem; }
.owner-badge.lg { width: 50px; height: 50px; font-size: 1.3rem; }
.owner-badge.sm { width: 32px; height: 32px; font-size: .9rem; }
.owner-badge.muted { background: var(--paper); color: var(--muted); }
.owner-label { font-weight: 750; color: var(--ink); line-height: 1.2; }

/* ==========================================================================
   HOME (visitors)
   ========================================================================== */
.hero { position: relative; padding: 3.6rem 0 2.6rem; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(700px 360px at 92% 0%, rgba(110, 68, 217, .16), transparent 70%),
  radial-gradient(600px 300px at 0% 100%, rgba(43, 89, 255, .12), transparent 70%); z-index: -1; }
.hero-title { font-size: clamp(2.35rem, 5.4vw, 4.1rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; max-width: 15ch; }
.hero-lead { font-size: 1.12rem; color: #3d4466; max-width: 36rem; margin: 1.2rem 0 0; }
.postbox { margin-top: 2rem; background: #fff; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--lift-2); padding: .55rem .55rem .55rem 1rem; display: flex; align-items: center; gap: .8rem; max-width: 620px; cursor: text; transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.postbox:hover { transform: translateY(-2px); box-shadow: 0 26px 50px -24px rgba(20, 26, 61, .45); }
.postbox-input { flex: 1; color: var(--muted); font-size: 1.05rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.postbox-input .caret { display: inline-block; width: 2px; height: 1.15em; background: var(--link); vertical-align: -3px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.postbox-hint { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .9rem; font-size: .88rem; color: var(--muted); }
.postbox-hint i { color: var(--ok); }
.live-strip { margin-top: 2.6rem; }
.live-strip-head { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--ink); font-size: .92rem; margin-bottom: .8rem; }
.live-cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: .9rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .6rem; scrollbar-width: thin; }
.live-card { scroll-snap-align: start; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; color: var(--text); display: flex; flex-direction: column; gap: .5rem; transition: border-color .2s, transform .2s var(--ease); }
.live-card:hover { border-color: var(--link); color: var(--text); transform: translateY(-2px); }
.live-card h3 { font-family: var(--ui); font-size: 1rem; font-weight: 750; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.live-card p { font-size: .86rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.live-card .meta { margin-top: auto; display: flex; gap: .8rem; font-size: .78rem; color: var(--muted); }
.hero-visual { position: relative; }
.thread-demo { background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--lift-2); padding: 1.2rem; position: relative; }
.thread-demo .td-row { display: flex; gap: .7rem; padding: .7rem 0; }
.thread-demo .td-row + .td-row { border-top: 1px dashed var(--line); }
.thread-demo .td-row.reply { padding-left: 2.6rem; }
.thread-demo strong { display: block; font-size: .9rem; }
.thread-demo p { margin: .15rem 0 0; font-size: .88rem; color: var(--muted); }
.td-av { width: 36px; height: 36px; border-radius: 50%; background: var(--visited-50); color: var(--visited); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.thread-demo .td-lock { position: absolute; right: -14px; bottom: -18px; background: var(--ink); color: #fff; border-radius: 16px; padding: .7rem .9rem; font-size: .82rem; display: flex; gap: .5rem; align-items: center; box-shadow: var(--lift-2); max-width: 240px; }
.thread-demo .td-lock i { color: var(--mark); }
.td-caption { font-size: .78rem; color: var(--muted); margin-top: 1.6rem; text-align: center; }
@media (max-width: 991.98px) { .hero { padding-top: 2rem; } .thread-demo .td-lock { right: 8px; } }

.section { padding: 4.2rem 0; }
.section-tight { padding: 2.8rem 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-ink { background: var(--ink); color: rgba(255, 255, 255, .78); }
.section-ink h2, .section-ink h3 { color: #fff; }
.section-title { font-size: clamp(1.75rem, 3.4vw, 2.55rem); margin: 0 0 .6rem; }
.section-lead { color: var(--muted); max-width: 40rem; font-size: 1.05rem; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.link-more { font-weight: 700; display: inline-flex; gap: .3rem; align-items: center; }
.link-more i { transition: transform .2s var(--ease); }
.link-more:hover i { transform: translateX(3px); }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: step; position: relative; }
.flow-step { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem; position: relative; }
.flow-step::before { counter-increment: step; content: counter(step); width: 34px; height: 34px; border-radius: 11px; background: var(--ink); color: var(--mark); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .9rem; font-family: var(--display); }
.flow-step h3 { font-family: var(--ui); font-size: 1.05rem; font-weight: 750; margin-bottom: .35rem; }
.flow-step p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 991.98px) { .flow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575.98px) { .flow { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.side-card { border-radius: var(--r-lg); padding: 2rem; position: relative; overflow: hidden; }
.side-card.buyers { background: var(--link); color: rgba(255, 255, 255, .85); }
.side-card.publishers { background: #fff; border: 1px solid var(--line); }
.side-card.buyers h3 { color: #fff; }
.side-card h3 { font-size: 1.6rem; margin-bottom: .4rem; }
.side-card .who { font-weight: 700; font-size: .86rem; display: inline-flex; gap: .4rem; align-items: center; margin-bottom: .8rem; padding: .25rem .7rem; border-radius: 999px; }
.side-card.buyers .who { background: rgba(255, 255, 255, .16); color: #fff; }
.side-card.publishers .who { background: var(--visited-50); color: var(--visited); }
.ticks { list-style: none; padding: 0; margin: 1.1rem 0 1.5rem; display: grid; gap: .6rem; }
.ticks li { display: flex; gap: .6rem; }
.ticks li i { flex: 0 0 auto; margin-top: .1rem; }
.side-card.buyers .ticks i { color: var(--mark); }
.side-card.publishers .ticks i { color: var(--visited); }
@media (max-width: 767.98px) { .split { grid-template-columns: 1fr; } .side-card { padding: 1.5rem; } }

.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.use { background: #fff; padding: 1.5rem; }
.use i { font-size: 1.4rem; color: var(--link); }
.use h3 { font-family: var(--ui); font-size: 1.02rem; font-weight: 750; margin: .7rem 0 .3rem; }
.use p { color: var(--muted); font-size: .9rem; margin: 0; }
@media (max-width: 991.98px) { .uses { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575.98px) { .uses { grid-template-columns: 1fr; } }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem; }
.cat-tile { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: .95rem 1rem; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-weight: 650; transition: border-color .2s, transform .2s var(--ease); }
.cat-tile:hover { border-color: var(--link); color: var(--link); transform: translateY(-2px); }
.cat-tile .n { font-size: .76rem; font-weight: 700; color: var(--muted); background: var(--paper); border-radius: 999px; padding: .1rem .55rem; white-space: nowrap; }
.cat-tile .n.live { color: var(--ok); background: #e6f6ef; }

.stats-band { display: flex; flex-wrap: wrap; gap: 2.4rem; }
.stats-band .s strong { display: block; font-family: var(--display); font-size: 2.4rem; color: #fff; line-height: 1; }
.stats-band .s span { font-size: .9rem; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.blog-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s; }
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--lift-2); }
.blog-thumb { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--link-50), var(--visited-50)); overflow: hidden; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-thumb .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--link); font-size: 2rem; }
.blog-card-body { padding: 1.15rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.blog-card-body h2, .blog-card-body h3 { font-family: var(--ui); font-size: 1.08rem; font-weight: 750; margin: 0; line-height: 1.35; }
.blog-card-body h2 a, .blog-card-body h3 a { color: var(--ink); }
.blog-card-body p { color: var(--muted); font-size: .9rem; margin: 0; }

.faq .accordion-item { border: 1px solid var(--line); border-radius: 14px !important; margin-bottom: .6rem; overflow: hidden; background: #fff; }
.faq .accordion-button { font-family: var(--ui); font-weight: 700; color: var(--ink); padding: 1.05rem 1.2rem; box-shadow: none !important; }
.faq .accordion-button:not(.collapsed) { background: var(--link-50); color: var(--link-600); }
.faq .accordion-body { color: #3d4466; }

.cta-band { background: var(--link); color: rgba(255, 255, 255, .86); border-radius: var(--r-lg); padding: 3rem 2rem; text-align: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .07); right: -120px; top: -160px; }
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.seo-copy { columns: 2 320px; column-gap: 2.5rem; color: #3d4466; }
.seo-copy p { break-inside: avoid; }

/* ==========================================================================
   FEED (Facebook-style, logged-in home + /requirements/)
   ========================================================================== */
.fb { display: grid; grid-template-columns: 270px minmax(0, 1fr) 320px; gap: 1.5rem; padding-top: 1.4rem; align-items: start; }
.fb-left, .fb-right { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 1rem; max-height: calc(100vh - var(--topbar-h) - 32px); overflow-y: auto; scrollbar-width: none; }
.fb-left::-webkit-scrollbar, .fb-right::-webkit-scrollbar { display: none; }
.fb-center { min-width: 0; max-width: 660px; width: 100%; margin: 0 auto; }
@media (max-width: 1199.98px) { .fb { grid-template-columns: 250px minmax(0, 1fr); } .fb-right { display: none; } }
@media (max-width: 991.98px) { .fb { grid-template-columns: minmax(0, 1fr); padding-top: .8rem; } .fb-left { display: none; } }
.me-card { padding: 1.1rem; text-align: center; }
.me-card .avatar { width: 64px; height: 64px; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--link-50); }
.me-card h2 { font-family: var(--ui); font-size: 1rem; font-weight: 750; margin: .6rem 0 0; }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: .9rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.me-stats a { color: var(--ink); display: flex; flex-direction: column; font-size: .72rem; color: var(--muted); font-weight: 600; }
.me-stats strong { font-size: 1.1rem; color: var(--ink); }
.shortcuts { padding: .5rem; }
.shortcuts a { display: flex; align-items: center; gap: .75rem; padding: .62rem .7rem; border-radius: 12px; color: var(--ink); font-weight: 600; font-size: .93rem; transition: background .15s; }
.shortcuts a:hover { background: var(--paper); }
.shortcuts a.active { background: var(--link-50); color: var(--link); }
.shortcuts .sc-ic { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.02rem; flex: 0 0 auto; }
.sc-ic.c1 { background: var(--link-50); color: var(--link); }
.sc-ic.c2 { background: var(--visited-50); color: var(--visited); }
.sc-ic.c3 { background: var(--mark-50); color: #9a7400; }
.sc-ic.c4 { background: #e6f6ef; color: var(--ok); }
.sc-ic.c5 { background: #fdebee; color: var(--danger); }
.rail-card { padding: 1.1rem; }
.rail-card h2 { font-family: var(--ui); font-size: .95rem; font-weight: 750; margin-bottom: .7rem; }
.rail-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; font-size: .88rem; color: var(--muted); }
.rail-list li { display: flex; gap: .6rem; }
.rail-list i { color: var(--link); }
.rail-foot { font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .2rem .7rem; padding: 0 .4rem; }
.rail-foot a { color: var(--muted); }
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .9rem; }
.feed-head h1 { font-size: 1.55rem; margin: 0; }
.feed-intro { margin-bottom: 1rem; padding: 1.2rem 1.3rem; }

.composer { padding: .95rem 1rem; margin-bottom: 1rem; }
.composer-row { display: flex; gap: .7rem; align-items: center; }
.composer-input { flex: 1; background: var(--paper); border-radius: 999px; padding: .7rem 1.1rem; color: var(--muted); font-weight: 500; cursor: pointer; transition: background .15s; border: 0; text-align: left; }
.composer-input:hover { background: #e7eaf4; }
.composer-actions { display: flex; border-top: 1px solid var(--line); margin-top: .8rem; padding-top: .55rem; }
.composer-actions button { flex: 1; background: none; border: 0; border-radius: 10px; padding: .45rem; color: var(--muted); font-weight: 650; font-size: .88rem; display: inline-flex; justify-content: center; gap: .45rem; align-items: center; }
.composer-actions button:hover { background: var(--paper); }
.composer-actions .i1 { color: var(--link); } .composer-actions .i2 { color: var(--visited); } .composer-actions .i3 { color: #c99700; }

/* post card */
.post { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--lift); margin-bottom: 1rem; }
.post.is-new { animation: newPost 1.2s var(--ease); }
@keyframes newPost { 0% { opacity: 0; transform: translateY(-12px) scale(.98); box-shadow: 0 0 0 3px var(--mark); } 60% { opacity: 1; transform: none; box-shadow: 0 0 0 3px var(--mark); } 100% { box-shadow: var(--lift); } }
.post-head { display: flex; align-items: flex-start; gap: .7rem; padding: 1rem 1.1rem 0; }
.post-who { flex: 1; min-width: 0; }
.post-meta { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .25rem .7rem; align-items: center; }
.post-meta .exp { display: inline-flex; gap: .25rem; align-items: center; }
.post-meta .exp.soon { color: #b45309; font-weight: 650; }
.post-body { padding: .7rem 1.1rem 0; }
.post-title { font-family: var(--ui); font-size: 1.12rem; font-weight: 800; line-height: 1.35; margin: 0 0 .35rem; letter-spacing: -.01em; }
.post-title a { color: var(--ink); }
.post-title a:hover { color: var(--link); }
.post-text { color: #2f3554; font-size: .97rem; }
.post-text.is-clamped { max-height: 9.6em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.post-more { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 700; font-size: .9rem; }
.post-tags { display: flex; flex-wrap: wrap; gap: .35rem; padding: .7rem 1.1rem 0; }
.post-stats { display: flex; justify-content: space-between; padding: .7rem 1.1rem .5rem; font-size: .84rem; color: var(--muted); }
.post-stats button { background: none; border: 0; padding: 0; color: var(--muted); }
.post-stats button:hover { text-decoration: underline; }
.post-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; border-top: 1px solid var(--line); margin: 0 .7rem; padding: .3rem 0; }
.post-actions button, .post-actions a { background: none; border: 0; border-radius: 10px; padding: .55rem .3rem; color: var(--muted); font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; transition: background .15s, color .15s; position: relative; overflow: hidden; }
.post-actions button:hover, .post-actions a:hover { background: var(--paper); color: var(--ink); }
.post-actions .is-on { color: var(--link); }
.post-actions i { font-size: 1.05rem; }
.inline-comments { border-top: 1px solid var(--line); padding: .8rem 1.1rem 1rem; display: none; }
.inline-comments.open { display: block; animation: dropIn .25s var(--ease); }
.ic-item { display: flex; gap: .55rem; margin-bottom: .6rem; }
.ic-bubble { background: var(--paper); border-radius: 16px; padding: .5rem .8rem; font-size: .9rem; min-width: 0; }
.ic-bubble .n { font-weight: 750; font-size: .84rem; color: var(--ink); display: block; }
.ic-bubble .n a { color: var(--ink); }
.ic-bubble .b { word-wrap: break-word; }
.ic-owner .ic-bubble { background: var(--mark-50); }
.ic-form { display: flex; gap: .5rem; align-items: flex-end; }
.ic-form textarea { border-radius: 18px; resize: none; min-height: 40px; padding: .5rem .9rem; font-size: .92rem; }
.ic-form .btn { border-radius: 50%; width: 40px; height: 40px; padding: 0; flex: 0 0 auto; }
.ic-all { font-size: .86rem; font-weight: 700; display: inline-block; margin-bottom: .6rem; }
.feed-status { text-align: center; padding: 1rem 0; }
.skeleton { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem; margin-bottom: 1rem; }
.sk { border-radius: 8px; background: linear-gradient(90deg, #eef1f8 25%, #f7f8fc 50%, #eef1f8 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; height: 12px; margin-bottom: .6rem; }
.sk.c { width: 42px; height: 42px; border-radius: 50%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.ad-slot { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: .7rem; position: relative; text-align: center; overflow: hidden; }
.ad-slot img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 0 auto; }
.ad-label { display: block; text-align: left; font-size: .68rem; font-weight: 700; color: var(--muted); margin-bottom: .35rem; }
.ad-placeholder { border: 1.5px dashed var(--line-2); background: repeating-linear-gradient(-45deg, #fafbfe, #fafbfe 10px, #f4f6fc 10px, #f4f6fc 20px); }
.ad-placeholder a { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.4rem .8rem; color: var(--muted); font-size: .84rem; }
.ad-placeholder a i { font-size: 1.5rem; color: var(--visited); }
.ad-placeholder strong { color: var(--ink); font-size: .95rem; }
.ad-in_feed { margin-bottom: 1rem; }

/* ==========================================================================
   REQUIREMENT PAGE — content + sticky sidebar
   ========================================================================== */
.rq { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.6rem; align-items: start; padding-top: .8rem; }
.rq-aside { align-self: stretch; display: flex; flex-direction: column; gap: 1rem; }
.rq-sticky { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 1rem; }
@media (max-width: 991.98px) { .rq { grid-template-columns: minmax(0, 1fr); } .rq-sticky { position: static; } }
.rq-card { padding: 1.5rem 1.6rem; }
.rq-title { font-size: clamp(1.6rem, 3.2vw, 2.25rem); margin: 1.1rem 0 .9rem; line-height: 1.15; }
.rq-body { font-size: 1.04rem; line-height: 1.72; color: #2f3554; }
.rq-cta { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.owner-note { background: var(--mark-50); color: #5c4700; border-radius: 12px; padding: .75rem .95rem; font-size: .9rem; width: 100%; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.facts li { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; }
.facts li span { color: var(--muted); }
.facts li strong { color: var(--ink); text-align: right; }
.meter { height: 6px; border-radius: 3px; background: var(--paper); overflow: hidden; margin-top: .3rem; }
.meter span { display: block; height: 100%; background: var(--link); border-radius: 3px; transition: width 1s var(--ease); }
.meter.soon span { background: #f59e0b; }
.share-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.share-row a, .share-row button { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; color: var(--ink); font-size: .68rem; font-weight: 650; transition: transform .18s var(--ease), border-color .18s; }
.share-row a:hover, .share-row button:hover { transform: translateY(-2px); border-color: var(--link); color: var(--ink); }
.share-row i { font-size: 1.2rem; }
.s-whatsapp i { color: #1fa855; } .s-facebook i { color: #1877f2; } .s-x i { color: #111; } .s-linkedin i { color: #0a66c2; } .s-telegram i { color: #229ed9; } .s-email i { color: var(--visited); } .s-copy i { color: var(--link); } .s-native i { color: var(--ink); }
.related a { display: block; padding: .65rem 0; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 650; font-size: .9rem; }
.related a:last-child { border-bottom: 0; }
.related a span { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; }
.related a:hover { color: var(--link); }

/* comments */
.comments-section { margin-top: 1.2rem; padding: 1.3rem 1.4rem; }
.comment-form textarea { border-radius: 14px; }
.login-callout { background: var(--paper); border-radius: 14px; padding: 1rem; text-align: center; margin-bottom: 1rem; }
.comment { display: flex; gap: .7rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment.is-reply { border-bottom: 0; padding: .6rem 0 0; }
.comment-main { flex: 1; min-width: 0; }
.comment-avatar .owner-badge, .comment-avatar .avatar { width: 38px; height: 38px; font-size: .95rem; }
.comment.is-reply .comment-avatar .owner-badge, .comment.is-reply .comment-avatar .avatar { width: 30px; height: 30px; font-size: .82rem; }
.comment-bubble { background: var(--paper); border-radius: 4px 16px 16px 16px; padding: .6rem .85rem; display: inline-block; max-width: 100%; }
.comment.by-owner > .comment-main > .comment-bubble { background: var(--mark-50); }
.comment-head { display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; font-size: .86rem; }
.comment-author { font-weight: 750; color: var(--ink); }
a.comment-author:hover { text-decoration: underline; color: var(--ink); }
.owner-tag { font-size: .66rem; font-weight: 800; background: var(--ink); color: var(--mark); padding: .1rem .4rem; border-radius: 5px; }
.comment-time, .comment-edited, .reply-to { color: var(--muted); font-size: .78rem; }
.comment-body { margin-top: .15rem; word-wrap: break-word; }
.comment-actions { padding-left: .4rem; }
.comment-actions .btn-link { padding: .15rem .35rem .15rem 0; font-size: .8rem; font-weight: 700; text-decoration: none; color: var(--muted); }
.comment-actions .btn-link:hover { color: var(--link); }
.replies { border-left: 2px solid var(--line); padding-left: .9rem; margin-top: .3rem; }
.replies:empty { display: none; }
.reply-box { margin-top: .5rem; animation: dropIn .2s var(--ease); }
.more-replies { font-size: .82rem; font-weight: 700; text-decoration: none; }
.comment.is-highlighted > .comment-main > .comment-bubble { box-shadow: 0 0 0 3px var(--mark); }

/* ==========================================================================
   PAGES: hero band, legal, blog, contact, profile, errors, auth
   ========================================================================== */
.page-hero { padding: 2.6rem 0 2rem; background: #fff; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(110, 68, 217, .12), transparent 70%); }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: .2rem 0 .5rem; }
.page-hero p { color: var(--muted); max-width: 44rem; font-size: 1.05rem; margin: 0; }
.page-body { padding-top: 2rem; }
.doc { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 2rem; align-items: start; }
.doc-aside { position: sticky; top: calc(var(--topbar-h) + 16px); }
@media (max-width: 991.98px) { .doc { grid-template-columns: 1fr; } .doc-aside { position: static; } }
.doc-nav a { display: block; padding: .5rem .7rem; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: .9rem; }
.doc-nav a:hover { background: var(--paper); }
.doc-nav a.active { background: var(--link-50); color: var(--link); }
.rich { font-size: 1.02rem; line-height: 1.75; color: #2f3554; }
.rich > *:first-child { margin-top: 0; }
.rich p:last-child { margin-bottom: 0; }
.rich h2 { font-size: 1.5rem; margin: 2rem 0 .7rem; }
.rich h3 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
.rich ul, .rich ol { padding-left: 1.3rem; }
.rich li { margin-bottom: .35rem; }
.rich blockquote { border-left: 4px solid var(--mark); background: var(--mark-50); padding: .8rem 1rem; border-radius: 0 12px 12px 0; color: #3d4466; }
.rich img { max-width: 100%; height: auto; border-radius: 14px; }
.rich table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; }
.rich table td, .rich table th { border: 1px solid var(--line); padding: .5rem .7rem; }
.rich code { background: var(--paper); padding: .1rem .35rem; border-radius: 6px; }
.article-wrap { max-width: 760px; margin: 0 auto; }
.article-title { font-size: clamp(2rem, 4.6vw, 3rem); margin: .8rem 0 .6rem; }
.article-meta { color: var(--muted); display: flex; gap: .4rem 1rem; flex-wrap: wrap; font-size: .92rem; }
.article-hero { width: 100%; border-radius: var(--r-lg); margin: 1.6rem 0; box-shadow: var(--lift); }
.article-body { font-size: 1.1rem; }
.landing-cta { background: var(--ink); color: rgba(255, 255, 255, .8); border-radius: var(--r-lg); padding: 1.8rem; margin-top: 2.2rem; }
.landing-cta h2 { color: #fff; font-size: 1.5rem; }
.contact-cards { display: grid; gap: .8rem; }
.contact-card { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem; }
.contact-card i { width: 40px; height: 40px; border-radius: 12px; background: var(--link-50); color: var(--link); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 1.1rem; }
.profile-cover { height: 150px; border-radius: var(--r-lg) var(--r-lg) 0 0; background: radial-gradient(400px 200px at 20% 0, rgba(255, 212, 59, .5), transparent 70%), linear-gradient(120deg, var(--link), var(--visited)); }
.profile-card { margin-top: 1rem; overflow: hidden; }
.profile-main { padding: 0 1.5rem 1.5rem; display: flex; gap: 1.2rem; align-items: flex-end; flex-wrap: wrap; margin-top: -52px; }
.profile-main .avatar { width: 112px; height: 112px; border: 5px solid #fff; box-shadow: var(--lift); }
.profile-main .info { flex: 1; min-width: 220px; padding-bottom: .4rem; }
.profile-main h1 { font-size: 1.8rem; margin: 0; }
.activity-list > li { padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.activity-list > li:last-child { border-bottom: 0; }
.error-page { text-align: center; padding: 4.5rem 16px; }
.error-code { font-family: var(--display); font-size: clamp(4.5rem, 14vw, 8rem); font-weight: 800; line-height: .9; color: var(--ink); margin-bottom: .6rem; letter-spacing: -.05em; }
.error-code .bad-link { text-decoration: line-through; text-decoration-color: var(--danger); text-decoration-thickness: 6px; }

.auth-wrap { padding: 2.2rem 0 1rem; display: flex; justify-content: center; }
.auth-card { display: grid; grid-template-columns: 1fr; width: 100%; max-width: 980px; background: #fff; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; box-shadow: var(--lift-2); }
.auth-card.single { max-width: 520px; }
@media (min-width: 768px) { .auth-card:not(.single) { grid-template-columns: 5fr 6fr; } }
.auth-aside { background: var(--ink); color: rgba(255, 255, 255, .78); padding: 2.6rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-aside::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; border: 50px solid rgba(43, 89, 255, .35); right: -120px; bottom: -120px; }
.auth-aside h2 { color: #fff; font-size: 2rem; }
.auth-points li { display: flex; gap: .6rem; margin-bottom: .7rem; }
.auth-points i { color: var(--mark); }
.auth-main { padding: 2.3rem; }
@media (max-width: 575.98px) { .auth-main { padding: 1.5rem 1.2rem; } .auth-card { border-radius: 20px; } .auth-wrap { padding-top: 1rem; } }
.auth-tabs { display: flex; gap: .3rem; background: var(--paper); border-radius: 14px; padding: .3rem; margin-bottom: 1.6rem; position: relative; }
.auth-tabs a { flex: 1; text-align: center; padding: .55rem; border-radius: 11px; color: var(--muted); font-weight: 700; position: relative; z-index: 1; transition: color .2s; }
.auth-tabs a[aria-selected="true"] { color: var(--ink); }
.auth-tabs .tab-ink { position: absolute; top: .3rem; bottom: .3rem; border-radius: 11px; background: #fff; box-shadow: 0 2px 8px rgba(20, 26, 61, .1); transition: left .3s var(--ease), width .3s var(--ease); }
.auth-panel { animation: panelIn .3s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.auth-divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .85rem; margin: 1.3rem 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pw-meter { height: 5px; border-radius: 3px; background: var(--paper); margin-top: .45rem; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .25s var(--ease), background .25s; }

/* ---------- modals & toasts ---------- */
.modal-content { border: 0; border-radius: 22px; box-shadow: 0 30px 80px -30px rgba(20, 26, 61, .5); }
.modal-header { border-bottom: 1px solid var(--line); padding: 1rem 1.3rem; }
.modal-footer { border-top: 1px solid var(--line); }
.modal.fade .modal-dialog { transform: translateY(18px) scale(.98); transition: transform .3s var(--ease); }
.modal.show .modal-dialog { transform: none; }
.modal-backdrop.show { opacity: .45; backdrop-filter: blur(2px); }
.anon-note { background: var(--ink); color: rgba(255, 255, 255, .85); border-radius: 14px; padding: .75rem .95rem; font-size: .88rem; display: flex; gap: .6rem; }
.anon-note i { color: var(--mark); }
.editor-wrap { border: 1.5px solid var(--line-2); border-radius: 14px; overflow: hidden; background: #fff; transition: border-color .15s, box-shadow .15s; }
.editor-wrap:focus-within { border-color: var(--link); box-shadow: 0 0 0 4px rgba(43, 89, 255, .12); }
.editor-wrap .ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid var(--line); background: var(--paper); }
.editor-wrap .ql-container.ql-snow { border: 0; font-family: var(--ui); font-size: 1rem; }
.editor-wrap .ql-editor { min-height: 210px; max-height: 46vh; }
.editor-wrap .ql-editor.ql-blank::before { color: #9aa1bd; font-style: normal; }
.editor-wrap.is-invalid { border-color: var(--danger); }
.editor-fallback { min-height: 210px; border: 0; border-radius: 0; }
@media (max-width: 575.98px) { .modal-fullscreen-sm-down .modal-content { border-radius: 0; } }
.share-sheet .modal-dialog { max-width: 440px; }
.share-preview { background: var(--paper); border-radius: 14px; padding: .8rem 1rem; font-weight: 700; color: var(--ink); font-size: .95rem; margin-bottom: 1rem; }
.share-preview span { display: block; font-weight: 500; font-size: .8rem; color: var(--muted); word-break: break-all; }
.toast { border: 0; border-radius: 14px; box-shadow: var(--lift-2); }
.toast.text-bg-success { background: var(--ink) !important; }
.toast.text-bg-success .toast-body::before { content: "\F26A"; font-family: bootstrap-icons; color: var(--mark); margin-right: .5rem; }
.flash-alert { border-radius: 14px; border: 0; box-shadow: var(--lift); }

/* ==========================================================================
   USER PANEL (dashboard) + MESSAGES
   ========================================================================== */
.dash { padding-top: 1.4rem; }
.dash-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 991.98px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.dash-grid > * { min-width: 0; }
.dash-nav { position: sticky; top: calc(var(--topbar-h) + 16px); padding: .6rem; }
.dash-user { display: flex; gap: .7rem; align-items: center; padding: .6rem .6rem 1rem; border-bottom: 1px solid var(--line); margin-bottom: .4rem; }
.dash-nav a, .dash-nav button { display: flex; gap: .7rem; align-items: center; padding: .6rem .75rem; border-radius: 12px; color: var(--ink); font-size: .93rem; font-weight: 600; width: 100%; background: none; border: 0; text-align: left; transition: background .15s, color .15s; position: relative; }
.dash-nav a:hover, .dash-nav button:hover { background: var(--paper); }
.dash-nav a i, .dash-nav button i { color: var(--muted); font-size: 1.05rem; }
.dash-nav a.active { background: var(--link); color: #fff; box-shadow: 0 8px 18px -10px rgba(43, 89, 255, .8); }
.dash-nav a.active i { color: #fff; }
.dash-nav .count { margin-left: auto; font-size: .72rem; font-weight: 800; background: var(--danger); color: #fff; border-radius: 999px; padding: .05rem .45rem; }
@media (max-width: 991.98px) {
  .dash-nav { position: static; display: flex; overflow-x: auto; gap: .35rem; padding: .4rem; scrollbar-width: none; }
  .dash-nav::-webkit-scrollbar { display: none; }
  .dash-nav .dash-user, .dash-nav form { display: none; }
  .dash-nav a { white-space: nowrap; width: auto; flex: 0 0 auto; }
}
.dash-title { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.dash-title h1 { font-size: 1.75rem; margin: 0; }
.dash-title p { margin: .2rem 0 0; color: var(--muted); }
.welcome { background: var(--ink); color: rgba(255, 255, 255, .8); border-radius: var(--r-lg); padding: 1.6rem 1.8rem; position: relative; overflow: hidden; margin-bottom: 1.2rem; }
.welcome::after { content: ""; position: absolute; right: -60px; top: -90px; width: 260px; height: 260px; border-radius: 50%; border: 44px solid rgba(255, 212, 59, .18); }
.welcome h1 { color: #fff; font-size: 1.75rem; margin: 0 0 .3rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .9rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.15rem; display: flex; gap: .9rem; align-items: center; color: var(--text); box-shadow: var(--lift); transition: transform .2s var(--ease), box-shadow .2s; }
a.stat:hover { transform: translateY(-3px); box-shadow: var(--lift-2); color: var(--text); }
.stat-ic { width: 48px; height: 48px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; flex: 0 0 auto; }
.stat-n { font-family: var(--display); font-size: 1.75rem; font-weight: 800; line-height: 1; color: var(--ink); display: block; }
.stat-l { font-size: .82rem; color: var(--muted); font-weight: 600; }
.ic-blue { background: var(--link-50); color: var(--link); } .ic-violet { background: var(--visited-50); color: var(--visited); } .ic-yellow { background: var(--mark-50); color: #9a7400; } .ic-green { background: #e6f6ef; color: var(--ok); } .ic-red { background: #fdebee; color: var(--danger); } .ic-ink { background: #e9ebf5; color: var(--ink); }
.progress-ring { display: flex; gap: 1rem; align-items: center; }
.progress-x { height: 10px; border-radius: 6px; background: var(--paper); overflow: hidden; flex: 1; }
.progress-x span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--link), var(--visited)); border-radius: 6px; transition: width 1.2s var(--ease); }
.mini-list li { display: flex; justify-content: space-between; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li .t { font-weight: 650; color: var(--ink); }
.mini-list li.unread .t { color: var(--link); }
.table-x { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-x th { font-size: .78rem; font-weight: 700; color: var(--muted); padding: .75rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line); text-align: left; }
.table-x td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-x tr:last-child td { border-bottom: 0; }
.table-x tbody tr { transition: background .15s; }
.table-x tbody tr:hover { background: #fafbfe; }
.row-out { animation: rowOut .45s var(--ease) forwards; }
@keyframes rowOut { to { opacity: 0; transform: translateX(30px); } }
.toggle-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row strong { display: block; font-size: .95rem; color: var(--ink); }
.toggle-row span { font-size: .85rem; color: var(--muted); }
.toggle-row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.toggle-row > div:last-child { flex: 0 0 auto; }
.saved-tick { color: var(--ok); font-size: .82rem; font-weight: 700; opacity: 0; transition: opacity .3s; }
.saved-tick.show { opacity: 1; }
.avatar-drop { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.avatar-drop .avatar { width: 92px; height: 92px; border: 4px solid #fff; box-shadow: var(--lift); transition: transform .3s var(--ease); }
.avatar-drop.is-dragover .avatar { transform: scale(1.06); }
.upload-bar { height: 6px; border-radius: 3px; background: var(--paper); overflow: hidden; width: 200px; display: none; }
.upload-bar span { display: block; height: 100%; width: 0; background: var(--link); transition: width .2s; }
.notif-page li { display: flex; gap: .9rem; align-items: flex-start; padding: .95rem 1.1rem; border-bottom: 1px solid var(--line); transition: background .3s; }
.notif-page li:last-child { border-bottom: 0; }
.notif-page li.unread { background: var(--link-50); }

.page-messages .site-footer { display: none; }
.page-messages .site-main { padding-bottom: 0; }
.messenger { display: grid; grid-template-columns: 350px 1fr; height: calc(100vh - var(--topbar-h) - 32px); height: calc(100dvh - var(--topbar-h) - 32px); margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--lift); padding: 0; }
.inbox-pane { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.inbox-head { padding: 1.1rem 1.1rem .6rem; }
.inbox-head h1 { font-size: 1.4rem; }
.inbox-search { padding: 0 1.1rem .8rem; border-bottom: 1px solid var(--line); }
.inbox-search .form-control { background: var(--paper); border-color: transparent; border-radius: 999px; }
.inbox-list { overflow-y: auto; flex: 1; }
.conv { display: flex; gap: .75rem; padding: .85rem 1.1rem; color: var(--text); border-left: 3px solid transparent; transition: background .15s; }
.conv:hover { background: var(--paper); color: var(--text); }
.conv.active { background: var(--link-50); border-left-color: var(--link); }
.conv .conv-body { flex: 1; min-width: 0; }
.conv .conv-name { font-weight: 750; display: flex; justify-content: space-between; gap: .4rem; color: var(--ink); }
.conv .conv-name time { font-weight: 500; color: var(--muted); font-size: .74rem; white-space: nowrap; }
.conv .conv-preview { color: var(--muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .conv-ctx { font-size: .74rem; color: var(--visited); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.conv.unread .conv-preview { color: var(--ink); font-weight: 700; }
.conv-badge { background: var(--link); color: #fff; border-radius: 999px; font-size: .7rem; padding: .1rem .5rem; font-weight: 800; align-self: center; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; }
.chat-empty { margin: auto; text-align: center; max-width: 420px; padding: 2rem; color: var(--muted); }
.chat-empty > i { font-size: 2rem; color: var(--link); background: var(--link-50); width: 72px; height: 72px; border-radius: 24px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .8rem; }
.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.chat-peer { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.chat-peer .avatar, .chat-peer .owner-badge { width: 40px; height: 40px; }
.chat-context { font-size: .82rem; padding: .5rem 1rem; background: var(--mark-50); border-bottom: 1px solid var(--line); color: #5c4700; }
.chat-context:empty { display: none; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; background: var(--paper); }
.chat-messages { display: flex; flex-direction: column; gap: .35rem; }
.msg { max-width: min(78%, 560px); padding: .6rem .85rem; border-radius: 18px 18px 18px 6px; background: #fff; border: 1px solid var(--line); align-self: flex-start; word-wrap: break-word; animation: msgIn .25s var(--ease); }
.msg.mine { align-self: flex-end; background: var(--link); color: #fff; border-color: var(--link); border-radius: 18px 18px 6px 18px; }
.msg.mine a { color: var(--mark); }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.msg-meta { font-size: .7rem; opacity: .72; margin-top: .15rem; text-align: right; }
.msg.pending { opacity: .6; }
.msg.failed { background: #fdebee; color: var(--danger); border-color: #f6c3cb; }
.day-sep { text-align: center; font-size: .72rem; color: var(--muted); margin: .7rem 0; font-weight: 700; }
.chat-compose { display: flex; gap: .5rem; padding: .75rem 1rem; border-top: 1px solid var(--line); align-items: flex-end; background: #fff; }
.chat-compose textarea { resize: none; max-height: 160px; border-radius: 20px; background: var(--paper); border-color: transparent; }
.chat-compose .btn { border-radius: 50%; width: 44px; height: 44px; padding: 0; flex: 0 0 auto; }
.chat-blocked { padding: .9rem 1rem; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .9rem; }
@media (max-width: 767.98px) {
  .messenger { grid-template-columns: 1fr; border-radius: 0; border: 0; margin-top: 0; height: calc(100dvh - var(--topbar-h) - var(--appnav-h)); }
  .messenger.has-active .inbox-pane { display: none; }
  .messenger:not(.has-active) .chat-pane { display: none; }
}

/* ---------- one orchestrated entrance: the hero ---------- */
.hero-seq > * { animation: seqIn .7s var(--ease) both; }
.hero-seq > *:nth-child(2) { animation-delay: .08s; } .hero-seq > *:nth-child(3) { animation-delay: .16s; } .hero-seq > *:nth-child(4) { animation-delay: .24s; } .hero-seq > *:nth-child(5) { animation-delay: .32s; }
@keyframes seqIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

.shake { animation: shake .4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
