:root {
  --ink:#182822;
  --muted:#69766f;
  --paper:#f8f5ed;
  --canvas:#e9eee8;
  --line:#d5ddd4;
  --moss:#1e4a3b;
  --moss-dark:#10251e;
  --clay:#d86f4b;
  --sun:#f0b85c;
  --cream:#fffdf7;
}

* { box-sizing:border-box; }
html { background:var(--canvas); }
body {
  margin:0;
  min-width:320px;
  color:var(--ink);
  background:radial-gradient(circle at 90% 0%,rgba(240,184,92,.26),transparent 29rem),linear-gradient(120deg,#e5eee6 0%,#f8f5ed 48%,#edf0e9 100%);
  font-family:Georgia,"Times New Roman",serif;
}
button,input { font:inherit; }
button { cursor:pointer; }
button:disabled { cursor:not-allowed; opacity:.55; }
code,pre { font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace; }

.app-shell { display:grid; grid-template-columns:244px minmax(0,1fr); min-height:100vh; }
.sidebar {
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  padding:1.35rem 1rem;
  color:#f3f7ef;
  background:linear-gradient(165deg,#183b30,#10251e 64%,#0c1b16);
}
.brand { display:flex; align-items:center; gap:.75rem; color:inherit; text-decoration:none; font-size:1.12rem; font-weight:700; line-height:.95; letter-spacing:-.04em; }
.brand-mark { display:grid; width:46px; height:46px; place-items:center; border:1px solid rgba(22,54,44,.25); border-radius:50%; color:#16362c; background:var(--sun); font-family:Georgia,serif; font-size:1rem; letter-spacing:-.08em; }
.sidebar-section { margin-top:4rem; }
.sidebar-label,.eyebrow { margin:0; font-family:"Trebuchet MS",sans-serif; font-size:.67rem; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }
.sidebar-label { margin:0 .8rem .7rem; color:#9eb0a6; }
.nav-item { display:flex; align-items:center; gap:.75rem; width:100%; padding:.8rem; border-radius:10px; color:#cdd9d1; font-family:"Trebuchet MS",sans-serif; font-size:.86rem; }
.nav-item span { color:#82968b; font-size:.62rem; font-weight:800; letter-spacing:.08em; }
.nav-item.is-active { color:#16372b; background:var(--sun); }
.nav-item.is-active span { color:#315448; }
.sidebar-note { display:grid; gap:.35rem; margin-top:auto; padding:1rem .8rem; border-top:1px solid rgba(255,255,255,.12); color:#d3ded6; font-family:"Trebuchet MS",sans-serif; font-size:.76rem; line-height:1.4; }
.sidebar-note small { color:#90a398; font-size:.7rem; }
.status-dot { width:8px; height:8px; border-radius:50%; background:#78d49c; box-shadow:0 0 0 4px rgba(120,212,156,.12); }

.main-content { width:min(100%,1440px); padding:clamp(1.4rem,4vw,3.5rem); }
.topbar { display:flex; align-items:start; justify-content:space-between; gap:1rem; margin-bottom:2.4rem; }
.topbar h1 { margin:.45rem 0 0; font-size:clamp(2.3rem,4vw,4.2rem); font-weight:400; letter-spacing:-.07em; line-height:.91; }
.eyebrow { color:var(--moss); }
.domain-card { min-width:235px; padding:.8rem 1rem; border:1px solid var(--line); border-radius:12px; background:rgba(255,253,247,.72); font-family:"Trebuchet MS",sans-serif; text-align:right; }
.domain-card span { display:block; color:var(--muted); font-size:.63rem; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.domain-card strong { display:block; margin-top:.3rem; font-size:.9rem; }

.hero-panel { display:flex; justify-content:space-between; gap:2rem; padding:clamp(1.5rem,4vw,3.1rem); overflow:hidden; border-radius:25px; color:#f5f5eb; background:linear-gradient(122deg,#163f32,#205844 62%,#5c7548); box-shadow:0 24px 55px rgba(26,67,51,.18); }
.hero-panel .eyebrow { color:var(--sun); }
.hero-panel h2 { max-width:720px; margin:.55rem 0 1rem; font-size:clamp(2rem,4vw,3.85rem); font-weight:400; letter-spacing:-.065em; line-height:.95; }
.hero-panel p:not(.eyebrow) { max-width:620px; margin:0; color:#d4e1d9; font-family:"Trebuchet MS",sans-serif; line-height:1.55; }
.hero-quote { align-self:end; max-width:180px; padding:1.1rem; border:1px solid rgba(255,255,255,.22); border-radius:14px; color:#e5ede7; font-size:1.05rem; font-style:italic; line-height:1.25; }

.workspace-grid { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(300px,.7fr); gap:1rem; margin-top:1rem; align-items:start; }
.panel { padding:1.35rem; border:1px solid var(--line); border-radius:18px; background:rgba(255,253,247,.78); box-shadow:0 12px 32px rgba(30,63,47,.05); }
.access-panel { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,.65fr); gap:1.5rem; align-items:end; margin-top:1rem; }
.access-form { display:grid; grid-template-columns:minmax(180px,1fr) auto auto; gap:.55rem; align-items:end; }
.panel-heading { display:flex; align-items:start; justify-content:space-between; gap:1rem; }
.panel h2 { margin:.45rem 0 0; font-size:1.8rem; font-weight:400; letter-spacing:-.05em; }
.panel-copy { margin:.8rem 0 0; color:var(--muted); font-family:"Trebuchet MS",sans-serif; font-size:.84rem; line-height:1.5; }
.pill { display:inline-flex; align-items:center; min-height:27px; padding:0 .6rem; border-radius:999px; color:var(--moss); background:#e6efe7; font-family:"Trebuchet MS",sans-serif; font-size:.62rem; font-weight:900; letter-spacing:.05em; text-transform:uppercase; white-space:nowrap; }

.redirect-list { display:grid; gap:.8rem; margin-top:1.25rem; }
.redirect-list.is-locked .redirect-card { opacity:.58; }
.redirect-card { display:grid; grid-template-columns:50px minmax(0,1fr); gap:1rem; padding:1rem; border:1px solid #d7e0d7; border-radius:13px; background:#f9fbf6; }
.route-number { display:grid; place-items:center; align-self:start; width:42px; height:42px; border-radius:12px; color:#f8f5ed; background:var(--moss); font-family:"Trebuchet MS",sans-serif; font-size:.7rem; font-weight:900; letter-spacing:.08em; }
.route-content { display:grid; gap:.72rem; min-width:0; }
label { display:grid; gap:.35rem; color:var(--muted); font-family:"Trebuchet MS",sans-serif; font-size:.67rem; font-weight:900; letter-spacing:.05em; text-transform:uppercase; }
input { width:100%; min-height:42px; padding:.7rem .75rem; border:1px solid #cfd9d0; border-radius:9px; outline:0; color:var(--ink); background:#fffefa; font-family:"Trebuchet MS",sans-serif; font-size:.86rem; font-weight:400; letter-spacing:normal; text-transform:none; }
input:focus { border-color:#5c9076; box-shadow:0 0 0 3px rgba(68,128,98,.12); }
input:invalid { border-color:#c76d55; }
.public-url-row { display:grid; grid-template-columns:1fr auto; gap:.25rem .6rem; align-items:center; padding:.68rem .75rem; border:1px dashed #adc3b2; border-radius:9px; background:#f3f8f1; }
.public-url-row span { grid-column:1 / -1; color:var(--moss); font-family:"Trebuchet MS",sans-serif; font-size:.58rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.public-url-row strong { overflow-wrap:anywhere; font-family:"Trebuchet MS",sans-serif; font-size:.78rem; }
.text-button { border:0; padding:.25rem; color:var(--moss); background:transparent; font-family:"Trebuchet MS",sans-serif; font-size:.63rem; font-weight:900; text-decoration:underline; text-underline-offset:3px; text-transform:uppercase; }

.form-actions { display:flex; flex-wrap:wrap; gap:.55rem; margin-top:.35rem; }
.button { min-height:42px; padding:.7rem 1rem; border:0; border-radius:9px; font-family:"Trebuchet MS",sans-serif; font-size:.68rem; font-weight:900; letter-spacing:.06em; text-transform:uppercase; }
.button-dark { color:#fff; background:var(--moss); }
.button-accent { color:#203e35; background:var(--sun); }
.button-ghost { color:var(--moss); border:1px solid #b9cbbd; background:transparent; }
.button-light { width:100%; color:#203e35; background:#f4d27b; }
.status-message { min-height:1.2rem; margin:0; color:var(--moss); font-family:"Trebuchet MS",sans-serif; font-size:.73rem; line-height:1.4; }
.status-message.is-error { color:#a34b34; }

.side-stack { display:grid; gap:1rem; }
.preview-panel { color:#f7f4e8; background:linear-gradient(150deg,#254b51,#173630); }
.preview-panel .eyebrow { color:#a8d8d1; }
.preview-panel h2 { margin-bottom:1rem; }
pre { min-height:185px; margin:0 0 1rem; padding:1rem; overflow:auto; border:1px solid rgba(255,255,255,.15); border-radius:11px; color:#dce8df; background:rgba(6,22,17,.38); font-size:.72rem; line-height:1.65; white-space:pre-wrap; word-break:break-word; }
.instructions-panel ol { display:grid; gap:.6rem; padding-left:1.3rem; color:var(--ink); font-family:"Trebuchet MS",sans-serif; font-size:.82rem; line-height:1.45; }
.instructions-panel > p:last-child { margin:1rem 0 0; color:var(--muted); font-family:"Trebuchet MS",sans-serif; font-size:.76rem; line-height:1.5; }

@media (max-width:1000px) {
  .workspace-grid { grid-template-columns:1fr; }
  .side-stack { grid-template-columns:1fr 1fr; }
  .access-panel { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .app-shell { display:block; }
  .sidebar { position:relative; height:auto; min-height:0; }
  .sidebar-section { display:none; }
  .sidebar-note { margin-top:1.5rem; }
  .topbar,.hero-panel { flex-direction:column; }
  .domain-card { width:100%; text-align:left; }
  .hero-quote { align-self:start; max-width:none; }
  .side-stack { grid-template-columns:1fr; }
  .access-form { grid-template-columns:1fr; }
  .access-form .button { width:100%; }
}
@media (max-width:520px) {
  .main-content { padding:1rem; }
  .redirect-card { grid-template-columns:1fr; }
  .route-number { width:36px; height:36px; }
  .public-url-row { grid-template-columns:1fr; }
  .form-actions .button { width:100%; }
}
