/* ===========================================================
   Automation News — brand theme (navy + bright blue + gold)
   =========================================================== */

:root {
  --bg: #eaf0f6;
  --surface: #ffffff;
  --surface-2: #dde7f1;
  --text: #0a2540;
  --text-soft: #55677b;
  --border: #d5e0ea;
  --accent: #0d8ce6;
  --accent-2: #1c74c4;
  --accent-soft: #e2effb;
  --accent-ink: #0a4d86;
  --gold: #b8923f;
  --gold-bright: #c8a24c;
  --gold-soft: #f4ecd6;
  --navy: #0a2540;
  --navy-2: #0e3a6b;
  --shadow: 0 1px 2px rgba(10, 37, 64, .06), 0 10px 28px rgba(10, 37, 64, .08);
  --shadow-lg: 0 16px 46px rgba(10, 37, 64, .18);
  --radius: 16px;
  --maxw: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root[data-theme="dark"] {
  --bg: #061a30;
  --surface: #0c2643;
  --surface-2: #103055;
  --text: #e9f1f9;
  --text-soft: #93a6ba;
  --border: #1a3c60;
  --accent: #2ba4f5;
  --accent-2: #4aa3e8;
  --accent-soft: #103963;
  --accent-ink: #a9d4f7;
  --gold: #d0ac56;
  --gold-bright: #e0bf6d;
  --gold-soft: #26241a;
  --navy: #061a30;
  --navy-2: #0d3260;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .38);
  --shadow-lg: 0 18px 52px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  transition: background .3s var(--ease), color .3s var(--ease);
}
h1, h2, h3 { font-family: "Space Grotesk", "Inter", sans-serif; line-height: 1.15; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bi { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Brand logo + wordmark ---------- */
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo { display: inline-flex; width: 38px; height: 38px; flex: none; }
.brand-logo svg { width: 100%; height: 100%; }
.lg-disc { fill: var(--navy); }
.lg-ring { fill: none; stroke: var(--gold-bright); stroke-width: 1.5; }
.lg-gray { stroke: #cfd6dd; stroke-width: 3; }
.lg-blue { stroke: #189cf0; stroke-width: 3; }
:root[data-theme="dark"] .lg-disc { fill: #061426; }
.wordmark { display: flex; align-items: baseline; gap: 5px; font-family: "Space Grotesk", sans-serif; letter-spacing: .02em; line-height: 1; }
.wordmark b { color: var(--accent); font-weight: 700; font-size: 1.02rem; }
.wordmark span { color: var(--text); font-weight: 600; font-size: 1.02rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--border); transition: box-shadow .3s var(--ease); }
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { color: var(--text-soft); font-weight: 500; font-size: .95rem; position: relative; transition: color .2s; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--gold-bright); transition: width .25s var(--ease); }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.header-actions { display: flex; gap: 6px; margin-left: 8px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; cursor: pointer; transition: all .2s var(--ease); }
.icon-btn:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
.nav-toggle { display: none; }

/* ---------- News ticker ---------- */
.ticker { display: flex; align-items: stretch; background: var(--navy); color: #eaf1f9; overflow: hidden; border-bottom: 2px solid var(--gold-bright); }
.ticker-label { display: flex; align-items: center; gap: 4px; flex: none; padding: 9px 16px; background: linear-gradient(120deg, var(--accent-2), var(--accent)); font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #fff; white-space: nowrap; z-index: 2; }
.ticker-label i { color: var(--gold-bright); font-style: normal; }
.ticker-viewport { position: relative; overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-track { display: inline-flex; gap: 42px; white-space: nowrap; padding-left: 42px; animation: ticker 40s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { font-size: .84rem; color: #d5e2f0; display: inline-flex; align-items: center; gap: 12px; }
.ticker-item:hover { color: #fff; }
.ticker-item::before { content: "▸"; color: var(--gold-bright); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Brand banner ---------- */
.banner { position: relative; overflow: hidden; color: #eaf1f9; border-bottom: 1px solid var(--border); }
.banner-bg { position: absolute; inset: 0; z-index: 0; background: radial-gradient(circle at 18% 26%, rgba(24,156,240,.35), transparent 42%), radial-gradient(circle at 82% 74%, rgba(24,156,240,.22), transparent 46%), linear-gradient(125deg, #071c33 0%, #0a2a4f 45%, #0e3f74 100%); }
.banner-bg::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(150,200,255,.16) 1px, transparent 1.4px); background-size: 24px 24px; opacity: .55; -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); }
.banner-bg::after { content: ""; position: absolute; right: -60px; top: 50%; transform: translateY(-50%); width: 340px; height: 340px; border-radius: 50%; border: 1px solid rgba(120,180,255,.18); box-shadow: 0 0 0 40px rgba(120,180,255,.06); }
.banner-inner { position: relative; z-index: 1; text-align: center; padding: 56px 20px 60px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.brand-logo-lg { width: 74px; height: 74px; margin-bottom: 6px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.4)); }
.wordmark-lg { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: clamp(2.1rem, 6.5vw, 4.2rem); letter-spacing: .04em; color: var(--accent); line-height: .98; }
.wordmark-lg span { color: #fff; }
.tagline { margin: 6px 0 0; font-size: clamp(.95rem, 2.2vw, 1.2rem); color: #b9cbe0; letter-spacing: .02em; position: relative; padding-top: 14px; }
.tagline::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 64px; height: 2px; background: var(--gold-bright); }

/* ---------- Sections ---------- */
.section { padding: 46px 0; }
.section-alt { background: var(--surface-2); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-title { font-size: clamp(1.4rem, 2.5vw, 1.95rem); letter-spacing: -.02em; position: relative; padding-bottom: 12px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px; border-radius: 2px; background: var(--gold-bright); }
.section-sub { color: var(--text-soft); margin: 0 0 12px; font-size: .96rem; }
.link-more { color: var(--accent); font-weight: 600; font-size: .92rem; }
.link-more:hover { text-decoration: underline; }

/* ---------- Hero (featured) ---------- */
.hero { padding: 34px 20px 8px; }
.hero-card { display: grid; grid-template-columns: 1.1fr .9fr; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-media { position: relative; min-height: 340px; overflow: hidden; background: var(--surface-2); }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media .tag-featured { position: absolute; top: 18px; left: 18px; z-index: 2; }
.hero-content { padding: 34px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.hero-content h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -.01em; }
.hero-content .excerpt { color: var(--text-soft); font-size: 1.05rem; }
.card-meta { display: flex; align-items: center; gap: 9px; color: var(--text-soft); font-size: .84rem; flex-wrap: wrap; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

/* ---------- Topic pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 36px; }
.pillar { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 16px; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.pillar-ico { width: 46px; height: 46px; display: grid; place-items: center; color: var(--accent); }
.pillar-ico svg { width: 40px; height: 40px; }
.pillar h3 { font-size: 1.02rem; }
.pillar p { color: var(--text-soft); font-size: .82rem; margin: 0; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); padding: 8px 15px; border-radius: 999px; font-size: .9rem; font-weight: 500; cursor: pointer; transition: all .18s var(--ease); font-family: inherit; }
.filter-chip svg { width: 16px; height: 16px; }
.filter-chip:hover { color: var(--text); border-color: var(--accent); }
.filter-chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-chip.active svg { color: var(--gold-bright); }

/* ---------- News grid + cards ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; animation: fadeUp .45s var(--ease) both; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card-link { display: flex; flex-direction: column; flex: 1; }
.card-media { height: 168px; position: relative; overflow: hidden; border-bottom: 3px solid var(--gold-bright); background: var(--surface-2); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.media-badge { position: absolute; top: 12px; left: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; background: rgba(6, 20, 38, .72); color: #fff; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; backdrop-filter: blur(4px); }
.media-badge svg { width: 13px; height: 13px; }
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 1.12rem; letter-spacing: -.01em; }
.card .excerpt { color: var(--text-soft); font-size: .92rem; flex: 1; }
.watermark { color: rgba(255,255,255,.92); }
.watermark .bi { stroke-width: 1.4; }

/* Bookmark button on cards / articles */
.bookmark { position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px; border-radius: 9px; border: none; background: rgba(6,20,38,.5); color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .2s, transform .2s; }
.bookmark:hover { background: rgba(6,20,38,.75); transform: scale(1.06); }
.bookmark svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.bookmark.saved { background: var(--gold-bright); }
.bookmark.saved svg { fill: #2a1e00; stroke: #2a1e00; }

/* Tags */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 5px 10px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-ink); width: fit-content; }
.tag svg { width: 13px; height: 13px; }
.tag-featured { background: var(--gold-bright); color: #2a1e00; box-shadow: 0 2px 10px rgba(0,0,0,.25); }

.empty-state { text-align: center; color: var(--text-soft); padding: 48px 0; font-size: 1.02rem; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 30px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-weight: 600; font-size: .95rem; padding: 12px 22px; border-radius: 11px; cursor: pointer; border: 1px solid transparent; transition: all .2s var(--ease); }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-gold { background: var(--gold-bright); color: #2a1e00; white-space: nowrap; }
.btn-gold:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--accent); }

/* ---------- Pull quote ---------- */
.pull-quote { position: relative; margin: 0; padding: 34px 30px 30px 64px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--gold-bright); border-radius: var(--radius); box-shadow: var(--shadow); }
.pull-quote::before { content: "\201C"; position: absolute; left: 20px; top: 6px; font-family: "Space Grotesk", serif; font-size: 4.6rem; line-height: 1; color: var(--gold-bright); opacity: .85; }
.pull-quote p { font-family: "Space Grotesk", sans-serif; font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--text); margin: 0 0 10px; letter-spacing: -.01em; }
.pull-quote cite { color: var(--text-soft); font-style: normal; font-size: .9rem; font-weight: 500; }

/* ---------- Topic page header ---------- */
.topic-hero { position: relative; overflow: hidden; color: #eaf1f9; }
.topic-hero .banner-bg { z-index: 0; }
.topic-hero-inner { position: relative; z-index: 1; padding: 46px 20px; display: flex; align-items: center; gap: 22px; }
.topic-hero .t-ico { width: 78px; height: 78px; flex: none; display: grid; place-items: center; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; }
.topic-hero .t-ico svg { width: 46px; height: 46px; }
.topic-hero h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); letter-spacing: -.02em; }
.topic-hero p { color: #b9cbe0; margin: 6px 0 0; }
.breadcrumb { font-size: .85rem; color: var(--text-soft); padding: 16px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .5; }

/* ---------- Article page ---------- */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold-bright)); z-index: 80; transition: width .1s linear; }
.article-wrap { max-width: 760px; margin: 0 auto; padding: 8px 20px 20px; }
.article-head { padding-top: 8px; }
.article-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -.02em; margin: 12px 0 14px; }
.article-media { position: relative; height: 340px; border-radius: var(--radius); margin: 8px 0 26px; border-bottom: 4px solid var(--gold-bright); overflow: hidden; background: var(--surface-2); }
.article-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article-meta { display: flex; align-items: center; gap: 10px; color: var(--text-soft); font-size: .9rem; flex-wrap: wrap; margin-bottom: 6px; }
.article-body { font-size: 1.09rem; }
.article-body p { margin: 0 0 20px; }
.article-body p.lead { font-size: 1.2rem; color: var(--text); font-weight: 500; }
.source-box { margin: 26px 0 8px; padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; font-size: .92rem; color: var(--text-soft); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.source-box a { color: var(--accent); font-weight: 600; }
.source-box a:hover { text-decoration: underline; }

/* Share + bookmark row */
.article-actions { display: flex; align-items: center; gap: 10px; margin: 22px 0 8px; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: .88rem; font-weight: 500; cursor: pointer; font-family: inherit; transition: all .2s var(--ease); }
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-btn.is-saved { background: var(--gold-soft); border-color: var(--gold-bright); color: var(--gold); }

/* Related */
.related { border-top: 1px solid var(--border); margin-top: 30px; padding-top: 8px; }

/* ---------- Fairs ---------- */
.fairs-list { display: grid; gap: 14px; }
.fair-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.fair-row:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.fair-date { text-align: center; border-right: 1px solid var(--border); padding-right: 18px; }
.fair-date .day { font-family: "Space Grotesk", sans-serif; font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--accent); }
.fair-date .mon { text-transform: uppercase; font-size: .74rem; letter-spacing: .08em; color: var(--gold); font-weight: 600; }
.fair-date .yr { font-size: .72rem; color: var(--text-soft); }
.fair-info h3 { font-size: 1.1rem; }
.fair-info p { color: var(--text-soft); font-size: .88rem; margin: 4px 0 0; }
.fair-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.fair-loc { color: var(--text-soft); font-size: .9rem; white-space: nowrap; }
.fair-link { color: var(--accent); font-size: .85rem; font-weight: 600; }
.fair-link:hover { text-decoration: underline; }

/* ---------- Newsletter ---------- */
.newsletter-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; position: relative; overflow: hidden; background: linear-gradient(125deg, #071c33, #0a2a4f 55%, #0e3f74); border-radius: 22px; padding: 44px; color: #fff; border: 1px solid var(--border); }
.newsletter-inner::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(150,200,255,.14) 1px, transparent 1.4px); background-size: 24px 24px; opacity: .5; }
.newsletter-copy { position: relative; z-index: 1; }
.newsletter-copy h2 { color: #fff; }
.newsletter-copy h2::after { background: var(--gold-bright); }
.newsletter-copy p { margin: 16px 0 0; opacity: .9; }
.newsletter-form { position: relative; z-index: 1; }
.newsletter-form .form-row { display: flex; gap: 10px; }
.newsletter-form input { flex: 1; padding: 14px 16px; border-radius: 11px; border: 1px solid rgba(255,255,255,.32); background: rgba(255,255,255,.12); color: #fff; font-size: 1rem; font-family: inherit; outline: none; }
.newsletter-form input::placeholder { color: rgba(255,255,255,.72); }
.newsletter-form input:focus { border-color: var(--gold-bright); background: rgba(255,255,255,.2); }
.form-msg { margin: 12px 0 0; font-size: .9rem; min-height: 1.1em; font-weight: 500; }
.form-msg.error { color: #ffd4d4; }
.form-msg.success { color: #d9f7c6; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 20px; background: var(--surface); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft); margin: 0 0 12px; }
.footer-col a { display: block; color: var(--text); font-size: .92rem; padding: 4px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-tag { color: var(--text-soft); font-size: .92rem; margin: 12px 0 0; max-width: 30ch; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 18px; text-align: center; color: var(--text-soft); font-size: .84rem; }

/* ---------- Search overlay ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 120; display: grid; place-items: start center; padding: 12vh 20px 20px; }
.search-overlay .ov-backdrop { position: absolute; inset: 0; background: rgba(6,20,38,.62); backdrop-filter: blur(3px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.search-panel { position: relative; z-index: 1; width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .25s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.search-input-row { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.search-input-row svg { width: 20px; height: 20px; fill: none; stroke: var(--text-soft); stroke-width: 2; stroke-linecap: round; flex: none; }
.search-input-row input { flex: 1; border: none; background: none; color: var(--text); font-size: 1.1rem; outline: none; font-family: inherit; }
.search-results { max-height: 56vh; overflow-y: auto; }
.search-result { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); transition: background .15s; }
.search-result:hover, .search-result:focus { background: var(--surface-2); }
.sr-ico { width: 38px; height: 38px; border-radius: 9px; flex: none; display: grid; place-items: center; }
.sr-ico .watermark { width: 22px; height: 22px; }
.sr-thumb { width: 46px; height: 46px; border-radius: 9px; flex: none; overflow: hidden; }
.sr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sr-body b { font-size: .96rem; font-weight: 600; display: block; }
.sr-body span { font-size: .8rem; color: var(--text-soft); }
.search-empty { padding: 26px 18px; color: var(--text-soft); text-align: center; }
.search-hint { padding: 10px 18px; font-size: .78rem; color: var(--text-soft); background: var(--surface-2); }

/* ---------- Back to top ---------- */
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: var(--navy); color: #fff; font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow); transition: all .2s var(--ease); opacity: 0; transform: translateY(10px); }
.to-top.show { opacity: 1; transform: none; }
.to-top:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) { .pillars { grid-template-columns: repeat(2, 1fr); } .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .main-nav { position: fixed; inset: 66px 0 auto 0; flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 20px 16px; transform: translateY(-120%); transition: transform .28s var(--ease); box-shadow: var(--shadow); }
  .main-nav.open { transform: none; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
  .main-nav a::after { display: none; }
  .nav-toggle { display: grid; }
  .header-actions { margin-left: auto; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-media { min-height: 200px; }
  .topic-hero-inner { flex-direction: column; text-align: center; }
  .newsletter-inner { grid-template-columns: 1fr; padding: 32px 24px; }
  .fair-row { grid-template-columns: 72px 1fr; }
  .fair-cta { grid-column: 2; align-items: flex-start; text-align: left; }
}
@media (max-width: 520px) { .newsletter-form .form-row { flex-direction: column; } .footer-inner { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto; } .ticker-track { animation: none; } }
