@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --page: #f3f1ec;
  --surface: #ffffff;
  --sunk: #f7f6f2;
  --hover: #f6f5f1;
  --ink: #15181c;
  --ink-2: #4b535d;
  --ink-3: #737b85;
  --line: #e2dfd7;
  --line-soft: #eceae4;
  --accent: #1559c7;
  --accent-hover: #0f4aa8;
  --accent-soft: #e9f0fb;
  --on-accent: #ffffff;
  --like: #d0246a;
  --repost: #12865c;
  --danger: #b4232f;
  --head-h: 60px;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #111316;
    --surface: #181b1f;
    --sunk: #1d2126;
    --hover: #1e2227;
    --ink: #e9ebee;
    --ink-2: #aab2bc;
    --ink-3: #8a939e;
    --line: #2b3038;
    --line-soft: #242830;
    --accent: #5c9cf5;
    --accent-hover: #7aaff7;
    --accent-soft: #1b2a40;
    --on-accent: #0b1525;
    --like: #f0508e;
    --repost: #36c08b;
    --danger: #f06470;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--page); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--ink-3); }
.pad { padding: 0 16px 14px; margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent; font-weight: 650; font-size: 14px; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary[disabled] { opacity: 0.45; cursor: default; }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { background: var(--hover); }
.btn-ghost { background: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }

/* Masthead */
.masthead { position: sticky; top: 0; z-index: 5; height: var(--head-h); background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead-inner { max-width: 1004px; height: 100%; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 20px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--accent); text-decoration: none !important; flex: none; }
.wordmark-mark { width: 30px; height: 30px; }
.wordmark span { font-family: var(--display); font-size: 25px; font-weight: 750; letter-spacing: -0.6px; color: var(--ink); line-height: 1; padding-bottom: 2px; }
.nav { display: flex; align-items: stretch; height: 100%; gap: 2px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none !important; }
.nav-link svg { width: 20px; height: 20px; flex: none; }
.nav-link:hover { color: var(--ink); }
.nav-link.is-current { color: var(--ink); }
.nav-link.is-current::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }
.nav-link .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.search { position: relative; flex: 1; min-width: 160px; max-width: 320px; margin: 0 0 0 auto; }
.search svg { position: absolute; left: 11px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; height: 38px; padding: 0 12px 0 35px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunk); outline: none; }
.search input:focus { border-color: var(--accent); background: var(--surface); }
.account { display: flex; align-items: center; gap: 6px; flex: none; }
.me { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none !important; padding: 4px 8px 4px 4px; border-radius: 8px; }
.me:hover { background: var(--hover); }
.me .avatar { width: 32px; height: 32px; font-size: 12px; border-radius: 8px; }
.me-text { line-height: 1.15; min-width: 0; }
.me-name { display: block; font-weight: 650; font-size: 14px; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-handle { display: block; font-size: 12px; color: var(--ink-3); }

/* Layout */
.layout { max-width: 1004px; margin: 0 auto; padding: 20px 20px 60px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.column { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.column-head { position: sticky; top: var(--head-h); z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.column-title { display: flex; align-items: center; gap: 8px; padding: 14px 18px 10px; }
.column-title h1 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -0.3px; min-width: 0; overflow-wrap: anywhere; }
.back { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-left: -8px; border-radius: 8px; color: var(--ink); flex: none; }
.back:hover { background: var(--hover); text-decoration: none; }
.back svg { width: 20px; height: 20px; }
.tabs { display: flex; gap: 4px; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; padding: 10px 10px 12px; background: none; border: 0; color: var(--ink-3); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.is-current { color: var(--ink); }
.tab.is-current::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.tab-note { margin: 0; padding: 9px 18px; font-size: 13px; color: var(--ink-3); background: var(--sunk); border-bottom: 1px solid var(--line-soft); }
.empty { color: var(--ink-3); padding: 48px 24px; text-align: center; margin: 0; }
.feed-foot { display: flex; justify-content: center; padding: 18px; color: var(--ink-3); font-size: 13px; }

/* Composer */
.composer { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.composer textarea { display: block; width: 100%; min-height: 64px; border: 0; background: none; resize: vertical; font-size: 17px; line-height: 1.4; padding: 8px 0; outline: none; }
.composer textarea::placeholder { color: var(--ink-3); }
.composer-bar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.composer-count { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.composer-count.is-over { color: var(--like); font-weight: 600; }
.replying { color: var(--ink-3); font-size: 13px; margin: 0 0 2px; display: flex; align-items: center; gap: 4px; min-width: 0; }
.replying svg { width: 14px; height: 14px; flex: none; }

/* Chirps */
.chirp { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.chirp:hover { background: var(--hover); }
.chirp.is-focus { cursor: default; padding-top: 16px; background: none; }
.chirp.is-focus .chirp-text { font-size: 18px; line-height: 1.45; margin-top: 8px; }
.chirp.is-ancestor { border-bottom: 0; position: relative; }
.chirp.is-ancestor::before { content: ""; position: absolute; left: 39px; top: 62px; bottom: -14px; width: 2px; background: var(--line); }
.chirp-main { min-width: 0; }
.context { display: flex; align-items: center; gap: 5px; color: var(--ink-3); font-size: 13px; font-weight: 600; margin: 0 0 4px; }
.context svg { width: 14px; height: 14px; }
.chirp-head { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.chirp-name { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.chirp-handle { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.chirp-time { color: var(--ink-3); white-space: nowrap; margin-left: auto; padding-left: 8px; font-size: 13px; flex: none; }
.chirp-time:hover { color: var(--ink-2); }
.verified { display: inline-flex; width: 16px; height: 16px; align-self: center; color: var(--accent); flex: none; }
.verified svg { width: 100%; height: 100%; }
.chirp-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.chirp-image { display: block; margin-top: 10px; max-width: 100%; max-height: 440px; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); }
.quote { display: block; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--ink); text-decoration: none !important; }
.quote:hover { background: var(--sunk); }
.quote .chirp-text { font-size: 14px; }
.quote-gone { color: var(--ink-3); font-size: 14px; }
.actions { display: flex; gap: 4px; margin: 8px 0 -6px -8px; }
.act { display: inline-flex; align-items: center; gap: 6px; min-width: 64px; height: 32px; background: none; border: 0; padding: 0 8px; border-radius: 8px; color: var(--ink-3); font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums; }
.act svg { width: 18px; height: 18px; flex: none; }
.act:hover { background: var(--line-soft); }
.act[disabled] { opacity: 0.5; cursor: default; }
.act-reply:hover { color: var(--accent); }
.act-repost:hover, .act-repost.is-on { color: var(--repost); }
.act-like:hover, .act-like.is-on { color: var(--like); }
.act-share { margin-left: auto; min-width: 32px; }
.act-share:hover { color: var(--accent); }
.act-delete:hover { color: var(--danger); }
.focus-time { color: var(--ink-3); margin-top: 14px; font-size: 14px; }
.focus-stats { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 12px 0; margin-top: 12px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); color: var(--ink-3); font-size: 14px; }
.focus-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.chirp.is-focus .actions { margin-bottom: 0; }

.avatar { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; letter-spacing: 0.3px; overflow: hidden; background: #3e6ea8; text-decoration: none !important; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.is-large { width: 112px; height: 112px; border-radius: 18px; font-size: 38px; border: 4px solid var(--surface); }

/* Profile */
.banner { height: 180px; background: var(--accent-soft); }
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-top { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 18px; margin-top: -56px; }
.profile-info { padding: 10px 18px 14px; }
.profile-name { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -0.3px; margin: 0; overflow-wrap: anywhere; }
.profile-name .verified { width: 20px; height: 20px; }
.profile-handle { color: var(--ink-3); }
.follows-you { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--sunk); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.profile-bio { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-meta { color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; margin-top: 10px; }
.profile-counts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; color: var(--ink-3); font-size: 14px; }
.profile-counts b { color: var(--ink); font-variant-numeric: tabular-nums; }
.profile-tabs { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* People + notifications */
.person { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none !important; }
.person:hover { background: var(--hover); }
.person-name { display: flex; align-items: center; gap: 5px; font-weight: 700; min-width: 0; }
.person-bio { color: var(--ink-2); margin-top: 2px; font-size: 14px; overflow-wrap: anywhere; }
.note-line { overflow-wrap: anywhere; }
.note-quote { color: var(--ink-3); font-size: 14px; margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.section-title { margin: 0; padding: 10px 18px; font-size: 13px; font-weight: 700; color: var(--ink-2); border-bottom: 1px solid var(--line-soft); background: var(--sunk); }

/* Side */
.side { position: sticky; top: calc(var(--head-h) + 20px); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.panel h2 { margin: 0; padding: 14px 16px 8px; font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -0.2px; }
.panel p { margin: 0; }
.join { padding: 0 16px 16px; display: grid; gap: 12px; justify-items: start; }
.join p { color: var(--ink-2); font-size: 14px; }
.trend { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 9px 16px; color: var(--ink); text-decoration: none !important; }
.trend:hover { background: var(--hover); }
.trend:last-child { padding-bottom: 14px; }
.trend-rank { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.trend b { display: block; font-weight: 650; overflow-wrap: anywhere; }
.trend small { display: block; color: var(--ink-3); font-size: 13px; }
.side-foot { margin: 0; padding: 0 4px; color: var(--ink-3); font-size: 12px; line-height: 1.5; }

/* Forms */
.form { display: grid; gap: 12px; padding: 20px 18px 24px; max-width: 420px; }
.form label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form input { height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; background: var(--surface); font-size: 15px; font-weight: 400; color: var(--ink); }
.form input:focus { outline: none; border-color: var(--accent); }
.form .btn { height: 42px; }
.form-error { color: var(--danger); margin: 0; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; max-width: calc(100vw - 32px); z-index: 10; box-shadow: 0 4px 16px rgb(0 0 0 / 0.18); }

@media (max-width: 960px) {
  .nav-link .label { display: none; }
  .nav-link { padding: 0 10px; }
  .me-text { display: none; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); max-width: 680px; }
  .side { position: static; }
  [data-trends] { display: none; }
}
@media (max-width: 640px) {
  :root { --head-h: 104px; }
  .masthead-inner { flex-wrap: wrap; align-content: center; gap: 0 12px; padding: 0 16px; }
  .wordmark span { font-size: 22px; }
  .wordmark { height: 52px; }
  .account { margin-left: auto; height: 52px; }
  .account .btn { height: 32px; padding: 0 12px; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin: 0 0 8px; }
  .search input { height: 36px; }
  .nav { height: 52px; }
  .nav-link.is-current::after { bottom: 0; }
  .layout { padding: 0 0 40px; gap: 0; }
  .column { border-width: 0 0 1px; border-radius: 0; }
  .column-head { border-radius: 0; }
  .side { padding: 16px; }
  .chirp, .person, .composer { padding-left: 16px; padding-right: 16px; }
  .chirp.is-ancestor::before { left: 37px; }
  .act { min-width: 48px; }
  .banner { height: 130px; }
  .avatar.is-large { width: 88px; height: 88px; font-size: 30px; border-radius: 14px; }
  .profile-top { margin-top: -44px; padding: 0 16px; }
  .profile-info { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 380px) {
  .wordmark span { display: none; }
}
.column .pad { padding: 14px 18px; font-size: 14px; }
