:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-alt: #f2efe8;
  --text: #1e2523;
  --muted: #68716d;
  --line: #e5e0d6;
  --accent: #576b5f;
  --accent-dark: #31443a;
  --danger: #8f4c43;
  --shadow: 0 20px 60px rgba(42, 53, 48, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 247, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--accent-dark);
  color: white;
  font-family: "Source Serif 4", serif;
  font-size: 22px;
}
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: -3px; }
.nav-links { display: flex; gap: 22px; color: var(--muted); font-size: 14px; }
.nav-links a:hover { color: var(--accent-dark); }

.hero { padding: 92px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-size: 12px; font-weight: 700; }
h1, h2, h3 { line-height: 1.12; margin: 0; }
h1 { font-family: "Source Serif 4", serif; font-size: clamp(42px, 7vw, 78px); font-weight: 600; letter-spacing: -0.04em; }
h2 { font-family: "Source Serif 4", serif; font-size: clamp(34px, 4vw, 52px); font-weight: 600; letter-spacing: -0.03em; }
h3 { font-size: 20px; }
.hero-text, .section-text { color: var(--muted); font-size: 18px; max-width: 670px; }
.hero-actions, .editor-actions, .calendar-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 700;
  background: var(--surface);
  color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.button.primary { background: var(--accent-dark); color: white; border-color: var(--accent-dark); }
.button.ghost { background: transparent; }
.button.danger { color: var(--danger); }
.today-card, .editor-card, .calendar-card, .post-card, .privacy-note, .principles-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.today-card { padding: 28px; }
.today-card strong { display: block; font-size: 30px; margin: 10px 0; font-family: "Source Serif 4", serif; }
.muted { color: var(--muted); }
.section { padding: 78px 0; }
.section.alt { background: var(--surface-alt); }
.two-column, .calendar-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 42px; align-items: start; }
.privacy-note { padding: 18px; color: var(--muted); margin-top: 22px; }
.editor-card { padding: 24px; }
label { display: block; font-weight: 700; font-size: 13px; margin: 14px 0 7px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fffdf9;
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; min-height: 260px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editor-actions { margin-top: 16px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}
.chip.active { background: var(--accent-dark); color: white; border-color: var(--accent-dark); }
.post-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card { padding: 22px; display: flex; flex-direction: column; min-height: 230px; }
.post-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.post-title { margin-top: 15px; }
.post-excerpt { color: var(--muted); flex: 1; }
.post-actions { display: flex; gap: 14px; }
.text-button { border: 0; background: none; padding: 0; color: var(--accent-dark); font-weight: 700; cursor: pointer; }
.text-button.delete-post { color: var(--danger); }
.calendar-controls { margin-top: 24px; }
.calendar-card { padding: 20px; }
.weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.weekdays span { text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; }
.day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: #fffdf9;
  position: relative;
}
.day.has-post { color: var(--text); border-color: var(--accent); background: #eef3ef; font-weight: 800; }
.day.today { outline: 2px solid var(--accent-dark); }
.day.empty { border: 0; background: transparent; }
.day.has-post::after {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-dark);
  position: absolute;
  bottom: 8px;
}
.principles-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 26px; }
.principles-grid article { padding: 22px; }
.principles-grid p { color: var(--muted); }
.footer { padding: 32px 0; border-top: 1px solid var(--line); }
.footer-grid { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); }
.footer a { margin-left: 18px; color: var(--accent-dark); font-weight: 700; }

@media (max-width: 900px) {
  .hero-grid, .two-column, .calendar-grid { grid-template-columns: 1fr; }
  .post-list, .principles-grid { grid-template-columns: 1fr 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .filters { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1120px); }
  .nav-wrap { align-items: flex-start; flex-direction: column; padding: 14px 0; }
  .nav-links { flex-wrap: wrap; gap: 12px; }
  .hero { padding-top: 54px; }
  .form-row, .post-list, .principles-grid { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
  .footer a { margin-left: 0; margin-right: 16px; }
}

.post-body {
  display: none;
  color: var(--text);
  font-family: "Source Serif 4", serif;
  font-size: 17px;
  line-height: 1.72;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
}
.post-card.open .post-body { display: block; }
.post-card.open { grid-column: span 2; }
.post-card.open .post-excerpt { display: none; }
.post-body p { margin: 0 0 13px; }
@media (max-width: 900px) {
  .post-card.open { grid-column: span 1; }
}

.subsection-title {
  margin-top: 2.25rem;
}

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

.five-pillars-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

@media (max-width: 640px) {
  .three-focus-grid,
  .five-pillars-grid {
    grid-template-columns: 1fr;
  }
}

.framework-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.framework-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 0.35rem;
}

.framework-content[contenteditable="true"] {
  outline: 1px dashed rgba(69, 88, 73, 0.45);
  outline-offset: 12px;
  border-radius: 18px;
}

.framework-content[contenteditable="true"] article {
  cursor: text;
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .framework-header {
    display: block;
  }

  .framework-actions {
    justify-content: flex-start;
    margin-bottom: 1rem;
  }
}
