/* BLAQPLOYMENT dashboard. Mobile first: one column, large touch targets;
   wider screens (iPad and up) get two-column grids and more air. */

:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #14171c;
  --muted: #5b6472;
  --line: #e2e6ec;
  --accent: #b8860b;
  --accent-ink: #ffffff;
  --accent-soft: #fdf3d7;
  --ok: #1a7f37;
  --ok-soft: #dcf5e3;
  --warn: #9a6700;
  --warn-soft: #fff4d6;
  --bad: #c62828;
  --bad-soft: #fde2e1;
  --idle: #5b6472;
  --idle-soft: #eceff3;
  --code-bg: #0f1216;
  --code-text: #d8dee9;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 4px 16px rgb(0 0 0 / 0.04);
  --tap: 44px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d10;
    --panel: #14181d;
    --text: #e8ebef;
    --muted: #97a1ae;
    --line: #262c34;
    --accent: #f5c542;
    --accent-ink: #14171c;
    --accent-soft: #3a3113;
    --ok: #4ac26b;
    --ok-soft: #12301c;
    --warn: #e3b341;
    --warn-soft: #33290f;
    --bad: #ff7b72;
    --bad-soft: #3c1716;
    --idle: #97a1ae;
    --idle-soft: #22282f;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; min-height: 100vh; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 2rem; color: var(--muted); }

