* { box-sizing: border-box; }

:root {
  --bg: #f2ede3;
  --paper: #fffaf2;
  --ink: #28241f;
  --muted: #756e65;
  --accent: #7c4331;
  --accent-dark: #613327;
  --line: #d7cebf;
  --soft: #e8ddcb;
  --danger: #8a2d2d;
  --shadow: 0 20px 55px rgba(61, 45, 32, .09);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.72), transparent 34rem),
    var(--bg);
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.site-header,
.hero,
.trust-strip,
.featured-section,
.latest-section,
.moderation-section,
.page-hero,
.form-layout,
.archive-section,
.single-story,
.site-footer,
.admin-header,
.admin-main {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 22px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
}

.main-nav a:not(.nav-button) { color: var(--muted); }

.nav-button {
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
}

.hero {
  min-height: 690px;
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 72px;
  align-items: center;
  padding: 72px 0 105px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.06;
}

h1 {
  margin-bottom: 28px;
  font-size: clamp(54px, 7vw, 92px);
  letter-spacing: -.045em;
}

h2 {
  margin-bottom: 24px;
  font-size: clamp(38px, 4.6vw, 60px);
  letter-spacing: -.035em;
}

h3 {
  margin-bottom: 16px;
  font-size: 29px;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 21px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.primary:hover { background: var(--accent-dark); }

.secondary { background: transparent; }

.danger {
  border-color: var(--danger);
  color: var(--danger);
}

.why-card,
.featured-story,
.story-form,
.moderation-card,
.moderation-item,
.login-card {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.why-card { padding: 42px; }
.why-card h2 { font-size: 43px; }
.why-card p:not(.eyebrow) { color: var(--muted); }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-strip > div {
  padding: 30px;
  text-align: center;
}

.trust-strip > div + div { border-left: 1px solid var(--line); }

.trust-strip strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 400;
}

.trust-strip span {
  color: var(--muted);
  font-size: 13px;
}

.featured-section,
.latest-section,
.moderation-section,
.archive-section {
  padding: 110px 0;
}

.featured-section {
  display: grid;
  grid-template-columns: .65fr 1.35fr;
  gap: 80px;
}

.section-label {
  position: sticky;
  top: 28px;
  align-self: start;
}

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

.featured-story { padding: 36px; }

.featured-story h3 {
  font-size: clamp(32px, 3.5vw, 44px);
}

.featured-story p {
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1.55;
}

.story-punchline { margin-bottom: 5px; }

.story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 12px;
}

.tag {
  display: inline-flex;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 44px;
  margin-bottom: 44px;
}

.text-link,
.read-link {
  color: var(--accent);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.story-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: 31px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, .66);
}

.story-card p { color: var(--muted); }

.read-link {
  margin-top: auto;
  padding-top: 28px;
  font-size: 14px;
}

.moderation-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.moderation-card {
  max-width: 880px;
  margin: auto;
  padding: 56px;
  text-align: center;
}

.moderation-card p:not(.eyebrow) {
  max-width: 700px;
  margin-inline: auto;
  color: var(--muted);
}

.page-hero {
  padding: 90px 0 70px;
}

.page-hero.compact {
  min-height: auto;
}

.form-layout {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 80px;
  padding: 30px 0 110px;
}

.form-info {
  align-self: start;
  position: sticky;
  top: 30px;
}

.form-info h2 { font-size: 42px; }

.steps {
  padding-left: 20px;
}

.steps li {
  margin-bottom: 22px;
  padding-left: 8px;
}

.steps strong,
.steps span { display: block; }

.steps span {
  color: var(--muted);
  font-size: 14px;
}

.story-form { padding: 38px; }

.story-form label {
  display: block;
  margin-bottom: 22px;
  font-size: 13px;
  font-weight: 700;
}

.story-form label > span,
.field-help {
  color: var(--muted);
  font-weight: 400;
}

fieldset {
  margin: 8px 0 26px;
  padding: 24px;
  border: 1px solid var(--line);
}

legend {
  padding: 0 8px;
  font-family: Georgia, serif;
  font-size: 24px;
}

.field-help {
  margin-top: 0;
  font-size: 13px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

input, textarea, select {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,67,49,.08);
}

textarea { resize: vertical; }

.checkbox {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400 !important;
}

.checkbox input {
  width: auto;
  margin-top: 5px;
}

.checkbox a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.full { width: 100%; }

