/* ── Variables ── */
:root {
  --navy:       #0f172a;
  --navy-mid:   #1e3a5f;
  --blue:       #2563eb;
  --blue-h:     #1d4ed8;
  --blue-pale:  #eff6ff;
  --primary:    #2563eb;          /* alias for components */
  --accent:     #60a5fa;
  --bg:         #f4f7fb;          /* slightly softer than slate-100 */
  --surface:    #ffffff;
  --white:      #ffffff;
  --text:       #1e293b;
  --muted:      #64748b;
  --muted-2:    #94a3b8;
  --border:     #e2e8f0;
  --border-2:   #eef2f7;
  --red:        #dc2626;
  --red-pale:   #fef2f2;
  --shadow-sm:  0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --shadow:     0 4px 14px rgba(15,23,42,.08);
  --shadow-lg:  0 18px 40px rgba(15,23,42,.14);
  --r:          10px;
  --r-card:     14px;
  --r-pill:     999px;
  --ease:       .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6; font-size: 15px;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.bg-white { background: var(--white); }
.hidden { display: none !important; }

/* ── Buttons ── */
.btn {
  display: inline-block; padding: 11px 28px; border-radius: var(--r);
  font-size: 14px; font-weight: 600; border: 2px solid transparent;
  cursor: pointer; transition: var(--ease); text-decoration: none; line-height: 1.4;
}
.btn--primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn--primary:hover { background: var(--blue-h); border-color: var(--blue-h); text-decoration: none; color: #fff; }
.btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--outline:hover { background: rgba(255,255,255,.12); border-color: #fff; text-decoration: none; color: #fff; }
.btn--ghost { background: var(--blue-pale); color: var(--blue); border-color: var(--blue-pale); }
.btn--ghost:hover { background: #dbeafe; border-color: #dbeafe; text-decoration: none; }
.btn--block { display: block; width: 100%; text-align: center; }
.btn--sm { padding: 7px 18px; font-size: 13px; }

.btn-mini {
  display: inline-block; padding: 5px 12px; font-size: 12px; font-weight: 600;
  background: var(--blue-pale); color: var(--blue); border-radius: 6px;
  text-decoration: none; transition: var(--ease);
}
.btn-mini:hover { background: #dbeafe; text-decoration: none; }

/* ── Nav ── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 200; background: var(--navy); box-shadow: 0 1px 10px rgba(0,0,0,.35); }
.nav__inner { max-width: 1080px; margin: 0 auto; padding: 0 24px; height: 62px; display: flex; align-items: center; justify-content: space-between; }
.nav__logo { color: #fff; font-size: 17px; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.nav__logo:hover { text-decoration: none; opacity: .82; }
.nav__links { display: flex; gap: 4px; }
.nav__links a { color: rgba(255,255,255,.72); font-size: 14px; font-weight: 500; padding: 6px 14px; border-radius: 6px; transition: var(--ease); text-decoration: none; }
.nav__links a:hover, .nav__links a.active { color: #fff; background: rgba(255,255,255,.12); text-decoration: none; }
.nav__hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav__hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: var(--ease); }

/* ── Hero ── */
.hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 24px 48px; position: relative; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background: linear-gradient(140deg, #0f172a 0%, #1e3a5f 55%, #0f172a 100%); }
.hero__bg::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 80%, rgba(37,99,235,.18) 0%, transparent 55%), radial-gradient(circle at 80% 20%, rgba(37,99,235,.12) 0%, transparent 50%); }
.hero__content { position: relative; z-index: 1; max-width: 680px; }
.hero__avatar { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), #60a5fa); color: #fff; font-size: 38px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; border: 3px solid rgba(255,255,255,.18); overflow: hidden; }
.hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero__name { color: #fff; font-size: clamp(30px, 5vw, 50px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 12px; }
.hero__title { color: #93c5fd; font-size: 17px; font-weight: 500; margin-bottom: 14px; }
.hero__tagline { color: rgba(255,255,255,.62); font-size: 15px; line-height: 1.75; margin-bottom: 36px; max-width: 540px; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.35); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .08em; }
.hero__chevron { width: 16px; height: 16px; border-right: 2px solid rgba(255,255,255,.3); border-bottom: 2px solid rgba(255,255,255,.3); transform: rotate(45deg); animation: chevron 1.6s ease infinite; }
@keyframes chevron { 0%,100% { transform: rotate(45deg) translateY(0); } 50% { transform: rotate(45deg) translateY(5px); } }

/* ── Sections ── */
.section { padding: 88px 0; }
.section-title { font-size: clamp(22px, 3vw, 30px); font-weight: 700; text-align: center; margin-bottom: 8px; color: var(--text); }
.section-sub { text-align: center; color: var(--muted); font-size: 15px; margin-bottom: 52px; }
.sub-heading { font-size: 17px; font-weight: 700; margin-bottom: 18px; color: var(--text); }

/* ── About ── */
.about-wrap { display: grid; grid-template-columns: 1fr 380px; gap: 56px; max-width: 900px; margin: 0 auto; }
.about-bio { font-size: 15px; line-height: 1.9; color: var(--text); white-space: pre-line; }
.skills-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.skill-tag { background: var(--blue-pale); color: var(--blue); padding: 5px 14px; border-radius: 100px; font-size: 13px; font-weight: 500; }
.contact-wrap { display: flex; flex-direction: column; gap: 10px; }
.ci { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.ci-icon { width: 18px; text-align: center; color: var(--blue); flex-shrink: 0; }

/* ── Timeline ── */
.timeline { position: relative; max-width: 820px; margin: 0 auto; padding-left: 40px; }
.timeline::before { content: ''; position: absolute; left: 14px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(to bottom, var(--blue), rgba(37,99,235,.1)); }
.t-item { position: relative; margin-bottom: 44px; }
.t-item:last-child { margin-bottom: 0; }
.t-dot { position: absolute; left: -40px; top: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); border: 3px solid var(--bg); display: flex; align-items: center; justify-content: center; }
.t-dot::after { content: ''; width: 8px; height: 8px; background: #fff; border-radius: 50%; }
.t-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 24px 28px; box-shadow: var(--shadow-sm); transition: var(--ease); }
.t-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.t-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.t-company { font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; }
.t-period { font-size: 12px; color: var(--muted); background: var(--bg); padding: 3px 10px; border-radius: 100px; white-space: nowrap; }
.t-role { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.t-desc { font-size: 14px; color: var(--muted); margin-bottom: 14px; line-height: 1.65; }
.t-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.t-list li { font-size: 14px; color: var(--text); padding-left: 18px; position: relative; line-height: 1.5; }
.t-list li::before { content: '→'; position: absolute; left: 0; color: var(--blue); font-weight: 700; }

/* ── Articles ── */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.a-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 26px; box-shadow: var(--shadow-sm); transition: var(--ease); cursor: pointer; display: flex; flex-direction: column; }
.a-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: #bfdbfe; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--blue); background: var(--blue-pale); padding: 3px 11px; border-radius: 100px; letter-spacing: .04em; text-transform: uppercase; }
.a-card__tag { margin-bottom: 14px; }
.a-card__title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 10px; line-height: 1.4; }
.a-card__summary { font-size: 13px; color: var(--muted); line-height: 1.65; flex: 1; margin-bottom: 20px; }
.a-card__footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.a-card__date { font-size: 12px; color: var(--muted); }
.a-card__read { font-size: 13px; font-weight: 600; color: var(--blue); }
.a-card__stats { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.a-card__stat { display: inline-flex; align-items: center; gap: 4px; }
.a-card__has-attach { font-size: 11px; color: var(--blue); margin-left: 6px; }

/* ── Contact / Guestbook ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; max-width: 960px; margin: 0 auto; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-row label { font-size: 13px; font-weight: 600; color: var(--text); }
.required { color: var(--red); }
.form-row input, .form-row textarea { padding: 10px 13px; border: 1.5px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; color: var(--text); background: var(--white); transition: var(--ease); resize: vertical; }
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-fb { font-size: 13px; padding: 10px 13px; border-radius: 6px; display: none; margin-top: 4px; }
.form-fb.ok { display: block; background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.form-fb.err { display: block; background: var(--red-pale); color: var(--red); border: 1px solid #fecaca; }

.c-item { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 18px; margin-bottom: 14px; }
.c-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.c-name { font-weight: 700; font-size: 14px; }
.c-date { font-size: 11px; color: var(--muted); }
.c-msg { font-size: 14px; color: var(--text); line-height: 1.6; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }
.placeholder { text-align: center; color: var(--muted); padding: 48px 0; font-size: 14px; }

/* ── Footer ── */
.footer { background: var(--navy); color: rgba(255,255,255,.5); text-align: center; padding: 36px 24px; }
.footer-name { color: rgba(255,255,255,.85); font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.footer-copy { font-size: 13px; }
.author-link { color: rgba(255,255,255,.55); font-size: 12px; }
.author-link:hover { color: rgba(255,255,255,.9); text-decoration: none; }
.author-badge-inline { color: #60a5fa; font-weight: 600; }

/* ── Modal ── */
.modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .22s ease; }
.modal.open { opacity: 1; pointer-events: all; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
.modal-box { position: relative; z-index: 1; background: var(--white); border-radius: 12px; max-width: 780px; width: 92vw; max-height: 92vh; overflow-y: auto; padding: 44px 52px; box-shadow: var(--shadow-lg); }
.modal-close { position: sticky; top: 0; float: right; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--muted); line-height: 1; transition: var(--ease); margin-left: 12px; }
.modal-close:hover { color: var(--text); }
.modal-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.modal-date { font-size: 13px; color: var(--muted); }
.m-stat { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; background: var(--bg); padding: 3px 10px; border-radius: 100px; }
.stat-ico { font-size: 13px; }
.modal-title { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.35; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.modal-body { font-size: 15px; line-height: 1.85; color: var(--text); }
.modal-body h1, .modal-body h2, .modal-body h3 { font-weight: 700; margin: 24px 0 12px; color: var(--text); }
.modal-body h2 { font-size: 19px; }
.modal-body h3 { font-size: 16px; }
.modal-body p { margin-bottom: 14px; }
.modal-body ul, .modal-body ol { padding-left: 22px; margin-bottom: 14px; }
.modal-body li { margin-bottom: 6px; }
.modal-body strong { font-weight: 700; }
.modal-body table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 14px; }
.modal-body th { background: var(--bg); font-weight: 700; padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
.modal-body td { padding: 8px 12px; border: 1px solid var(--border); }
.modal-body blockquote { border-left: 4px solid var(--blue); padding-left: 16px; margin: 16px 0; color: var(--muted); font-style: italic; }
.modal-body code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 13px; }
.modal-body pre { background: var(--bg); padding: 16px; border-radius: var(--r); overflow-x: auto; margin-bottom: 16px; }

/* ── Attachment ── */
.attachment { margin-top: 28px; padding: 20px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); }
.att-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.att-title { font-size: 14px; font-weight: 600; color: var(--text); }
.attachment iframe { width: 100%; height: 560px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }

/* ── Like bar ── */
.like-bar { margin-top: 32px; padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 16px; }
.like-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; background: var(--white); border: 1.5px solid var(--border); border-radius: 100px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; transition: var(--ease); font-family: inherit; }
.like-btn:hover { border-color: #fecaca; background: var(--red-pale); }
.like-btn.liked { border-color: var(--red); background: var(--red-pale); color: var(--red); }
.heart { font-size: 18px; }
.like-count { background: var(--bg); color: var(--text); padding: 1px 9px; border-radius: 100px; font-size: 12px; font-weight: 700; }
.like-btn.liked .like-count { background: #fff; color: var(--red); }
.like-tip { font-size: 13px; color: var(--muted); }

/* ── Comments ── */
.comments-block { margin-top: 36px; }
.comments-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 18px; }
.c-count { color: var(--muted); font-weight: 500; }

.ac-form { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; margin-bottom: 24px; }
.ac-form .form-row { margin-bottom: 10px; }
.ac-form .form-row:last-child { margin-bottom: 0; }
.ac-form input, .ac-form textarea { background: var(--white); }
.ac-reply-to { font-size: 13px; color: var(--muted); margin-bottom: 10px; padding: 8px 12px; background: var(--blue-pale); border-radius: 6px; }
.ac-reply-to b { color: var(--blue); }
.ac-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.posting-as { font-size: 12px; color: var(--blue); }
.posting-as b { color: var(--blue); }

.ac-list { display: flex; flex-direction: column; gap: 16px; }
.ac-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 18px; }
.ac-item.is-author { background: #fffaf0; border-color: #fde68a; }
.ac-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.ac-name { font-weight: 700; font-size: 14px; color: var(--text); }
.ac-badge { display: inline-block; font-size: 10px; font-weight: 700; color: #b45309; background: #fef3c7; padding: 1px 7px; border-radius: 100px; letter-spacing: .03em; }
.ac-date { font-size: 11px; color: var(--muted); margin-left: auto; }
.ac-msg { font-size: 14px; color: var(--text); line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.ac-footer { display: flex; gap: 12px; margin-top: 8px; }
.ac-action { font-size: 12px; color: var(--muted); cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; }
.ac-action:hover { color: var(--blue); text-decoration: underline; }
.ac-action.delete:hover { color: var(--red); }
.ac-replies { margin-top: 12px; padding-left: 20px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.ac-replies .ac-item { padding: 10px 14px; }

/* ── Auth modal ── */
.auth-box { max-width: 380px; padding: 36px 32px; }
.auth-title { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.auth-desc { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.auth-box .form-row { margin-bottom: 14px; }

/* ── Knowledge Base Widget ── */
.kb-widget { background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%); border: 1px solid #dbeafe; border-radius: 14px; padding: 28px 32px; margin-bottom: 40px; box-shadow: var(--shadow-sm); }
.kb-header { margin-bottom: 20px; }
.kb-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.kb-title { font-size: 20px; font-weight: 700; color: var(--navy); margin: 0; }
.kb-tag { background: var(--blue); color: #fff; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; }
.kb-desc { color: var(--muted); font-size: 13px; margin: 0; }
.kb-form { display: flex; gap: 10px; margin-bottom: 14px; }
.kb-input { flex: 1; padding: 13px 18px; border: 1.5px solid #dbeafe; border-radius: 10px; font-size: 15px; font-family: inherit; background: #fff; transition: var(--ease); }
.kb-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.kb-submit { min-width: 92px; }
.kb-submit:disabled { opacity: .6; cursor: wait; }
.kb-suggest { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kb-suggest-label { font-size: 12px; color: var(--muted); }
.kb-chip { font-size: 12px; padding: 5px 12px; background: #fff; border: 1px solid #dbeafe; border-radius: 100px; color: var(--blue); transition: var(--ease); }
.kb-chip:hover { background: var(--blue); color: #fff; text-decoration: none; border-color: var(--blue); }
.kb-result { margin-top: 20px; border-top: 1px solid #dbeafe; padding-top: 20px; }
.kb-answer-block { background: #fff; border-radius: 10px; padding: 18px 22px; box-shadow: var(--shadow-sm); }
.kb-answer-label { font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.kb-answer { font-size: 14.5px; line-height: 1.75; color: var(--text); white-space: pre-wrap; }
.kb-answer.loading { color: var(--muted); font-style: italic; }
.kb-sources { margin-top: 14px; background: #fff; border-radius: 10px; padding: 16px 22px; box-shadow: var(--shadow-sm); }
.kb-sources-label { color: var(--muted); }
.kb-source-item { font-size: 13px; color: var(--text); background: #f8fafc; border-left: 3px solid var(--blue); padding: 10px 14px; border-radius: 4px; margin-bottom: 8px; line-height: 1.6; white-space: pre-wrap; }
.kb-source-item:last-child { margin-bottom: 0; }
.kb-source-item.is-qa { border-left-color: #16a34a; background: #f0fdf4; }
.kb-source-badge { display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: 100px; background: #16a34a; color: #fff; font-weight: 600; margin-right: 6px; vertical-align: middle; }
.kb-feedback { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kb-fb-label { font-size: 13px; color: var(--muted); }
.kb-fb-btn { padding: 6px 14px; border: 1.5px solid var(--border); background: #fff; border-radius: 100px; font-size: 13px; cursor: pointer; transition: var(--ease); font-family: inherit; }
.kb-fb-btn:hover { border-color: var(--blue); color: var(--blue); }
.kb-fb-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.kb-fb-msg { font-size: 13px; color: #16a34a; font-weight: 600; }
.kb-error { background: var(--red-pale); color: var(--red); padding: 12px 16px; border-radius: 8px; font-size: 13px; }
.kb-divider { font-size: 16px; font-weight: 700; color: var(--muted); margin: 10px 0 20px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .about-wrap { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  .nav__links { display: none; flex-direction: column; position: absolute; top: 62px; left: 0; right: 0; background: var(--navy); padding: 12px 16px; gap: 2px; }
  .nav__links.open { display: flex; }
  .nav__hamburger { display: flex; }
  .modal-box { padding: 28px 20px; }
  .timeline { padding-left: 32px; }
  .timeline::before { left: 10px; }
  .t-dot { left: -32px; width: 22px; height: 22px; }
  .articles-grid { grid-template-columns: 1fr; }
  .attachment iframe { height: 400px; }
  .kb-widget { padding: 20px 18px; }
  .kb-form { flex-direction: column; }
  .kb-submit { width: 100%; }
}

/* ════════════════════════════════════════════════════════
   v2 UI: industrial theme additions
   ════════════════════════════════════════════════════════ */

.btn--lg { padding: 14px 36px; font-size: 15px; }

/* Nav logo with icon */
.nav__logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: 0.3px; text-decoration: none; }
.nav__logo:hover { text-decoration: none; color: #fff; }
.nav__logo-icon { font-size: 22px; filter: drop-shadow(0 0 6px rgba(59, 130, 246, .4)); }
.nav__user-name { color: #93c5fd; font-weight: 600; margin-right: 12px; }
.nav__links a + a { margin-left: 4px; }

/* Hero v2: industrial grid bg */
.hero2 {
  position: relative; padding: 140px 0 80px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #1e40af 100%);
  color: #fff; overflow: hidden;
}
.hero2__grid {
  position: absolute; inset: 0; opacity: .12;
  background-image:
    linear-gradient(rgba(147, 197, 253, .4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 197, 253, .4) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}
.hero2__content { position: relative; z-index: 2; text-align: center; }
.hero2__title { font-size: clamp(28px, 4.5vw, 44px); font-weight: 700; letter-spacing: 0.5px; margin-bottom: 14px; }
.hero2__sub { font-size: clamp(14px, 1.8vw, 17px); color: rgba(255,255,255,.82); max-width: 760px; margin: 0 auto 36px; }
.hero2__sub b { color: #93c5fd; font-weight: 600; }
.hero2__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }

/* Stats strip */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  background: rgba(255,255,255,.12); border-radius: 14px; overflow: hidden;
  max-width: 820px; margin: 0 auto;
  backdrop-filter: blur(8px);
}
.stat { padding: 22px 12px; text-align: center; background: rgba(15, 23, 42, .5); }
.stat__v { font-size: clamp(20px, 3vw, 28px); font-weight: 700; color: #fff; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.5px; }
.stat__k { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

@media (max-width: 640px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .hero2 { padding: 110px 0 60px; }
}

/* Section variants */
.section { padding: 72px 0; }
.section--alt { background: var(--white); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-title { font-size: clamp(22px, 3vw, 28px); font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.section-sub { color: var(--muted); font-size: 15px; }

/* KB widget refresh (override earlier block style) */
.kb-widget {
  max-width: 820px; margin: 0 auto;
  background: #fff; border-radius: 14px; padding: 28px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.kb-form { display: flex; gap: 10px; margin-bottom: 14px; }
.kb-input {
  flex: 1; padding: 13px 18px; font-size: 15px; border: 2px solid var(--border);
  border-radius: 10px; outline: none; transition: var(--ease); font-family: inherit;
}
.kb-input:focus { border-color: var(--blue); background: #fff; }
.kb-submit { padding: 13px 28px; font-size: 15px; border-radius: 10px; white-space: nowrap; }
.kb-suggest { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.kb-suggest-label { font-size: 13px; color: var(--muted); }
.kb-chip {
  padding: 5px 14px; background: #f1f5f9; border-radius: 999px; font-size: 13px;
  color: #334155; transition: var(--ease); text-decoration: none; border: 1px solid transparent;
}
.kb-chip:hover { background: var(--blue-pale); color: var(--blue); border-color: #bfdbfe; text-decoration: none; }
.kb-result { margin-top: 24px; padding-top: 22px; border-top: 1px dashed var(--border); }
.kb-answer-block { margin-bottom: 14px; }
.kb-answer-label { font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.kb-answer {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border-left: 3px solid var(--blue); padding: 14px 18px; border-radius: 6px;
  line-height: 1.75; white-space: pre-wrap; font-size: 14.5px;
}
.kb-sources { margin: 16px 0; }
.kb-sources-label { color: #64748b; }
.kb-source {
  background: #f8fafc; padding: 10px 14px; border-radius: 6px; margin-bottom: 6px;
  font-size: 13px; color: #475569; border-left: 2px solid #cbd5e1; line-height: 1.65;
}
.kb-source--qa { border-left-color: #10b981; background: #ecfdf5; }
.kb-feedback { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border); }
.kb-fb-label { font-size: 13px; color: var(--muted); }
.kb-fb-btn {
  padding: 6px 14px; font-size: 13px; background: #fff; border: 1px solid var(--border);
  border-radius: 999px; cursor: pointer; transition: var(--ease);
}
.kb-fb-btn:hover { background: var(--blue-pale); border-color: var(--blue); color: var(--blue); }
.kb-fb-btn--active { background: var(--blue); color: #fff; border-color: var(--blue); }
.kb-fb-msg { font-size: 13px; color: #10b981; }
.kb-disabled { padding: 30px; text-align: center; color: var(--muted); background: #f8fafc; border-radius: 8px; }

/* Question wall */
.wall-list { display: grid; gap: 16px; max-width: 920px; margin: 0 auto; }
.wall-card {
  background: #fff; border-radius: 12px; padding: 22px 24px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: var(--ease);
}
.wall-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.wall-card__q {
  font-size: 16px; font-weight: 600; color: var(--navy); line-height: 1.55;
  display: flex; gap: 10px; align-items: flex-start;
}
.wall-card__q-icon { color: var(--blue); font-weight: 700; flex-shrink: 0; }
.wall-card__meta { font-size: 12px; color: var(--muted); margin: 6px 0 14px 26px; }
.wall-card__a {
  margin-left: 26px; padding: 12px 16px; background: #f8fafc; border-radius: 8px;
  font-size: 14px; line-height: 1.75; color: #334155; white-space: pre-wrap;
  border-left: 3px solid var(--blue);
}
.wall-card__supp {
  margin: 10px 0 0 26px; padding: 12px 16px; background: #fefce8;
  border-left: 3px solid #eab308; border-radius: 8px; font-size: 14px;
  line-height: 1.75; color: #713f12; white-space: pre-wrap;
}
.wall-card__supp-label { font-weight: 600; font-size: 12px; margin-bottom: 4px; color: #854d0e; }
.wall-card__actions {
  margin: 14px 0 0 26px; display: flex; gap: 10px; flex-wrap: wrap;
}
.wall-like-btn {
  padding: 6px 14px; font-size: 13px; background: #f1f5f9;
  border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  transition: var(--ease); color: #475569;
}
.wall-like-btn:hover { background: var(--blue-pale); color: var(--blue); }
.wall-like-btn--liked { background: var(--blue); color: #fff; }
.wall-like-btn--liked:hover { background: var(--blue-h); color: #fff; }

@media (max-width: 768px) {
  .kb-form { flex-direction: column; }
  .kb-submit { width: 100%; }
}

/* Auth modal */
.auth-box { max-width: 440px; }
.auth-tabs { display: flex; gap: 4px; background: #f1f5f9; padding: 4px; border-radius: 8px; margin-bottom: 22px; }
.auth-tab { flex: 1; padding: 8px 0; font-size: 13px; background: transparent; border: none; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 500; transition: var(--ease); }
.auth-tab--active { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.auth-title { font-size: 18px; color: var(--navy); margin-bottom: 18px; font-weight: 700; }
.auth-pane .form-row { margin-bottom: 14px; }
.auth-pane label { display: block; font-size: 13px; color: #475569; margin-bottom: 6px; font-weight: 500; }
.auth-pane input {
  width: 100%; padding: 10px 14px; font-size: 14px; border: 1.5px solid var(--border);
  border-radius: 8px; outline: none; font-family: inherit;
}
.auth-pane input:focus { border-color: var(--blue); }
.code-row-inner { display: flex; gap: 8px; }
.code-row-inner input { flex: 1; }
.code-row-inner .btn { white-space: nowrap; }

/* ════════════════════════════════════════════════════════
   Mobile polish for v2 UI
   ════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Nav: mobile menu shows vertically; user badge also stacks */
  .nav__links { padding: 14px 18px; gap: 6px; }
  .nav__links a { padding: 10px 12px; border-radius: 6px; font-size: 14px; }
  .nav__user-name { display: block; margin: 6px 0; color: #93c5fd; }
  #nav-user { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.12); }
  #nav-user a { color: #fca5a5; }

  /* Modal: full-bleed on small screens */
  .modal-box { padding: 24px 20px; width: 94vw; max-height: 92vh; border-radius: 10px; }
  .auth-box { padding: 22px 18px; }
  .auth-tabs { margin-bottom: 16px; }
  .auth-tab { padding: 9px 0; font-size: 13px; }
  .auth-title { font-size: 16px; margin-bottom: 14px; }
  .auth-pane input { padding: 11px 13px; font-size: 15px; } /* iOS 至少 16px 防自动缩放 */
  .auth-pane .form-row { margin-bottom: 12px; }
  .code-row-inner { flex-direction: row; }
  .code-row-inner input { font-size: 16px; min-width: 0; }
  .code-row-inner .btn { padding: 9px 12px; font-size: 12px; flex-shrink: 0; }

  /* KB widget, wall, donate form inputs: bigger tap area + 16px to prevent zoom */
  .kb-input, .donate-form input { font-size: 16px; padding: 12px 14px; }

  /* Section spacing */
  .section { padding: 48px 0; }
  .container { padding: 0 16px; }
  .section-title { font-size: 20px; }

  /* Hero on tiny screens */
  .hero2 { padding: 90px 0 44px; }
  .hero2__cta { margin-bottom: 30px; }
  .btn--lg { padding: 11px 24px; font-size: 14px; }

  /* Kb card + wall card padding */
  .kb-widget { padding: 18px 16px; border-radius: 10px; }
  .wall-card { padding: 16px 16px; }
  .wall-card__a, .wall-card__supp { margin-left: 0; }
  .wall-card__meta, .wall-card__actions { margin-left: 0; }

  /* Donate grid: already stacks via earlier rule; tighten padding */
  .cost-card, .donate-pay { padding: 16px; }
  .pay-qr { max-width: 200px; }
}

/* Ensure iOS doesn't auto-zoom on input focus (font-size >= 16px) */
@media (max-width: 768px) {
  .f-row input, .f-row textarea, .f-row select,
  .auth-pane input, .donate-form input,
  .kb-input { font-size: 16px !important; }
}

/* ═══════════════ v3: Wall teaser, Ads, Wall page ═══════════════ */

/* Wall teaser card on homepage */
.wall-teaser-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 24px 28px; border-radius: 14px;
  background: #fff; border: 1px solid #e2e8f0;
  text-decoration: none; color: inherit;
  transition: box-shadow .2s, border-color .2s, transform .1s;
}
.wall-teaser-card:hover { box-shadow: 0 6px 22px rgba(15,23,42,0.08); border-color: #cbd5e1; }
.wall-teaser-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; color: #0f172a; }
.wall-teaser-sub   { font-size: 13px; color: var(--muted); margin: 0; }
.wall-teaser-btn   {
  flex-shrink: 0; padding: 10px 18px; border-radius: 8px;
  background: var(--primary, #2563eb); color: #fff;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
@media (max-width: 640px) {
  .wall-teaser-card { flex-direction: column; text-align: center; padding: 20px 16px; }
  .wall-teaser-btn { width: 100%; text-align: center; }
}

/* Ads grid */
.ads-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.ad-card {
  display: block; position: relative;
  border: 1px solid #e2e8f0; border-radius: 14px;
  background: #fff; overflow: hidden; text-decoration: none; color: inherit;
  aspect-ratio: 16 / 9;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s;
}
a.ad-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,0.1); border-color: #cbd5e1; }
.ad-card__imgwrap {
  position: relative; width: 100%; height: 100%; cursor: zoom-in;
  overflow: hidden;
}
.ad-card__img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .25s ease;
}
.ad-card__imgwrap:hover .ad-card__img { transform: scale(1.04); }
.ad-card__zoom {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; pointer-events: none;
  opacity: 0; transition: opacity .2s ease;
}
.ad-card__imgwrap:hover .ad-card__zoom { opacity: 1; }
.ad-card__title {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 14px; font-size: 13px; font-weight: 600;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ad-card__link {
  color: #fff; text-decoration: none; font-size: 12px; font-weight: 500;
  padding: 3px 10px; border: 1px solid rgba(255,255,255,0.6); border-radius: 999px;
  background: rgba(255,255,255,0.08);
  white-space: nowrap;
}
.ad-card__link:hover { background: rgba(255,255,255,0.22); border-color: #fff; }

/* Ad lightbox */
.ad-lightbox { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.ad-lightbox.hidden { display: none; }
.ad-lightbox__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.82); }
.ad-lightbox__box {
  position: relative; max-width: 92vw; max-height: 92vh;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.ad-lightbox__img {
  max-width: 92vw; max-height: 82vh; object-fit: contain;
  border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  background: #fff;
}
.ad-lightbox__caption { color: #f1f5f9; font-size: 14px; max-width: 80vw; text-align: center; }
.ad-lightbox__close {
  position: absolute; top: -44px; right: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.14); color: #fff; border: none;
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ad-lightbox__close:hover { background: rgba(255,255,255,0.28); }
.ad-card--empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; border-style: dashed; background: #f8fafc;
  color: #94a3b8;
}
.ad-empty-icon { font-size: 38px; line-height: 1; font-weight: 300; }
.ad-empty-text { font-size: 13px; }

@media (max-width: 640px) {
  .ads-grid { grid-template-columns: 1fr; gap: 14px; }
  .ad-card { aspect-ratio: 16 / 9; }
}

/* Wall page */
.wall-page-hero { padding: 100px 0 40px; background: linear-gradient(135deg, #f8fafc 0%, #fff 100%); }
.wall-page-title { font-size: 32px; font-weight: 800; margin: 0 0 8px; }
.wall-page-sub   { font-size: 15px; color: var(--muted); margin: 0; max-width: 720px; }

.wall-pager {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 28px;
}
.wall-pager-info { font-size: 14px; color: var(--muted); min-width: 160px; text-align: center; }
.wall-pager .btn:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 640px) {
  .wall-page-title { font-size: 24px; }
  .wall-page-hero { padding: 84px 0 24px; }
  .wall-pager { flex-wrap: wrap; gap: 10px; }
  .wall-pager-info { flex-basis: 100%; order: -1; }
}

/* ═══════════════════════════════════════════════════════
   v4: Visual polish — unified rhythm + mobile refinement
   ═══════════════════════════════════════════════════════ */

/* Nav — active pill, clearer hover, backdrop blur */
.nav { background: rgba(15, 23, 42, .92); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid rgba(255,255,255,.06); }
.nav__links a { position: relative; }
.nav__links a.active { color: #fff; background: rgba(96,165,250,.18); font-weight: 600; }
.nav__links a.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--accent);
}

/* Hero — deeper ambient gradient + smooth divider */
.hero2 {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(96,165,250,.28), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(59,130,246,.20), transparent 60%),
    linear-gradient(180deg, #0b1224 0%, #11203b 55%, #142a52 100%);
}
.hero2::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px; z-index: 1;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.hero2__title { text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.hero2__sub { line-height: 1.75; }

/* Stats strip — glassy, softer grid */
.stats-strip {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  gap: 1px;
}
.stat { background: rgba(15,23,42,.42); transition: background .2s ease; }
.stat:hover { background: rgba(30, 58, 95, .55); }
.stat__v { font-variant-numeric: tabular-nums; }
.stat__k { text-transform: none; letter-spacing: .02em; font-size: 12.5px; color: rgba(226,232,240,.75); }

/* Section rhythm — consistent spacing scale */
.section { padding: 88px 0 80px; }
.section--alt { background: var(--surface); }
.section-head { margin-bottom: 44px; }
.section-title { color: var(--navy); }
.section-sub { max-width: 640px; margin: 8px auto 0; }

/* Unified card surface */
.kb-widget, .wall-teaser-card, .ad-card, .wall-card {
  border-radius: var(--r-card);
  border-color: var(--border);
  background: var(--surface);
}

/* KB widget — lifted, consistent */
.kb-widget { box-shadow: var(--shadow); padding: 32px; }
.kb-input { border-radius: 10px; border-width: 1.5px; }
.kb-submit { border-radius: 10px; }
.kb-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: #334155;
}
.kb-chip:hover { background: var(--blue-pale); color: var(--blue); border-color: #bfdbfe; }
.kb-answer { border-radius: 10px; }

/* Wall teaser — arrow micro-interaction */
.wall-teaser-card {
  padding: 26px 30px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, transform .15s ease, border-color .2s ease;
}
.wall-teaser-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.wall-teaser-title { color: var(--navy); }
.wall-teaser-btn {
  background: var(--primary);
  box-shadow: 0 6px 16px rgba(37,99,235,.28);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.wall-teaser-card:hover .wall-teaser-btn { background: var(--blue-h); transform: translateX(2px); }

/* Ads grid — shared shadow + refined empty state */
.ad-card { box-shadow: var(--shadow-sm); transition: box-shadow .25s ease, transform .15s ease, border-color .2s ease; }
.ad-card:hover { box-shadow: var(--shadow); }
.ad-card--empty {
  border: 1.5px dashed #cbd5e1;
  background:
    repeating-linear-gradient(45deg, #fafbfc, #fafbfc 10px, #f1f5f9 10px, #f1f5f9 20px);
  color: #94a3b8;
}
.ad-empty-icon { font-size: 34px; color: #94a3b8; }
.ad-empty-text { font-size: 12.5px; letter-spacing: .02em; }

/* Footer — slimmer, consistent with nav */
.footer { background: var(--navy); padding: 28px 24px; font-size: 13px; }
.footer-copy { color: rgba(255,255,255,.55); }
.footer #footer-site { color: rgba(255,255,255,.85); font-weight: 600; }
.author-link { color: rgba(147,197,253,.75); margin-left: 6px; }
.author-link:hover { color: #fff; }

/* Buttons — consistent focus ring + hover lift */
.btn { border-radius: 10px; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease; }
.btn--primary { box-shadow: 0 6px 16px rgba(37,99,235,.25); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(37,99,235,.32); }
.btn--ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.btn--ghost:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.45); color: #fff; }
/* On light section, ghost reverts to light-blue */
.section .btn--ghost, .kb-widget .btn--ghost {
  background: var(--blue-pale); color: var(--blue); border-color: var(--blue-pale);
}
.section .btn--ghost:hover, .kb-widget .btn--ghost:hover { background: #dbeafe; border-color: #dbeafe; color: var(--blue); }
.btn:focus-visible { outline: 3px solid rgba(37,99,235,.35); outline-offset: 2px; }

/* Wall page hero — align with main hero tone */
.wall-page-hero {
  padding: 120px 0 44px;
  background:
    radial-gradient(900px 400px at 80% -20%, rgba(96,165,250,.22), transparent 60%),
    linear-gradient(180deg, #0b1224 0%, #142a52 100%);
  color: #fff;
  position: relative; overflow: hidden;
}
.wall-page-hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.wall-page-title { color: #fff; letter-spacing: -.01em; }
.wall-page-sub { color: rgba(226,232,240,.75); }

/* ═════════ Mobile portrait refinement (≤640px) ═════════ */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 18px; }
  .section { padding: 56px 0 52px; }
  .section-head { margin-bottom: 28px; }

  /* Nav mobile menu */
  .nav__inner { height: 56px; }
  .nav__logo-text { font-size: 15px; }
  .nav__logo-icon { font-size: 20px; }
  .nav__links { top: 56px; padding: 10px 14px; gap: 2px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
  .nav__links a { padding: 12px 14px; font-size: 15px; }
  .nav__links a.active::after { display: none; }

  /* Hero mobile */
  .hero2 { padding: 96px 0 52px; }
  .hero2__title { font-size: 26px; line-height: 1.25; }
  .hero2__sub { font-size: 14px; margin-bottom: 24px; padding: 0 4px; }
  .hero2__cta { gap: 10px; margin-bottom: 32px; }
  .hero2__cta .btn { flex: 1 1 140px; min-width: 0; }
  .btn--lg { padding: 13px 22px; font-size: 14px; }

  /* Stats: 2x2 with a touch more breathing room */
  .stats-strip { max-width: 480px; border-radius: 12px; }
  .stat { padding: 18px 10px; }
  .stat__v { font-size: 22px; }
  .stat__k { font-size: 11.5px; }

  /* KB widget */
  .kb-widget { padding: 20px 16px; }
  .kb-form { gap: 10px; }
  .kb-submit { padding: 13px 22px; }
  .kb-suggest { gap: 6px; }
  .kb-chip { padding: 6px 12px; font-size: 12.5px; }

  /* Wall teaser */
  .wall-teaser-card { padding: 22px 18px; gap: 14px; }
  .wall-teaser-title { font-size: 17px; }
  .wall-teaser-sub { font-size: 13px; }
  .wall-teaser-btn { padding: 12px 18px; width: 100%; text-align: center; }

  /* Ads: tighter + always show zoom cue */
  .ads-grid { gap: 12px; }
  .ad-card { aspect-ratio: 4 / 3; }
  .ad-card__zoom { opacity: .85; }
  .ad-card__title { padding: 9px 12px; font-size: 12.5px; }

  /* Wall page */
  .wall-page-hero { padding: 94px 0 30px; }
  .wall-page-title { font-size: 22px; }
  .wall-page-sub { font-size: 13.5px; }
  .wall-card { padding: 16px 14px; border-radius: 12px; }
  .wall-card__q { font-size: 15px; }
  .wall-card__a, .wall-card__supp { font-size: 13.5px; }
  .wall-pager .btn { padding: 10px 18px; font-size: 13px; }

  /* Footer */
  .footer { padding: 22px 16px; font-size: 12.5px; }
}

/* Very narrow screens (≤380px) — iPhone SE etc */
@media (max-width: 380px) {
  .hero2__title { font-size: 23px; }
  .stat__v { font-size: 20px; }
  .hero2__cta .btn { flex: 1 1 100%; }
}
