:root {
  --app-font: "Inter", "Segoe UI", sans-serif;
  --font-scale: 1;
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-muted: #f1f3f5;
  --border: #e2e6ea;
  --text: #0f1b2d;
  --text-primary: #fafaf8;
  --muted: #3a4a63;
  --text-secondary: #667085;
  --accent: #5f8f7a;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --block-gap: 12px;
  font-family: var(--app-font);
  font-size: calc(16px * var(--font-scale));
  line-height: 1.5;
  font-weight: 400;
  color: var(--text);
  background-color: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background-color: var(--bg);
  overflow-x: hidden;
}

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

h2 {
  margin-bottom: 24px;
}


.body-text {
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
}

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

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

.container {
  width: min(1240px, 92vw);
  margin: 0 auto;
}

.page-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-sections .page-grid {
  max-width: 760px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: padding 0.2s ease;
}

.app-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.app-datetime {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  justify-self: start;
  white-space: nowrap;
}

.app-header-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.app-brand {
  justify-self: center;
  display: flex;
  align-items: center;
  width: 220px;
  height: 70px;
  padding: 5px 6px;
  transition: width 0.2s ease, height 0.2s ease, padding 0.2s ease;
}

.app-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.app-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 0.812rem;
  font-weight: 600;
  overflow: hidden;
  padding: 0;
}

.app-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-header--compact {
  padding: 7px 18px;
}

.app-header--compact .app-brand {
  width: 140px;
  height: 45px;
  padding: 3px 4px;
}

.primary-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.primary-nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.812rem;
  font-weight: 600;
  color: var(--muted);
}

.primary-nav-inner a {
  color: inherit;
  padding: 6px 8px;
  border-radius: 999px;
}

.primary-nav-inner a:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.btn {
  background: #ffffff;
  border: 1px solid #e2e6ea;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  color: #0f1b2d;
  font-size: 0.875rem;
}

.btn:hover {
  background: #f1f3f5;
  border-color: #e2e6ea;
}

.btn-primary {
  border: 1px solid #0f1b2d;
  border-radius: 12px;
  padding: 10px 16px;
  background: #0f1b2d;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-color: #0f1b2d;
}

.btn-primary:hover {
  background: #14243b;
  border-color: #14243b;
}

.btn-ghost {
  border: 1px solid #e2e6ea;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.875rem;
  color: #0f1b2d;
  cursor: pointer;
}

.text-link {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: #0f1b2d;
  font-size: 0.812rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.text-link.danger {
  color: #b91c1c;
}

.site-main {
  min-height: calc(100vh - 120px);
  padding-bottom: calc(64px + 20px + env(safe-area-inset-bottom));
}

.notice {
  background: #fff6db;
  color: #7a5200;
  border: 1px solid #e2d4a8;
  text-align: center;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 18px 16px;
  border-radius: 12px;
}

.landing-hero {
  background: #ffffff;
  padding: 48px 0;
}

.landing-hero-inner {
  width: 100%;
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
  text-align: left;
}

.landing-hero-content--center {
  text-align: center;
  align-items: center;
}

.landing-hero-content--center .landing-body,
.landing-hero-content--center .landing-support {
  margin: 0 auto;
}


.landing-hero-content {
  display: grid;
  gap: var(--block-gap);
}

.landing-kicker,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.landing-title {
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0;
}

.landing-body {
  color: var(--muted);
  max-width: 520px;
}

.landing-support {
  display: grid;
  gap: var(--block-gap);
  color: var(--muted);
  max-width: 520px;
}

.landing-support p {
  margin: 0;
}

.landing-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.landing-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #e7ecf2, #f5f7fa);
}

.hero-visual {
  margin-top: 0;
}

.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: none;
}

.page-section {
  padding: 48px 0;
}

.page-sections > .page-section {
  background: #ffffff;
}

.page-sections > .page-section:nth-of-type(odd) {
  background: #f7f9f8;
}

.section-title {
  font-size: 1.5rem;
  margin: 0 0 24px;
  text-align: center;
}

.section-body {
  color: var(--muted);
  display: grid;
  gap: var(--block-gap);
  font-size: 0.95rem;
  text-align: center;
}

.section-body p {
  margin: 0;
}

.section-actions {
  margin-top: 18px;
}

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

.split:has(.split-text:only-child) {
  grid-template-columns: 1fr;
}

.split-text,
.split-visual {
  display: flex;
  flex-direction: column;
  gap: var(--block-gap);
  align-items: center;
}

.split-visual {
  align-items: stretch;
}

.visual-block {
  width: 100%;
  min-height: 280px;
  border-radius: 16px;
  background: #eef1f4;
  flex: 1;
  overflow: hidden;
}

