/* ClarioStack Projects — same palette and type as clariostack.com */
:root {
  --navy: #0f1f4a;
  --navy-2: #1e3a8a;
  --navy-3: #172554;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --primary-softer: #eff6ff;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --cyan-500: #06b6d4;
  --amber: #f59e0b;
  --green: #059669;
  --violet: #7c3aed;
  --text: #0f172a;
  --text-2: #334155;
  --text-3: #475569;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --border: #e2e8f0;
  --border-2: #cbd5e1;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-softer: #f1f5f9;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 48px rgba(15, 31, 74, .16);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --container: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; color: var(--text); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, kbd { font-family: var(--mono); font-size: .85em; }
mark { background: #fef3c7; color: inherit; padding: 0 2px; border-radius: 3px; font-weight: 600; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--cyan); color: var(--navy); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.icon { width: 1em; height: 1em; flex-shrink: 0; }

/* ------------------------------------------------------------------ buttons, chips, badges */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: .95rem; line-height: 1.2; transition: all .2s; white-space: nowrap; }
.btn .icon { width: 18px; height: 18px; }
.btn-sm { padding: 8px 14px; font-size: .85rem; border-radius: 8px; }
.btn-sm .icon { width: 15px; height: 15px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(37, 99, 235, .3); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-accent { background: var(--cyan); color: var(--navy); box-shadow: 0 4px 18px rgba(34, 211, 238, .35); }
.btn-accent:hover { background: #67e8f9; color: var(--navy); transform: translateY(-1px); }
.btn-outline { border-color: var(--border-2); color: var(--text-2); background: #fff; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline-light { border-color: rgba(255, 255, 255, .25); color: #fff; background: rgba(255, 255, 255, .06); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.btn-ghost { color: var(--primary); background: var(--primary-softer); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row-center { justify-content: center; margin-top: 24px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; }
.link-arrow .icon { width: 16px; height: 16px; transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(3px); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 500; background: var(--bg-softer); color: var(--text-3); border: 1px solid var(--border); transition: all .15s; }
a.chip:hover { background: var(--primary-softer); border-color: var(--primary-soft); color: var(--primary); }
.chip.is-match { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.chip-more { color: var(--muted); }
.chip-dark { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #dbeafe; }
a.chip-dark:hover { background: rgba(34, 211, 238, .15); border-color: rgba(34, 211, 238, .4); color: #fff; }
.chip-removable { background: var(--primary-softer); color: var(--primary-dark); border-color: var(--primary-soft); }
.chip-removable .icon { width: 13px; height: 13px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .02em; }
.badge .icon { width: 12px; height: 12px; }
.badge-soft { background: var(--primary-softer); color: var(--primary-dark); }
.badge-accent { background: rgba(34, 211, 238, .15); color: var(--cyan); border: 1px solid rgba(34, 211, 238, .3); }

/* ------------------------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy); box-shadow: 0 2px 12px rgba(15, 31, 74, .25); }
.topbar { background: var(--navy-2); border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: .75rem; color: #bfdbfe; }
.topbar-inner { display: flex; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; }
.topbar-group { display: flex; gap: 24px; align-items: center; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 6px; color: #bfdbfe; }
.topbar a:hover { color: #fff; }
.topbar .icon { width: 14px; height: 14px; }
.navbar-inner { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand-name { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.brand-clario { color: #fff; }
.brand-stack { color: var(--cyan); }
.brand-badge { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan); border: 1px solid rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .08); padding: 2px 8px; border-radius: 999px; }
.nav-search { position: relative; flex: 1; max-width: 380px; display: flex; align-items: center; }
.nav-search > .icon { position: absolute; left: 12px; width: 16px; height: 16px; color: #93c5fd; pointer-events: none; }
.nav-search input { width: 100%; padding: 9px 40px 9px 36px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-size: .9rem; transition: all .2s; }
.nav-search input::placeholder { color: #93c5fd; }
.nav-search input:focus { outline: none; background: rgba(255, 255, 255, .14); border-color: var(--cyan); }
.nav-search kbd { position: absolute; right: 10px; font-size: .7rem; color: #93c5fd; border: 1px solid rgba(255, 255, 255, .2); border-radius: 4px; padding: 1px 6px; }
.nav-search .suggest { top: calc(100% + 6px); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a:not(.btn) { display: block; padding: 8px 12px; border-radius: 6px; color: #dbeafe; font-size: .9rem; font-weight: 500; transition: all .2s; }
.nav-links a:not(.btn):hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; background: transparent; border: 0; color: #fff; padding: 6px; }
.nav-toggle .icon { width: 26px; height: 26px; }
body.page-search .nav-search { visibility: hidden; }

/* ------------------------------------------------------------------ hero */
.hero, .page-hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-3) 55%, #0b1a3f 100%); color: #fff; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); pointer-events: none; }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.hero-glow-1 { width: 480px; height: 480px; background: rgba(37, 99, 235, .45); top: -160px; left: -120px; }
.hero-glow-2 { width: 420px; height: 420px; background: rgba(34, 211, 238, .22); bottom: -200px; right: -80px; }
.hero-inner { position: relative; text-align: center; padding-top: 88px; padding-bottom: 72px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .3); color: var(--cyan); font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 22px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(34, 211, 238, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); } }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; max-width: 860px; margin: 0 auto 18px; }
.gradient-text { background: linear-gradient(90deg, var(--cyan), #60a5fa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { color: #bfdbfe; font-size: 1.1rem; max-width: 680px; margin: 0 auto 34px; }
.hero-scopes, .hero-popular { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; font-size: .85rem; color: #93c5fd; }
.hero-popular > span { display: inline-flex; align-items: center; gap: 6px; }
.scope-pill { padding: 5px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .15); color: #dbeafe; font-weight: 500; transition: all .15s; }
.scope-pill:hover { color: #fff; border-color: rgba(255, 255, 255, .35); }
.scope-pill.is-active { background: var(--cyan); border-color: var(--cyan); color: var(--navy); }
.hero-stats { display: flex; justify-content: center; gap: 56px; margin: 48px 0 0; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dd { margin: 0; font-size: 2rem; font-weight: 800; color: #fff; }
.hero-stats dt { font-size: .8rem; color: #93c5fd; text-transform: uppercase; letter-spacing: .06em; }
.hero-error .error-code { display: block; font-size: 6rem; font-weight: 800; line-height: 1; margin-bottom: 8px; background: linear-gradient(90deg, var(--cyan), #60a5fa); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------------ search box */
.searchbox { position: relative; display: flex; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 999px; box-shadow: 0 1px 6px rgba(32, 33, 36, .12); transition: box-shadow .2s, border-color .2s; text-align: left; }
.searchbox:hover, .searchbox:focus-within { box-shadow: 0 2px 12px rgba(32, 33, 36, .22); border-color: transparent; }
.searchbox.is-open { border-radius: 26px 26px 0 0; }
.searchbox-hero { max-width: 760px; margin: 0 auto; }
.searchbox-hero:hover, .searchbox-hero:focus-within { box-shadow: 0 8px 40px rgba(34, 211, 238, .25), 0 2px 12px rgba(0, 0, 0, .2); }
.searchbox-icon { display: flex; padding-left: 20px; color: var(--muted-2); }
.searchbox-icon .icon { width: 20px; height: 20px; }
.searchbox-input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 17px 12px; font: inherit; font-size: 1.05rem; color: var(--text); }
.searchbox-input:focus { outline: none; }
.searchbox-input::-webkit-search-cancel-button { display: none; }
.searchbox-clear, .searchbox-tips-btn { display: flex; background: none; border: 0; color: var(--muted); padding: 8px; border-radius: 50%; }
.searchbox-clear:hover, .searchbox-tips-btn:hover { color: var(--text); background: var(--bg-softer); }
.searchbox-clear .icon, .searchbox-tips-btn .icon { width: 20px; height: 20px; }
.searchbox-divider { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.searchbox-submit { display: flex; align-items: center; gap: 8px; margin: 6px 6px 6px 4px; padding: 11px 22px; border: 0; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 600; transition: background .2s; }
.searchbox-submit:hover { background: var(--primary-dark); }
.searchbox-submit .icon { width: 18px; height: 18px; }
.searchbox-page .searchbox-input { padding: 13px 12px; font-size: 1rem; }
.searchbox-page .searchbox-submit { padding: 9px 18px; }

.suggest { position: absolute; left: -1px; right: -1px; top: 100%; z-index: 40; background: #fff; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 26px 26px; box-shadow: 0 12px 24px rgba(32, 33, 36, .2); padding: 6px 0 14px; overflow: hidden; }
.suggest::before { content: ""; display: block; height: 1px; background: var(--border); margin: 0 20px 6px; }
.nav-search .suggest { border-radius: 12px; border-top: 1px solid var(--border); left: 0; right: 0; }
.nav-search .suggest::before { display: none; }
.suggest li { display: flex; align-items: center; gap: 14px; padding: 8px 22px; cursor: pointer; color: var(--text); font-size: .95rem; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--bg-softer); }
.suggest li .icon { width: 18px; height: 18px; color: var(--muted-2); }
.suggest li b { font-weight: 700; }
.suggest .s-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .s-meta { font-size: .75rem; color: var(--muted); }
.suggest .s-kind { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); background: var(--primary-softer); padding: 2px 8px; border-radius: 999px; }
.suggest .s-head { cursor: default; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 4px; padding-bottom: 4px; }
.suggest .s-head:hover { background: none; }
.suggest .s-remove { background: none; border: 0; color: var(--muted-2); padding: 2px; display: flex; }
.suggest .s-remove:hover { color: var(--text); }

.tips { position: absolute; right: 0; top: calc(100% + 10px); z-index: 45; width: min(460px, calc(100vw - 32px)); background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 18px 20px; font-size: .85rem; text-align: left; }
.tips-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tips-close { background: none; border: 0; color: var(--muted); display: flex; padding: 4px; }
.tips table { width: 100%; border-collapse: collapse; }
.tips td { padding: 5px 0; border-bottom: 1px solid var(--bg-softer); vertical-align: top; color: var(--text-3); }
.tips td:first-child { width: 48%; padding-right: 10px; }
.tips code { background: var(--bg-softer); padding: 2px 6px; border-radius: 5px; color: var(--primary-dark); }
.tips code[data-example] { cursor: pointer; }
.tips code[data-example]:hover { background: var(--primary-soft); }
.tips p { margin: 12px 0 0; color: var(--muted); }
.tips kbd { border: 1px solid var(--border-2); border-radius: 4px; padding: 0 5px; }

/* ------------------------------------------------------------------ sections & cards */
.section { padding: 72px 0; }
.section-tight { padding: 40px 0 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; font-weight: 800; }
.section-kicker { display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); margin-bottom: 6px; }

.category-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text-2); font-size: .88rem; font-weight: 500; transition: all .15s; }
.pill span { font-size: .75rem; color: var(--muted); background: var(--bg-softer); padding: 0 7px; border-radius: 999px; }
.pill:hover { border-color: var(--primary); color: var(--primary); }
.pill.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill.is-active span { background: rgba(255, 255, 255, .15); color: var(--cyan); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.grid-item.is-hidden { display: none; }
.card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-soft); }
.card-cover { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy); }
.card-cover .cover-img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s; }
.card:hover .cover-img { transform: scale(1.04); }
.card-cover .badge { position: absolute; top: 12px; }
.badge-cat { left: 12px; background: rgba(15, 31, 74, .85); color: #fff; backdrop-filter: blur(6px); }
.badge-featured { right: 12px; background: var(--amber); color: #fff; }
.card-body { padding: 18px 20px 12px; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.card-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.card-meta .icon { width: 14px; height: 14px; }
.card-meta-light { color: #bfdbfe; margin-bottom: 14px; }
.card-title { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary); }
.card-text { font-size: .9rem; color: var(--text-3); margin-bottom: 14px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px 18px; border-top: 1px solid var(--bg-softer); }

.cover-brand { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; overflow: hidden; }
.cover-v0 { background: radial-gradient(circle at 20% 20%, #2563eb, var(--navy) 65%); }
.cover-v1 { background: radial-gradient(circle at 80% 30%, #0891b2, var(--navy) 65%); }
.cover-v2 { background: radial-gradient(circle at 30% 80%, #7c3aed, var(--navy) 65%); }
.cover-v3 { background: radial-gradient(circle at 70% 70%, #1d4ed8, #0b1a3f 65%); }
.cover-brand::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 28px 28px; }
.cover-initials { position: relative; font-size: 3rem; font-weight: 800; letter-spacing: -0.04em; }
.cover-cat { position: relative; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--cyan); }
.cover-mark { position: absolute; right: -18px; bottom: -18px; width: 110px; height: 110px; opacity: .14; }

.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; background: #fff; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.feature-cover { display: block; min-height: 320px; background: var(--navy); }
.feature-cover .cover-img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.feature-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.feature-body h3 { font-size: 1.7rem; font-weight: 800; }
.feature-body h3 a { color: var(--text); }
.feature-body p { color: var(--text-3); }
.tech-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tech-list a { display: inline-block; font-family: var(--mono); font-size: .78rem; padding: 4px 10px; border-radius: 6px; background: var(--navy); color: var(--cyan); }
.tech-list a:hover { background: var(--navy-2); color: #fff; }

.cta { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; background: linear-gradient(120deg, var(--navy), var(--navy-2)); color: #fff; border-radius: 24px; padding: 48px; position: relative; overflow: hidden; }
.cta h2 { color: #fff; font-size: 1.9rem; font-weight: 800; }
.cta p { color: #bfdbfe; margin: 0; }
.empty { color: var(--muted); text-align: center; padding: 48px 0; }

/* ------------------------------------------------------------------ search page */
.search-head { background: #fff; border-bottom: 1px solid var(--border); padding: 24px 0 0; position: sticky; top: 0; z-index: 30; }
.search-head .searchbox { max-width: 760px; }
.scope-tabs { display: flex; gap: 4px; margin-top: 16px; overflow-x: auto; scrollbar-width: none; }
.scope-tab input { position: absolute; opacity: 0; pointer-events: none; }
.scope-tab span { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px 12px; font-size: .9rem; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; transition: color .15s; }
.scope-tab span .icon { width: 16px; height: 16px; }
.scope-tab em { font-style: normal; font-size: .72rem; background: var(--bg-softer); color: var(--muted); padding: 0 7px; border-radius: 999px; }
.scope-tab span:hover { color: var(--text); }
.scope-tab input:checked + span { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.scope-tab input:checked + span em { background: var(--primary-soft); color: var(--primary-dark); }
.scope-tab input:focus-visible + span { outline: 2px solid var(--cyan); }

.search-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 28px 0 72px; }
.search-layout.is-loading .results { opacity: .5; transition: opacity .2s; }
.filters-toggle { display: none; }
.facet { border: 0; padding: 0; margin: 0 0 26px; }
.facet legend { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin-bottom: 10px; padding: 0; }
.facet li { position: relative; }
.facet input { position: absolute; opacity: 0; }
.facet label { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px 5px 30px; border-radius: 8px; font-size: .88rem; color: var(--text-2); cursor: pointer; position: relative; }
.facet label::before { content: ""; position: absolute; left: 6px; width: 16px; height: 16px; border: 1.5px solid var(--border-2); border-radius: 4px; background: #fff; transition: all .15s; }
.facet label:hover { background: var(--bg-softer); }
.facet input:checked + label { color: var(--primary-dark); font-weight: 600; }
.facet input:checked + label::before { background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; border-color: var(--primary); }
.facet input:focus-visible + label { outline: 2px solid var(--cyan); }
.facet label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet label em { font-style: normal; font-size: .75rem; color: var(--muted); }
.facet-collapsible:not(.is-expanded) .facet-extra { display: none; }
.facet-more { background: none; border: 0; color: var(--primary); font-size: .82rem; font-weight: 600; padding: 6px 8px; }

.results-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.results-stats { margin: 0; font-size: .88rem; color: var(--muted); }
.results-stats strong { color: var(--text); }
.results-controls { display: flex; gap: 10px; align-items: center; }
.select select { appearance: none; padding: 8px 34px 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat; font: inherit; font-size: .85rem; color: var(--text-2); cursor: pointer; }
.view-toggle { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.view-toggle label { display: flex; padding: 8px 10px; cursor: pointer; color: var(--muted); }
.view-toggle input { position: absolute; opacity: 0; }
.view-toggle label:has(input:checked) { background: var(--navy); color: var(--cyan); }
.view-toggle .icon { width: 16px; height: 16px; }
.spell { font-size: 1.05rem; color: #c5221f; margin: 6px 0 14px; }
.spell a { color: var(--primary-dark); }
.spell small { font-size: .85rem; color: var(--muted); }
.notice { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; padding: 10px 14px; border-radius: 10px; }
.notice .icon { margin-top: 3px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.clear-all { font-size: .82rem; font-weight: 600; }

.result-list { display: flex; flex-direction: column; }
.result { display: grid; grid-template-columns: 1fr 200px; gap: 28px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.result:first-child { padding-top: 6px; }
.result-crumb { display: inline-flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--text-3); margin-bottom: 4px; }
.result-crumb img { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); padding: 3px; }
.result-crumb strong { color: var(--text); font-weight: 500; }
.result-title { font-size: 1.3rem; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }
.result-title a { color: var(--primary-dark); }
.result-title a:hover { text-decoration: underline; }
.result-title mark { background: transparent; color: inherit; font-weight: 800; padding: 0; }
.result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.result-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.result-meta .icon { width: 13px; height: 13px; }
.result-snippet { font-size: .92rem; color: var(--text-3); margin-bottom: 10px; }
.result-snippet mark { background: transparent; color: var(--text); font-weight: 700; padding: 0; }
.result-actions { display: flex; gap: 20px; margin-top: 12px; }
.result-thumb { display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--navy); align-self: start; margin-top: 30px; }
.result-thumb .cover-img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.result-thumb .cover-initials { font-size: 2rem; }
.result-thumb .cover-cat, .result-thumb .cover-mark { display: none; }
.grid-results { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

.no-results { padding: 24px 0; color: var(--text-3); }
.no-results-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-softer); color: var(--muted-2); margin-bottom: 18px; }
.no-results-icon .icon { width: 28px; height: 28px; }
.no-results h2 { font-size: 1.15rem; font-weight: 500; color: var(--text); }
.no-results ul { list-style: disc; padding-left: 22px; margin-bottom: 20px; }
.no-results li { margin: 4px 0; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 36px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; gap: 6px; min-width: 40px; justify-content: center; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); font-size: .9rem; color: var(--text-2); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination span[aria-current] { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pagination .icon { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ project page */
.page-hero { padding: 36px 0 56px; }
.page-hero .container { position: relative; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: #93c5fd; margin-bottom: 28px; }
.breadcrumb a { color: #bfdbfe; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb [aria-current] { color: #fff; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; max-width: 820px; }
.page-hero .hero-lead { margin: 0 0 28px; text-align: left; }

.preview { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.preview-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bg-softer); border-bottom: 1px solid var(--border); }
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #f87171; }
.dots i:nth-child(2) { background: #fbbf24; }
.dots i:nth-child(3) { background: #34d399; }
.preview-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 5px 12px; font-family: var(--mono); font-size: .78rem; color: var(--text-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.preview-url .icon { width: 13px; height: 13px; color: var(--green); }
.preview-devices { display: flex; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.preview-devices button, .preview-btn { display: flex; background: none; border: 0; padding: 6px 8px; border-radius: 6px; color: var(--muted); }
.preview-devices button.is-active { background: var(--navy); color: var(--cyan); }
.preview-btn:hover, .preview-devices button:not(.is-active):hover { color: var(--text); background: #fff; }
.preview-devices .icon, .preview-btn .icon { width: 16px; height: 16px; }
.preview-stage { background: repeating-linear-gradient(45deg, var(--bg-soft), var(--bg-soft) 10px, var(--bg-softer) 10px, var(--bg-softer) 20px); display: flex; justify-content: center; }
.preview-frame { width: 100%; height: 640px; transition: width .35s ease; background: #fff; }
.preview-frame[data-device="tablet"] { width: 820px; max-width: 100%; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.preview-frame[data-device="mobile"] { width: 390px; max-width: 100%; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.preview-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 48px; }
.detail-main h2 { font-size: 1.5rem; font-weight: 800; margin-top: 8px; }
.detail-main h2 + p { margin-top: 0; }
.detail-main p { color: var(--text-3); font-size: 1.02rem; }
.detail-main h2:not(:first-child) { margin-top: 36px; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); font-size: .92rem; color: var(--text-2); }
.checklist .icon { width: 20px; height: 20px; color: #fff; background: var(--primary); border-radius: 50%; padding: 4px; margin-top: 1px; }
.detail-side { display: flex; flex-direction: column; gap: 18px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; background: #fff; }
.panel h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.panel .tech-list { margin: 0; }
.info { margin: 0; }
.info div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--bg-softer); font-size: .9rem; }
.info div:last-child { border-bottom: 0; }
.info dt { color: var(--muted); }
.info dd { margin: 0; font-weight: 600; text-align: right; }
.status { font-size: .78rem; padding: 2px 10px; border-radius: 999px; background: var(--bg-softer); color: var(--muted); }
.status-live { background: #d1fae5; color: #047857; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--navy); color: #bfdbfe; padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 48px; }
.footer-brand p { font-size: .9rem; margin: 16px 0 20px; max-width: 320px; }
.site-footer h3 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.site-footer li { margin-bottom: 10px; font-size: .9rem; }
.site-footer a { color: #bfdbfe; }
.site-footer a:hover { color: var(--cyan); }
.social { display: flex; gap: 8px; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: rgba(255, 255, 255, .1); color: #fff; transition: background .2s; }
.social a:hover { background: var(--primary); color: #fff; }
.social .icon { width: 17px; height: 17px; }
.footer-contact li { display: flex; gap: 10px; align-items: center; }
.footer-contact .icon { width: 16px; height: 16px; color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 20px; padding-bottom: 24px; font-size: .82rem; color: #93c5fd; }
.footer-bottom p { margin: 0; display: flex; gap: 18px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .nav-links a:not(.btn) { padding: 8px 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .topbar { display: none; }
  .nav-toggle { display: flex; }
  .nav-search { order: 3; flex-basis: 100%; max-width: none; }
  body.page-search .nav-search { display: none; }
  .navbar-inner { flex-wrap: wrap; gap: 12px; }
  .nav-links { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; order: 4; padding: 8px 0; }
  .nav-links.is-open { display: flex; }
  .nav-cta { margin: 8px 0 0; }
  .nav-cta .btn { width: 100%; }
  .feature { grid-template-columns: 1fr; }
  .feature-cover { min-height: 220px; aspect-ratio: 16 / 10; }
  .search-layout { grid-template-columns: 1fr; gap: 16px; }
  .filters-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-2); font-size: .88rem; font-weight: 500; }
  .filters-toggle .icon { width: 15px; height: 15px; }
  .filters-toggle .count { background: var(--primary); color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 7px; }
  .filters-body { display: none; padding-top: 18px; }
  .filters.is-open .filters-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 24px; }
  .detail-layout { grid-template-columns: 1fr; }
  .search-head { position: static; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero-inner { padding-top: 56px; padding-bottom: 48px; }
  .hero-stats { gap: 28px; }
  .hero-stats dd { font-size: 1.5rem; }
  .searchbox-submit span, .searchbox-divider { display: none; }
  .searchbox-submit { padding: 10px 12px; }
  .searchbox-icon { padding-left: 14px; }
  .searchbox-input { padding: 14px 8px; font-size: 1rem; }
  .result { grid-template-columns: 1fr; gap: 0; }
  .result-thumb { display: none; }
  .section { padding: 48px 0; }
  .cta { padding: 32px 24px; }
  .feature-body { padding: 24px; }
  .preview-frame { height: 520px; }
  .preview-devices { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* grid children may shrink below their content width (prevents horizontal scroll on phones) */
.search-layout > *, .detail-layout > *, .feature > *, .result > * { min-width: 0; }
body { overflow-x: hidden; }
