/* Trailpost — shared styles (marketing + app). Plain and fast on purpose. */
:root {
  --ink: #1b2733;
  --ink-soft: #46586a;
  --paper: #ffffff;
  --mist: #f3f6f9;
  --line: #dde5ec;
  --blaze: #e8872b;
  --blaze-dark: #c96f1a;
  --pine: #1f6f54;
  --red: #b3402e;
  --radius: 10px;
  font-size: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
a { color: var(--blaze-dark); }
h1, h2, h3 { line-height: 1.2; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.nav .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; }
.nav .brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav .links a { margin-left: 22px; text-decoration: none; color: var(--ink-soft); font-weight: 500; }
.nav .links a.cta { color: #fff; background: var(--blaze); padding: 8px 16px; border-radius: 8px; }

.hero { padding: 64px 0 48px; }
.hero h1 { font-size: 2.5rem; margin: 0 0 14px; max-width: 640px; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 620px; margin: 0 0 26px; }
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  background: var(--blaze); color: #fff; font-weight: 600; font-size: 1rem;
  padding: 12px 22px; border-radius: 9px;
}
.btn:hover { background: var(--blaze-dark); }
.btn.secondary { background: var(--mist); color: var(--ink); border: 1px solid var(--line); }
.btn.quiet { background: none; color: var(--ink-soft); border: 1px solid var(--line); }
.btn.danger { background: var(--red); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.section { padding: 40px 0; }
.section.alt { background: var(--mist); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin-top: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.88rem; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; margin-top: 48px; color: var(--ink-soft); font-size: 0.92rem; }
footer .links { margin-bottom: 10px; }
footer .links a { margin-right: 18px; color: var(--ink-soft); }

/* Legal pages */
.legal h1 { margin-top: 36px; }
.legal h2 { margin-top: 30px; font-size: 1.2rem; }
.legal { padding-bottom: 60px; }

/* ---------- App ---------- */
.app-shell { max-width: 860px; margin: 0 auto; padding: 0 16px 80px; }
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.app-header .brand { display: flex; align-items: center; gap: 9px; font-weight: 700; text-decoration: none; color: var(--ink); }
.app-header .brand img { width: 26px; height: 26px; border-radius: 6px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { justify-content: space-between; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; background: var(--mist); color: var(--ink-soft); }
.chip.green { background: #e4f3ec; color: var(--pine); }
.chip.amber { background: #fcecd9; color: var(--blaze-dark); }
.chip.red { background: #f9e5e1; color: var(--red); }

.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--mist); }

input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; color: var(--ink); background: #fff;
}
textarea { resize: vertical; min-height: 84px; }
label { font-weight: 600; font-size: 0.92rem; display: block; margin-bottom: 5px; }
.field { margin-bottom: 16px; }
.hint { font-size: 0.84rem; color: var(--ink-soft); margin-top: 4px; }
.error-text { color: var(--red); font-size: 0.9rem; }

.auth-box { max-width: 400px; margin: 60px auto; }

.post-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.post-item:last-child { border-bottom: 0; }
.post-item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }

/* Composer modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20, 30, 40, 0.55);
  display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 30px 12px; z-index: 50;
}
.modal { background: #fff; border-radius: 14px; max-width: 620px; width: 100%; padding: 26px; }
.modal h2 { margin-top: 0; }
.composer video { width: 100%; max-height: 340px; border-radius: 10px; background: #000; }
.toggle-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.toggle-row input { width: auto; }
.toggle-row label { margin: 0; font-weight: 500; }
.toggle-row.disabled { opacity: 0.45; }
.disclosure-box { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 10px; }
.consent-line { font-size: 0.86rem; color: var(--ink-soft); margin: 14px 0 10px; }
.banner {
  padding: 10px 14px; border-radius: 9px; margin-bottom: 14px; font-size: 0.92rem;
}
.banner.warn { background: #fcecd9; color: var(--blaze-dark); }
.banner.info { background: #e8f0f8; color: #2b5e8c; }
.banner.err { background: #f9e5e1; color: var(--red); }
.banner.ok { background: #e4f3ec; color: var(--pine); }
.dev-sim { position: fixed; bottom: 0; left: 0; right: 0; background: #b3402e; color: #fff; text-align: center; padding: 6px; font-weight: 700; z-index: 99; }
code.block { display: block; background: var(--mist); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; font-size: 0.85rem; white-space: pre; }
