/* malayali.social — design tokens and components.
   No inline styles anywhere (the Content-Security-Policy forbids them). */

:root {
  --forest-900: #084125;
  --forest-700: #0d582f;
  --forest-100: #e4f1e8;
  --backwater: #267e5e;
  --teal-avatar: #1f6e52;
  --sun: #fbb943;
  --sun-ink: #3a2600;
  --night: #000000;
  --cream: #fbf7ec;
  --sun-text: #8a5300;
  --page: #f6f8f4;
  --card: #ffffff;
  --ink: #10231a;
  --ink-2: #22382c;
  --muted: #4d5f55;
  --border: #dfe6e0;
  --border-strong: #c9d8ce;
  --soft: #eef3ef;
  --like: #b3261e;
  --danger: #b3261e;
  --radius: 20px;
  --font-ui: "Inter", "Noto Sans Malayalam", system-ui, -apple-system, "Segoe UI", Roboto, "Nirmala UI", sans-serif;
  --font-display: "Nunito", "Inter", "Noto Sans Malayalam", system-ui, sans-serif;
  --font-ml: "Noto Sans Malayalam", "Nirmala UI", "Malayalam Sangam MN", "Inter", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
}
:lang(ml) { font-family: var(--font-ml); line-height: 1.75; }
a { color: var(--forest-700); }
a:hover { color: var(--forest-900); }
img, svg { max-width: 100%; }
.icon { flex: none; vertical-align: middle; }
h1, h2, h3 { line-height: 1.2; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link { position: absolute; left: -10000px; top: 8px; z-index: 100; background: #fff; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-word { font-family: var(--font-display); font-weight: 900; font-size: 22px; color: var(--forest-900); letter-spacing: -0.3px; }
.brand-word .dot { color: #e0a12f; }
.brand-word.on-dark { color: #e8f3ec; }
.brand-word.on-dark .dot { color: var(--sun); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 700 15px var(--font-ui); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--forest-700); color: #fff; }
.btn-primary:hover { background: var(--forest-900); color: #fff; }
.btn-gold { background: var(--sun); color: #1d1405; }
.btn-gold:hover { background: #f5ab25; color: #1d1405; }
.btn-outline { background: #fff; color: var(--forest-700); border-color: #9bbfa8; }
.btn-outline:hover { background: var(--soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f1d17; color: #fff; }
.btn-quiet { background: transparent; color: var(--forest-700); border-color: transparent; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 52px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--forest-700); cursor: pointer; text-decoration: underline; }

/* ---------- Header ---------- */
.app-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.app-header-inner { max-width: 1240px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.search-form { flex: 1 1 260px; min-width: 0; max-width: 520px; }
.search-box { display: flex; align-items: center; gap: 10px; background: #f0f4f1; border: 1px solid var(--border); border-radius: 999px; padding: 0 16px; color: var(--muted); }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 11px 0; font: 15px var(--font-ui); color: var(--ink); }
.search-box input:focus { outline: none; }
.search-box:focus-within { outline: 3px solid var(--sun); outline-offset: 2px; }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.lang-toggle { display: flex; background: #f0f4f1; border: 1px solid var(--border); border-radius: 999px; padding: 3px; margin: 0; }
.lang-toggle.on-white { background: #fff; }
.lang-toggle button {
  font: 600 14px var(--font-ui); border: 0; border-radius: 999px; padding: 6px 14px; min-height: 36px;
  background: transparent; color: #2d4a3a; cursor: pointer;
}
.lang-toggle button.ml { font-family: var(--font-ml); }
.lang-toggle button[aria-pressed="true"] { background: var(--forest-700); color: #fff; }

/* ---------- Avatars ---------- */
.av {
  width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font: 700 16px var(--font-ui); flex: none; text-decoration: none; line-height: 1;
}
.av-sm { width: 40px; height: 40px; font-size: 14px; }
.av-xl { width: 120px; height: 120px; font: 800 40px var(--font-display); border: 6px solid #fff; }
.av-green { background: var(--forest-700); color: #fff; }
.av-teal { background: var(--teal-avatar); color: #fff; }
.av-gold { background: var(--sun); color: var(--sun-ink); }
.av-dark { background: var(--forest-900); color: #f4e7c6; }
a.av:hover { filter: brightness(1.08); }
.av-img { overflow: hidden; padding: 0; }
.av-img img { width: 100%; height: 100%; display: block; }
.av-img img[hidden], .ap-initials[hidden] { display: none; }
.av-xxl { width: 136px; height: 136px; border: 5px solid #fff; box-shadow: 0 8px 24px rgba(8, 65, 37, 0.14); }
.avbg-cream { background: #fbf1d8; }
.avbg-mint { background: #dcefe2; }
.avbg-leaf { background: #e3efc9; }
.avbg-sky { background: #dceefa; }
.avbg-peach { background: #fde2cc; }
.avbg-rose { background: #f7dce2; }
.avbg-lilac { background: #e6e1f5; }
.avbg-sand { background: #ece3d3; }

/* ---------- Avatar picker ---------- */
.ap-intro { margin: 0; }
.ap-welcome { display: flex; flex-direction: column; gap: 6px; }
.ap-welcome .page-title, .ap-welcome p { margin: 0; }
.avatar-picker { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 0; padding: 0; }
.ap-preview {
  margin: 16px 0 16px 16px; padding: 24px 20px; border-radius: 16px; background: var(--cream); align-self: start;
  position: sticky; top: 88px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.ap-preview-av { background: #fbf1d8; }
.ap-preview-av .ap-initials { font-size: 46px; }
.ap-preview-text { display: flex; flex-direction: column; gap: 4px; }
.ap-preview-text strong { font-size: 18px; color: var(--forest-900); }
.ap-preview-text .muted { font-size: 14px; }
.ap-backgrounds { border: 0; margin: 4px 0 0; padding: 0; width: 100%; }
.ap-backgrounds legend { margin: 0 auto 10px; font-size: 12.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.ap-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; justify-items: center; }
.ap-swatch { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-strong); cursor: pointer; }
.ap-swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ap-swatch:has(input:checked) { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--forest-700); }
.ap-swatch:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 4px; }
.ap-choices { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ap-groups { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-groups a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.ap-groups a:hover { border-color: var(--forest-700); color: var(--forest-900); }
.ap-list { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.ap-group-title { grid-column: 1 / -1; margin: 14px 0 0; font-size: 15px; color: var(--forest-900); scroll-margin-top: 96px; }
.ap-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px;
  border: 2px solid var(--border); border-radius: 16px; background: #fff; cursor: pointer; text-align: center;
}
.ap-tile:hover { border-color: var(--border-strong); background: #fafcfa; }
.ap-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ap-tile:has(input:checked) { border-color: var(--forest-700); background: #f2f8f4; }
.ap-tile:has(input:checked)::after {
  content: ""; position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--forest-700) url("../img/check-white.f25b74294d01.svg") center / 13px no-repeat;
}
.ap-tile:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 2px; }
.ap-tile-av { width: 64px; height: 64px; background: #fbf1d8; }
.ap-tile-name { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.ap-tile-ml { font-family: var(--font-ml); font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.ap-initials { font: 800 22px var(--font-display); color: var(--forest-900); }
.ap-actions { grid-column: 1 / -1; border-top: 1px solid var(--border); padding: 16px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.ap-actions .muted { margin-right: auto; font-size: 14px; }
/* Background colour follows the selected swatch, without JavaScript. */
.avatar-picker:has(input[name="avatar_background"][value="cream"]:checked) :is(.ap-tile-av, .ap-preview-av) { background: #fbf1d8; }
.avatar-picker:has(input[name="avatar_background"][value="mint"]:checked) :is(.ap-tile-av, .ap-preview-av) { background: #dcefe2; }
.avatar-picker:has(input[name="avatar_background"][value="leaf"]:checked) :is(.ap-tile-av, .ap-preview-av) { background: #e3efc9; }
.avatar-picker:has(input[name="avatar_background"][value="sky"]:checked) :is(.ap-tile-av, .ap-preview-av) { background: #dceefa; }
.avatar-picker:has(input[name="avatar_background"][value="peach"]:checked) :is(.ap-tile-av, .ap-preview-av) { background: #fde2cc; }
.avatar-picker:has(input[name="avatar_background"][value="rose"]:checked) :is(.ap-tile-av, .ap-preview-av) { background: #f7dce2; }
.avatar-picker:has(input[name="avatar_background"][value="lilac"]:checked) :is(.ap-tile-av, .ap-preview-av) { background: #e6e1f5; }
.avatar-picker:has(input[name="avatar_background"][value="sand"]:checked) :is(.ap-tile-av, .ap-preview-av) { background: #ece3d3; }

/* ---------- Layout ---------- */
.layout { max-width: 1240px; margin: 0 auto; padding: 24px; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.sidenav { flex: 1 1 200px; max-width: 230px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 88px; }
.main { flex: 999 1 560px; min-width: 0; max-width: 640px; display: flex; flex-direction: column; gap: 16px; }
.main.wide { max-width: none; }
.aside { flex: 1 1 280px; max-width: 320px; display: flex; flex-direction: column; gap: 16px; }

.nav-link { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; text-decoration: none; color: var(--ink-2); font-size: 16px; font-weight: 500; }
.nav-link:hover { background: #e9f0ea; color: var(--forest-900); }
.nav-link.is-active { background: var(--forest-100); color: var(--forest-900); font-weight: 700; }
.nav-link .label { flex: 1; }
.badge { background: var(--sun); color: var(--sun-ink); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; line-height: 1.4; }
.nav-form { margin: 0; }
.nav-form .nav-link { width: 100%; background: none; border: 0; font: 500 16px var(--font-ui); cursor: pointer; text-align: left; }

.page-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 32px; color: var(--forest-900); letter-spacing: -0.4px; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 17px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.card-title { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.card-pad { padding: 28px; }

/* ---------- Flash messages & banners ---------- */
.flashes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.flash { border-radius: 14px; padding: 12px 16px; font-size: 15px; border: 1px solid; }
.flash-success { background: #e8f5ec; border-color: #b7dcc3; color: #0b4a28; }
.flash-info { background: #eef3ef; border-color: var(--border-strong); color: var(--ink-2); }
.flash-warning { background: #fff5df; border-color: #f2d08a; color: #5c3d00; }
.flash-error { background: #fdecea; border-color: #f1b8b3; color: #7d1a14; }
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff5df; border: 1px solid #f2d08a; color: #5c3d00; border-radius: 14px; padding: 12px 16px; font-size: 15px; }
.banner form { margin: 0 0 0 auto; }

/* ---------- Composer ---------- */
.composer { display: flex; gap: 14px; }
.composer-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.composer textarea {
  width: 100%; resize: vertical; border: 0; font: 18px/1.6 var(--font-ui); color: var(--ink); padding: 6px 0; background: transparent; min-height: 84px;
}
.composer textarea:focus { outline: none; }
.composer:focus-within { border-color: #9bbfa8; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #eef2ee; padding-top: 12px; flex-wrap: wrap; }
.counter { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--danger); font-weight: 700; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); }
.tab { padding: 12px 16px; min-height: 44px; font-weight: 500; font-size: 15px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.tab:hover { color: var(--forest-900); }
.tab.is-active { color: var(--forest-900); font-weight: 700; border-bottom-color: var(--forest-700); }

/* ---------- Posts ---------- */
.post { display: flex; gap: 14px; }
.post.is-reply { border-radius: 16px; }
.post-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.post-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.post-author { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 16px; }
.post-author:hover { text-decoration: underline; color: var(--ink); }
.post-handle, .post-time { color: var(--muted); font-size: 14px; }
.post-time { text-decoration: none; }
.post-time:hover { text-decoration: underline; color: var(--muted); }
.post-context { font-size: 14px; color: var(--muted); }
.post-body { margin: 2px 0 0; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.post-body:lang(ml) { line-height: 1.8; }
.post-body a.tag, .post-body a.mention { font-weight: 600; text-decoration: none; }
.post-body a.tag:hover, .post-body a.mention:hover { text-decoration: underline; }
.post-body a.ext { word-break: break-all; }
.post-actions { display: flex; gap: 4px; margin-left: -12px; align-items: center; }
.post-actions form { margin: 0; }
.act {
  display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; border-radius: 999px;
  padding: 8px 12px; min-height: 40px; font: 500 14px var(--font-ui); color: var(--muted); cursor: pointer; text-decoration: none;
}
.act:hover { background: var(--soft); color: var(--forest-900); }
.act.is-liked { color: var(--like); }
.act.is-liked .icon { fill: var(--like); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #3f5448; background: var(--soft); border-radius: 999px; padding: 3px 10px; align-self: flex-start; }

.more { position: relative; margin-left: auto; }
.more > summary { list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more-menu {
  position: absolute; right: 0; top: 44px; z-index: 10; min-width: 190px; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 10px 30px rgba(16, 35, 26, 0.12); padding: 6px; display: flex; flex-direction: column;
}
.more-menu a, .more-menu button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font: 500 15px var(--font-ui);
  color: var(--ink-2); text-decoration: none; background: none; border: 0; cursor: pointer; width: 100%; text-align: left;
}
.more-menu a:hover, .more-menu button:hover { background: var(--soft); }
.more-menu .danger { color: var(--danger); }

/* Account menu in the top bar */
.user-menu { margin-left: 0; }
.user-menu-toggle { position: relative; display: flex; align-items: center; gap: 4px; padding: 3px 6px 3px 3px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.user-menu-toggle:hover, .user-menu[open] .user-menu-toggle { background: var(--soft); color: var(--ink); }
.user-menu-toggle:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.user-menu-caret { transition: transform .15s; }
.user-menu[open] .user-menu-caret { transform: rotate(180deg); }
.user-menu-dot { position: absolute; top: 2px; left: 32px; width: 11px; height: 11px; border-radius: 50%; background: var(--sun); border: 2px solid #fff; }
.user-menu-panel { top: 52px; min-width: 240px; z-index: 40; }
.user-menu-who { display: flex; flex-direction: column; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); line-height: 1.35; }
.user-menu-who strong { color: var(--ink); font-size: 15px; overflow-wrap: anywhere; }
.user-menu-who span { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.user-menu-panel .badge { margin-left: auto; }
.user-menu-logout { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--border); }

.replies { display: flex; flex-direction: column; gap: 12px; padding-left: 28px; border-left: 2px solid var(--border); margin-left: 22px; }
.empty { text-align: center; padding: 40px 24px; color: var(--muted); }
.empty h2 { color: var(--ink); font-size: 20px; margin: 0 0 6px; }
.load-more { display: flex; justify-content: center; padding: 8px 0 24px; }

/* ---------- Sidebar ---------- */
.suggestion { display: flex; align-items: center; gap: 12px; }
.suggestion + .suggestion { margin-top: 14px; }
.suggestion-name { font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; display: block; }
.suggestion-meta { font-size: 13px; color: var(--muted); }
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill { display: inline-block; font-size: 14px; font-weight: 600; color: var(--forest-700); background: var(--soft); border-radius: 999px; padding: 6px 12px; text-decoration: none; }
.tag-pill:hover, .tag-pill.is-active { background: var(--forest-100); color: var(--forest-900); }
.footer-links { margin: 0; padding: 0 8px; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--muted); line-height: 1.9; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- Follow buttons ---------- */
.follow-form { margin: 0; }
.btn-follow[aria-pressed="true"] { background: #fff; color: var(--forest-700); border-color: #9bbfa8; }
.btn-follow[aria-pressed="false"] { background: var(--forest-700); color: #fff; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field legend { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field fieldset { border: 0; padding: 0; margin: 0; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=search],
.field select, .field textarea {
  width: 100%; font: 16px var(--font-ui); color: var(--ink); background: #fff; border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 11px 14px; min-height: 46px;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--sun); outline-offset: 1px; border-color: var(--forest-700); }
.field .help { font-size: 13px; color: var(--muted); }
.field .help ul { margin: 4px 0 0; padding-left: 18px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border: 2px solid var(--danger); }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--danger); font-size: 14px; }
.form-errors { background: #fdecea; border: 1px solid #f1b8b3; color: #7d1a14; border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.radio-list, .radio-list > div { display: flex; flex-direction: column; gap: 6px; }
.radio-list { margin-top: 8px; }
.radio-list label { display: flex; align-items: center; gap: 10px; font-weight: 500; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.radio-list input { width: 18px; height: 18px; accent-color: var(--forest-700); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.checkbox input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--forest-700); }
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.filters .field { flex: 1 1 200px; }

/* ---------- Auth pages ---------- */
.auth-wrap { max-width: 460px; margin: 0 auto; padding: 48px 20px 64px; display: flex; flex-direction: column; gap: 20px; }
.auth-wrap.wide { max-width: 640px; }
.auth-card { padding: 32px; }
.auth-title { margin: 0 0 6px; font-family: var(--font-display); font-weight: 900; font-size: 32px; color: var(--forest-900); letter-spacing: -0.4px; }
.auth-alt { text-align: center; font-size: 15px; color: var(--muted); }
.simple-header { background: #fff; border-bottom: 1px solid var(--border); }
.simple-header-inner { max-width: 1120px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Profile ---------- */
.profile-card { padding: 0 28px 26px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.profile-card .cover { background: var(--forest-900); height: 140px; margin: 0 -28px; }
.profile-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.profile-top .av-xl { margin-top: -48px; }
.profile-name { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.3px; }
.profile-handle { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.profile-bio { margin: 0; font-size: 16px; line-height: 1.65; max-width: 620px; overflow-wrap: anywhere; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); background: var(--soft); border-radius: 999px; padding: 7px 14px; }
.facts .k { color: var(--muted); }
.facts .icon { color: var(--forest-700); }
.stats { display: flex; gap: 24px; font-size: 15px; flex-wrap: wrap; }
.stats a { color: var(--ink); text-decoration: none; }
.stats a:hover { text-decoration: underline; }
.stats .k { color: var(--muted); }
.profile-actions { display: flex; gap: 10px; padding-top: 16px; align-items: center; }

/* ---------- People ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.person { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.person-top { display: flex; gap: 14px; align-items: center; }
.person-name { font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; }
.person-name:hover { text-decoration: underline; color: var(--ink); }
.person-meta { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.person-meta .icon { color: var(--forest-700); }
.person-bio { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.av-lg { width: 52px; height: 52px; font-size: 17px; }

/* ---------- Notifications ---------- */
.notif { display: flex; gap: 14px; align-items: flex-start; }
.notif.is-unread { border-color: #f2d08a; background: #fffbf0; }
.notif-text { margin: 0; }
.notif-quote { margin: 4px 0 0; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }

/* ---------- Settings ---------- */
.settings-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.danger-zone { border-color: #f1b8b3; }

/* ---------- Landing ---------- */
.landing { min-height: 100vh; display: flex; flex-wrap: wrap; }
.landing-brand {
  flex: 1 1 560px; min-width: 0; min-height: 560px; position: relative; overflow: hidden; color: var(--ink);
  background:
    radial-gradient(ellipse 60% 45% at 30% 22%, rgba(251, 185, 67, 0.20), transparent 70%),
    radial-gradient(ellipse 70% 50% at 80% 90%, rgba(38, 126, 94, 0.10), transparent 70%),
    var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; padding: 48px 40px 170px;
}
.landing-logo { position: relative; width: 100%; max-width: 600px; height: auto; display: block; }
.landing-tagline { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.landing-tagline .en { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: -0.4px; color: var(--forest-900); }
.landing-tagline .ml { margin: 0; font-family: var(--font-ml); font-size: 19px; font-weight: 600; color: var(--sun-text); }
.divider-dot { display: flex; align-items: center; gap: 10px; }
.divider-dot span { width: 36px; height: 1px; background: var(--border-strong); }
.divider-dot span.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); }
.landing-waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 140px; display: block; }
.landing-action { flex: 1 1 420px; min-width: 0; background: var(--card); border-left: 1px solid var(--border); display: flex; flex-direction: column; padding: 24px 32px; }
.landing-action-top { display: flex; justify-content: flex-end; }
.landing-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 0; }
.landing-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.landing-box h1 { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: 38px; line-height: 1.1; color: var(--forest-900); letter-spacing: -0.5px; }
.landing-box p { margin: 0 0 14px; font-size: 17px; color: var(--muted); }
.landing-about { margin-top: 10px; font-size: 15px; font-weight: 600; text-align: center; }
.site-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: 13px; color: var(--muted); }
.site-footer-links a { color: var(--muted); text-decoration: none; }
.site-footer-links a:hover { color: var(--forest-900); text-decoration: underline; }

/* ---------- About ---------- */
.about-intro { max-width: 760px; margin: 0 auto; padding: 72px 24px 48px; display: flex; flex-direction: column; gap: 18px; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.about-intro h1 { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: 48px; line-height: 1.1; color: var(--forest-900); letter-spacing: -0.8px; }
.about-intro .ml-line { margin: 0; font-size: 19px; color: var(--sun-text); }
.prose { margin: 0; font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.about-maker { margin: 4px 0 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 15px; color: var(--muted); }
.about-maker a { font-weight: 600; }
.section { max-width: 1120px; margin: 0 auto; padding: 40px 24px 16px; display: flex; flex-direction: column; gap: 24px; }
.section-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--forest-900); letter-spacing: -0.3px; }
.feature-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--forest-100); color: var(--forest-700); display: flex; align-items: center; justify-content: center; }
.policy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.policy-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.policy-card:hover { border-color: var(--backwater); box-shadow: 0 8px 24px rgba(8, 65, 37, 0.08); transform: translateY(-2px); }
.policy-card:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.policy-card h3 { margin: 4px 0 0; font-size: 19px; color: var(--forest-900); }
.policy-card p { margin: 0; flex: 1; font-size: 15.5px; color: var(--muted); }
.policy-more { font-size: 15px; font-weight: 600; color: var(--forest-700); }
.legal-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; color: var(--ink-2); }
.legal-checks li { position: relative; padding-left: 32px; }
.legal-checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--forest-100) url("../img/check.80183c745b84.svg") center / 12px no-repeat; }
.legal-checks strong { color: var(--forest-900); }
.contact-band {
  background: radial-gradient(ellipse 50% 90% at 10% 20%, rgba(251, 185, 67, 0.18), transparent 70%), var(--cream);
  border: 1px solid var(--border); border-radius: 28px; padding: 36px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px;
}
.contact-band h2 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--forest-900); }
.contact-band p { margin: 0; color: var(--ink-2); }
.contact-band a:not(.btn) { font-weight: 600; }

/* ---------- Terms / Privacy / Safety ---------- */
.legal { max-width: 1120px; margin: 0 auto; padding: 56px 24px 0; }
.legal-head { display: flex; flex-direction: column; gap: 12px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.legal-head h1 { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: 44px; line-height: 1.15; color: var(--forest-900); letter-spacing: -0.6px; }
.legal-updated { margin: 0; font-size: 14px; color: var(--muted); }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.legal-tabs a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; color: var(--ink-2); font-size: 14.5px; font-weight: 600; text-decoration: none; }
.legal-tabs a:hover { border-color: var(--forest-700); color: var(--forest-900); }
.legal-tabs a[aria-current="page"] { background: var(--forest-700); border-color: var(--forest-700); color: #fff; }
.legal-body { display: flex; gap: 48px; align-items: flex-start; padding-top: 36px; }
.legal-toc { flex: 0 0 240px; position: sticky; top: 24px; font-size: 14.5px; }
.legal-toc-title { margin: 0 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.legal-toc ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.legal-toc a { color: var(--ink-2); text-decoration: none; }
.legal-toc a:hover { color: var(--forest-900); text-decoration: underline; }
.legal-article { flex: 1; min-width: 0; max-width: 760px; font-size: 16.5px; line-height: 1.75; color: var(--ink-2); }
.legal-article section { padding-bottom: 12px; scroll-margin-top: 24px; }
.legal-article h2 { margin: 28px 0 10px; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.3; color: var(--forest-900); }
.legal-article h3 { margin: 18px 0 6px; font-size: 17px; color: var(--forest-900); }
.legal-article p { margin: 0 0 14px; }
.legal-article ul { margin: 0 0 14px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal-article .legal-checks { padding-left: 0; }
.legal-article strong { color: var(--ink); }
.legal-article code { font-size: 14px; background: var(--soft); padding: 2px 6px; border-radius: 6px; }
.legal-lead { font-size: 18px; color: var(--ink); }
.legal-summary { background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 28px 14px; }
.legal-summary h2 { margin-top: 20px; }
.legal-tools { margin: 0 0 14px; display: flex; flex-direction: column; gap: 12px; }
.legal-tools > div { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; }
.legal-tools dt { font-weight: 700; color: var(--forest-900); }
.legal-tools dd { margin: 4px 0 0; }
.table-wrap { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.legal-table th { background: var(--soft); font-weight: 700; color: var(--forest-900); }
.legal-table tr:last-child td { border-bottom: 0; }
.form-note { margin: 4px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); text-align: center; }
.form-note a { font-weight: 600; }
.site-footer { border-top: 1px solid var(--border); background: #fff; margin-top: 56px; }
.site-footer-inner { max-width: 1120px; margin: 0 auto; padding: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }

/* ---------- Error pages ---------- */
.error-page { max-width: 560px; margin: 0 auto; padding: 96px 24px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.error-code { font-family: var(--font-display); font-weight: 900; font-size: 72px; color: var(--forest-700); margin: 0; line-height: 1; }

/* ---------- Mobile ---------- */
.tabbar { display: none; }
.fab { display: none; }
@media (max-width: 860px) {
  .sidenav { display: none; }
  .aside { max-width: none; }
  .layout { padding: 16px 12px 96px; gap: 16px; }
  .app-header-inner { padding: 10px 14px; gap: 10px; }
  .search-form { order: 3; flex-basis: 100%; max-width: none; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff;
    border-top: 1px solid var(--border); padding: 4px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; min-height: 48px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 500; position: relative; }
  .tabbar a.is-active { color: var(--forest-900); font-weight: 700; }
  .tabbar a { min-width: 0; }
  .tab-label { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar :lang(ml) .tab-label, .tabbar .tab-label:lang(ml) { font-size: 10.5px; line-height: 1.5; }
  .tabbar .badge { position: absolute; top: 2px; left: 54%; font-size: 10px; padding: 1px 6px; }
  .fab {
    display: flex; position: fixed; right: 18px; bottom: 88px; z-index: 30; width: 58px; height: 58px; border-radius: 50%;
    background: var(--forest-700); color: #fff; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(8, 65, 37, 0.35);
  }
  .replies { padding-left: 12px; margin-left: 8px; }
  .profile-card { padding: 0 18px 22px; }
  .profile-card .cover { margin: 0 -18px; height: 110px; }
  .landing-brand { min-height: 0; gap: 28px; padding: 40px 20px 130px; }
  .landing-action { border-left: 0; border-top: 1px solid var(--border); }
  .landing-tagline .en { font-size: 28px; }
  .about-intro h1 { font-size: 36px; }
  .contact-band { padding: 28px 22px; }
  .legal { padding-top: 36px; }
  .legal-head h1 { font-size: 30px; overflow-wrap: anywhere; }
  .avatar-picker { grid-template-columns: 1fr; }
  .ap-preview { position: static; margin: 16px 16px 0; flex-direction: row; flex-wrap: wrap; text-align: left; justify-content: center; }
  .ap-preview-av { width: 96px; height: 96px; }
  .ap-preview-av .ap-initials { font-size: 32px; }
  .ap-preview-text { flex: 1; min-width: 150px; }
  .ap-backgrounds legend { margin: 0 0 8px; }
  .ap-choices { padding: 16px; }
  .ap-list { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
  .ap-tile-av { width: 56px; height: 56px; }
  .ap-actions { padding: 14px 16px; }
  .simple-header-inner { padding: 10px 16px; gap: 10px; }
  .header-actions { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
  .legal-body { flex-direction: column; gap: 24px; padding-top: 24px; }
  .legal-toc { position: static; flex: none; width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; }
  .legal-summary { padding: 2px 20px 12px; }
  .legal-table th, .legal-table td { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* hCaptcha widget */
.captcha { display: flex; justify-content: center; min-height: 78px; }
