:root {
  --bg: #10241f;
  --bg-2: #18352d;
  --sand: #efe6d4;
  --ink: #14201c;
  --muted: #5f6f68;
  --line: #d7cdba;
  --accent: #1f6b57;
  --accent-2: #c45c26;
  --card: rgba(255, 250, 242, 0.94);
  --shadow: 0 18px 50px rgba(8, 20, 16, 0.28);
  font-family: Manrope, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--sand); background: var(--bg); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
.atmosphere {
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(196, 92, 38, 0.28), transparent 60%),
    radial-gradient(700px 420px at 90% 10%, rgba(31, 107, 87, 0.45), transparent 55%),
    linear-gradient(160deg, #0c1c18, #163129 45%, #10241f);
}
.nav, .nav.compact {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 4vw; position: sticky; top: 0; backdrop-filter: blur(10px);
  background: rgba(16, 36, 31, 0.72); border-bottom: 1px solid rgba(239,230,212,0.08);
}
.logo { font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.nav nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.nav a.cta, .btn.primary, button, .ghost-btn {
  border: 0; border-radius: 999px; padding: 0.7rem 1.1rem; font: inherit; cursor: pointer;
}
.nav a.cta, .btn.primary, button { background: var(--sand); color: var(--ink); font-weight: 600; }
.btn.ghost, .ghost-btn { background: transparent; color: var(--sand); border: 1px solid rgba(239,230,212,0.35); }
.hero { min-height: calc(100vh - 72px); display: grid; align-content: center; padding: 4vw; max-width: 920px; }
.kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; color: #d8b48a; margin: 0 0 1rem; }
.hero h1 {
  font-family: Fraunces, Georgia, serif; font-size: clamp(3rem, 9vw, 5.8rem);
  line-height: 0.95; margin: 0 0 1rem; letter-spacing: -0.03em;
}
.lead { font-size: 1.15rem; max-width: 36rem; color: rgba(239,230,212,0.82); line-height: 1.55; }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.section { padding: 3rem 4vw 5rem; background: var(--sand); color: var(--ink); }
.section h2 { font-family: Fraunces, Georgia, serif; font-size: 2rem; margin: 0 0 1rem; }
.steps { margin: 0 0 2rem; padding-left: 1.2rem; line-height: 1.6; color: var(--muted); }
.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.role {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem;
  box-shadow: var(--shadow); display: grid; gap: 0.35rem; transition: transform .2s ease;
}
.role:hover { transform: translateY(-3px); }
.role span { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.role strong { font-family: Fraunces, Georgia, serif; font-size: 1.25rem; }
.role em { font-style: normal; color: var(--muted); font-size: 0.92rem; }
.foot { padding: 1.2rem 4vw; color: rgba(239,230,212,0.55); font-size: 0.85rem; }

body.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: #f4efe4; color: var(--ink); }
.side { background: var(--bg-2); color: var(--sand); padding: 1.4rem 1rem; display: flex; flex-direction: column; gap: 1rem; }
.side-role { margin: 0; color: #d8b48a; font-size: 0.85rem; }
.side-nav { display: grid; gap: 0.4rem; }
.side-nav button { background: transparent; color: var(--sand); border: 1px solid transparent; text-align: left; border-radius: 12px; }
.side-nav button.active, .side-nav button:hover { background: rgba(239,230,212,0.1); border-color: rgba(239,230,212,0.2); }
.back { margin-top: auto; color: rgba(239,230,212,0.7); font-size: 0.9rem; }
.workspace { padding: 1.5rem 1.75rem 3rem; }
.tab { display: none; animation: fade .25s ease; }
.tab.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none; } }
.workspace h1 { font-family: Fraunces, Georgia, serif; margin: 0 0 0.4rem; }
.hint { color: var(--muted); margin-top: 0; }
.form-card, .result {
  background: #fffdf8; border: 1px solid var(--line); border-radius: 16px; padding: 1rem; margin-top: 1rem;
  display: grid; gap: 0.75rem; max-width: 560px;
}
label { display: grid; gap: 0.35rem; font-size: 0.9rem; color: var(--muted); }
input, select, textarea {
  font: inherit; padding: 0.65rem 0.75rem; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  color: var(--ink);
}
.check { display: flex; align-items: center; gap: 0.5rem; }
.toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; max-width: 720px; }
.cards li {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1rem;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.badge { font-size: 0.72rem; border-radius: 999px; padding: 0.2rem 0.55rem; border: 1px solid var(--line); }
.badge.ok { color: var(--accent); }
.badge.warn { color: var(--accent-2); }
.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); }
.err { color: var(--accent-2); }
.result { white-space: pre-wrap; font-family: ui-monospace, monospace; font-size: 0.82rem; }

body.member { background: #f4efe4; color: var(--ink); }
.member .nav { background: rgba(244,239,228,0.9); color: var(--ink); border-bottom: 1px solid var(--line); }
.member-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1rem; padding: 1.25rem 4vw 3rem; }
.feed h1, .chat h2 { font-family: Fraunces, Georgia, serif; }
.post { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; margin-bottom: 0.85rem; }
.post .meta { color: var(--muted); font-size: 0.8rem; margin: 0 0 0.35rem; }
.post h2 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.chat {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1rem; display: flex; flex-direction: column;
  min-height: 420px; box-shadow: var(--shadow);
}
.chat-log { flex: 1; overflow: auto; display: grid; gap: 0.55rem; margin-bottom: 0.75rem; }
.bubble { padding: 0.7rem 0.85rem; border-radius: 14px; max-width: 92%; line-height: 1.4; }
.bubble.user { background: #e5f0eb; justify-self: end; }
.bubble.bot { background: #f3ebe0; justify-self: start; }
.chat-form { display: flex; gap: 0.5rem; }
.chat-form input { flex: 1; }

@media (max-width: 900px) {
  body.app { grid-template-columns: 1fr; }
  .role-grid, .member-layout { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 2; }
}
