:root {
  --night: #171420;
  --night-soft: #221d31;
  --sand: #f7f2e8;
  --paper: #fbf7f0;
  --paper-strong: #f4ece0;
  --mist: #f1ebe1;
  --gold-soft: #d7bf91;
  --gold-strong: #8c6a2f;
  --ink-strong: #191724;
  --ink-soft: #5f5a6b;
  --ink-muted: #867f91;
  --border-strong: rgba(25, 23, 36, 0.08);
  --border-soft: rgba(25, 23, 36, 0.05);
  --shadow-soft: 0 14px 44px rgba(22, 18, 32, 0.05);
  --shadow-panel: 0 24px 90px rgba(24, 19, 34, 0.07);
  --bg:
    radial-gradient(circle at top left, rgba(131, 114, 91, 0.08), transparent 24%),
    radial-gradient(circle at bottom right, rgba(44, 35, 68, 0.06), transparent 20%),
    linear-gradient(180deg, #fcfaf7 0%, #f6f0e8 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink-strong);
  font-family: "Avenir Next", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 34px;
  backdrop-filter: blur(20px);
  background: rgba(251, 247, 240, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.brand {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
  max-width: 220px;
  line-height: 1.02;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a,
.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  transition: 180ms ease;
}

.nav a {
  background: rgba(25, 23, 36, 0.04);
  color: var(--ink-soft);
}

.nav a.active,
.button {
  background: var(--night);
  color: var(--sand);
  box-shadow: 0 10px 24px rgba(23, 20, 32, 0.16);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--border-strong);
  color: var(--ink-strong);
}

.nav a:hover,
.button:hover,
.button-secondary:hover {
  transform: translateY(-1px);
}

.panel,
.card,
.hero,
.post,
.metric,
.minimal-card {
  background: rgba(251, 247, 240, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-panel);
}

.hero,
.panel {
  border-radius: 30px;
  padding: 28px;
}

.card,
.post,
.metric,
.minimal-card {
  border-radius: 22px;
  padding: 20px;
}

.minimal-card {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--border-soft);
  box-shadow: none;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(140, 106, 47, 0.08);
  border: 1px solid rgba(140, 106, 47, 0.14);
  color: var(--gold-strong);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 64px;
  line-height: 1.04;
  letter-spacing: 0;
  max-width: 980px;
  text-wrap: balance;
}

h2 {
  font-size: 32px;
  line-height: 1.16;
  letter-spacing: 0;
  text-wrap: balance;
}

h3 {
  font-size: 22px;
  line-height: 1.22;
  letter-spacing: 0;
  text-wrap: balance;
}

p,
li {
  color: var(--ink-soft);
  line-height: 1.9;
  font-size: 15px;
}

.muted {
  color: var(--ink-soft);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 24px;
}

.stack,
.research-list,
.toc,
.article-meta,
.luxury-stack {
  display: grid;
  gap: 14px;
}

.pill {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(25, 23, 36, 0.05);
  color: var(--ink-soft);
  font-size: 12px;
}

.metric-value {
  font-size: 44px;
  line-height: 1;
  font-weight: 800;
  color: var(--ink-strong);
}

.metric-label,
.micro-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-strong);
  font-weight: 700;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--gold-strong);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-strong);
  outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(140, 106, 47, 0.28);
  box-shadow: 0 0 0 4px rgba(140, 106, 47, 0.07);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.section {
  display: grid;
  gap: 20px;
}

.article-body {
  display: grid;
  gap: 12px;
}

.article-body ul {
  margin: 0;
  padding-left: 22px;
}

.quote {
  border-left: 4px solid rgba(140, 106, 47, 0.36);
  padding: 14px 16px;
  background: rgba(140, 106, 47, 0.06);
  border-radius: 0 18px 18px 0;
  color: var(--ink-strong);
}

.job-badge {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--night);
  color: var(--sand);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
}

.score-grid,
.intelligence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.intelligence-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.score-box {
  padding: 14px;
  border-radius: 18px;
  background: rgba(25, 23, 36, 0.04);
  border: 1px solid var(--border-soft);
}

.score-box strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: var(--ink-strong);
}

.research-list div {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--border-strong);
}

.research-list strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ink-strong);
}

.toc a {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(37, 31, 60, 0.06);
  color: var(--ink-soft);
}

.soft-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(25, 23, 36, 0.12), transparent);
}

.hero-note {
  max-width: 58ch;
  font-size: 17px;
  line-height: 1.8;
}

.page-title {
  max-width: 920px;
}

.article-hero-title {
  max-width: 1080px;
  font-size: 58px;
  line-height: 1.06;
  margin-bottom: 22px;
}

.blog-title {
  max-width: 900px;
  font-size: 54px;
  line-height: 1.08;
}

.admin-title {
  max-width: 960px;
  font-size: 52px;
  line-height: 1.08;
}

.panel-title {
  max-width: 760px;
}

