:root {
  --bg: #f4f1eb;
  --surface: rgba(255, 253, 248, 0.82);
  --surface-strong: #fffdf8;
  --ink: #172235;
  --muted: #596577;
  --line: rgba(23, 34, 53, 0.1);
  --accent: #8b6a3f;
  --accent-soft: #efe4d5;
  --accent-ink: #7a5a31;
  --shadow: 0 24px 72px rgba(16, 24, 38, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --display-font: "Baskerville", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --body-font: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(178, 149, 109, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(71, 89, 122, 0.14), transparent 22%),
    linear-gradient(180deg, #f5f2ec 0%, #f1eee8 48%, #eef1f3 100%);
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
}

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

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

.site-body {
  position: relative;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  inset: auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(38px);
  opacity: 0.28;
  pointer-events: none;
  z-index: 0;
}

.ambient-one {
  top: -120px;
  right: -60px;
  background: rgba(182, 153, 116, 0.34);
}

.ambient-two {
  bottom: -150px;
  left: -70px;
  background: rgba(86, 111, 145, 0.24);
}

.site-header,
.page-main,
.admin-shell {
  position: relative;
  z-index: 1;
}

.site-header {
  width: min(1160px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 14px 18px;
  border: 1px solid rgba(23, 34, 53, 0.08);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.74);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 42px rgba(16, 24, 38, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: static;
}

.brand a {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #152133, #334562);
  color: #f8f6f1;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 16px 34px rgba(21, 33, 51, 0.18);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(23, 34, 53, 0.06);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(23, 34, 53, 0.05);
}

.page-main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero-section,
.listing-hero,
.detail-hero,
.auth-shell {
  padding: 72px 0 36px;
}

.hero-grid,
.hero-shell,
.detail-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.listing-hero,
.listing-panel,
.detail-hero,
.auth-card,
.section-card,
.metric-card,
.admin-item-card,
.media-card,
.cta-panel,
.opportunity-card,
.focus-card {
  border: 1px solid rgba(23, 34, 53, 0.08);
  background: rgba(255, 253, 248, 0.8);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 56px;
  border-radius: 36px;
  background:
    radial-gradient(circle at top right, rgba(168, 145, 110, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 252, 0.96), rgba(242, 238, 231, 0.9));
}

.hero-panel {
  border-radius: 28px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(250, 247, 241, 0.98), rgba(242, 238, 231, 0.84));
}

.hero-aside {
  display: grid;
  gap: 20px;
}

.listing-panel {
  padding: 30px;
}

.hero-panel__label,
.eyebrow {
  color: var(--accent-ink);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--display-font);
  line-height: 1;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.9rem, 7vw, 5.3rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
}

h3 {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}

p,
li {
  line-height: 1.66;
  color: var(--muted);
}

.hero-lead {
  font-size: 1.15rem;
  max-width: 58ch;
}

.hero-meta,
.story-meta,
.tag-row,
.cta-links,
.hero-actions,
.admin-header__actions,
.admin-actions,
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-meta span,
.story-meta,
.field-help,
.admin-note {
  color: var(--muted);
  font-size: 0.96rem;
}

.hero-meta span {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(23, 34, 53, 0.045);
  border: 1px solid rgba(23, 34, 53, 0.06);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.summary-card {
  padding: 20px 22px;
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.74);
  border: 1px solid rgba(23, 34, 53, 0.08);
  box-shadow: var(--shadow);
}

.summary-card__label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.08rem;
  line-height: 1.4;
}

.button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button {
  background: linear-gradient(135deg, #162235, #32455f);
  color: #f9f7f2;
  box-shadow: 0 14px 28px rgba(22, 34, 53, 0.18);
}

.button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.button--secondary,
.ghost-button {
  background: rgba(23, 34, 53, 0.05);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(23, 34, 53, 0.08);
}

.inline-link {
  color: var(--accent-ink);
  font-weight: 600;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-ink);
  font-weight: 600;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.content-section {
  padding: 32px 0 10px;
}

.content-section--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}

.section-heading {
  margin-bottom: 22px;
  max-width: 760px;
}

.section-heading--tight h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.section-copy,
.callout-card,
.section-card,
.auth-card,
.listing-hero,
.listing-panel,
.detail-hero,
.opportunity-card,
.cta-panel {
  border-radius: var(--radius-xl);
}

.rich-copy,
.callout-card,
.opportunity-card {
  padding: 28px;
}

.rich-copy p + p {
  margin-top: 1rem;
}

