* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #060607;
  --bg-elev: #0c0d10;
  --text: #f4f4f2;
  --text-muted: #b6b6b2;
  --text-faint: #7b7b75;
  --accent: #e7e0cf;
  --border: rgba(255, 255, 255, 0.08);
  --glow: rgba(255, 255, 255, 0.06);
  --font-family: "Garamond", "Didot", "Bodoni MT", "Times New Roman", serif;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background: radial-gradient(circle at top, #0e0f12 0%, var(--bg) 55%, #040405 100%);
  color: var(--text);
  min-height: 100vh;
  letter-spacing: 0.2px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #fff;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  padding: 48px 0 12px;
}

.wordmark {
  font-size: 1.6rem;
  letter-spacing: 0.6rem;
  text-transform: uppercase;
  color: var(--text);
}

.wordmark-subtitle {
  display: block;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.35rem;
}

.content {
  flex: 1;
  padding: 72px 0 96px;
}

.hero {
  padding: 32px 0;
  display: grid;
  gap: 24px;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.6rem;
  color: var(--text-faint);
  font-size: 0.85rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 3.6vw, 4.4rem);
  line-height: 1.1;
  font-weight: 500;
  margin: 0;
}

.hero .lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.6;
}

.hero-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  width: min(360px, 80%);
}

