/* ==========================================================
   ByteBlog — global styles
   Warm ash-grey palette, soft beige accents, charcoal ink.
   ========================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:          #f1eee9;
    --surface:     #faf8f5;
    --beige:       #e7ddd1;
    --beige-soft:  #eee7de;
    --ink:         #2b2724;
    --ink-2:       #4b453f;
    --muted:       #857c73;
    --line:        #e1d9cf;
    --line-strong: #cfc5b9;
    --danger:      #b3412e;
    --danger-tint: #f5e3de;
    --success:     #4f6b4a;

    --tone-0: #3a3430;
    --tone-1: #8a6c58;
    --tone-2: #66705d;

    --radius-xl: 36px;
    --radius-lg: 28px;
    --radius:    20px;
    --radius-sm: 14px;

    --shadow-sm: 0 1px 2px rgba(43,39,36,.05);
    --shadow:    0 1px 2px rgba(43,39,36,.04), 0 12px 32px rgba(43,39,36,.07);
    --focus:     0 0 0 3px rgba(43,39,36,.18);
    --ease:      cubic-bezier(.2,.7,.2,1);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
* { -webkit-tap-highlight-color: transparent; }
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
main, .page { flex: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg.i { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 52px; padding: 0 28px;
    border-radius: 999px; border: 1.5px solid transparent;
    font-weight: 600; font-size: 1rem; line-height: 1; white-space: nowrap;
    cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: none; box-shadow: var(--focus); }
.btn .i { width: 18px; height: 18px; }
.btn-dark { background: var(--ink); color: #f6f2ec; }
.btn-dark:hover { background: #000; }
.btn-light { background: var(--beige); color: var(--ink); }
.btn-light:hover { background: #ddd1c3; }
.btn-outline { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: .95rem; }
.icon-btn {
    width: 52px; height: 52px; border-radius: 999px; border: 1.5px solid var(--line-strong);
    display: inline-grid; place-items: center; transition: border-color .2s, background .2s;
}
.icon-btn:hover { border-color: var(--ink); }

/* ── Chips ───────────────────────────────────────────── */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 36px; padding: 0 16px; border-radius: 999px;
    font-size: .9rem; font-weight: 500; white-space: nowrap;
    border: 1.5px solid var(--line-strong); color: var(--ink-2);
}
.chip .i { width: 16px; height: 16px; }
.chip-glass {
    color: #fff; border-color: rgba(255,255,255,.6);
    background: rgba(28,24,21,.32);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

/* ── Avatars ─────────────────────────────────────────── */
.avatar { border-radius: 999px; object-fit: cover; flex-shrink: 0; background: var(--beige); }
.avatar-sm { width: 36px; height: 36px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 120px; height: 120px; }
.avatar-fallback { display: inline-grid; place-items: center; background: var(--beige); color: var(--ink); font-weight: 700; text-transform: uppercase; }
.avatar-sm.avatar-fallback { font-size: .9rem; }
.avatar-md.avatar-fallback { font-size: 1.1rem; }
.avatar-lg.avatar-fallback { font-size: 2.8rem; }

/* ── Navigation ──────────────────────────────────────── */
.site-nav { position: relative; z-index: 40; }
.site-nav-inner { height: 104px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; justify-self: start; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; background: var(--ink); display: grid; place-items: center; }
.brand-mark svg { width: 22px; height: 22px; fill: var(--beige); }
.nav-pill { display: flex; gap: 4px; padding: 6px; background: var(--beige); border-radius: 999px; }
.nav-pill a { padding: 12px 30px; border-radius: 999px; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s; }
.nav-pill a:hover { color: var(--ink); background: rgba(255,255,255,.45); }
.nav-pill a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.nav-right { display: flex; align-items: center; gap: 14px; justify-self: end; }
.nav-user { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; font-weight: 600; transition: background .2s; }
.nav-user:hover { background: var(--beige-soft); }
.nav-toggle { display: none; justify-self: end; width: 48px; height: 48px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: transparent; cursor: pointer; place-items: center; }
.nav-toggle .close { display: none; }
.nav-toggle[aria-expanded="true"] .open { display: none; }
.nav-toggle[aria-expanded="true"] .close { display: block; }
.mobile-menu { display: none; }

@media (max-width: 960px) {
    .site-nav-inner { height: 80px; grid-template-columns: 1fr auto; }
    .nav-pill, .nav-right { display: none; }
    .nav-toggle { display: grid; }
    .mobile-menu.open { display: block; padding: 4px 0 24px; border-bottom: 1px solid var(--line); }
    .mobile-menu a:not(.btn) { display: block; padding: 16px 4px; font-size: 1.1rem; font-weight: 600; border-bottom: 1px solid var(--line); }
    .mobile-menu a.active { color: var(--tone-1); }
    .mobile-menu .btn { margin-top: 20px; }
}

/* ── Footer ──────────────────────────────────────────── */
.site-footer { margin-top: 96px; padding: 32px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.site-footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ── Post card ───────────────────────────────────────── */
.post-card { position: relative; display: block; isolation: isolate; }
.post-card-media {
    position: relative; overflow: hidden; height: 100%;
    border-radius: var(--radius-lg); background: var(--tone-0);
    color: #fff;
}
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card-media::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,.22) 0%, rgba(0,0,0,0) 28%, rgba(0,0,0,0) 40%, rgba(0,0,0,.78) 100%);
}
.post-card--plain .post-card-media::after { background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.25) 100%); }
.post-card--plain.tone-0 .post-card-media { background: var(--tone-0); }
.post-card--plain.tone-1 .post-card-media { background: var(--tone-1); }
.post-card--plain.tone-2 .post-card-media { background: var(--tone-2); }
.post-card-glyph {
    position: absolute; right: -4%; top: -14%;
    font-size: 15rem; font-weight: 800; line-height: 1; letter-spacing: -.06em;
    color: rgba(255,255,255,.08); user-select: none;
}
.post-card-top { position: absolute; z-index: 1; top: 18px; left: 18px; right: 18px; display: flex; justify-content: space-between; gap: 8px; }
.post-card-body { position: absolute; z-index: 1; left: 22px; right: 96px; bottom: 22px; }
.post-card-num { display: block; font-size: .9rem; opacity: .9; margin-bottom: 4px; letter-spacing: .04em; }
.post-card-title {
    font-size: 1.75rem; line-height: 1.15; font-weight: 600; letter-spacing: -.02em;
    text-shadow: 0 1px 14px rgba(0,0,0,.35);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    overflow-wrap: anywhere;
}
.post-card-arrow {
    position: absolute; z-index: 2; right: 0; bottom: 0;
    width: 76px; height: 76px; border-radius: 999px;
    background: var(--beige); color: var(--ink);
    display: grid; place-items: center;
    box-shadow: 0 0 0 12px var(--bg);
    transition: transform .35s var(--ease), background .2s;
}
.post-card-arrow .i { width: 28px; height: 28px; stroke-width: 1.6; }
.post-card:hover .post-card-media img { transform: scale(1.04); }
.post-card:hover .post-card-arrow { transform: rotate(45deg); background: var(--ink); color: var(--beige); }
.post-card--sm { height: 300px; }
.post-card--md { height: 380px; }
.post-card--sm .post-card-title { font-size: 1.4rem; -webkit-line-clamp: 3; }