.callout-card {
  margin-top: 18px;
  border: 1px solid rgba(23, 34, 53, 0.08);
  background: linear-gradient(180deg, rgba(241, 236, 227, 0.86), rgba(255, 253, 248, 0.96));
}

.focus-grid,
.story-grid,
.hobby-grid,
.dashboard-metrics,
.media-grid {
  display: grid;
  gap: 18px;
}

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

.focus-card {
  border-radius: 22px;
  padding: 24px;
  background: rgba(255, 253, 248, 0.86);
  border-left: 3px solid rgba(139, 106, 63, 0.45);
}

.focus-index {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--accent-ink);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}

.focus-card h3 {
  margin-bottom: 10px;
}

.opportunity-list {
  margin: 0;
  padding-left: 20px;
}

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

.hobby-card,
.story-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid rgba(23, 34, 53, 0.08);
  box-shadow: var(--shadow);
}

.story-card {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.story-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 56px rgba(16, 24, 38, 0.12);
}

.hobby-card__media {
  aspect-ratio: 1.25 / 0.9;
  overflow: hidden;
}

.hobby-card__media img,
.cover-media img,
.detail-cover img,
.media-card > img,
.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hobby-card__content,
.story-card__content,
.media-card__content {
  padding: 22px;
}

.hobby-placeholder,
.cover-placeholder,
.mini-placeholder {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff9f2;
}

.hobby-placeholder,
.cover-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.cover-placeholder strong {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-family: var(--display-font);
  margin-bottom: 12px;
}

.cover-placeholder p,
.cover-pill,
.hobby-placeholder span {
  color: rgba(255, 249, 242, 0.92);
}

.cover-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: auto;
}

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

.story-card__link {
  display: block;
  height: 100%;
}

.cover-media {
  aspect-ratio: 1.45 / 1;
}

.tag-row {
  margin-top: 10px;
}

.tag,
.pill {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(23, 34, 53, 0.05);
  border: 1px solid rgba(23, 34, 53, 0.08);
  color: var(--ink);
  font-size: 0.82rem;
}

.pill--muted {
  background: rgba(139, 106, 63, 0.08);
}

.section-link-row {
  margin-top: 18px;
}

.content-section--cta {
  padding-bottom: 42px;
}

.cta-panel {
  padding: 32px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, rgba(21, 33, 51, 0.98), rgba(39, 56, 78, 0.98));
  color: #f5f4ef;
}

.cta-panel p,
.cta-panel h2,
.cta-panel .eyebrow {
  color: inherit;
}

.cta-panel .eyebrow {
  color: #d4c1a5;
}