.visual-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.section {
  padding: 32px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-header-center {
  justify-content: center;
}

.section-title {
  font-size: 1.25rem;
  margin: 0 0 12px;
}

.section-title-center {
  text-align: center;
}

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

.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.benefit-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.benefit-card p {
  margin: 0;
  color: var(--muted);
}

.theme-grid,
.story-grid {
  display: grid;
  gap: 16px;
}

.content-grid {
  display: grid;
  gap: 16px;
}

.theme-card,
.story-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.theme-desc {
  color: var(--muted);
  font-size: 0.875rem;
}

.story-card h3 {
  margin: 8px 0;
}

.story-grid-contained {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  margin-top: 32px;
}

.story-card-contained {
  display: grid;
  gap: 8px;
  height: 100%;
}

.story-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #eef1f4;
}

.story-image--placeholder {
  background: linear-gradient(135deg, #e7ecf2, #f5f7fa);
}

.story-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.story-date {
  font-size: 0.85rem;
  color: var(--muted);
}

.story-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.page-hero {
  padding: 32px 0 12px;
}

.page-hero:not(.page-hero--home) {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 12px;
}

.page-hero:not(.page-hero--home) + .legal {
  max-width: 760px;
  margin: 0 auto;
}

.page-hero--home {
  padding: 48px 0;
  text-align: center;
  background: linear-gradient(160deg, var(--bg) 0%, var(--surface-muted) 55%, var(--surface) 100%);
}

.page-hero h1 {
  font-size: 2rem;
  line-height: 1.1;
  margin: 6px 0 0;
}

.page-hero.page-hero--home h1 {
  font-size: 48px;
  line-height: 1.1;
  margin: 0;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.lead {
  color: var(--muted);
}

.content-grid,
.plan-card,
.story-list,
.pagination,
.article,
.legal,
.form-card,
.table {
  width: min(900px, 92vw);
  margin: 0 auto;
}

.plan-card,
.content-card,
.legal,
.form-card,
.table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.plan-price {
  font-size: 1.4rem;
  font-weight: 700;
}

.plan-features {
  padding-left: 18px;
  color: var(--muted);
}

.article-hero {
  margin-bottom: 24px;
}

.article-meta {
  display: flex;
  gap: 8px;
  color: var(--muted);
}

.article-image {
  width: 100%;
  border-radius: 18px;
  margin-bottom: 24px;
}

.article-body {
  line-height: 1.7;
  color: var(--text);
}

.form-card {
  display: grid;
  gap: 14px;
}

.sign-up-card {
  width: 100%;
  margin: 0;
}

.sign-up-copy {
  align-content: start;
}

.form-card label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.form-card input,
.form-card textarea,
.form-card select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.table {
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.table-head {
  font-weight: 700;
  background: #f8fafc;
}

.table-actions {
  display: flex;
  gap: 12px;
}

.site-footer {
  background: #0f1b2d;
  color: #e6ebf5;
  padding: 32px 0;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-meta {
  font-size: 0.75rem;
  color: #cbd5f5;
}

.theme-link-title {
  font-weight: 600;
}

.theme-link-desc {
  font-size: 0.875rem;
}

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

.theme-card {
  display: grid;
  gap: 8px;
  height: 100%;
}

.theme-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #eef1f4;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.theme-image--placeholder {
  background: linear-gradient(135deg, #e7ecf2, #f5f7fa);
}

.theme-overlay {
  width: 100%;
  padding: 28px 16px 16px;
  background-color: #0a1621;
  background-image: linear-gradient(180deg, rgba(10, 22, 33, 0) 0%, rgba(10, 22, 33, 0.98) 55%);
  color: #f8fafc;
  display: grid;
  gap: 6px;
}

.theme-link-title,
.theme-link-desc {
  color: inherit;
}

.theme-link-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.theme-link-desc {
  font-size: 1rem;
  line-height: 1.4;
} 

@media (max-width: 1000px) {
  .benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .app-header {
    padding: 12px 14px;
  }

  .app-header-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  .app-header-actions .btn {
    padding: 6px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .primary-nav-inner {
    padding: 8px 14px;
    gap: 10px;
    justify-content: flex-start;
  }

  .app-datetime {
    max-width: 120px;
    white-space: normal;
    line-height: 1.2;
  }

  .app-datetime-sep,
  .app-datetime-time {
    display: none;
  }

  .app-brand {
    width: 190px;
    height: 60px;
    padding: 4px 5px;
  }

  .landing-hero {
    padding: 40px 0;
    text-align: center;
  }

  .landing-title {
    font-size: 1.75rem;
  }

  .landing-body,
  .landing-support {
    margin: 0 auto;
  }

  .landing-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .landing-actions {
    justify-content: center;
  }


  .page-section {
    padding: 40px 0;
  }

  .story-grid-contained {
    grid-template-columns: 1fr;
  }

  .theme-grid,
  .story-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    flex-direction: column;
  }
}
