:root {
  --bg: #f6f7fb;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: #ffffff;
  --text: #16181d;
  --muted: #667085;
  --line: rgba(15, 23, 42, 0.08);
  --accent: #214d89;
  --accent-2: #3f7ad6;
  --danger: #b42318;
  --success: #027a48;
  --shadow: 0 20px 50px rgba(17, 24, 39, 0.10);
  --max: 1200px;
  --content-max: 760px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(63,122,214,0.12), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(33,77,137,0.10), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #f5f7fb 100%);
  color: var(--text);
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button,input,select,textarea { font: inherit; }
.container { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; }
.glass {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: var(--shadow);
}
.site-header {
  position: sticky; top: 0; z-index: 50; padding: 1rem 0;
  background: linear-gradient(to bottom, rgba(246,247,251,0.92), rgba(246,247,251,0.58), transparent);
  backdrop-filter: blur(8px);
}
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem 1.1rem; border-radius: 999px;
}
.brand { display:flex; align-items:center; gap:.8rem; font-weight:800; letter-spacing:-.03em; font-size:1.05rem; }
.brand-mark {
  width:42px; height:42px; border-radius:14px; background:linear-gradient(135deg,var(--accent),var(--accent-2));
  display:grid; place-items:center; color:#fff; font-weight:800; box-shadow:0 10px 22px rgba(33,77,137,.28);
}
.nav-links,.nav-actions { display:flex; align-items:center; gap:1rem; }
.nav-links { color:var(--muted); font-size:.95rem; }
.nav-links a:hover,.nav-links a:focus { color:var(--text); }
.btn,.btn-outline,.btn-danger {
  display:inline-flex; align-items:center; justify-content:center; border-radius:999px; padding:.82rem 1.15rem;
  font-weight:700; font-size:.95rem; transition:transform .2s ease, box-shadow .2s ease; cursor:pointer; border:0;
}
.btn { background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:#fff; box-shadow:0 14px 28px rgba(33,77,137,.24); }
.btn-outline { background:rgba(255,255,255,.7); border:1px solid var(--line); color:var(--text); }
.btn-danger { background:rgba(180,35,24,.08); color:var(--danger); border:1px solid rgba(180,35,24,.18); }
.btn:hover,.btn-outline:hover,.btn-danger:hover { transform:translateY(-1px); }
.flash { margin-top: 1rem; padding: .9rem 1rem; border-radius: 18px; font-weight: 600; }
.flash.success { background: rgba(2,122,72,.08); border: 1px solid rgba(2,122,72,.18); color: var(--success); }
.flash.error { background: rgba(180,35,24,.08); border: 1px solid rgba(180,35,24,.18); color: var(--danger); }
.hero { padding: 2.4rem 0 1.2rem; }
.hero-grid { display:grid; grid-template-columns:1.2fr .8fr; gap:1.25rem; align-items:stretch; }
.hero-main,.hero-side,.panel,.list-panel,.newsletter,.post-shell,.side-card,.auth-card,.editor-card { border-radius: 28px; }
.hero-main {
  min-height:560px; position:relative; overflow:hidden; display:flex; align-items:flex-end; padding:2rem; color:#fff;
  background:linear-gradient(180deg, rgba(9,14,24,.1) 0%, rgba(9,14,24,.72) 78%), linear-gradient(135deg, #3b4d6b 0%, #0f172a 100%);
}
.hero-main.has-image { background-size: cover; background-position: center; }
.hero-copy { max-width:720px; }
.eyebrow,.tag {
  display:inline-flex; align-items:center; gap:.5rem; font-size:.82rem; text-transform:uppercase; letter-spacing:.12em;
  padding:.45rem .7rem; border-radius:999px; font-weight:800;
}
.eyebrow { background: rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.18); margin-bottom:1rem; }
.tag { color:var(--accent); background:rgba(33,77,137,.08); border:1px solid rgba(33,77,137,.10); }
h1 { font-size: clamp(2.2rem, 5vw, 4.8rem); line-height:.96; letter-spacing:-.05em; margin-bottom:1rem; }
.hero-copy p { font-size:1.05rem; color:rgba(255,255,255,.88); max-width:58ch; margin-bottom:1.25rem; }
.hero-meta,.meta-row,.post-meta { display:flex; flex-wrap:wrap; gap:.75rem 1rem; color:var(--muted); font-size:.93rem; }
.hero-meta { color: rgba(255,255,255,.82); }
.hero-side { padding:1rem; display:grid; gap:1rem; }
.mini-card,.story-item,.response-item,.related-item,.meta-item { background: rgba(255,255,255,.72); border:1px solid var(--line); }
.mini-card { border-radius:24px; overflow:hidden; display:grid; grid-template-columns:120px 1fr; min-height:160px; }
.mini-card img { height:100%; width:100%; object-fit:cover; }
.mini-card-content,.card-body { padding:1rem; }
.featured-grid,.story-list-grid,.field-grid,.editor-grid,.post-layout,.split { display:grid; gap:1rem; }
.featured-grid { grid-template-columns: repeat(3, 1fr); }
.card { background: rgba(255,255,255,.75); border:1px solid var(--line); border-radius:26px; overflow:hidden; box-shadow:var(--shadow); }
.card-image { aspect-ratio: 16 / 10; overflow:hidden; background:linear-gradient(135deg,#dbeafe,#eff6ff); }
.card-image img { width:100%; height:100%; object-fit:cover; }
.card h3,.mini-card h3,.story-item h3,.section-head h2,.panel h2,.post-title,.side-card h3,.auth-card h2 { letter-spacing: -.04em; }
.card h3 { font-size:1.18rem; line-height:1.22; margin:.45rem 0 .6rem; }
.card p,.story-item p,.newsletter p,.section-head p,.side-card p,.auth-card p,.panel-intro,.hint,.response-note,.caption,.muted { color: var(--muted); }
.section-block { padding: 1.2rem 0 2rem; }
.section-head { display:flex; align-items:end; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.list-panel,.newsletter,.post-shell,.side-card,.auth-card,.editor-card { padding: 1.2rem; }
.split { grid-template-columns: 1.2fr .8fr; align-items:start; }
.story-item { display:grid; grid-template-columns:88px 1fr; gap:1rem; padding:.8rem; border-radius:22px; }
.story-item img { width:88px; height:88px; object-fit:cover; border-radius:16px; }
.newsletter { position: sticky; top: 100px; background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(242,246,255,.9)); }
.categories,.article-footer,.toolbar,.action-row,.hero-actions,.inline-tools,.checkbox-row { display:flex; flex-wrap:wrap; gap:.75rem; }
.pill,.tool-chip {
  padding:.7rem .95rem; border-radius:999px; background:rgba(255,255,255,.72); border:1px solid var(--line);
  color:var(--muted); font-size:.92rem; font-weight:700;
}
.post-hero { padding: 2.2rem 0 1.2rem; }
.post-hero-card {
  border-radius: 32px; overflow:hidden; min-height:560px; display:flex; align-items:flex-end; color:#fff; padding:2rem;
  background:linear-gradient(180deg, rgba(10,16,26,.12) 0%, rgba(10,16,26,.78) 82%), linear-gradient(135deg,#334155,#0f172a);
}
.post-hero-card.has-image { background-size: cover; background-position: center; }
.post-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items:start; }
.post-shell { padding:1.5rem; }
.article { max-width: var(--content-max); margin:0 auto; }
.article p,.article li { font-size:1.04rem; color:#27303f; }
.article p,.article ul,.article ol { margin-bottom:1.2rem; }
.article h2 { font-size:1.8rem; margin:2rem 0 .8rem; line-height:1.15; }
.article h3 { font-size:1.3rem; margin:1.5rem 0 .7rem; line-height:1.2; }
.article blockquote { margin:1.5rem 0; padding:1.2rem 1.25rem; border-left:4px solid var(--accent); background:rgba(255,255,255,.62); border-radius:18px; color:#22304a; font-size:1.06rem; }
.article img { border-radius: 22px; margin: 1.25rem 0; }
.inline-image { margin:1.6rem 0; border-radius:24px; overflow:hidden; border:1px solid var(--line); background:#fff; box-shadow:var(--shadow); }
.caption { padding:.9rem 1rem 1rem; font-size:.92rem; background:rgba(255,255,255,.92); }
.sidebar { display:grid; gap:1rem; position:sticky; top:100px; }
.response-block,.selected-responses { margin-top:2rem; padding:1.5rem; border-radius:28px; background:rgba(255,255,255,.78); border:1px solid var(--line); }
.response-form,.form-grid,.stack,.auth-form { display:grid; gap:1rem; }
input,select,textarea {
  width:100%; border:1px solid var(--line); background:rgba(255,255,255,.94); border-radius:18px; padding:.95rem 1rem; color:var(--text); outline:none;
}
textarea { min-height: 150px; resize: vertical; }
input:focus,select:focus,textarea:focus { border-color: rgba(33,77,137,.28); box-shadow: 0 0 0 4px rgba(63,122,214,.08); }
.field { display:grid; gap:.45rem; }
.field.full { grid-column: 1 / -1; }
.checkbox-card { padding:.9rem 1rem; border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.72); }
.checkbox-row input { width:auto; }
.inline-help { font-size: .88rem; color: var(--muted); }
.auth-wrap { min-height: calc(100vh - 180px); display:grid; place-items:center; padding: 2rem 0 3rem; }
.auth-card { width:min(100%, 520px); }
.auth-card h2 { font-size: 2rem; margin-bottom: .6rem; }
.empty-state { padding: 1.4rem; border-radius: 22px; background: rgba(255,255,255,.72); border:1px solid var(--line); color:var(--muted); }
.site-footer { padding:1rem 0 3rem; }
.footer-wrap { border-radius:28px; padding:1.2rem; display:flex; flex-wrap:wrap; justify-content:space-between; gap:1rem; color:var(--muted); }
.footer-brand { color: var(--text); font-weight: 800; }
@media (max-width: 1100px) {
  .hero-grid,.featured-grid,.split,.post-layout,.editor-grid { grid-template-columns: 1fr; }
  .sidebar,.newsletter { position: static; }
}
@media (max-width: 760px) {
  .site-header { padding: .75rem 0; }
  .nav { border-radius: 24px; flex-wrap: wrap; }
  .nav-links,.nav-actions { width:100%; justify-content:space-between; }
  .hero-main,.post-hero-card { min-height: 420px; padding: 1.25rem; }
  .mini-card,.story-item,.field-grid { grid-template-columns:1fr; }
  .mini-card img,.story-item img { width:100%; height:180px; }
  .post-shell,.response-block,.selected-responses { padding: 1.15rem; }
  h1 { font-size: clamp(2rem, 8vw, 3rem); }
}
