:root {
  --bg: #0f172a;
  --panel: #fffdf8;
  --panel-soft: #f3efe7;
  --text: #16212f;
  --muted: #4b5563;
  --accent: #8b5e34;
  --accent-dark: #6d4b29;
  --border: #e5dfd4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background:
    linear-gradient(180deg, #fcfbf8 0%, #f4efe7 42%, #eef3f8 100%);
  color: var(--text);
  line-height: 1.65;
}

img { max-width: 100%; }

.top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--panel-soft);
  color: var(--accent-dark);
}

.container {
  width: min(1140px, calc(100% - 24px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero-card,
.card,
.list-card,
.post-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(248,247,243,0.98));
  border: 1px solid rgba(109, 75, 41, 0.12);
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  padding: 24px;
  margin-bottom: 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: stretch;
}

.hero-card {
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(139, 94, 52, 0.08), transparent 18%),
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(243, 239, 231, 0.98));
}

.feature-card {
  border-radius: 24px;
  border: 1px solid rgba(109, 75, 41, 0.12);
  background: linear-gradient(180deg, #17212d, #111827);
  color: #eff6ff;
  padding: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.feature-card h3,
.feature-card p {
  color: #eff6ff;
}

.feature-card .mini-label {
  color: #cbd5e1;
}

.mini-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent-dark);
  font-weight: 700;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
}

h1,
h2,
h3 {
  line-height: 1.15;
  color: var(--text);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.section-copy {
  max-width: 640px;
}

.topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-chip {
  border-radius: 999px;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid rgba(109, 75, 41, 0.14);
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.feature-grid,
.highlights-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.highlight-card {
  background: linear-gradient(145deg, #fff, #faf7f2);
  border: 1px solid rgba(109, 75, 41, 0.12);
  border-radius: 18px;
  padding: 16px;
}

.highlight-card strong {
  display: block;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.primary-button,
.ghost-button {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.primary-button,
.ghost-button {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

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

.primary-button {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}

.ghost-button {
  background: #fff;
  color: var(--text);
}

.note-composer.hidden,
.image-preview.hidden {
  display: none;
}

.editor-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.editor-card label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: var(--text);
}

.editor-card input,
.editor-card textarea {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
}

.editor-card textarea {
  resize: vertical;
}

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

.notes-list {
  display: grid;
  gap: 14px;
}

.note-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #faf7f2);
  padding: 16px;
}

.note-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.note-card h3 {
  margin-bottom: 4px;
}

.note-body {
  white-space: pre-wrap;
}

.note-card img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 14px;
  margin-top: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--accent-dark);
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 16px;
  color: var(--muted);
  background: #fff;
}

.image-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 10px; }
h2 { font-size: 1.25rem; margin-top: 0; margin-bottom: 10px; }
h3 { font-size: 1.05rem; margin: 0 0 8px; }

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 700px;
}

.article-grid,
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.post-meta {
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.post-card p,
.card p,
.list-card p {
  margin-top: 0;
  color: var(--text);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.chip {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.95rem;
}

.highlight {
  background: linear-gradient(135deg, #fffaf3, #ffffff);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.highlight strong {
  display: block;
  color: var(--accent-dark);
  margin-bottom: 4px;
}

ul { padding-left: 18px; margin: 8px 0 0; }
li + li { margin-top: 8px; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .top-nav { align-items: flex-start; flex-direction: column; }
  .nav-links { width: 100%; }
  .container { padding-top: 20px; }
  .section-heading,
  .editor-actions,
  .note-card-header { flex-direction: column; }
}