/* --- layout ------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 0.75rem;
  padding: calc(env(safe-area-inset-top) + 0.5rem) 1rem 0.5rem;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; letter-spacing: 0.02em; text-decoration: none; color: var(--text); min-height: var(--tap); }
.brand img { width: 28px; height: 28px; }
.topbar nav { margin-left: auto; display: flex; gap: 0.25rem; }
.topbar nav a { padding: 0 0.75rem; min-height: var(--tap); display: inline-flex; align-items: center; border-radius: 8px; text-decoration: none; color: var(--muted); }
.topbar nav a.active, .topbar nav a:hover { color: var(--text); background: var(--idle-soft); }
@media (max-width: 519px) {
  .topbar { flex-wrap: wrap; gap: 0.25rem; }
  .topbar nav { width: 100%; margin-left: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .topbar nav a { justify-content: center; padding: 0 0.5rem; min-width: 0; }
}

main { max-width: 1040px; margin: 0 auto; padding: 1rem 1rem calc(env(safe-area-inset-bottom) + 3rem); }
.crumbs { font-size: 0.9rem; color: var(--muted); margin: 0.25rem 0 0.75rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.crumbs a { color: var(--muted); }
h1 { font-size: 1.5rem; margin: 0.25rem 0 1rem; overflow-wrap: anywhere; }
h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }
h3 { font-size: 1rem; margin: 0 0 0.5rem; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; overflow-wrap: anywhere; }

.grid { display: grid; gap: 1rem; }
@media (min-width: 720px) {
  .grid.two { grid-template-columns: 1fr 1fr; }
  main { padding: 1.5rem 1.5rem 3rem; }
  h1 { font-size: 1.75rem; }
}

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 1rem; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 0.5rem; justify-content: space-between; flex-wrap: wrap; margin-bottom: 0.75rem; }
.card-head h2, .card-head h3 { margin: 0; }
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--accent); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 0.75rem 0; border-top: 1px solid var(--line); display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.list > li:first-child { border-top: 0; padding-top: 0; }
.list .grow { flex: 1 1 12rem; min-width: 0; }
.row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* --- controls ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: var(--tap); padding: 0 1rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; text-decoration: none; color: var(--text); font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.small { min-height: 36px; padding: 0 0.75rem; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

form.stack, .stack { display: grid; gap: 0.9rem; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.spaced { margin-top: 1rem; }
progress { width: 100%; height: 0.6rem; accent-color: var(--accent); }
[hidden] { display: none !important; }
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field > label { font-weight: 600; font-size: 0.95rem; }
.field .hint { color: var(--muted); font-size: 0.85rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; min-height: var(--tap); padding: 0.5rem 0.75rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg);
}
textarea { min-height: 6rem; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.choices { display: grid; gap: 0.5rem; }
@media (min-width: 540px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice { display: flex; gap: 0.6rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem; cursor: pointer; }
.choice input { margin-top: 0.25rem; width: 1.1rem; height: 1.1rem; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
details.advanced summary { cursor: pointer; color: var(--muted); min-height: var(--tap); display: flex; align-items: center; }

.tabs { display: flex; gap: 0.25rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 0 -1rem 1rem; padding: 0 1rem; scrollbar-width: none; }
.tabs a { white-space: nowrap; padding: 0 0.9rem; min-height: var(--tap); display: inline-flex; align-items: center; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 600; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }

/* --- status -------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: var(--idle-soft); color: var(--idle); white-space: nowrap; }
.badge::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }

.notice { border-radius: 10px; padding: 0.75rem 1rem; background: var(--idle-soft); margin: 0 0 1rem; overflow-wrap: anywhere; }
.notice.bad { background: var(--bad-soft); color: var(--bad); }

.live-indicator { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.live-indicator .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok-soft); animation: live-pulse 1.8s ease-out infinite; }
.live-indicator.paused .live-dot { background: var(--idle); animation: none; box-shadow: none; }
.live-indicator.stale .live-dot { background: var(--bad); animation: none; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .live-indicator .live-dot { animation: none; } }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }

.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty .btn { margin-top: 0.75rem; }

pre.log {
  background: var(--code-bg); color: var(--code-text); border-radius: 10px; padding: 0.75rem;
  max-height: 60vh; overflow: auto; font-size: 0.8rem; line-height: 1.5; margin: 0;
  white-space: pre-wrap; overflow-wrap: anywhere; -webkit-overflow-scrolling: touch;
}
pre:not(.log) { max-width: 100%; min-width: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
.stack > *, section { min-width: 0; }
.secret { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.secret code { flex: 1 1 14rem; padding: 0.5rem 0.75rem; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); overflow-wrap: anywhere; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 1rem); transform: translateX(-50%); max-width: calc(100% - 2rem); background: var(--text); color: var(--bg); padding: 0.75rem 1rem; border-radius: 10px; z-index: 50; box-shadow: var(--shadow); }
.toast.bad { background: var(--bad); color: #fff; }

.auth { max-width: 420px; margin: 8vh auto 0; }
.auth .brand { justify-content: center; font-size: 1.4rem; margin-bottom: 1rem; }

.card.domain { background: var(--bg); box-shadow: none; }

/* Workspace visual system. The authenticated product keeps real controls and
   page routes while making navigation, status and next actions easy to scan. */