/* ── Home: hero mosaic ───────────────────────────────── */
.home-hero { padding: 8px 0 0; }
.mosaic { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 32px; align-items: stretch; }
.mosaic-col { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.mosaic-col > .post-card, .mosaic-col > .tile { flex: 1; min-height: 280px; }
.intro { display: flex; flex-direction: column; gap: 28px; padding-top: 8px; }
.intro-eyebrow { font-weight: 600; color: var(--ink); }
.intro p { color: var(--muted); font-size: 1.12rem; line-height: 1.7; }
.intro-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Featured post with cut-out title tab */
.feature { position: relative; display: block; min-height: 620px; height: 100%; isolation: isolate; }
.feature-media { position: absolute; inset: 0; border-radius: var(--radius-xl); overflow: hidden; background: var(--tone-0); }
.feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.feature:hover .feature-media img { transform: scale(1.03); }
.feature-media .post-card-glyph { font-size: 26rem; top: -10%; }
.feature-chips { position: absolute; z-index: 1; top: 22px; left: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.feature-tab {
    position: absolute; z-index: 1; left: 0; bottom: 0; max-width: 86%;
    background: var(--bg); padding: 26px 36px 0 0;
    border-top-right-radius: var(--radius-xl);
}
.feature-tab::before, .feature-tab::after {
    content: ''; position: absolute; width: var(--radius-xl); height: var(--radius-xl);
    background: radial-gradient(circle at 100% 0, transparent calc(var(--radius-xl) - .5px), var(--bg) var(--radius-xl));
}
.feature-tab::before { left: 0; top: calc(var(--radius-xl) * -1); }
.feature-tab::after { right: calc(var(--radius-xl) * -1); bottom: 0; }
.feature-kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.feature-title {
    font-size: clamp(2rem, 3.5vw, 3.3rem); line-height: 1.06; letter-spacing: -.035em; font-weight: 600;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
    padding-bottom: .08em;
}
.feature:hover .feature-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Typographic tiles (logged-out home) */
.tile {
    position: relative; display: flex; flex-direction: column; justify-content: flex-end;
    padding: 24px 104px 24px 24px; border-radius: var(--radius-lg); overflow: hidden; color: #fff;
    background: var(--tone-0);
}
.tile.tone-1 { background: var(--tone-1); }
.tile.tone-2 { background: var(--tone-2); }
.tile .post-card-glyph { font-size: 13rem; top: -10%; }
.tile-chip { position: absolute; top: 18px; left: 18px; }
.tile-num { position: relative; font-size: .9rem; opacity: .9; margin-bottom: 4px; }
.tile-title { font-size: 1.7rem; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; position: relative; }
.tile-wrap { position: relative; display: flex; flex: 1; min-height: 280px; }
.tile-wrap .tile { flex: 1; }
.tile-wrap:hover .post-card-arrow { transform: rotate(45deg); background: var(--ink); color: var(--beige); }
.feature--plain .feature-media { background: var(--ink); display: flex; align-items: flex-start; padding: 40px; }
.feature-statement { position: relative; z-index: 1; margin-top: 64px; color: #f3ede5; font-size: clamp(2.6rem, 5vw, 4.6rem); line-height: 1; letter-spacing: -.04em; font-weight: 700; }
.feature-statement span { color: var(--beige); opacity: .55; }

/* Sections */
.section { padding-top: 96px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-title { font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; }
.section-sub { color: var(--muted); margin-top: 6px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }

/* Empty state */
.empty {
    text-align: center; padding: 72px 24px; border-radius: var(--radius-xl);
    background: var(--surface); border: 1px solid var(--line);
}
.empty-icon { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 999px; background: var(--beige); display: grid; place-items: center; }
.empty-icon .i { width: 26px; height: 26px; }
.empty h2, .empty h3 { font-size: 1.6rem; letter-spacing: -.02em; font-weight: 600; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 24px; }

@media (max-width: 1100px) {
    .mosaic { grid-template-columns: 1fr 1fr; }
    .mosaic-center { grid-column: 1 / -1; order: -1; }
    .mosaic-right { order: 0; }
    .feature { min-height: 540px; }
}
@media (max-width: 700px) {
    .container { padding: 0 20px; }
    .mosaic { grid-template-columns: 1fr; gap: 24px; }
    .mosaic-col { gap: 24px; }
    .feature { min-height: 460px; }
    .feature-tab { max-width: 100%; padding: 20px 24px 0 0; }
    .post-card--sm, .post-card--md, .mosaic-col > .post-card, .mosaic-col > .tile-wrap { flex: none; height: 340px; min-height: 0; }
    .mosaic--posts .mosaic-left { order: 1; }
    .post-grid { grid-template-columns: 1fr; gap: 24px; }
    .section { padding-top: 64px; }
    .site-footer { margin-top: 64px; }
}

/* ── Article (show blog) ─────────────────────────────── */
.article { padding-top: 8px; }
.article-head { max-width: 880px; margin: 0 auto; text-align: center; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; margin-bottom: 28px; transition: color .2s; }
.back-link:hover { color: var(--ink); }
.back-link .i { width: 18px; height: 18px; }
.article-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.article-title { font-size: clamp(2.3rem, 5.4vw, 4.4rem); line-height: 1.04; letter-spacing: -.04em; font-weight: 600; overflow-wrap: anywhere; }
.byline { display: inline-flex; align-items: center; gap: 14px; margin-top: 32px; text-align: left; }
.byline-name { font-weight: 700; }
.byline-sub { color: var(--muted); font-size: .95rem; }
.article-cover { margin: 48px auto 0; max-width: 1160px; border-radius: var(--radius-xl); overflow: hidden; background: var(--beige); }
.article-cover img { width: 100%; max-height: 640px; object-fit: cover; }
.article-body { max-width: 700px; margin: 56px auto 0; font-size: 1.16rem; line-height: 1.85; color: var(--ink-2); }
.article-body p { margin-bottom: 1.5em; white-space: pre-line; overflow-wrap: anywhere; }
.article-body.has-dropcap > p:first-child::first-letter {
    float: left; font-size: 4.6em; line-height: .85; font-weight: 700; color: var(--ink);
    margin: .08em .12em 0 0;
}
.article-foot { max-width: 700px; margin: 16px auto 0; }

.like-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.like-btn {
    display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px;
    border-radius: 999px; border: 1.5px solid var(--line-strong); font-weight: 600;
    transition: border-color .2s, background .2s, color .2s;
}
.like-btn .i { width: 20px; height: 20px; }
.like-btn:hover { border-color: var(--ink); }
.like-btn.liked { background: var(--ink); border-color: var(--ink); color: #f6f2ec; }
.like-btn.liked .i { fill: currentColor; }
.like-btn.disabled { color: var(--muted); cursor: default; }
.like-count { color: var(--muted); }
.like-count strong { color: var(--ink); }
.like-tip { margin-left: auto; color: var(--muted); font-size: .95rem; }
.like-tip a, .text-link { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.like-tip a:hover, .text-link:hover { text-decoration-color: var(--ink); }

.comments { margin-top: 56px; }
.comments-title { display: flex; align-items: center; gap: 12px; font-size: 1.7rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: 24px; }
.count-pill { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px; background: var(--beige); font-size: .95rem; font-weight: 700; }
.comment-form { display: flex; gap: 12px; padding: 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 28px; transition: border-color .2s, box-shadow .2s; }
.comment-form:focus-within { border-color: var(--ink); box-shadow: var(--focus); }
.comment-input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; font: inherit; color: var(--ink); outline: none; }
.comment-input::placeholder { color: var(--muted); }
.signin-prompt { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--muted); margin-bottom: 28px; }
.signin-prompt strong { display: block; color: var(--ink); margin-bottom: 4px; }
.comment-list { display: flex; flex-direction: column; }
.comment { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment-author { font-weight: 700; margin-bottom: 2px; }
.comment-time { color: var(--muted); font-weight: 500; font-size: .9rem; margin-left: 8px; }
.comment-text { color: var(--ink-2); overflow-wrap: anywhere; }
.comments-empty { text-align: center; color: var(--muted); padding: 40px 0; }

@media (max-width: 700px) {
    .article-cover { margin-top: 36px; border-radius: var(--radius-lg); }
    .article-body { margin-top: 36px; font-size: 1.08rem; }
    .like-tip { margin-left: 0; width: 100%; }
    .comment-form { border-radius: var(--radius); flex-direction: column; padding: 12px; }
    .comment-input { padding: 10px 8px; }
}

/* ── Forms ───────────────────────────────────────────── */
.form-page { max-width: 780px; margin: 0 auto; }
.page-head { margin-bottom: 36px; }
.page-head .eyebrow { display: inline-block; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -.04em; font-weight: 600; margin-bottom: 12px; }
.page-head p { color: var(--muted); font-size: 1.1rem; max-width: 560px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 40px; }
.field { margin-bottom: 26px; }
.field-label { display: block; font-weight: 700; margin-bottom: 10px; }
.field-hint { color: var(--muted); font-weight: 500; }
.input, .textarea {
    width: 100%; border: 1.5px solid var(--line); background: var(--bg);
    border-radius: var(--radius-sm); padding: 0 18px; min-height: 56px;
    font: inherit; color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder, .textarea::placeholder { color: #a39a90; }
.input:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: var(--focus); }
.input-title { font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; }
.textarea { padding: 16px 18px; min-height: 320px; line-height: 1.75; resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--danger-tint); color: var(--danger); font-weight: 600; margin-bottom: 24px; }
.alert .i { margin-top: 2px; }

/* Upload dropzone (cover image / profile image) */
.upload { position: relative; display: block; border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--bg); cursor: pointer; transition: border-color .2s, background .2s; overflow: hidden; }
.upload:hover { border-color: var(--ink); }
.upload:focus-within { border-color: var(--ink); box-shadow: var(--focus); }
.upload input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 1; }
.upload-default { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 24px; }
.upload-icon { width: 60px; height: 60px; border-radius: 999px; background: var(--beige); display: grid; place-items: center; margin-bottom: 16px; }
.upload-icon .i { width: 26px; height: 26px; }
.upload-title { font-weight: 700; }
.upload-title span { text-decoration: underline; text-underline-offset: 3px; }
.upload-sub { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.upload-preview { display: none; }
.upload.has-file { border-style: solid; border-color: var(--line); cursor: default; }
.upload.has-file input[type="file"] { display: none; }
.upload.has-file .upload-default { display: none; }
.upload.has-file .upload-preview { display: block; }
.upload-preview img.cover { width: 100%; max-height: 360px; object-fit: cover; }
.preview-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--surface); }
.preview-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-remove { border: 0; background: none; font-weight: 700; color: var(--danger); cursor: pointer; padding: 6px 10px; border-radius: 10px; position: relative; z-index: 2; }
.preview-remove:hover { background: var(--danger-tint); }
.preview-row { display: flex; align-items: center; gap: 18px; padding: 20px; }
.preview-row img { width: 88px; height: 88px; border-radius: 999px; object-fit: cover; }
.preview-row .preview-info { flex: 1; min-width: 0; }
.preview-label { color: var(--muted); font-size: .9rem; }
.tips { display: grid; gap: 10px; margin: 24px 0 8px; color: var(--muted); font-size: .95rem; }
.tips li { list-style: none; display: flex; gap: 10px; align-items: baseline; }
.tips li::before { content: ''; width: 6px; height: 6px; border-radius: 99px; background: var(--line-strong); flex-shrink: 0; transform: translateY(-2px); }

@media (max-width: 700px) {
    .panel { padding: 24px; border-radius: var(--radius-lg); }
    .form-actions .btn { flex: 1; }
}

/* ── Profile ─────────────────────────────────────────── */
.profile-card { margin-top: 8px; display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; padding: 36px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); }
.profile-eyebrow { color: var(--muted); font-weight: 600; }
.profile-name { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 600; margin: 4px 0 8px; overflow-wrap: anywhere; }
.profile-email { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); overflow-wrap: anywhere; }
.profile-email .i { width: 18px; height: 18px; }
.profile-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.stats { display: flex; gap: 12px; }
.stat { min-width: 120px; padding: 20px 24px; border-radius: var(--radius); background: var(--bg); text-align: left; }
.stat-num { display: block; font-size: 2.2rem; line-height: 1; font-weight: 700; letter-spacing: -.03em; }
.stat-label { color: var(--muted); font-weight: 500; }
@media (max-width: 960px) {
    .profile-card { grid-template-columns: auto 1fr; }
    .stats { grid-column: 1 / -1; }
    .stat { flex: 1; }
}
@media (max-width: 600px) {
    .profile-card { grid-template-columns: 1fr; padding: 24px; gap: 20px; border-radius: var(--radius-lg); }
    .avatar-lg { width: 96px; height: 96px; }
    .profile-actions .btn { flex: 1; }
}