.subtle {
  font-size: 0.95rem;
  color: var(--text-faint);
  letter-spacing: 0.2rem;
  text-transform: uppercase;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.job-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.job-body {
  margin-top: 32px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.job-body h1, .job-body h2, .job-body h3 {
  font-weight: 500;
  margin-top: 1.8rem;
  color: var(--text);
}

.job-body p {
  margin: 1rem 0;
  color: var(--text-muted);
}

.job-body a {
  color: var(--accent);
}

.admin-grid {
  display: grid;
  gap: 20px;
}

.admin-form {
  display: grid;
  gap: 16px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  font-family: inherit;
}

.admin-form select {
  appearance: none;
  background-color: rgba(255, 255, 255, 0.05);
}

.admin-form option {
  color: #0b0b0b;
}

.admin-form textarea {
  min-height: 180px;
}

.markdown-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.markdown-preview {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  min-height: 180px;
}

.markdown-preview p {
  color: var(--text-muted);
  line-height: 1.7;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3 {
  margin-top: 1.6rem;
}

.admin-form button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--accent);
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.admin-form button:hover {
  background: var(--accent);
  color: #0b0b0b;
}

.admin-list {
  display: grid;
  gap: 14px;
}

.admin-item {
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.admin-item-expanded {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.admin-item-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.chart-mini {
  min-height: 60px;
  padding-top: 8px;
}

.admin-item span {
  color: var(--text-muted);
}

.admin-item .subtle {
  display: block;
  margin-top: 4px;
}

.admin-item form button {
  border-color: var(--text-faint);
}

.admin-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-link {
  font-size: 0.8rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: var(--text-faint);
}

.admin-link:hover {
  color: var(--text);
}

.chart {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 10px;
  align-items: end;
  padding-top: 18px;
  min-height: 220px;
}

.chart-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15rem;
}

.chart-fill {
  width: 100%;
  min-height: 6px;
  background: linear-gradient(180deg, rgba(231, 224, 207, 0.7), rgba(231, 224, 207, 0.15));
  border-radius: 10px 10px 6px 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 36px;
  color: var(--text-faint);
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.site-footer a,
.site-footer a:link,
.site-footer a:visited {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover,
.site-footer a:active {
  color: var(--accent);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .markdown-split {
    grid-template-columns: 1fr;
  }
}

.style-nocturne {
  --bg: #060607;
  --bg-elev: #0c0d10;
  --text: #f4f4f2;
  --text-muted: #b6b6b2;
  --text-faint: #7b7b75;
  --accent: #e7e0cf;
  --font-family: "Garamond", "Didot", "Bodoni MT", "Times New Roman", serif;
}

.style-obsidian-silk {
  --bg: #050607;
  --bg-elev: #101216;
  --text: #f0f0ee;
  --text-muted: #bcb8b2;
  --text-faint: #8b8680;
  --accent: #d7c9b2;
  --font-family: "Bodoni MT", "Didot", "Garamond", serif;
}

.style-imperial-ink {
  --bg: #07090d;
  --bg-elev: #0f121b;
  --text: #f5f3ee;
  --text-muted: #c1b7ac;
  --text-faint: #857a6e;
  --accent: #d1b38d;
  --font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

.style-velvet-ash {
  --bg: #0b0b0d;
  --bg-elev: #15161a;
  --text: #f4f2f0;
  --text-muted: #bdb6b0;
  --text-faint: #7e7772;
  --accent: #cdbfb6;
  --font-family: "Constantia", "Georgia", "Times New Roman", serif;
}

.style-midnight-atelier {
  --bg: #0a0c12;
  --bg-elev: #131621;
  --text: #f1f4f8;
  --text-muted: #b3bcc9;
  --text-faint: #7a8190;
  --accent: #aeb7d6;
  --font-family: "Optima", "Segoe UI", "Helvetica Neue", sans-serif;
}

.style-ivory-eclipse {
  --bg: #0b0b0a;
  --bg-elev: #171411;
  --text: #f6f3ec;
  --text-muted: #c8bfb2;
  --text-faint: #8a8176;
  --accent: #e0cfb2;
  --font-family: "Didot", "Bodoni MT", "Garamond", serif;
}

.style-onyx-gilt {
  --bg: #070707;
  --bg-elev: #12110f;
  --text: #f5f1ea;
  --text-muted: #c0b4a3;
  --text-faint: #8a7d6d;
  --accent: #d2b48c;
  --font-family: "Goudy Old Style", "Garamond", "Times New Roman", serif;
}

.style-aria-noir {
  --bg: #05070a;
  --bg-elev: #0e1117;
  --text: #eef1f6;
  --text-muted: #aeb6c4;
  --text-faint: #778192;
  --accent: #c8d4f0;
  --font-family: "Cambria", "Georgia", "Times New Roman", serif;
}

.style-cathedral-blue {
  --bg: #070a12;
  --bg-elev: #101725;
  --text: #eef2f8;
  --text-muted: #b3bdd0;
  --text-faint: #7b879c;
  --accent: #b3c7e6;
  --font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

.style-silent-platinum {
  --bg: #08090c;
  --bg-elev: #121418;
  --text: #f3f5f7;
  --text-muted: #bfc5cf;
  --text-faint: #868c96;
  --accent: #d5dbe3;
  --font-family: "Helvetica Neue", "Avenir", "Segoe UI", sans-serif;
}

.style-ember-dusk {
  --bg: #0c0807;
  --bg-elev: #1a1210;
  --text: #f5f0ec;
  --text-muted: #c9b8ac;
  --text-faint: #8c756a;
  --accent: #e8a87c;
  --font-family: "Baskerville", "Georgia", "Times New Roman", serif;
}

.style-slate-harbor {
  --bg: #0a0c0e;
  --bg-elev: #14181c;
  --text: #e8ecf0;
  --text-muted: #a8b4c0;
  --text-faint: #6d7a88;
  --accent: #8fa8c4;
  --font-family: "Futura", "Century Gothic", "Avenir", sans-serif;
}

.style-champagne-noir {
  --bg: #08080a;
  --bg-elev: #131214;
  --text: #f8f5f0;
  --text-muted: #d4c8b8;
  --text-faint: #9a8e7e;
  --accent: #e8d4b0;
  --font-family: "Playfair Display", "Didot", "Georgia", serif;
}

.style-graphite-rose {
  --bg: #0a090b;
  --bg-elev: #161418;
  --text: #f4f0f2;
  --text-muted: #c4b8bc;
  --text-faint: #887c82;
  --accent: #d4a8b4;
  --font-family: "Cormorant Garamond", "Garamond", "Georgia", serif;
}

.style-prussian-depths {
  --bg: #060810;
  --bg-elev: #0e1220;
  --text: #e8ecf4;
  --text-muted: #a4b0c8;
  --text-faint: #6878a0;
  --accent: #7090c8;
  --font-family: "Libre Baskerville", "Baskerville", "Georgia", serif;
}

.style-antique-sepia {
  --bg: #0a0908;
  --bg-elev: #15130f;
  --text: #f4efe8;
  --text-muted: #c8bca8;
  --text-faint: #8c8070;
  --accent: #c4a878;
  --font-family: "Crimson Text", "Garamond", "Times New Roman", serif;
}

.style-verdant-shadow {
  --bg: #070a08;
  --bg-elev: #101610;
  --text: #ecf2ec;
  --text-muted: #a8c0a8;
  --text-faint: #6e8a6e;
  --accent: #88b888;
  --font-family: "Lora", "Georgia", "Times New Roman", serif;
}

.style-copper-twilight {
  --bg: #0a0808;
  --bg-elev: #161210;
  --text: #f4f0ec;
  --text-muted: #c8b4a4;
  --text-faint: #907c6c;
  --accent: #c08c64;
  --font-family: "Source Serif Pro", "Palatino", "Georgia", serif;
}

.style-frosted-ebony {
  --bg: #080a0c;
  --bg-elev: #121618;
  --text: #f0f4f8;
  --text-muted: #b8c4d0;
  --text-faint: #7888a0;
  --accent: #a8c0e0;
  --font-family: "Inter", "SF Pro Display", "Segoe UI", sans-serif;
}

.style-burgundy-smoke {
  --bg: #0c0808;
  --bg-elev: #181212;
  --text: #f4f0f0;
  --text-muted: #c8b4b4;
  --text-faint: #907878;
  --accent: #b07878;
  --font-family: "EB Garamond", "Garamond", "Georgia", serif;
}

/* Job action buttons */
.job-actions {
  display: flex;
  gap: 12px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.05em;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--accent);
}

.action-btn svg {
  opacity: 0.7;
}

.action-btn:hover svg {
  opacity: 1;
}

/* Print-only elements (hidden on screen) */
.print-only {
  display: none;
}

/* Print / PDF styles */
@media print {
  :root {
    --bg: #ffffff;
    --bg-elev: #ffffff;
    --text: #1a1a1a;
    --text-muted: #4a4a4a;
    --text-faint: #6a6a6a;
    --accent: #2c2c2c;
    --border: #e0e0e0;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html {
    font-size: 11pt;
  }

  body {
    background: #fff !important;
    color: #1a1a1a !important;
    font-family: "Georgia", "Times New Roman", serif !important;
  }

  .page {
    min-height: auto;
  }

  .site-header {
    padding: 24px 0 12px;
    border-bottom: 1px solid #e0e0e0;
  }

  .wordmark {
    color: #1a1a1a !important;
    font-size: 1.4rem;
  }

  .wordmark-subtitle {
    color: #6a6a6a !important;
    font-size: 0.75rem;
  }

  .content {
    padding: 32px 0 24px;
  }

  .card {
    background: #fff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    border-radius: 0;
  }

  .job-meta {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 12px;
    margin-bottom: 24px;
  }

  .job-body {
    margin-top: 0;
  }

  .job-body h1 {
    font-size: 1.6rem;
    margin-top: 0;
    color: #1a1a1a;
  }

  .job-body h2 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    color: #2a2a2a;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 6px;
  }

  .job-body h3 {
    font-size: 1.05rem;
    margin-top: 1.2rem;
    color: #3a3a3a;
  }

  .job-body p {
    color: #3a3a3a;
    line-height: 1.7;
    text-align: justify;
    hyphens: auto;
  }

  .job-body ul, .job-body ol {
    padding-left: 20px;
    text-align: left;
  }

  .job-body li {
    margin-bottom: 6px;
    color: #3a3a3a;
  }

  .job-body a {
    color: #1a1a1a;
    text-decoration: underline;
  }

  .site-footer {
    border-top: 1px solid #e0e0e0;
    padding: 16px 0;
    margin-top: 32px;
  }

  .footer-inner {
    color: #8a8a8a !important;
    font-size: 0.8rem;
  }

  .no-print {
    display: none !important;
  }

  .print-only {
    display: flex !important;
  }

  .print-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
    gap: 32px;
  }

  .print-footer-info {
    flex: 1;
  }

  .print-footer-brand {
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #1a1a1a;
    margin-bottom: 4px;
  }

  .print-footer-tagline {
    font-size: 0.85rem;
    color: #6a6a6a;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
  }

  .print-footer-contact,
  .print-footer-url {
    font-size: 0.9rem;
    color: #3a3a3a;
    margin-bottom: 6px;
  }

  .print-footer-label {
    color: #8a8a8a;
    margin-right: 8px;
  }

  .print-footer-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .print-footer-qr img {
    width: 100px;
    height: 100px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 4px;
  }

  .print-footer-qr span {
    font-size: 0.7rem;
    color: #8a8a8a;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  @page {
    margin: 2.5cm 3cm;
    size: A4;
  }

  @page :first {
    margin-top: 3cm;
  }
}