:root {
  --ink: #16332c;
  --muted: #6d7d77;
  --cream: #f5f1e8;
  --paper: #fffdf7;
  --lime: #c8f05a;
  --orange: #e7653b;
  --line: #d9ddd2;
  --shadow: 0 24px 70px rgba(33, 54, 47, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar { position: sticky; top: 0; z-index: 20; height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 4vw; border-bottom: 1px solid rgba(22,51,44,.12); background: rgba(245,241,232,.92); backdrop-filter: blur(16px); }
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; color: var(--cream); background: var(--ink); border-radius: 50% 50% 50% 12px; font: 700 22px Georgia, serif; }
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
nav { display: flex; gap: 28px; }
nav a { color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 650; }
.status { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; }
.status i { width: 9px; height: 9px; border-radius: 50%; background: #d2a529; box-shadow: 0 0 0 5px rgba(210,165,41,.12); }
.status i.online { background: #4a9b65; box-shadow: 0 0 0 5px rgba(74,155,101,.12); }

main { max-width: 1380px; margin: auto; padding: 0 4vw 100px; }
.hero { min-height: 620px; display: grid; grid-template-columns: 1.45fr .55fr; gap: 7vw; align-items: center; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 16px; color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; max-width: 900px; font: 600 clamp(54px, 7vw, 104px)/.9 Georgia, serif; letter-spacing: -.055em; }
h1 em { color: var(--orange); font-weight: 400; }
.lead { max-width: 650px; margin: 28px 0; color: var(--muted); font-size: 18px; line-height: 1.7; }
.hero-actions, .button-row, .toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.primary, .secondary, .text-button { border: 0; border-radius: 999px; padding: 13px 20px; font-weight: 750; }
.primary { color: var(--cream); background: var(--ink); }
.primary:hover { background: var(--orange); }
.secondary { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.text-button { padding-left: 0; color: var(--orange); background: transparent; text-align: left; }
.hero-card { position: relative; padding: 34px; color: var(--cream); background: var(--ink); border-radius: 140px 140px 22px 22px; box-shadow: var(--shadow); overflow: hidden; }
.hero-card:after { content: ""; position: absolute; width: 180px; height: 180px; right: -50px; top: -50px; border: 34px solid var(--lime); border-radius: 50%; opacity: .9; }
.hero-card > span { opacity: .68; font-size: 13px; }
.hero-card > strong { display: block; margin: 28px 0 70px; font: 500 54px Georgia, serif; }
.hero-card dl { margin: 0; }
.hero-card dl div { display: flex; justify-content: space-between; padding: 13px 0; border-top: 1px solid rgba(255,255,255,.14); }
.hero-card dt { opacity: .55; }
.hero-card dd { margin: 0; font-family: ui-monospace, monospace; font-size: 12px; }
.pulse { width: 12px; height: 12px; margin-bottom: 34px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 10px rgba(200,240,90,.1); }

.metric-grid { display: grid; grid-template-columns: repeat(4,1fr); margin: 44px 0 110px; border: 1px solid var(--line); background: var(--paper); }
.metric-grid article { padding: 28px; border-right: 1px solid var(--line); }
.metric-grid article:last-child { border: 0; }
.metric-grid span, .metric-grid small { display: block; color: var(--muted); font-size: 12px; }
.metric-grid strong { display: block; margin: 12px 0 4px; font: 500 30px Georgia, serif; }

.workspace { margin: 120px 0; scroll-margin-top: 100px; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; margin-bottom: 34px; }
.section-heading h2 { margin: 0; font: 500 48px Georgia, serif; letter-spacing: -.03em; }
.section-heading > p { max-width: 520px; justify-self: end; color: var(--muted); line-height: 1.6; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.wide-left { grid-template-columns: .75fr 1.25fr; }
.panel { padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: 0 12px 40px rgba(33,54,47,.05); }
.panel-title { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.panel-title span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--orange); background: #f8dfd4; font-size: 11px; font-weight: 800; }
.panel-title h3 { margin: 0; font: 500 25px Georgia, serif; }
label { display: block; margin: 14px 0; color: var(--muted); font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; margin-top: 7px; padding: 13px 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(231,101,59,.1); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dev-controls { margin-top: 24px; padding-top: 14px; border-top: 1px dashed var(--line); }
.card-list { min-height: 180px; margin-top: 20px; }
.card-list.empty { display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.item-card { display: grid; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.item-card:last-child { border: 0; }
.item-card strong { font: 500 21px Georgia, serif; }
.item-card small { color: var(--muted); }
.item-actions { display: flex; gap: 8px; margin-top: 5px; }
.item-actions button { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: transparent; font-size: 11px; font-weight: 750; }

.explorer { display: grid; grid-template-columns: .85fr 1.15fr; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.explorer form { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; padding: 28px; background: var(--paper); }
.explorer form textarea { grid-column: 1/-1; font-family: ui-monospace, monospace; }
.explorer pre { min-height: 360px; margin: 0; padding: 30px; color: #d9f4e8; background: #10251f; overflow: auto; font: 12px/1.65 ui-monospace, monospace; }
#toast { position: fixed; right: 24px; bottom: 24px; max-width: 380px; padding: 14px 18px; color: white; background: var(--ink); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .2s; }
#toast.show { opacity: 1; transform: translateY(0); }
#toast.error { background: #9f392b; }

@media (max-width: 900px) {
  nav { display: none; }
  .hero, .section-heading, .two-column, .wide-left, .explorer { grid-template-columns: 1fr; }
  .hero { padding: 70px 0; }
  .hero-card { border-radius: 80px 80px 20px 20px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid article:nth-child(2) { border-right: 0; }
  .metric-grid article { border-bottom: 1px solid var(--line); }
  .section-heading > p { justify-self: start; }
  .explorer form { grid-template-columns: 1fr; }
  .explorer form textarea { grid-column: auto; }
}