:root{--bg:#f2f4f6;--panel:#fff;--text:#172232;--muted:#677688;--line:#dfe5eb;--accent:#a66b13;--accent-ink:#fff;--accent-soft:#fff2d7;--ok:#147e5b;--ok-soft:#e4f7ef;--warn:#98610a;--warn-soft:#fff2d8;--bad:#bf3d44;--bad-soft:#fff0f0;--idle:#66788a;--idle-soft:#e9edf1;--code-bg:#111d2b;--code-text:#d8e8ef;--radius:16px;--shadow:0 4px 26px #1523370b;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color-scheme:light}
html,body{background:var(--bg)}body{font-size:15px}.topbar{position:fixed;inset:0 auto 0 0;width:238px;display:flex;flex-direction:column;align-items:stretch;gap:0;padding:26px 15px 18px;background:#101b29;color:#edf3f8;border:0;box-shadow:8px 0 22px #1a2a3810}.topbar .brand{color:#f7f9fa;font-size:14px;letter-spacing:.035em;padding:0 8px;margin-bottom:45px}.topbar .brand img{width:32px;height:32px;border-radius:9px}.topbar nav{margin:0;display:flex;flex-direction:column;gap:5px}.topbar nav a{color:#a9b9c8;border-radius:9px;padding:0 12px;font-size:13px;font-weight:700}.topbar nav a:hover,.topbar nav a.active{background:#27394b;color:#fff}.topbar nav a.active{box-shadow:inset 3px 0 #e7b65d}.sidebar-label{font-size:10px;color:#7f92a4;font-weight:850;letter-spacing:.15em;padding:0 12px;margin-bottom:13px}.sidebar-foot{margin-top:auto;border-top:1px solid #ffffff1b;padding:18px 10px 0;color:#899bac;font-size:11px;line-height:1.6}.sidebar-foot a{color:#e9bc65;text-decoration:none}
main{width:calc(100% - 238px);max-width:1430px;margin:0 0 0 238px;padding:36px clamp(20px,4vw,64px) 72px}.crumbs{font-size:12px;font-weight:700;letter-spacing:.01em;margin:0 0 18px}.crumbs a{text-decoration:none}.crumbs a:hover{color:#946111}h1{font-size:clamp(26px,3vw,38px);letter-spacing:-.045em;line-height:1.12;margin:0 0 23px}h2{font-size:19px;letter-spacing:-.022em}.card{padding:22px;border-radius:16px;box-shadow:var(--shadow)}.card+.card{margin-top:18px}.grid{gap:18px}.grid>.card+.card{margin-top:0}a.card:hover{border-color:#e1b767;transform:translateY(-2px);box-shadow:0 12px 36px #15233718}a.card{transition:transform .15s,box-shadow .15s}.card-head{margin-bottom:15px}.list>li{padding:13px 0}.list>li:first-child{padding-top:0}.row{gap:9px}.btn{border-radius:9px;font-size:13px;font-weight:750;box-shadow:none}.btn.primary{background:#1b2d40;border-color:#1b2d40;color:#fff}.btn.primary:hover{background:#30455a}.btn:not(.primary):hover{background:#f3f6f8}.btn.danger{border-color:#e9c2c4}.btn.small{font-size:12px}.tabs{gap:6px;overflow-x:auto;scrollbar-width:thin;margin:0 0 22px;padding:0;border-color:#dfe5eb}.tabs a{font-size:13px;padding:0 13px}.tabs a.active{color:#23374a;border-color:#c58726}.badge{font-size:11px;padding:.2rem .65rem}.notice{padding:13px 16px}.field>label{font-size:13px;color:#293a4b}.field .hint{font-size:12px}input[type=text],input[type=email],input[type=password],input[type=number],input[type=url],select,textarea{background:#f8fafb;border:1px solid #dce3e9;border-radius:9px;padding:.55rem .8rem}.choice{border-radius:11px;padding:13px}.choice:has(input:checked){background:#fff7e8;border-color:#dfa94a}details.advanced summary{font-weight:700;color:#526376}dl.facts{gap:8px 15px}.empty{padding:38px 25px}.auth{max-width:none;margin:0;min-height:100vh;display:grid;grid-template-columns:minmax(300px,1fr) minmax(350px,1fr);background:#f5f7f8}.auth-story{background:#0e1b29;color:white;padding:clamp(36px,8vw,110px);display:flex;flex-direction:column;justify-content:space-between;gap:65px}.auth-story .brand{font-size:18px;color:white;justify-content:flex-start;margin:0}.auth-story h2{font-size:clamp(42px,5vw,68px);line-height:1.08;letter-spacing:-.055em;margin:0}.auth-story h2 span{color:#e7b859}.auth-story p{max-width:490px;color:#b7c6d4;line-height:1.75}.auth-story .auth-points{display:flex;flex-wrap:wrap;gap:8px}.auth-points span{border:1px solid #8ba0b345;border-radius:100px;padding:8px 12px;font-size:11px;color:#e2e9ee}.auth-content{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:45px 30px}.auth-content>.card{width:min(440px,100%);padding:32px}.auth-content .brand{font-size:16px}.auth-content h1{font-size:29px;margin-bottom:22px}.auth-content p a{font-weight:750;text-decoration:none}.auth-content p a:hover{text-decoration:underline}
.projects-hero,.project-hero{background:#142436;color:#f7f9fb;border-radius:20px;padding:clamp(25px,4vw,42px);display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:22px;position:relative;overflow:hidden}.projects-hero:after,.project-hero:after{content:"";position:absolute;width:350px;height:260px;border-radius:50%;background:radial-gradient(circle,#66839934,transparent 70%);right:-85px;top:-120px;pointer-events:none}.projects-hero h1,.project-hero h1{font-size:clamp(28px,4vw,44px);margin:7px 0 12px}.projects-hero p,.project-hero p{margin:0;color:#b5c5d3;max-width:580px;line-height:1.6}.section-kicker{font-size:10px;letter-spacing:.16em;font-weight:850;color:#e7b75f}.projects-hero .btn,.project-hero .btn{background:#e8b85c;border-color:#e8b85c;color:#162331;z-index:1;flex:none}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:24px 0 13px}.section-heading h2{margin:0}.section-heading>span{color:#748393;font-size:12px}.project-tile{display:flex!important;flex-direction:column;gap:20px;min-height:150px}.project-tile h2{margin:0}.tile-icon{width:36px;height:36px;background:#f1e7d6;color:#895c1b;border-radius:10px;display:grid;place-items:center;font-weight:900}.tile-sub{font-size:12px;color:#778596}.tile-link{margin-top:auto;color:#9b6415;font-size:12px;font-weight:800}.tile-state{display:flex;align-items:center;gap:.4rem;margin-top:-10px}.metric-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:19px}.metric-card{background:#fff;border:1px solid #e2e7ed;border-radius:14px;padding:19px 21px}.metric-card>span{font-size:11px;color:#778697;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.metric-card strong{display:block;font-size:25px;line-height:1.3;margin-top:5px;letter-spacing:-.04em}.metric-card small{display:block;color:#8795a5;font-size:11px}.flow-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin:18px 0}.flow-card{padding:17px;border:1px solid #e2e8ec;background:#fff;border-radius:13px;display:block;text-decoration:none;color:#263446;min-height:115px}.flow-card:hover{border-color:#dda950}.flow-card span{display:block;color:#a66b13;font-size:11px;font-weight:850;margin-bottom:9px}.flow-card strong{display:block;font-size:14px}.flow-card small{color:#728191;font-size:11px;line-height:1.5;display:block;margin-top:4px}.section-caption{font-size:12px;color:#798798;margin:-11px 0 18px}.create-panel{margin-top:20px}.danger-details{margin-top:23px;border-top:1px solid #e5eaee;padding-top:15px}.danger-details>summary{cursor:pointer;color:#a0464b;font-weight:700;min-height:38px}.launch-intro{background:linear-gradient(125deg,#142436,#28425a);color:#f5f8fc;border-radius:20px;padding:clamp(26px,5vw,52px) clamp(22px,5vw,58px) 52px;position:relative;overflow:hidden}.launch-intro:after{content:"";position:absolute;width:350px;height:350px;border-radius:50%;background:radial-gradient(circle,#dca84d44,transparent 70%);right:-100px;top:-150px;pointer-events:none}.launch-intro h2{font-size:clamp(30px,4vw,49px);letter-spacing:-.045em;line-height:1.08;margin:12px 0}.launch-intro p{max-width:690px;line-height:1.65;color:#c0ceda;margin:0}.launch-form{max-width:790px;margin:-23px auto 22px;position:relative;box-shadow:0 16px 42px #13263a14;padding:clamp(20px,4vw,36px)}.launch-form form{gap:18px}.launch-form .choices{margin:4px 0}.launch-form .notice{margin-top:16px}.service-intro{background:#eaf0f5;border:1px solid #d9e3ec;border-radius:13px;padding:16px 20px;margin-bottom:20px;color:#425368}.service-intro strong{color:#1d3246;display:block;margin-bottom:3px}.service-intro p{margin:0;font-size:12px;line-height:1.5}
@media(max-width:900px){.topbar{position:sticky;inset:auto;top:0;width:100%;flex-direction:row;align-items:center;padding:7px 17px;min-height:58px;box-shadow:0 2px 18px #14243714}.topbar .brand{margin:0;font-size:13px}.topbar nav{margin-left:auto;flex-direction:row}.topbar nav a{padding:0 10px}.sidebar-label,.sidebar-foot{display:none}main{width:100%;margin:0;padding:25px 20px 60px}}
@media(max-width:640px){.topbar{flex-wrap:wrap;gap:0;padding:7px 14px}.topbar .brand{min-height:38px}.topbar nav{width:100%;margin:0;display:flex;gap:2px}.topbar nav a{flex:1;justify-content:center;font-size:12px;min-height:36px}.topbar nav a.active{box-shadow:inset 0 -2px #e7b65d}main{padding:20px 15px 55px}.projects-hero,.project-hero{display:block}.projects-hero .btn,.project-hero .btn{margin-top:18px}.metric-grid{grid-template-columns:repeat(3,1fr);gap:6px}.metric-card{padding:12px 9px}.metric-card>span{font-size:9px}.metric-card strong{font-size:17px}.metric-card small{font-size:9px}.flow-grid{grid-template-columns:1fr}.flow-card{min-height:0}.auth{grid-template-columns:1fr}.auth-story{padding:23px 20px;gap:15px}.auth-story h2{font-size:30px}.auth-story p{display:none}.auth-content{padding:30px 20px}.auth-content>.card{padding:24px}}

.projects-hero h2,.project-hero h2{font-size:clamp(27px,3.7vw,43px);line-height:1.08;letter-spacing:-.045em;margin:9px 0 13px}

input[type=search]{width:100%;min-height:44px;border:1px solid #dce3e9;border-radius:9px;background:#f8fafb;padding:.55rem .8rem}.activity-search{margin:10px 0 18px;max-width:460px}.activity-feed li{align-items:flex-start}.activity-feed strong{font-size:13px;text-transform:capitalize}.activity-feed .grow>div{margin-top:3px}

/* An operator has a fifth workspace link. Do not shrink labels or unread
   badges beyond their touch targets on the narrow horizontal navigation. */
@media (max-width: 900px) {
  .topbar nav:has(a[href="#/notifications"]) { flex-wrap: wrap; }
  .topbar nav:has(a[href="#/notifications"]) a { flex-shrink: 0; gap: .3rem; }
}
@media (max-width: 640px) {
  .topbar nav:has(a[href="#/notifications"]) a { flex: 1 0 auto; }
}
/* --- operational metrics ------------------------------------------------ */
.metric-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.metric-toolbar h2,.metric-toolbar p{margin:.2rem 0}.metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin-bottom:1rem}.metric-summary{display:flex;flex-direction:column;gap:.25rem}.metric-summary strong{font-size:1.35rem;line-height:1.15}.metric-summary small{color:var(--muted)}.metrics-charts{align-items:stretch}.metric-chart{display:flex;flex-direction:column;min-height:230px}.metric-bars{height:130px;display:flex;align-items:flex-end;gap:2px;padding:8px 0;border-bottom:1px solid var(--line);overflow:hidden}.metric-bar{flex:1 1 0;min-width:2px;height:var(--metric-height);max-height:100%;background:var(--accent);border-radius:3px 3px 0 0}.metric-bar.gap{height:2px;background:var(--line);opacity:.65}.metric-note{margin:.7rem 0 0}.section-kicker{font-size:.72rem;letter-spacing:.12em;font-weight:800;color:var(--muted)}
@media(min-width:720px){.metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.metric-summary strong{font-size:1.55rem}}
@media(max-width:480px){.metric-grid{grid-template-columns:1fr 1fr}.metric-toolbar>.row{width:100%;display:grid;grid-template-columns:repeat(4,1fr)}.metric-toolbar>.row .btn{padding:0 .4rem}.metric-chart{min-height:210px}.metric-bars{height:110px}}

/* --- log explorer -------------------------------------------------------- */
.log-explorer-head{position:relative;z-index:2;display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.log-explorer-head h2,.log-explorer-head p{margin:.2rem 0}.log-export{display:flex;gap:.45rem;flex-wrap:wrap}.log-filter-card form{display:grid;grid-template-columns:minmax(220px,2fr) repeat(3,minmax(130px,1fr));gap:.75rem;align-items:end}.log-filter-card form .actions{grid-column:1/-1}.log-table-wrap{padding:0;overflow:auto}.log-table{width:100%;border-collapse:collapse;font-size:.84rem}.log-table th{position:sticky;top:0;z-index:1;background:var(--panel);text-align:left;padding:.7rem;border-bottom:1px solid var(--line)}.log-table td{padding:.62rem .7rem;vertical-align:top;border-bottom:1px solid var(--line)}.log-table tr:last-child td{border-bottom:0}.log-time{min-width:150px;white-space:nowrap}.log-source{display:inline-block;font-size:.67rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;padding:.15rem .35rem;border:1px solid var(--line);border-radius:999px;margin-right:.4rem}.log-source-build{color:var(--accent)}.log-message{min-width:360px;white-space:pre-wrap;overflow-wrap:anywhere}.log-table code{font-size:.72rem}.log-export .btn{min-height:40px}
@media(max-width:760px){.log-filter-card form{grid-template-columns:1fr 1fr}.log-filter-card form>label:first-child{grid-column:1/-1}.log-explorer-head{align-items:flex-start;flex-direction:column}.log-message{min-width:260px}}
@media(max-width:480px){.log-filter-card form{display:flex;flex-direction:column;align-items:stretch}.log-filter-card form .actions{width:100%}.log-export{display:grid;grid-template-columns:repeat(3,1fr);width:100%}.log-export .btn{padding:0 .35rem}.log-table{font-size:.78rem}.log-time{min-width:130px}.log-message{min-width:220px}}
.log-actions{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}.log-copy{position:relative}.log-copy summary{list-style:none;cursor:pointer}.log-copy summary::-webkit-details-marker{display:none}.log-copy-menu{position:absolute;right:0;top:calc(100% + .35rem);z-index:5;min-width:130px;padding:.4rem;background:var(--panel);border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 30px rgba(0,0,0,.18);display:grid;gap:.35rem}.log-copy:not([open]) .log-copy-menu{display:none}@media(max-width:480px){.log-actions{width:100%}.log-actions>.btn,.log-actions>.log-copy{flex:1 1 auto}.log-copy summary{text-align:center}.log-copy-menu{left:0;right:auto}}

/* --- Phase 9 interactive console + files -------------------------------- */
.interactive-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.interactive-head h2,.interactive-head p{margin:.2rem 0}.console-session{margin-bottom:1rem}.console-history{display:flex;flex-direction:column;gap:.75rem}.console-history>h2{margin-bottom:0}.console-command{background:#0b0d12;border:1px solid var(--line);border-radius:12px;padding:.85rem;color:#f1f4f8;min-width:0}.console-command-head{display:flex;justify-content:space-between;gap:.75rem;align-items:flex-start}.console-command-head .mono{white-space:pre-wrap;overflow-wrap:anywhere}.console-output{margin:.65rem 0 0;background:#05070a;border-radius:8px;padding:.75rem;max-height:340px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;color:#dce7dc}.console-error{color:#ffb6b6}.file-toolbar{display:flex;flex-direction:column;gap:1rem;margin-bottom:1rem}.file-table{width:100%;border-collapse:collapse}.file-table th,.file-table td{text-align:left;padding:.7rem;border-bottom:1px solid var(--line);vertical-align:middle}.file-table th{background:var(--panel);position:sticky;top:0}.file-kind{display:inline-block;font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;border:1px solid var(--line);border-radius:999px;padding:.15rem .4rem}.file-kind-directory{color:var(--accent)}.file-kind-symlink{color:#d5a93d}.file-editor textarea{font-family:var(--mono,monospace);min-height:300px;white-space:pre;overflow:auto}.file-editor .card-head{gap:.75rem;flex-wrap:wrap}.file-toolbar form{min-width:0}.file-toolbar input[type=file]{max-width:100%}
@media(max-width:700px){.interactive-head{align-items:flex-start;flex-direction:column}.interactive-head>.row{width:100%}.interactive-head>.row .btn{flex:1}.console-command-head{flex-direction:column}.file-toolbar>.grid.two{display:flex;flex-direction:column}.file-table td:last-child .row{flex-wrap:wrap}.file-editor textarea{min-height:240px}}
@media(max-width:480px){.console-command{padding:.7rem}.console-output{font-size:.76rem}.file-table{font-size:.8rem}.file-table th,.file-table td{padding:.55rem}.file-editor textarea{min-height:220px}}

.edge-panel { min-width: 0; }
.edge-panel textarea, .edge-panel input, .edge-panel select { max-width: 100%; box-sizing: border-box; }
.edge-rule { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; overflow-wrap: anywhere; }
.edge-rule span { flex: 1 1 100%; }
.edge-preview { white-space: pre-wrap; overflow-wrap: anywhere; }

.settings-tabs { display:flex; flex-wrap:wrap; gap:.5rem; }
.project-settings { min-width:0; }
.project-settings .card { min-width:0; overflow-wrap:anywhere; }
.project-settings .secret { white-space:pre-wrap; overflow-wrap:anywhere; }
.project-settings input,.project-settings select,.project-settings textarea { max-width:100%; box-sizing:border-box; }
.project-settings.compact .settings-tabs .btn { padding:.3rem .5rem; font-size:.85rem; }

/* --- universal migrations ------------------------------------------------ */
.migration-hero{background:linear-gradient(125deg,#112033,#293f56);color:#f5f8fb;border-radius:20px;padding:clamp(25px,4vw,44px);display:grid;grid-template-columns:minmax(0,1.4fr) minmax(230px,.6fr);gap:28px;margin-bottom:26px;overflow:hidden;position:relative}
.migration-hero:after{content:"";position:absolute;width:380px;height:380px;border-radius:50%;background:radial-gradient(circle,#d8a9503d,transparent 70%);right:-120px;top:-190px;pointer-events:none}
.migration-hero h2{font-size:clamp(30px,4vw,48px);letter-spacing:-.045em;line-height:1.08;margin:8px 0 13px}
.migration-hero p{max-width:730px;color:#bdcad6;line-height:1.65;margin:0}
.migration-hero .section-kicker{color:#e8b95f}
.migration-safety{align-self:end;display:grid;gap:8px;padding:18px;border:1px solid #ffffff24;border-radius:14px;background:#ffffff0c;z-index:1}
.migration-safety strong{font-size:13px}
.migration-safety span{font-size:11px;color:#c8d5df}
.migration-safety span:before{content:"✓";margin-right:7px;color:#e7b65d;font-weight:900}
.migration-provider-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:10px;margin-bottom:24px}
.migration-provider{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px;min-width:0}
.migration-provider strong{font-size:13px}
.provider-modes{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}
.provider-modes span{font-size:9px;text-transform:uppercase;letter-spacing:.04em;background:#eef2f5;color:#627386;border-radius:999px;padding:4px 7px}
.migration-import-grid{align-items:start;margin:22px 0 28px}
.migration-connect{min-width:0}
.migration-connect h2{margin:.2rem 0 .45rem}
.migration-connect .card-head p{line-height:1.55;margin:.4rem 0 0}
.migration-connect textarea{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.45;resize:vertical}
.migration-session-list{display:grid;gap:16px}
.migration-session{min-width:0}
.migration-session h2{margin:.2rem 0 0}
.migration-meta{display:flex;gap:12px;flex-wrap:wrap;color:var(--muted);font-size:11px;margin:-2px 0 14px}
.migration-totals{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:12px 0 16px}
.migration-totals span{background:#f5f7f9;border:1px solid var(--line);border-radius:9px;padding:8px;font-size:10px;color:var(--muted)}
.migration-totals strong{display:block;font-size:17px;color:var(--text);margin-bottom:1px}
.migration-issues{display:grid;gap:7px;margin:11px 0 16px}
.migration-issue{border-left:3px solid var(--line);background:#f7f9fa;border-radius:0 8px 8px 0;padding:9px 11px}
.migration-issue.warning{border-left-color:var(--warn);background:var(--warn-soft)}
.migration-issue.blocking{border-left-color:var(--bad);background:var(--bad-soft)}
.migration-issue.info{border-left-color:var(--idle)}
.migration-issue strong{font-size:11px;line-height:1.4}
.migration-issue small{display:block;color:var(--muted);font-size:10px;margin-top:3px;line-height:1.45}
.migration-actions{flex-wrap:wrap;margin-top:12px}
.migration-editor{margin-top:15px;border-top:1px solid var(--line);padding-top:12px}
.migration-editor>summary{cursor:pointer;font-weight:750;color:#4d6072;min-height:36px}
@media(max-width:900px){
  .migration-hero{grid-template-columns:1fr}
  .migration-safety{align-self:auto}
  .migration-totals{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:640px){
  .migration-provider-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .migration-import-grid{display:flex;flex-direction:column}
  .migration-totals{grid-template-columns:repeat(2,minmax(0,1fr))}
  .migration-actions{display:grid;grid-template-columns:1fr 1fr}
  .migration-actions .btn{width:100%}
}
@media(max-width:420px){
  .migration-provider-grid{grid-template-columns:1fr}
  .migration-actions{grid-template-columns:1fr}
}

.migration-data-panel{margin-top:16px;padding-top:15px;border-top:1px solid var(--line)}
.migration-data-panel .section-heading{margin:0 0 10px}
.migration-data-status{display:grid;gap:7px;margin-bottom:12px}
.migration-data-row{display:grid;grid-template-columns:minmax(150px,1fr) minmax(120px,.65fr);gap:5px 12px;align-items:center;background:#f6f8fa;border:1px solid var(--line);border-radius:9px;padding:9px 11px;font-size:11px}
.migration-data-row strong{font-size:11px;overflow-wrap:anywhere}
.migration-data-row>span{text-transform:capitalize;color:#526579}
.migration-data-row small{grid-column:1/-1}
@media(max-width:640px){.migration-data-row{grid-template-columns:1fr}.migration-data-row small{grid-column:auto}}

.migration-cutover-list{display:grid;gap:9px;margin:10px 0 14px}
.migration-cutover-domain{border:1px solid var(--line);border-radius:10px;padding:11px;background:#f7f9fa}
.migration-cutover-domain>small{display:block;margin-top:7px}
.migration-dns-record{display:grid;grid-template-columns:auto minmax(120px,.8fr) minmax(180px,1.2fr);gap:8px;align-items:center;margin-top:7px;padding:7px 8px;border-radius:8px;background:var(--panel);border:1px solid var(--line);font-size:10px}
.migration-dns-record code{overflow-wrap:anywhere;white-space:normal}
@media(max-width:640px){.migration-dns-record{grid-template-columns:auto 1fr}.migration-dns-record code:last-child{grid-column:1/-1}}
/* CSP-safe metric chart height buckets. */
.metric-h-1{height:5%}.metric-h-2{height:10%}.metric-h-3{height:15%}.metric-h-4{height:20%}.metric-h-5{height:25%}.metric-h-6{height:30%}.metric-h-7{height:35%}.metric-h-8{height:40%}.metric-h-9{height:45%}.metric-h-10{height:50%}.metric-h-11{height:55%}.metric-h-12{height:60%}.metric-h-13{height:65%}.metric-h-14{height:70%}.metric-h-15{height:75%}.metric-h-16{height:80%}.metric-h-17{height:85%}.metric-h-18{height:90%}.metric-h-19{height:95%}.metric-h-20{height:100%}