.card-title {
  max-width: 100%;
  font-size: 22px;
  line-height: 1.22;
  margin-bottom: 10px;
}

.article-card-title {
  min-height: 82px;
  max-width: 100%;
}

.article-intro {
  max-width: 940px;
}

.card h3,
.automation-list strong,
.performance-row strong,
.source-head strong,
.perf-head strong {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.footer-note {
  padding: 22px 0 6px;
  color: var(--ink-muted);
  font-size: 13px;
}

.post h3 {
  line-height: 1.08;
  max-width: 100%;
}

.post p {
  max-width: 100%;
}

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ecosystem-card {
  border-radius: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--border-strong);
}

.ecosystem-card p {
  margin-bottom: 0;
}

.admin-hero {
  background:
    radial-gradient(circle at top right, rgba(140, 106, 47, 0.08), transparent 32%),
    rgba(251, 247, 240, 0.92);
}

.cta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-dna {
  display: grid;
  gap: 12px;
}

.brand-dna div {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--border-soft);
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.analytics-panel {
  display: grid;
  gap: 16px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--border-soft);
}

.kpi-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
  color: var(--ink-strong);
}

.source-list,
.performance-list {
  display: grid;
  gap: 12px;
}

.source-row,
.performance-row {
  display: grid;
  gap: 8px;
}

.source-head,
.perf-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(25, 23, 36, 0.06);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-soft), var(--night));
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: top;
  color: var(--ink-soft);
  font-size: 14px;
}

.admin-table th {
  color: var(--ink-strong);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(25, 23, 36, 0.05);
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 700;
}

.automation-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.automation-card {
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--border-soft);
}

.automation-stack {
  display: grid;
  gap: 14px;
}

.automation-list {
  display: grid;
  gap: 10px;
}

.automation-list div {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(25, 23, 36, 0.04);
  border: 1px solid var(--border-soft);
}

.timeline {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.timeline-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--border-soft);
}

.timeline-item strong,
.timeline-item span {
  display: block;
}

.timeline-item strong {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-strong);
}

.timeline-item span {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-muted);
}

.timeline-item p {
  margin: 8px 0 0;
}

.toggle-area {
  display: grid;
  gap: 14px;
}

.toggle-box {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid var(--border-soft);
}

.admin-shell .header {
  background: rgba(245, 239, 228, 0.88);
}

@media (max-width: 980px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .hero-layout,
  .score-grid,
  .intelligence-grid,
  .ecosystem-grid,
  .analytics-grid,
  .kpi-grid,
  .automation-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    padding: 16px 16px 36px;
  }

  .header {
    padding: 14px 16px;
    margin-bottom: 20px;
  }

  .brand {
    font-size: 24px;
  }

  h1 {
    font-size: 48px;
    line-height: 1.06;
    letter-spacing: 0;
    max-width: 100%;
  }

  h2 {
    font-size: 28px;
  }

  .article-hero-title,
  .blog-title,
  .admin-title {
    font-size: 44px;
    line-height: 1.08;
  }

  .article-card-title {
    min-height: auto;
  }

  .hero,
  .panel {
    padding: 22px;
    border-radius: 26px;
  }

  .card,
  .post,
  .metric,
  .minimal-card {
    padding: 18px;
  }

  .hero-note,
  p,
  li {
    font-size: 16px;
    line-height: 1.8;
  }

  .post h3 {
    font-size: 24px;
    max-width: none;
  }

  .post p {
    max-width: none;
  }

  .row {
    gap: 10px;
  }

  .nav {
    gap: 8px;
  }

  .nav a,
  .button,
  .button-secondary {
    padding: 10px 15px;
    font-size: 12px;
  }

  .ecosystem-card,
  .automation-card,
  .kpi-card {
    border-radius: 20px;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 12px 12px 28px;
  }

  .header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
    border-radius: 20px;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    flex: 1 1 auto;
    min-width: 0;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  .card,
  .post,
  .metric,
  .minimal-card {
    padding: 16px;
    border-radius: 18px;
  }

  .eyebrow {
    margin-bottom: 12px;
    font-size: 9px;
    letter-spacing: 0.16em;
  }

  h1 {
    font-size: 36px;
    line-height: 1.12;
    max-width: 100%;
    margin-bottom: 14px;
  }

  h2 {
    font-size: 24px;
    line-height: 1.1;
  }

  h3 {
    font-size: 20px;
  }

  .article-hero-title,
  .blog-title,
  .admin-title {
    font-size: 34px;
    line-height: 1.12;
  }

  .hero-note,
  p,
  li {
    font-size: 15px;
    line-height: 1.72;
  }

  .button,
  .button-secondary {
    width: 100%;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
  }

  .pill {
    width: fit-content;
    max-width: 100%;
  }

  .article-body {
    gap: 10px;
  }

  .research-list div,
  .toc a {
    padding: 12px;
    border-radius: 14px;
  }
}