/* ── Auth (sign in / sign up) ────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; padding: 20px; gap: 20px; }
.auth-aside {
    position: relative; overflow: hidden; border-radius: var(--radius-xl);
    background: var(--ink); color: #f3ede5;
    padding: 40px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-aside .brand { color: #f3ede5; }
.auth-aside .brand-mark { background: var(--beige); }
.auth-aside .brand-mark svg { fill: var(--ink); }
.auth-aside .post-card-glyph { font-size: 34rem; right: -8%; top: -12%; color: rgba(255,255,255,.05); }
.auth-quote { position: relative; font-size: clamp(2rem, 3.4vw, 3.2rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; max-width: 520px; }
.auth-quote span { color: var(--beige); opacity: .55; }
.auth-points { position: relative; display: grid; gap: 12px; margin-top: 28px; list-style: none; color: rgba(243,237,229,.75); }
.auth-points li { display: flex; gap: 12px; align-items: center; }
.auth-points .i { width: 18px; height: 18px; color: var(--beige); }
.auth-foot { position: relative; color: rgba(243,237,229,.55); font-size: .9rem; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: clamp(2.1rem, 4vw, 2.8rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 600; margin-bottom: 10px; }
.auth-card .lead { color: var(--muted); margin-bottom: 32px; }
.auth-card .field { margin-bottom: 20px; }
.auth-card .btn-dark { width: 100%; margin-top: 8px; }
.auth-switch { margin-top: 28px; text-align: center; color: var(--muted); }
.auth-mobile-brand { display: none; margin-bottom: 40px; }
.form-help { color: var(--muted); font-size: .9rem; margin-top: 8px; }

.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.bb-strength-bar { height: 4px; border-radius: 99px; background: var(--line); transition: background .25s; }
.bb-strength-bar.active-1 { background: #b3412e; }
.bb-strength-bar.active-2 { background: #c58a2e; }
.bb-strength-bar.active-3 { background: #7d8f5a; }
.bb-strength-bar.active-4 { background: #4f6b4a; }
.strength-text { font-size: .9rem; font-weight: 600; margin-top: 6px; min-height: 1.4em; }

@media (max-width: 900px) {
    .auth { grid-template-columns: 1fr; padding: 0; }
    .auth-aside { display: none; }
    .auth-mobile-brand { display: inline-flex; }
    .auth-main { align-items: flex-start; padding: 32px 20px 48px; }
}

/* ── 404 ─────────────────────────────────────────────── */
.not-found { text-align: center; padding: 56px 20px 0; }
.not-found-code { display: block; font-size: clamp(7rem, 22vw, 14rem); line-height: .9; font-weight: 800; letter-spacing: -.07em; color: var(--beige); }
.not-found h1 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -.03em; font-weight: 600; margin: 12px 0 10px; }
.not-found p { color: var(--muted); max-width: 440px; margin: 0 auto 32px; }

/* ── Motion ──────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .6s var(--ease) both; }
.rise-2 { animation-delay: .08s; }
.rise-3 { animation-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