.notice {
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.notice.success { border-left: 4px solid #517049; }
.notice.error { border-left: 4px solid var(--danger); }

.category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.category-bar a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.category-bar a.active,
.category-bar a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.archive-grid { align-items: stretch; }

.single-story {
  max-width: 820px;
  padding: 100px 0 120px;
}

.single-story h1 {
  font-size: clamp(50px, 6vw, 78px);
}

.story-body {
  font-family: Georgia, serif;
  font-size: 23px;
  line-height: 1.7;
}

.single-footer {
  margin-top: 50px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.empty-state {
  padding: 40px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.site-footer {
  padding: 48px 0 70px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-brand {
  color: var(--ink);
}

.footer-brand-row {
  margin-bottom: 14px;
}

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.footer-bottom-row p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
}

/* Admin */

.admin-body {
  min-height: 100vh;
  background: #ece6db;
}

.login-card {
  width: min(520px, calc(100% - 28px));
  margin: 9vh auto 0;
  padding: 40px;
}

.login-card h1 {
  font-size: 54px;
}

.admin-form {
  margin-top: 26px;
  box-shadow: none;
}

.login-hint {
  color: var(--muted);
  font-size: 12px;
}

.admin-header {
  padding: 46px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
}

.admin-header h1 {
  margin-bottom: 0;
  font-size: 56px;
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.admin-main {
  padding-bottom: 90px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 25px 0 70px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.admin-stats > div {
  padding: 28px;
}

.admin-stats > div + div {
  border-left: 1px solid var(--line);
}

.admin-stats strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 400;
}

.admin-stats span {
  color: var(--muted);
  font-size: 13px;
}

.moderation-list {
  display: grid;
  gap: 22px;
}

.moderation-item {
  padding: 32px;
}

.moderation-story {
  max-width: 900px;
  color: var(--muted);
}

.moderation-actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

/* Über den Geschichtensammler */

.about-layout {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding: 20px 0 110px;
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 70px;
  align-items: start;
}

.about-card {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 34px;
}

.about-photo {
  width: 100%;
  max-width: 490px;
  margin: 0 auto 30px;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.about-card h2,
.about-text h2 {
  font-size: 46px;
}

.about-card p:not(.eyebrow),
.about-text > p {
  color: var(--muted);
}

.project-quote {
  margin: 38px 0;
  padding: 28px 0 28px 28px;
  border-left: 3px solid var(--accent);
  font-family: Georgia, serif;
  font-size: 25px;
  line-height: 1.5;
}

.about-cta {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding: 90px 0 110px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.about-cta h2 {
  max-width: 760px;
  margin-inline: auto;
}

.about-hero h1 {
  font-size: 58px;
}

/* Schlagwortsuche */

.story-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.story-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  border-radius: 4px;
}

.story-search input[type="search"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.story-search input[type="search"]::placeholder {
  color: var(--muted);
}

.search-result-info {
  margin: 24px 0;
  color: var(--muted);
}

/* Responsive */

@media (max-width: 930px) {
  .hero,
  .featured-section,
  .form-layout,
  .about-layout {
    grid-template-columns: 1fr;
  }

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

  .section-label,
  .form-info {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header,
  .hero,
  .trust-strip,
  .featured-section,
  .latest-section,
  .moderation-section,
  .page-hero,
  .form-layout,
  .archive-section,
  .single-story,
  .site-footer,
  .admin-header,
  .admin-main,
  .about-layout,
  .about-cta {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 0;
  }

  .main-nav {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .main-nav a {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .main-nav a:not(.nav-button) {
    display: inline-flex;
  }

  h1 {
    font-size: 49px;
  }

  .why-card,
  .featured-story,
  .story-form,
  .moderation-card,
  .login-card {
    padding: 27px;
  }

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

  .trust-strip > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .section-heading,
  .site-footer,
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }


  .footer-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .footer-bottom-row p {
    width: 100%;
  }

  .footer-links {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px 18px;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .admin-stats > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .about-photo {
    max-width: 100%;
  }

  /* Über-den-Geschichtensammler-Seite auf schmalen Displays */
  .about-layout > * {
    min-width: 0;
  }

  .about-card,
  .about-text {
    max-width: 100%;
    min-width: 0;
  }

  .about-card h2,
  .about-text h2 {
    font-size: 36px;
    overflow-wrap: anywhere;
  }

  .about-card p,
  .about-text p,
  .project-quote {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 650px) {
  .story-search {
    flex-direction: column;
    align-items: stretch;
  }

  .story-search .button {
    text-align: center;
  }
}

/* Rechtliche Seiten */

.legal-page {
  padding-top: 20px;
}

.legal-block {
  padding: 38px 0;
  border-top: 1px solid var(--line);
}

.legal-block:first-child {
  border-top: 0;
  padding-top: 0;
}

.legal-block h2 {
  margin-bottom: 18px;
  font-size: 38px;
}

.legal-block p {
  color: var(--muted);
}

.legal-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legal-link:hover {
  color: var(--accent-dark);
}
/* Abstand zwischen Einleitung und Suche auf der Geschichten-Seite */

.page-hero.compact {
  padding-bottom: 30px;
}

.archive-section {
  padding-top: 30px;
}
/* Navigation unter einer Geschichte */

.single-footer {
  position: relative;
  margin-top: 50px;
  padding-top: 28px;
  padding-bottom: 70px;
  border-top: 1px solid var(--line);
}

.story-navigation {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: -70px;
  margin-bottom: 50px;
}

.story-navigation-previous,
.story-navigation-next {
  display: flex;
}

.story-navigation .button {
  white-space: nowrap;
}
/* Navigation wieder sicher klickbar */

.single-footer {
  position: static;
  margin-top: 50px;
  padding-top: 28px;
  padding-bottom: 0;
  border-top: 1px solid var(--line);
}

.story-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 50px;
}

.story-navigation-previous,
.story-navigation-next {
  display: flex;
}

.story-navigation .button {
  white-space: nowrap;
}
/* Drei Buttons unter einer Geschichte */

.story-navigation-all {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 50px;
  padding-top: 28px;
  padding-bottom: 50px;
  border-top: 1px solid var(--line);
}

.story-navigation-back {
  text-align: left;
}

.story-navigation-previous {
  text-align: center;
}

.story-navigation-next {
  text-align: right;
}

.story-navigation-all .button {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .story-navigation-all {
    grid-template-columns: 1fr;
  }

  .story-navigation-back,
  .story-navigation-previous,
  .story-navigation-next {
    text-align: left;
  }
}