:root {
  --bg: #faf6ef;
  --bg-2: #f3ece1;
  --card: #ffffff;
  --text: #17120f;
  --muted: #6b625a;
  --line: #e6ddd0;
  --red: #a8262e;
  --red-dark: #8a1d25;
  --on-red: #ffffff;
  --glow: rgba(240, 150, 160, 0.35);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 18px;
}
[data-theme='dark'] {
  --bg: #14100e;
  --bg-2: #1b1613;
  --card: #1f1916;
  --text: #f5efe6;
  --muted: #a99f94;
  --line: #342b26;
  --red: #c4353d;
  --red-dark: #a8262e;
  --glow: rgba(168, 38, 46, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red); }
img, svg { max-width: 100%; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.red { color: var(--red); }

/* Type */
.eyebrow {
  margin: 0 0 14px; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--red);
}
.display, .h1, .h2, .h3, .banner h1, .big-red h2, .big-red h3, .legal h2, .card h3, .steps h3 {
  font-family: var(--serif); letter-spacing: -0.03em; line-height: 1.05; font-weight: 700; margin: 0;
}
.display { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; margin-bottom: 22px; }
.h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 20px; }
.h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); margin-bottom: 18px; }
.h3 { font-size: 1.6rem; margin-bottom: 10px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 0.95rem var(--sans); text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: var(--on-red); }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-white { background: #fff; color: var(--red-dark); }
.btn-sm { padding: 9px 16px; font-size: 0.875rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.btn-col { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.btn-col .btn { justify-content: flex-start; }
.link-btn { background: none; border: 0; color: var(--red); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.03em; color: var(--text); text-decoration: none; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M8 24V9l8 9 8-9v15' fill='none' stroke='white' stroke-width='3.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / 80% no-repeat; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 0.92rem; }
.nav-links > a { color: var(--text); text-decoration: none; }
.nav-links > a:hover { color: var(--red); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle, .side-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; padding: 11px 10px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.nav-toggle span, .side-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; position: relative; }
.theme-toggle::before { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--text); }
[data-theme='dark'] .theme-toggle::before { background: transparent; box-shadow: inset -5px -2px 0 0 var(--text); transform: rotate(-20deg); }

/* Hero */
.hero { position: relative; padding: 84px 0 64px; overflow: hidden; }
.hero::before { content: ''; position: absolute; width: 760px; height: 760px; right: -200px; top: -240px; background: radial-gradient(circle, var(--glow), transparent 65%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 28px 0 0; color: var(--muted); font-size: 0.92rem; }
.checks li::before { content: '\2713'; color: var(--red); font-weight: 700; margin-right: 8px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card h3 { font-size: 1.45rem; margin-bottom: 8px; }
.card p { margin: 0 0 12px; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.os-card { box-shadow: 0 30px 60px -30px rgba(120, 30, 40, 0.25); }
.os-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.os-head .eyebrow { margin: 0; }
.live { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; color: var(--red); display: inline-flex; align-items: center; gap: 6px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--glow); }
.os-site { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--bg); }
.os-site-row { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 10px; }
.os-site-row span:last-child { color: var(--red); font-weight: 600; }
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar div { height: 100%; background: var(--red); border-radius: 999px; }
.os-flow { display: flex; align-items: stretch; gap: 10px; margin: 16px 0; }
.node { flex: 1; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--bg); display: flex; flex-direction: column; }
.node strong { font-family: var(--serif); font-size: 1.1rem; letter-spacing: -0.02em; }
.node span { color: var(--muted); font-size: 0.8rem; }
.node-red { background: var(--red); border-color: var(--red); color: #fff; }
.node-red span { color: rgba(255, 255, 255, 0.8); }
.arrow { align-self: center; color: var(--red); font-size: 1.4rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span, .pill { border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; font-size: 0.82rem; background: var(--bg); display: inline-block; }
.pill { color: var(--red); font-weight: 600; margin-bottom: 12px; }
.os-note { margin: 14px 0 0 !important; font-size: 0.75rem; color: var(--muted); }

/* Sections */
.section { padding: 72px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.signal { display: flex; flex-direction: column; gap: 10px; }
.signal .eyebrow { margin-bottom: 4px; }
label { font-weight: 600; font-size: 0.9rem; }
input[type='text'], input[type='email'], input[type='password'], input[type='url'] {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit;
}
input:focus-visible, .btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
.steps li { display: flex; gap: 22px; padding: 26px 0; border-top: 1px solid var(--line); }
.steps .num { font-family: var(--serif); font-size: 1.1rem; color: var(--red); font-weight: 700; padding-top: 4px; }
.steps h3 { font-size: 1.7rem; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; margin-top: 30px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.big-red { background: var(--red); color: #fff; border-radius: 28px; padding: 36px; }
.big-red h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 20px; }
.tick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tick-list li::before { content: '\2713'; margin-right: 10px; font-weight: 700; }
.closing { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; padding: clamp(32px, 6vw, 64px); }
.closing h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); max-width: 20ch; }
.desk-list { list-style: none; margin: 0; padding: 0; }
.desk-list li { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); }
.desk-list strong { color: var(--red); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 36px 0; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.9rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--red); }

/* Auth + forms */
.auth { width: min(520px, 100% - 40px); }
.form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.form .btn { margin-top: 8px; align-self: flex-start; }
.form .btn-row { margin: 8px 0 0; }
.form .btn-row .btn { margin-top: 0; }
.alert { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); margin: 0 0 18px; font-size: 0.92rem; }
.alert.ok { border-color: #3c8a55; }
.alert.err { border-color: var(--red); color: var(--red); }
.alert.warn { border-color: #c98a1a; }
.inline-form { display: block; }
.legal h2 { font-size: 1.5rem; margin: 32px 0 10px; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 6px; }

/* App shell */
.app { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-family: var(--serif); font-size: 1.3rem; letter-spacing: -0.02em; }
.app-body { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 65px); }
.sidebar { border-right: 1px solid var(--line); padding: 24px 16px; background: var(--bg-2); }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 90px; }
.sidebar a { padding: 11px 14px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 500; }
.sidebar a:hover { background: var(--card); }
.sidebar a.active { background: var(--red); color: #fff; }
.app-main { padding: 28px clamp(18px, 4vw, 48px) 60px; max-width: 1100px; width: 100%; }
.signed-in { margin: 0 0 16px; color: var(--muted); font-size: 0.9rem; }
.signed-in strong { color: var(--text); }
.access { margin-left: 8px; padding: 3px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.78rem; color: var(--red); background: var(--card); }
.banner { background: var(--red); border-radius: 28px; padding: clamp(28px, 5vw, 52px); margin-bottom: 24px; color: #fff; background-image: radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.16), transparent 50%); }
.banner-label { margin: 0 0 14px; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; opacity: 0.85; }
.banner h1 { font-size: clamp(2rem, 4.4vw, 3.6rem); color: #fff; max-width: 18ch; }
.app-main .card { margin-bottom: 20px; }
.app-main .grid-2 .card { margin-bottom: 0; }

.biz-menu { position: relative; }
.biz-menu summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; line-height: 1.2; padding: 7px 34px 7px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); position: relative; min-width: 160px; max-width: 240px; }
.biz-menu summary::-webkit-details-marker { display: none; }
.biz-menu summary::after { content: '\25BE'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.biz-menu summary strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 330px; max-width: calc(100vw - 32px); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.35); }
.biz-title { margin: 0 0 8px; font-weight: 600; font-size: 0.9rem; }
.biz-list { list-style: none; margin: 0; padding: 0; }
.biz-row { display: flex; align-items: center; gap: 4px; border-radius: 10px; }
.biz-row.is-active { background: var(--bg-2); }
.biz-row form { flex: 1; min-width: 0; }
.biz-row form button { width: 100%; text-align: left; background: none; border: 0; padding: 10px; font: inherit; color: var(--text); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz-row.is-active form button { font-weight: 600; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; text-decoration: none; color: var(--muted); }
.icon-btn:hover { background: var(--bg-2); color: var(--red); }
.biz-add { display: block; margin-top: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; text-decoration: none; font-weight: 600; }
.biz-full { margin: 8px 0 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .two-col, .grid-3, .grid-2, .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .nav-toggle { display: flex; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .app-body { grid-template-columns: 1fr; }
  .side-toggle { display: flex; }
  .sidebar { display: none; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  .sidebar.open { display: block; }
  .sidebar nav { position: static; }
  .topbar { padding: 10px 14px; }
  .topbar-title { display: none; }
  .biz-menu summary { min-width: 120px; max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* Features */
textarea, select, input[type='number'], input[type='datetime-local'], input[type='file'] {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.between { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.between > div { min-width: 240px; flex: 1; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 6px 0; border-top: 1px solid var(--line); }
.plain li:first-child { border-top: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.tabs a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); font-size: 0.9rem; background: var(--card); }
.tabs a.on { background: var(--red); border-color: var(--red); color: #fff; }
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.post-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.post-body { white-space: pre-wrap; margin: 0 0 8px; }
.post-tags { color: var(--red); margin: 0 0 10px; word-break: break-word; }
.post-notes { color: var(--muted); font-size: 0.88rem; border-left: 3px solid var(--line); padding-left: 12px; margin: 10px 0; white-space: pre-wrap; }
.post img.thumb, .post video.thumb { max-width: 240px; max-height: 180px; border-radius: 12px; border: 1px solid var(--line); display: block; margin: 8px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.actions form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions input[type='datetime-local'], .actions input[type='text'] { width: auto; padding: 8px 10px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; border: 1px solid var(--line); background: var(--bg); }
.badge.published { border-color: #3c8a55; color: #3c8a55; }
.badge.failed, .badge.rejected, .badge.needs_reconnect { border-color: var(--red); color: var(--red); }
.badge.scheduled, .badge.publishing, .badge.approved { border-color: #c98a1a; color: #a56d0c; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { font-size: 0.75rem; color: var(--muted); text-align: center; font-weight: 600; }
.cal .day { min-height: 96px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: var(--card); overflow: hidden; }
.cal .day.out { opacity: 0.45; }
.cal .day.today { border-color: var(--red); }
.cal .num { font-size: 0.78rem; color: var(--muted); }
.cal .ev { display: block; font-size: 0.72rem; margin-top: 3px; padding: 2px 5px; border-radius: 6px; background: var(--bg-2); color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev.published { background: rgba(60, 138, 85, 0.18); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat strong { display: block; font-family: var(--serif); font-size: 1.8rem; letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: 0.82rem; }
.chart-row { display: grid; grid-template-columns: 110px 1fr 70px; gap: 10px; align-items: center; margin: 8px 0; font-size: 0.88rem; }
.chart-row .track { height: 14px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.chart-row .fill { height: 100%; background: var(--red); border-radius: 999px; }
.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline > * { flex: 1; min-width: 150px; }
.checkrow { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.checkrow input { width: auto; margin-top: 5px; }
.nowrap-btns .btn { margin: 0; }
.scene { border-top: 1px solid var(--line); padding: 10px 0; }
@media (max-width: 960px) { .cal .day { min-height: 64px; } .week { grid-template-columns: 1fr; } .chart-row { grid-template-columns: 80px 1fr 56px; } }
