:root {
  color-scheme: light;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #17201b;
  background: #f5f1e8;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  background: radial-gradient(circle at 100% 0, #d8c28b55, transparent 34rem), #f5f1e8;
}

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

.shell {
  width: min(100%, 48rem);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(2rem, 8vw, 5rem);
}

.header-actions,
.actions,
.item-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.text-button {
  border: 0;
  padding: 0.6rem;
  color: #315846;
  background: transparent;
  font-weight: 700;
}

.brand {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 50%;
  color: #f5f1e8;
  background: #17201b;
  font-family: Georgia, serif;
  font-size: 1.35rem;
  text-decoration: none;
}

.language {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #566158;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.language select {
  min-height: 2.5rem;
  border: 1px solid #17201b33;
  border-radius: 999px;
  padding: 0 0.8rem;
  color: inherit;
  background: #ffffff99;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: #8a702e;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 11ch;
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.5rem, 12vw, 5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.door {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid #17201b1c;
  border-radius: 1.25rem;
  background: #ffffff88;
}

.door-mark {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  color: #f5f1e8;
  background: #315846;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.door p,
.section > p:not(.eyebrow) {
  margin: 0.35rem 0 0;
  color: #566158;
  line-height: 1.5;
}

.primary {
  width: 100%;
  min-height: 3.25rem;
  margin-top: 0.8rem;
  border: 0;
  border-radius: 999px;
  color: #f5f1e8;
  background: #17201b;
  font-weight: 700;
  cursor: pointer;
}

.notice,
.error,
.loading {
  margin: 1rem 0;
  color: #566158;
  line-height: 1.5;
}

.error {
  color: #a52b2b;
}

.narrow {
  max-width: 34rem;
}

.form {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.form label {
  display: grid;
  gap: 0.45rem;
  color: #566158;
  font-size: 0.78rem;
  font-weight: 700;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  min-height: 3rem;
  border: 1px solid #17201b33;
  border-radius: 0.75rem;
  padding: 0.75rem;
  color: #17201b;
  background: #fff;
}

.form textarea {
  min-height: 7rem;
  resize: vertical;
}
.panel {
  padding: 1rem;
  border-radius: 1rem;
  background: #ffffff99;
}
.panel h2 {
  margin: 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin: 2rem 0 1rem;
}

.metrics article {
  min-width: 0;
  padding: 1rem;
  border-radius: 1rem;
  background: #fff9;
}

.metrics span,
.metrics strong {
  display: block;
}
.metrics span {
  color: #566158;
  font-size: 0.75rem;
}
.metrics strong {
  margin-top: 0.4rem;
  font-size: clamp(1.1rem, 5vw, 1.7rem);
}

.feed-list,
.guide-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.feed-item,
.guide-item,
.empty-state {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #17201b22;
  border-radius: 1rem;
  background: #ffffff88;
}

.feed-item.unread {
  border-left: 4px solid #8a702e;
}
.feed-item h2,
.guide-item h2 {
  margin: 0.6rem 0;
  font-family: Georgia, serif;
  font-size: 1.35rem;
}
.feed-item p,
.guide-item p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
}
.item-meta {
  justify-content: space-between;
  color: #566158;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.history {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}
.history li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #17201b22;
}

.cards {
  display: grid;
  gap: 0.7rem;
  margin-top: 2rem;
}

.card {
  display: flex;
  min-width: 0;
  min-height: 4.2rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #17201b22;
  color: inherit;
  font-weight: 650;
  text-decoration: none;
}

.card b {
  color: #8a702e;
  font-size: 1.25rem;
}

.section {
  padding-top: clamp(1rem, 8vw, 4rem);
}

.section > p:not(.eyebrow) {
  max-width: 32rem;
  margin-top: 1.5rem;
}

.back {
  display: inline-block;
  margin-top: 2rem;
  color: #315846;
  font-weight: 700;
  text-decoration: none;
}

@media (min-width: 42rem) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .card {
    padding: 0 1rem;
    border: 1px solid #17201b22;
    border-radius: 1rem;
    background: #ffffff55;
  }
}

@media (max-width: 30rem) {
  .language > span {
    display: none;
  }
  .metrics {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero,
  .cards,
  .section {
    animation: appear 300ms ease-out both;
  }

  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(0.5rem);
    }
  }
}
