:root {
  /* Hotel101 brand (hotel101.com): green #046A38, secondary #4A9473, mint #80C4A5, Inter */
  --bg: #f9fafb; --surface: #ffffff; --text: #333333; --muted: #6b7280; --border: #e5e7eb;
  --brand: #046a38; --brand-hover: #03552d; --brand-ink: #ffffff; --brand-soft: #e8f3ed;
  --brand-2: #4a9473; --brand-mint: #80c4a5; --accent: #046a38;
  --ok: #046a38; --ok-bg: #e8f3ed; --warn: #9a6700; --warn-bg: #fff4d6; --err: #c62828; --err-bg: #fdecea;
  --code-bg: #0f2a1c; --code-text: #e6f2eb;
  --radius: 10px; color-scheme: light; --shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
pre { background: var(--code-bg); color: var(--code-text); padding: 14px 16px; border-radius: 8px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
:not(pre) > code { background: var(--border); padding: 1px 5px; border-radius: 4px; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,.05); position: sticky; top: 0; z-index: 10; }
.topbar .inner { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo img { height: 40px; width: auto; display: block; }
.logo .name { font-size: 16px; letter-spacing: -.2px; }
.logo .name span { color: var(--accent); font-weight: 600; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a { color: var(--muted); padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.nav a.active, .nav a:hover { color: var(--accent); background: var(--brand-soft); text-decoration: none; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.who form { margin: 0; }

main { max-width: 1180px; margin: 0 auto; padding: 28px 16px 64px; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 28px 0 12px; }
.sub { color: var(--muted); margin: 0 0 24px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 24px; }
.stat .n { font-size: 30px; font-weight: 700; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 13px; }
.two { grid-template-columns: 2fr 1fr; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-running, .s-succeeded { color: var(--ok); background: var(--ok-bg); }
.s-stopped, .s-failed { color: var(--err); background: var(--err-bg); }
.s-degraded, .s-running-job { color: var(--warn); background: var(--warn-bg); }
.s-not-deployed { color: var(--muted); background: var(--bg); }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--border); padding: 1px 8px; border-radius: 999px; }

.btn { font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.danger { color: var(--err); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.ms { background: #2f2f2f; color: #fff; border-color: #2f2f2f; padding: 12px 16px; }

input[type=text], input[type=password], input[type=url], input[type=email], input[type=search], input[type=number], textarea, select { width: 100%; font: inherit; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
textarea { min-height: 110px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 6px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
form.inline { display: inline; margin: 0; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--err-bg); color: var(--err); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 20px 0; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--text); border-color: var(--brand); text-decoration: none; }

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; word-break: break-all; }

.feed { list-style: none; padding: 0; margin: 0; }
.feed li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.feed li:last-child { border: 0; }
.feed time { color: var(--muted); display: block; font-size: 12px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(180deg, var(--brand) 0 38%, var(--bg) 38%); }
.login .brandmark { display: flex; align-items: center; gap: 14px; }
.login .brandmark img { height: 64px; }
.login .brandmark .name { font-size: 20px; font-weight: 700; line-height: 1.2; }
.login .brandmark .name span { display: block; color: var(--accent); font-weight: 600; font-size: 15px; }
.login .card { width: 100%; max-width: 420px; padding: 32px; }
.login h1 { margin-top: 16px; }
.divider { text-align: center; color: var(--muted); font-size: 12px; margin: 22px 0 6px; }

.guide-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.guide-nav a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--muted); }
.guide-nav a.active, .guide-nav a:hover { background: var(--brand-soft); color: var(--accent); text-decoration: none; }
.prose { max-width: 820px; }
.prose h1 { font-size: 26px; }
.prose h2 { border-top: 1px solid var(--border); padding-top: 20px; }
.prose blockquote { margin: 0 0 20px; color: var(--muted); font-size: 16px; border: 0; padding: 0; }
.prose table { margin: 12px 0; }
.prose li { margin: 4px 0; }
@media (max-width: 760px) { .guide-layout { grid-template-columns: 1fr; } .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 8px; } }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.logbox { max-height: 70vh; min-height: 300px; }

input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand-mint); outline-offset: 0; border-color: var(--brand); }
.stat { border-top: 3px solid var(--brand); }
.site-footer { background: var(--brand); color: #fff; }
.site-footer .inner { max-width: 1180px; margin: 0 auto; padding: 18px 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.site-footer a { color: #fff; opacity: .9; }
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1; width: 100%; }

/* ---- lifecycle stages & marketplace ---- */
.stage { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; }
.st-development { color: #5b6470; background: #f1f3f5; border-color: #e1e5ea; }
.st-beta { color: #8a5a00; background: #fff6e0; border-color: #f5dca0; }
.st-production { color: #fff; background: var(--brand); }
.stage-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; padding: 0; border: 0; }
.stage-dot.st-development { background: #9aa3ad; }
.stage-dot.st-beta { background: #e0a100; }
.stage-dot.st-production { background: var(--brand); }
.tabs .count, h2 .count { font-size: 12px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 0 8px; margin-left: 4px; font-weight: 500; }
.stage-tabs { margin-top: 0; }
.request-card { border-left: 4px solid #e0a100; margin-bottom: 20px; }

.lifecycle { margin-bottom: 16px; }
.lifecycle h3 { font-size: 14px; margin: 0 0 8px; }
.pipeline { list-style: none; display: flex; gap: 0; padding: 0; margin: 0; flex-wrap: wrap; }
.pipeline li { padding: 6px 16px 6px 12px; color: var(--muted); font-size: 14px; border: 1px solid var(--border); background: var(--bg); margin-right: -1px; }
.pipeline li:first-child { border-radius: 8px 0 0 8px; }
.pipeline li:last-child { border-radius: 0 8px 8px 0; }
.pipeline li.done { color: var(--text); }
.pipeline li.current { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-mint); font-weight: 600; position: relative; z-index: 1; }
.promo { grid-template-columns: 1fr 1fr; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
@media (max-width: 760px) { .promo { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.checklist li { padding: 3px 0; }
.checklist li.ok { color: var(--ok); }
.checklist li.todo { color: var(--muted); }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 0 0 10px; }
.listing { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }

.market-hero { background: linear-gradient(135deg, var(--brand-soft), #ffffff); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 8px; }
.market-search { display: flex; gap: 10px; flex-wrap: wrap; max-width: 640px; }
.market-search input { flex: 2; min-width: 180px; background: #fff; }
.market-search select { flex: 1; min-width: 150px; width: auto; background: #fff; }
.market-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.app-card { display: flex; flex-direction: column; min-height: 230px; }
.app-card h3 { margin: 12px 0 4px; font-size: 17px; }
.app-card .desc { margin: 0 0 14px; }
.app-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; letter-spacing: .5px; }
.danger-zone { border-color: #f3c4c4; } .btn.danger:disabled { opacity: .45; cursor: not-allowed; }

/* ---- side navigation layout ---- */
body.has-sidenav { display: block; }
.has-sidenav .content { margin-left: 248px; min-height: 100vh; display: flex; flex-direction: column; }
.has-sidenav .content > main { flex: 1; width: 100%; max-width: 1800px; margin: 0; padding: 28px 32px 64px; }
.has-sidenav .site-footer .inner { max-width: none; padding: 14px 32px; }
.sidenav { position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 30; }
.sidenav > .logo { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.sidenav nav { flex: 1; overflow-y: auto; padding: 8px 12px 16px; }
.nav-section { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 16px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: 14px; }
.nav-item svg { width: 18px; height: 18px; fill: var(--muted); flex: none; }
.nav-item:hover { background: var(--bg); text-decoration: none; }
.nav-item.active { background: var(--brand-soft); color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.nav-item.active svg { fill: var(--brand); }
.sidenav-user { border-top: 1px solid var(--border); padding: 14px 16px; display: grid; grid-template-columns: 36px 1fr; gap: 4px 10px; align-items: center; }
.sidenav-user .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.sidenav-user .who-text { min-width: 0; font-size: 13px; line-height: 1.35; }
.sidenav-user .who-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidenav-user .who-text .mono { color: var(--muted); font-size: 12px; }
.sidenav-user form { grid-column: 1 / -1; margin: 8px 0 0; }
.sidenav-user form .btn { width: 100%; }
.nav-toggle, .mobilebar, .nav-scrim { display: none; }

@media (max-width: 900px) {
  .has-sidenav .content { margin-left: 0; }
  .has-sidenav .content > main { padding: 20px 16px 48px; }
  .has-sidenav .site-footer .inner { padding: 14px 16px; }
  .mobilebar { display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 20; height: 56px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .mobilebar .logo img { height: 32px; }
  .hamburger { display: grid; gap: 4px; cursor: pointer; padding: 6px; }
  .hamburger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; display: block; }
  .sidenav { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 24px rgba(0,0,0,.15); }
  .nav-toggle:checked ~ .sidenav { transform: none; }
  .nav-toggle:checked ~ .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 25; }
}
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: -10px 0 18px; background: var(--surface); }
.seg a { padding: 6px 14px; font-size: 13px; color: var(--muted); }
.seg a + a { border-left: 1px solid var(--border); }
.seg a.on { background: var(--brand); color: #fff; }
.seg a:hover { text-decoration: none; }

/* ---- app-store look: icons, tiles, store page ---- */
.app-icon-img { display: grid; place-items: center; flex: none; object-fit: cover; color: #fff; font-weight: 700; letter-spacing: .5px; box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 0 0 1px rgba(0,0,0,.06); background: #fff; }
.app-icon-img.size-md { width: 48px; height: 48px; border-radius: 12px; font-size: 16px; }
.app-icon-img.size-lg { width: 72px; height: 72px; border-radius: 17px; font-size: 22px; }
.app-icon-img.size-xl { width: 104px; height: 104px; border-radius: 24px; font-size: 32px; }
.app-icon-img.size-xxl { width: 128px; height: 128px; border-radius: 29px; font-size: 40px; }
.app-icon-img.gen { text-shadow: 0 1px 2px rgba(0,0,0,.2); }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px 24px; }
.app-tile { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.tile-link { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; color: inherit; }
.tile-link:hover { text-decoration: none; }
.tile-link:hover strong { color: var(--brand); }
.tile-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.tile-text strong { font-size: 15px; }
.tile-text span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile-text em { font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }
.get-btn { flex: none; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; padding: 5px 18px; border-radius: 999px; text-transform: uppercase; letter-spacing: .3px; }
.get-btn:hover { background: var(--brand); color: #fff; text-decoration: none; }
.get-btn.off { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.get-btn.off:hover { background: var(--bg); color: var(--muted); }
.get-btn.big { font-size: 15px; padding: 8px 30px; background: var(--brand); color: #fff; }
.get-btn.big:hover { background: var(--brand-hover); }

.featured { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; color: inherit; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.feature-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,24,40,.1); }
.feature-cover { aspect-ratio: 16 / 9; background: var(--brand-soft); overflow: hidden; }
.feature-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-meta { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.feature-meta .tile-text { flex: 1; }

.crumb { margin: 0 0 16px; font-size: 14px; }
.store-head { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.store-title h1 { font-size: 30px; margin: 0; }
.store-tagline { font-size: 17px; color: var(--muted); margin: 4px 0 2px; }
.store-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.store-facts > div { padding: 14px 10px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.store-facts > div + div { border-left: 1px solid var(--border); }
.store-facts > div > span { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.gallery { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
.gallery a { flex: none; scroll-snap-align: start; }
.gallery img { height: 340px; max-width: 80vw; width: auto; border-radius: 14px; border: 1px solid var(--border); object-fit: cover; display: block; background: var(--bg); }
@media (max-width: 700px) { .gallery img { height: 240px; } .store-head { gap: 18px; } }
.about { white-space: pre-line; font-size: 15px; max-width: 760px; }
.dev-list { list-style: none; padding: 0; }
.dev-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.avatar.sm { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }

.store-editor { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.store-editor-grid { display: grid; grid-template-columns: 160px 1fr; gap: 24px; margin-top: 12px; }
@media (max-width: 760px) { .store-editor-grid { grid-template-columns: 1fr; } }
.icon-edit { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.icon-edit form { margin: 0; }
.file-btn { position: relative; overflow: hidden; margin: 0; font-weight: 500; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.shots-edit { margin-top: 18px; }
.shots { display: flex; gap: 12px; overflow-x: auto; margin-top: 10px; }
.shot { position: relative; margin: 0; flex: none; }
.shot img { height: 150px; border-radius: 10px; border: 1px solid var(--border); display: block; }
.shot form { position: absolute; top: 6px; right: 6px; margin: 0; }
.shot-del { width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.shot-del:hover { background: var(--err); }
.app-icon-img.size-sm { width: 28px; height: 28px; border-radius: 7px; font-size: 10px; } .app-name { display: inline-flex; align-items: center; gap: 10px; vertical-align: middle; }

/* ---- server stats ---- */
.metric-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.metric { padding: 16px 18px 12px; }
.metric-title { font-size: 13px; font-weight: 600; color: var(--muted); }
.metric-big { font-size: 26px; font-weight: 700; margin: 6px 0 10px; line-height: 1.1; }
.metric-big span { font-size: 13px; font-weight: 500; color: var(--muted); }
.lvl { font-size: 12px; font-weight: 600; white-space: nowrap; }
.lvl-ok { color: var(--ok); } .lvl-warn { color: var(--warn); } .lvl-crit { color: var(--err); }
.meter { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; }
.lvl-bg-ok { background: var(--brand); } .lvl-bg-warn { background: #e0a100; } .lvl-bg-crit { background: var(--err); }
.spark-wrap { position: relative; margin-top: 12px; cursor: crosshair; }
.spark { width: 100%; height: 64px; display: block; overflow: visible; }
.spark-area { fill: var(--brand-soft); }
.spark-line { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark-dot { fill: var(--brand); stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark-cross { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0; }
.spark-tip { position: absolute; top: -30px; transform: translateX(-50%); background: var(--text); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.spark-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.usage-table td.num, td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-bar { height: 4px; background: var(--bg); border-radius: 999px; margin-top: 4px; width: 120px; overflow: hidden; }
.mini-bar div { height: 100%; background: var(--brand-2); border-radius: 999px; }
details.card summary { cursor: pointer; }

/* ---- login with mascot ---- */
.login .card.login-split { max-width: 900px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.login-art { background: #fff; display: grid; place-items: center; padding: 24px; border-right: 1px solid var(--border); }
.login-art img { width: 100%; max-width: 400px; height: auto; display: block; }
.login-form { padding: 36px 32px; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 760px) {
  .login .card.login-split { grid-template-columns: 1fr; max-width: 440px; }
  .login-art { border-right: 0; border-bottom: 1px solid var(--border); padding: 16px 16px 8px; }
  .login-art img { max-width: 240px; }
  .login-form { padding: 24px; }
}

/* ---- blueprints ---- */
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.bp-card { display: flex; flex-direction: column; }
.bp-card h3 { margin: 0; font-size: 16px; }
.bp-card p { color: var(--muted); font-size: 14px; margin: 14px 0 10px; }
.bp-badge { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 11px; color: #fff; font-weight: 700; font-size: 14px; font-family: ui-monospace, Menlo, monospace; }
.bp-badge.lg { width: 64px; height: 64px; border-radius: 15px; font-size: 20px; }
.steps { padding-left: 20px; max-width: 820px; }
.steps li { margin: 8px 0; }
.file-list { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.file-list li { padding: 3px 0; border-bottom: 1px dashed var(--border); }
.new-app-form { max-width: 860px; }
.bp-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.bp-option { margin: 0; font-weight: 400; cursor: pointer; }
.bp-option input { position: absolute; opacity: 0; }
.bp-option-body { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.bp-option-body > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.bp-option-body .bp-badge { width: 36px; height: 36px; border-radius: 9px; font-size: 12px; }
.bp-option input:checked + .bp-option-body { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-mint); background: var(--brand-soft); }
.bp-option input:focus-visible + .bp-option-body { outline: 2px solid var(--brand); }
.bp-note { display: flex; gap: 12px; align-items: flex-start; background: var(--brand-soft); border-radius: 10px; padding: 12px; }
.prune { margin: 14px 0 6px; padding: 12px; background: var(--bg); border-radius: 8px; } .prune label.check { align-items: flex-start; font-size: 13px; margin-bottom: 8px; } .prune label.check input { margin-top: 3px; }

/* ---- loading feedback ---- */
.page-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-mint)); z-index: 100; opacity: 0; pointer-events: none; }
.page-progress.active { opacity: 1; animation: progress-crawl 8s cubic-bezier(.1, .7, .2, 1) forwards; }
.page-progress.done { width: 100%; opacity: 0; transition: opacity .3s .1s; }
@keyframes progress-crawl { from { width: 0; } 20% { width: 45%; } to { width: 92%; } }
.spinner { display: inline-block; width: 22px; height: 22px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
.spinner.sm { width: 11px; height: 11px; border-width: 2px; margin-right: 6px; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border: 2px solid currentColor; border-color: rgba(255,255,255,.9) rgba(255,255,255,.9) rgba(255,255,255,.9) transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn:not(.primary):not(.ms).is-loading::after { border-color: var(--muted) var(--muted) var(--muted) transparent; }
.job-state { display: flex; align-items: center; gap: 12px; text-align: right; }
.job-state .hint { margin: 2px 0 0; }
a.badge.busy:hover { text-decoration: none; filter: brightness(.97); }
a.badge.busy::before { display: none; }

/* ---- login mascot: gentle float + shadow, CSS only ---- */
.login-art { position: relative; overflow: hidden; }
.login-art .mascot { animation: mascot-float 5s ease-in-out infinite; transform-origin: 50% 80%; will-change: transform; }
.login-art::after { content: ""; position: absolute; left: 50%; bottom: 13%; width: 34%; height: 14px; margin-left: -17%; border-radius: 50%; background: radial-gradient(rgba(4, 106, 56, .18), transparent 70%); animation: mascot-shadow 5s ease-in-out infinite; pointer-events: none; }
@keyframes mascot-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 30% { transform: translateY(-9px) rotate(-.8deg); } 60% { transform: translateY(-4px) rotate(.6deg); } }
@keyframes mascot-shadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 30% { transform: scaleX(.85); opacity: .7; } }
@media (prefers-reduced-motion: reduce) {
  .login-art .mascot, .login-art::after, .page-progress.active, .spinner, .btn.is-loading::after { animation: none; }
}
.readiness { margin-bottom: 16px; } .readiness .checklist { margin-bottom: 10px; }

/* ---- build with AI ---- */
.ai-steps { display: flex; gap: 0; list-style: none; padding: 0; margin: 0 0 20px; counter-reset: step; flex-wrap: wrap; }
.ai-steps li { counter-increment: step; padding: 8px 18px 8px 12px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 14px; margin-right: -1px; }
.ai-steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); margin-right: 8px; font-size: 12px; font-weight: 700; }
.ai-steps li:first-child { border-radius: 8px 0 0 8px; } .ai-steps li:last-child { border-radius: 0 8px 8px 0; }
.ai-steps li.on { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-mint); font-weight: 600; position: relative; z-index: 1; }
.ai-steps li.on::before { background: var(--brand); color: #fff; }
.ai-steps li.done::before { content: "✓"; background: var(--brand-mint); color: #fff; }
.build-form { max-width: 900px; }
.prompt-box { min-height: 460px; margin-top: 12px; font-size: 12.5px; line-height: 1.5; background: var(--bg); }
.ai-links { display: grid; gap: 8px; margin-bottom: 12px; }
.ai-link { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; color: var(--text); }
.ai-link span { color: var(--muted); font-size: 13px; }
.ai-link:hover { border-color: var(--brand); background: var(--brand-soft); text-decoration: none; }
kbd { font-family: ui-monospace, Menlo, monospace; font-size: 12px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--surface); }
.upload-zip { background: var(--brand-soft); border-radius: 10px; padding: 14px; margin-bottom: 4px; }
.upload-zip input[type=file] { font-size: 13px; max-width: 100%; }
.deploy-tabs { margin: 0 0 14px; } .deploy-tabs a { cursor: pointer; } pre.cmd { font-size: 12px; margin: 6px 0 12px; }
.prompt-filters { gap: 10px; margin-bottom: 14px; } .idea-cell { max-width: 460px; } .idea-cell a { color: var(--text); } .idea-cell a:hover { color: var(--brand); }

/* ---- backups ---- */
.day-card summary { cursor: pointer; list-style: none; }
.day-card summary::-webkit-details-marker { display: none; }
.confirm-del { display: inline-block; position: relative; }
.confirm-del > summary { list-style: none; display: inline-flex; }
.confirm-del > summary::-webkit-details-marker { display: none; }
.confirm-del[open] > summary { display: none; }
.confirm-del form { display: inline-flex; align-items: center; gap: 8px; margin: 0; background: var(--err-bg); border-radius: 8px; padding: 4px 4px 4px 10px; }
.next-steps { border-left: 4px solid var(--brand); margin-bottom: 16px; } .next-steps p, .next-steps ol { margin: 6px 0; }
.s-down { color: var(--err); background: var(--err-bg); } .s-checking { color: var(--muted); background: var(--bg); }
.reassign { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); } .reassign h3 { font-size: 14px; margin: 0 0 8px; }

input:not([type]) { width: 100%; font: inherit; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .form-2col { grid-template-columns: 1fr; } }
.request-box { background: #fff6e0; border: 1px solid #f5dca0; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }

/* ---- notifications & approvals ---- */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.nav-badge.action { background: #d97706; }
.mobile-bell { margin-left: auto; position: relative; display: inline-flex; padding: 6px; }
.mobile-bell svg { width: 22px; height: 22px; fill: var(--text); }
.mobile-bell .nav-badge { position: absolute; top: -2px; right: -6px; height: 18px; min-width: 18px; font-size: 10px; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.notif-list li:last-child { border-bottom: 0; }
.notif-list li.unread { background: var(--brand-soft); }
.notif-list li.unread .notif-text { font-weight: 600; }
.notif-text { flex: 1; color: var(--text); display: flex; flex-direction: column; }
.notif-text:hover { text-decoration: none; color: var(--brand); }
.notif-text time { font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }
.notif-icon { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: var(--muted); }
.notif-icon.k-action { background: #d97706; } .notif-icon.k-error { background: var(--err); } .notif-icon.k-success { background: var(--brand); } .notif-icon.k-info { background: #3b82c4; }
.approval .pipeline-mini { margin-top: 4px; font-size: 13px; color: var(--muted); }
.approval-body { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
@media (max-width: 760px) { .approval-body { grid-template-columns: 1fr; } }
.approval-actions { display: flex; flex-direction: column; gap: 10px; }
.approval-actions form { margin: 0; }

/* ---- reviews, ratings, changelog ---- */
.stars { color: #e0a100; letter-spacing: 1px; }
.stars.small { font-size: 13px; }
.rating-line { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--text); }
.rating-line:hover { text-decoration: none; }
.whats-new { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 8px; }
.reviews-grid { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .reviews-grid { grid-template-columns: 1fr; } }
.rating-summary { text-align: center; }
.big-avg { font-size: 48px; font-weight: 700; line-height: 1; }
.rating-summary .stars { font-size: 20px; margin: 6px 0 2px; }
.dist { margin-top: 12px; display: grid; gap: 4px; }
.dist-row { display: grid; grid-template-columns: 28px 1fr 24px; gap: 8px; align-items: center; font-size: 12px; }
.dist-bar { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.dist-bar div { height: 100%; background: #e0a100; border-radius: 999px; }
.review-form textarea { margin-top: 8px; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; margin: 6px 0 2px; }
.star-input input { position: absolute; opacity: 0; width: 0; }
.star-input label { font-size: 28px; line-height: 1; color: #d6d9de; cursor: pointer; margin: 0; padding: 0 1px; font-weight: 400; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #e0a100; }
.star-input input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }
.review-list { list-style: none; padding: 0; margin: 16px 0 0; }
.review { padding: 14px 0; border-bottom: 1px solid var(--border); }
.review-text { margin: 8px 0 0; white-space: pre-line; }
.dev-reply { margin: 10px 0 0 16px; padding: 10px 12px; background: var(--brand-soft); border-radius: 8px; font-size: 14px; }
.dev-reply p { margin: 4px 0 0; white-space: pre-line; }
.review-actions { gap: 14px; margin-top: 6px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; list-style: none; }
.link-btn.danger { color: var(--err); }
.link-btn:hover { text-decoration: underline; }
.reply-box > summary::-webkit-details-marker { display: none; }
.reply-box[open] { flex-basis: 100%; }
.reply-box form { margin-top: 8px; }
.changelog-form summary { cursor: pointer; }
.changelog-form form { margin-top: 10px; }
.timeline { list-style: none; padding: 0 0 0 18px; margin: 12px 0 0; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 16px 14px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid var(--bg); }
.timeline li.auto::before { background: var(--brand-mint); }
.timeline li.auto strong { color: var(--muted); font-weight: 600; }

/* Wide screens: use the space. Marketplace hero spans the page; tiles fill more columns. */
.market-hero .sub { max-width: 900px; }
.tile-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tile-text .tile-by { font-size: 12px; color: var(--text); opacity: .75; -webkit-line-clamp: 1; }
.name-stack { display: inline-flex; flex-direction: column; line-height: 1.25; }
.name-stack .mono { font-size: 11px; }
h1 .app-slug { font-size: 14px; font-weight: 400; vertical-align: middle; }

/* Marketplace tiles: breathing room between name, tagline, creator and category */
.tile-text { gap: 3px; line-height: 1.3; }
.tile-text strong { margin-bottom: 1px; }
.tile-text .tile-by { margin-top: 3px; }
.tile-text em { margin-top: 3px; }
.feature-meta .tile-text { gap: 2px; }

/* ---- marketplace hero v2 ---- */
.market-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 28px 32px; background: linear-gradient(120deg, var(--brand-soft) 0%, #ffffff 70%); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 12px; overflow: hidden; }
.hero-main { min-width: 0; }
.hero-top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.market-hero h1 { font-size: 28px; margin: 0 0 6px; }
.hero-sub { color: var(--muted); margin: 0; max-width: 640px; }
.hero-stats { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hero-stats span { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px; font-size: 13px; color: var(--muted); }
.hero-stats b { color: var(--brand); font-size: 14px; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hero-actions .btn.primary { padding: 10px 18px; font-size: 15px; }
.hero-links { font-size: 13px; color: var(--muted); }
.hero-search { display: flex; gap: 10px; margin-top: 20px; align-items: stretch; }
.search-box { flex: 1; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; margin: 0; font-weight: 400; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search-box svg { width: 20px; height: 20px; fill: var(--muted); flex: none; }
.search-box input { border: 0; background: transparent; padding: 13px 0; font-size: 16px; outline: none; box-shadow: none; }
.search-box input:focus { outline: none; }
.hero-search select { width: auto; background: #fff; border-radius: 12px; padding: 0 14px; }
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 500; }
.chip span { color: var(--muted); font-size: 12px; }
.chip:hover { border-color: var(--brand); text-decoration: none; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.on span { color: rgba(255,255,255,.8); }
.hero-mascot { width: 190px; height: auto; mix-blend-mode: multiply; }
.no-match { margin: 8px 0 0; }
@media (max-width: 1100px) { .hero-mascot { display: none; } .market-hero { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .market-hero { padding: 20px; } .hero-actions { align-items: flex-start; } .hero-search { flex-direction: column; } .hero-search select { padding: 10px 14px; } }
.app-tile[hidden], .market-section[hidden] { display: none !important; }

/* ---- add an app chooser ---- */
.add-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 8px 0 18px; }
.add-choice { display: flex; flex-direction: column; color: var(--text); padding: 22px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.add-choice:hover { text-decoration: none; border-color: var(--brand); box-shadow: 0 8px 24px rgba(16,24,40,.08); transform: translateY(-2px); }
.add-choice h2 { margin: 14px 0 6px; font-size: 18px; }
.add-choice p { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
.add-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.add-for { margin-top: auto; font-size: 12px; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: .4px; }
.idle-row td { opacity: .8; }

/* ---- security assessment ---- */
.grade { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #fff; flex: none; }
.grade.small { width: 26px; height: 26px; border-radius: 7px; font-size: 14px; display: inline-grid; vertical-align: middle; }
.g-A { background: #046a38; } .g-B { background: #4a9473; } .g-C { background: #d29b00; } .g-D { background: #d9661f; } .g-F { background: #c62828; }
.assess-head { display: flex; gap: 18px; align-items: center; margin: 16px 0; }
.sev-counts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.sev { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.sev-critical { background: #c62828; color: #fff; } .sev-high { background: #fdecea; color: #b42318; } .sev-medium { background: #fff4d6; color: #9a6700; } .sev-low { background: #eef2f6; color: #475467; } .sev-info { background: #f2f4f7; color: #667085; }
.assess-cat { margin-bottom: 12px; padding: 0; }
.assess-cat summary { padding: 14px 18px; cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.findings { margin: 0; }
.findings td { vertical-align: top; font-size: 14px; }
.findings td:first-child { width: 90px; }
.findings td:last-child { max-width: 260px; word-break: break-all; }
.current-report { background: var(--brand-soft); }
.assess-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; background: var(--bg); border-radius: 8px; font-size: 14px; }
.services-card { margin-bottom: 16px; }
.services { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 8px 0 10px; }
.svc { display: inline-flex; align-items: center; gap: 8px; }