.cta-panel .button {
  background: linear-gradient(135deg, #d9c2a0, #f0e5d1);
  color: #162235;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.cta-panel .button--secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #f5f4ef;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.listing-hero,
.detail-hero {
  padding: 36px;
}

.listing-hero--split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 24px;
  align-items: stretch;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.article-body,
.detail-sidecard {
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid rgba(23, 34, 53, 0.08);
  box-shadow: var(--shadow);
}

.article-body {
  padding: 34px;
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(23, 34, 53, 0.08);
  box-shadow: var(--shadow);
}

.article-body h2,
.article-body h3 {
  margin-top: 34px;
}

.article-body p,
.article-body li {
  font-size: 1.05rem;
}

.article-body ul,
.article-body ol {
  padding-left: 22px;
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

.article-body pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 18px;
  background: #1f2430;
  color: #f5eee4;
}

.article-body code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(31, 36, 48, 0.08);
}

.article-body blockquote {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: rgba(139, 106, 63, 0.08);
  border-radius: 0 18px 18px 0;
}

.article-figure {
  margin: 28px 0;
}

.article-figure figcaption {
  margin-top: 10px;
  font-size: 0.94rem;
  color: var(--muted);
}

.article-figure img,
.inline-markdown-image {
  border-radius: 20px;
}

.detail-sidecard {
  padding: 26px;
  position: sticky;
  top: 104px;
}

.detail-sidecard__group + .detail-sidecard__group {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.breadcrumb {
  margin-bottom: 22px;
  color: var(--muted);
}

.empty-state {
  border-radius: 22px;
  padding: 24px;
  border: 1px dashed rgba(23, 34, 53, 0.16);
  color: var(--muted);
  background: rgba(255, 253, 248, 0.58);
}

.auth-shell {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(560px, 100%);
  padding: 36px;
}

.admin-view .page-main {
  width: min(1220px, calc(100% - 32px));
  padding-top: 36px;
}

.admin-shell {
  padding: 8px 0 60px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.dashboard-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
}

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

.metric-card span {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  font-family: var(--display-font);
}

.admin-section {
  margin-top: 30px;
}

.admin-section--split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: start;
}

.section-card {
  padding: 28px;
}

.section-card--editor {
  scroll-margin-top: 28px;
}

.section-card--editing {
  border-color: rgba(217, 109, 58, 0.35);
  box-shadow:
    0 20px 60px rgba(43, 29, 18, 0.12),
    0 0 0 4px rgba(217, 109, 58, 0.08);
}

.stack-form {
  display: grid;
  gap: 16px;
}

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

.full-span {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(31, 36, 48, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(217, 109, 58, 0.18);
  border-color: rgba(217, 109, 58, 0.4);
}

.form-title {
  font-family: var(--display-font);
  font-size: 1.5rem;
}

.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.editor-status {
  margin: 0 0 18px;
  color: var(--muted);
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 500;
}

.checkbox-row input {
  width: auto;
}

.admin-list {
  display: grid;
  gap: 16px;
}

.admin-item-card {
  border-radius: 24px;
  padding: 18px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-item-card--story {
  grid-template-columns: 88px minmax(0, 1fr);
}

.admin-item-card.is-active {
  border-color: rgba(217, 109, 58, 0.35);
  box-shadow:
    0 20px 60px rgba(43, 29, 18, 0.12),
    0 0 0 4px rgba(217, 109, 58, 0.08);
}

.admin-item-card__media,
.mini-placeholder,
.image-preview {
  border-radius: 18px;
  overflow: hidden;
}

.mini-placeholder {
  min-height: 88px;
  display: grid;
  place-items: center;
  font-family: var(--display-font);
  font-size: 1.8rem;
  color: #fff9f2;
}

.admin-item-card__topline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.media-grid {
  margin-top: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-card {
  border-radius: 24px;
  overflow: hidden;
}

.media-card > img {
  width: 100%;
  aspect-ratio: 1.15 / 1;
}

.media-card__content code {
  display: block;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(31, 36, 48, 0.06);
  word-break: break-all;
}

.image-preview {
  width: min(260px, 100%);
  aspect-ratio: 1.1 / 1;
}

.notice {
  padding: 16px 18px;
  border-radius: 18px;
  margin-bottom: 18px;
}

.notice--success {
  background: rgba(92, 150, 124, 0.14);
  color: #355141;
}

.notice--error {
  background: rgba(194, 95, 84, 0.14);
  color: #70352d;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 550ms ease, transform 550ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tone-sunrise {
  background:
    radial-gradient(circle at top left, rgba(231, 213, 188, 0.3), transparent 24%),
    linear-gradient(135deg, #806044, #b69572);
}

.tone-ocean {
  background:
    radial-gradient(circle at top left, rgba(207, 220, 235, 0.32), transparent 24%),
    linear-gradient(135deg, #2a415b, #5f7897);
}

.tone-forest {
  background:
    radial-gradient(circle at top left, rgba(213, 225, 214, 0.28), transparent 24%),
    linear-gradient(135deg, #3d5144, #6f8779);
}

.tone-night {
  background:
    radial-gradient(circle at top left, rgba(197, 206, 225, 0.22), transparent 24%),
    linear-gradient(135deg, #1b2433, #41526d);
}

.tone-ember {
  background:
    radial-gradient(circle at top left, rgba(230, 208, 184, 0.26), transparent 22%),
    linear-gradient(135deg, #603f38, #936253);
}

@media (max-width: 1080px) {
  .focus-grid,
  .dashboard-metrics,
  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .site-header {
    border-radius: 28px;
    padding: 16px;
    top: 10px;
  }

  .hero-grid,
  .hero-shell,
  .hero-aside,
  .content-section--split,
  .detail-layout,
  .admin-section--split,
  .cta-panel,
  .admin-header,
  .detail-hero__grid,
  .listing-hero--split {
    grid-template-columns: 1fr;
  }

  .story-grid,
  .dashboard-metrics,
  .media-grid,
  .focus-grid,
  .hobby-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-panel,
  .listing-hero,
  .detail-hero,
  .article-body,
  .detail-sidecard,
  .section-card,
  .auth-card {
    padding: 26px;
  }

  .detail-sidecard {
    position: static;
  }

  .editor-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-main {
    width: min(100% - 24px, 100%);
    padding-top: 18px;
  }

  .site-header {
    width: min(100% - 24px, 100%);
    margin-top: 14px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero-copy {
    padding: 24px;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.4rem, 11vw, 3.6rem);
  }

  .admin-item-card,
  .admin-item-card--story {
    grid-template-columns: 1fr;
  }
}
