:root {
  --brand: #1f5eff;
  --brand-ink: #ffffff;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #1b1f27;
  --muted: #667085;
  --line: #e4e7ec;
  --good: #067647;
  --good-bg: #e7f6ee;
  --warn: #b54708;
  --warn-bg: #fef4e6;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --panel: #1b1f27; --ink: #eceff4; --muted: #98a2b3; --line: #2b313c;
    --good: #4ade80; --good-bg: #12301f; --warn: #fbbf24; --warn-bg: #33270d; --bad: #f87171; --bad-bg: #3a1614;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.right { margin-left: auto; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.hidden { display: none !important; }

/* shell */
.topbar { background: var(--brand); color: var(--brand-ink); }
.topbar .inner { max-width: 1120px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; color: inherit; }
.nav { display: flex; gap: 4px; }
.nav a { color: inherit; opacity: .85; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: rgba(255, 255, 255, .15); text-decoration: none; opacity: 1; }
.nav a.active { background: rgba(255, 255, 255, .22); opacity: 1; font-weight: 600; }
.who { font-size: 13px; display: flex; align-items: center; gap: 10px; }
.who button { background: rgba(255, 255, 255, .18); color: inherit; border: 0; }
.who button:hover { background: rgba(255, 255, 255, .3); }
main { max-width: 1120px; margin: 0 auto; padding: 24px 20px 64px; }

/* panels */
.panel { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.panel > .head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel > .head h2 { margin: 0; }
.panel > .body { padding: 18px; }
.pagehead { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.pagehead p { margin: 4px 0 0; color: var(--muted); }

/* controls */
button, .button { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .button:hover { border-color: var(--muted); text-decoration: none; }
button.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
button.primary:hover { filter: brightness(1.08); }
button.danger, .button.danger { color: var(--bad); }
button.small, .button.small { padding: 4px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); min-width: 0; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
form.inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 18px; border-bottom: 1px solid var(--line); }
td { padding: 11px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
td.actions { text-align: right; white-space: nowrap; }
td.actions button { margin-left: 4px; }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); }

/* chips */
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line); color: var(--muted); }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.brand { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }

/* cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; color: inherit; }
a.card:hover { text-decoration: none; border-color: var(--brand); }
.card h2 { margin: 0; }
.card .meta { display: flex; gap: 14px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .n { font-size: 28px; font-weight: 700; line-height: 1.2; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat.hot { border-color: var(--warn); background: var(--warn-bg); }
.stat.hot .n { color: var(--warn); }
.stat.win .n { color: var(--good); }

/* upload */
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); transition: .15s; background: var(--panel); }
.drop.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--panel)); color: var(--ink); }
.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 6px; }
.progress > div { height: 100%; background: var(--brand); width: 0; transition: width .1s; }
.upload-item { text-align: left; padding: 8px 0; font-size: 14px; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 10px 14px; color: var(--muted); }
.tabs button.active { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }

/* dialogs and toasts */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 64px); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); background: var(--panel); color: var(--ink); }
dialog::backdrop { background: rgba(10, 14, 22, .5); }
dialog .head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
dialog .body { padding: 6px 0 12px; overflow: auto; max-height: calc(100vh - 190px); }
dialog .pad { padding: 16px 20px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1b1f27; color: #fff; padding: 11px 18px; border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); z-index: 99; max-width: 90vw; }
.toast.error { background: var(--bad); }
.secret { background: var(--warn-bg); border: 1px solid var(--warn); border-radius: 8px; padding: 12px 14px; color: var(--ink); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #000)); }
.login .box { background: var(--panel); border-radius: 16px; padding: 32px; width: min(400px, 100%); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); display: flex; flex-direction: column; gap: 16px; }
.login h1 { font-size: 24px; }
.login .err { color: var(--bad); min-height: 20px; font-size: 14px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 8px; }

.hash { cursor: copy; }
.tree-path { word-break: break-all; }
@media (max-width: 720px) {
  .topbar .inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px 16px; }
  th, td { padding: 10px 12px; }
  .hide-sm { display: none; }
}

/* data tables, search, platform console */
.dt-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.scroll { overflow-x: auto; }
.pager { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--ink); }
th .arrow { color: var(--brand); font-size: 10px; }
mark { background: color-mix(in srgb, #ffd54a 55%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.actions-inline { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
td.actions .actions-inline { justify-content: flex-end; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.logo-preview { min-width: 140px; min-height: 56px; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; padding: 8px; background: var(--bg); }
.logo-preview img { max-height: 48px; max-width: 220px; }
.topbar.platform { background: #2b3445; }
.swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; display: inline-block; }
.kv { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-top: 6px; }
.kv > span:first-child { min-width: 130px; }
.kv .mono { word-break: break-all; }

dialog .body { overflow-x: hidden; }
dialog label.check { flex-wrap: wrap; }

/* sign-in */
.pw-row { display: flex; gap: 6px; align-items: stretch; }
.pw-row input { flex: 1; min-width: 0; }
.forgot { text-align: center; font-size: 14px; }

/* storage */
.storage { margin-bottom: 16px; }
.meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-bottom: 6px; }
.meter > div { height: 100%; background: var(--good); }
.meter.low > div { background: var(--warn); }
.meter.critical > div { background: var(--bad); }

/* project goals */
.goal-banner { display: flex; align-items: center; gap: 8px; padding: 10px 16px; margin-bottom: 12px; color: inherit; text-decoration: none; }
.goal-banner.pending { border-left: 4px solid var(--warn); }
.goal-banner.done { border-left: 4px solid var(--good); }

/* files: view switcher, thumbnail tiles, selection */
.seg { display: inline-flex; align-items: center; gap: 0; }
.seg .seg-label { font-size: 13px; margin-right: 8px; }
.seg button { border-radius: 0; margin-left: -1px; }
.seg button:first-of-type { border-radius: 8px 0 0 8px; margin-left: 0; }
.seg button:last-of-type { border-radius: 0 8px 8px 0; }
.seg button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); position: relative; }

.selbar { display: flex; align-items: center; gap: 10px; padding: 8px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; min-height: 49px; }
.selbar.active { background: color-mix(in srgb, var(--brand) 7%, var(--panel)); position: sticky; top: 0; z-index: 4; border-radius: var(--radius) var(--radius) 0 0; }
th.pickcol, td.pickcol { width: 1%; padding-right: 0; }
input.pick, .selbar input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: var(--brand); cursor: pointer; }
tr.selected { background: color-mix(in srgb, var(--brand) 7%, transparent); }

.tiles { display: grid; gap: 14px; padding: 16px; grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr)); }
.tiles.grid-s { --tile: 120px; --thumb: 96px; gap: 10px; padding: 12px; }
.tiles.grid-m { --tile: 190px; --thumb: 160px; }
.tiles.grid-l { --tile: 290px; --thumb: 250px; }
.tile { position: relative; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 8px; min-width: 0; }
.tile.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--panel)); box-shadow: 0 0 0 1px var(--brand); }
.tile .pick { position: absolute; top: 14px; left: 14px; z-index: 1; box-shadow: 0 0 0 2px var(--panel); border-radius: 3px; }
.tile-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.thumb { height: var(--thumb); display: grid; place-items: center; background: var(--bg); border-radius: 7px; overflow: hidden; }
.thumb .ftype { opacity: .8; animation: thumbwait 1.6s ease-in-out infinite; }
@keyframes thumbwait { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .thumb .ftype { animation: none; } }
.thumbstatus { position: fixed; right: 16px; bottom: 16px; z-index: 30; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .85rem; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.tile .name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .sub { color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tile .sub .chip { padding: 0 7px; }
.tile-actions { display: flex; gap: 4px; align-items: center; }
.grid-s .sub .when, .grid-s .sub .chip { display: none; }
.grid-s .tile-actions .button { padding: 3px 8px; }

.ftype { width: 56%; max-width: 120px; aspect-ratio: 4 / 5; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: .04em;
  color: #fff; background: #667085; position: relative; }
.ftype::after { content: ""; position: absolute; top: 0; right: 0; width: 22%; aspect-ratio: 1; background: rgba(255, 255, 255, .35); border-bottom-left-radius: 6px; }
.ftype.doc { background: #d92d20; } .ftype.sheet { background: #067647; } .ftype.slides { background: #dc6803; } .ftype.archive { background: #7a5af8; }
.ftype.audio { background: #c11574; } .ftype.video { background: #6927da; } .ftype.image { background: #0e9384; } .ftype.code { background: #175cd3; }

details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu .pop { position: absolute; right: 0; bottom: calc(100% + 4px); z-index: 6; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); padding: 6px; display: flex; flex-direction: column; gap: 2px; min-width: 150px; }
details.menu .pop button { border: 0; justify-content: flex-start; width: 100%; }
details.menu .pop button:hover { background: var(--bg); }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
@media (max-width: 720px) {
  .seg .seg-label { display: none; }
  .tiles.grid-l { --tile: 100%; }
}

/* brand mark: logo and/or company name (top bar, sign-in style pages, previews) */
.brandmark { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brandmark .bm-name { font-weight: 650; }
.brandmark .bm-logo { display: block; width: auto; height: auto; object-fit: contain; background: #fff; border-radius: 8px; }
.brandmark.bm-bar .bm-logo { max-height: 48px; max-width: 260px; padding: 4px 10px; }
.brandmark.bm-bar .bm-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.topbar .who { white-space: nowrap; }
.brandmark.bm-card { flex-direction: column; align-self: center; gap: 12px; text-align: center; max-width: 100%; }
.brandmark.bm-card .bm-logo { max-height: 88px; max-width: 100%; background: transparent; padding: 0; border-radius: 0; }
.brandmark.bm-card .bm-name { font-size: 20px; color: var(--ink); }
.brandmark.name-off .bm-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.login .authhead { text-align: center; }
.login .authhead h1 { font-size: 20px; }

/* settings: how it will look */
.pv { display: flex; flex-direction: column; gap: 8px; }
.pv-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin-top: 4px; }
.pv-bar { display: flex; align-items: center; gap: 20px; padding: 8px 16px; min-height: 64px; border-radius: 10px; color: #fff; flex-wrap: wrap; }
.pv-nav { opacity: .85; font-size: 14px; }
.pv-card { max-width: 340px; border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 10px; text-align: center; background: var(--panel); }
.pv-head { font-size: 18px; font-weight: 700; }
.pv-field { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.pv-btn { color: #fff; border-radius: 8px; padding: 8px; font-weight: 600; font-size: 14px; }
@media (max-width: 720px) { .brandmark.bm-bar .bm-logo { max-height: 36px; max-width: 170px; } }

/* early-testing notice and advertisement */
.notice { background: color-mix(in srgb, var(--brand) 9%, var(--panel)); border-bottom: 1px solid var(--line); font-size: 14px; }
.notice .inner { max-width: 1120px; margin: 0 auto; padding: 9px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.notice-i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font: italic 700 14px Georgia, serif; }
.notice-text { flex: 1 1 360px; min-width: 0; }
.notice-actions { display: flex; gap: 6px; align-items: center; }
.notice-actions .button.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.notice-x { font-size: 18px; line-height: 1; padding: 2px 9px; }
.adslot { margin-top: 28px; border: 1px dashed var(--muted); border-left: 4px solid var(--brand); border-radius: 12px; background: var(--panel); padding: 10px 16px 14px; max-width: 760px; }
.ad-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.ad-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ad-body { display: flex; gap: 14px; align-items: center; color: inherit; text-decoration: none; }
a.ad-body:hover { text-decoration: none; }
a.ad-body:hover strong { text-decoration: underline; }
.ad-img { max-height: 64px; max-width: 160px; border-radius: 8px; flex: none; }
.ad-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; align-items: flex-start; }
.ad-copy strong { font-size: 16px; }
.ad-cta { margin-top: 6px; background: var(--brand); color: var(--brand-ink); border-color: var(--brand); text-decoration: none; }
.ad-preview { max-width: 760px; }
.linkish { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.site-foot { margin-top: 22px; text-align: center; color: var(--muted); font-size: 12.5px; }
.auth-note { font-size: 12.5px; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 8px 10px; text-align: left; }
.about p { margin: 0 0 8px; }
.about h3 { margin-bottom: 4px; }

/* company name and logo as links; the logo grows when you rest on it */
.brandmark a { color: inherit; text-decoration: none; }
.brandmark a.bm-name[target="_blank"]:hover { text-decoration: underline; }
.brandmark a.bm-name[target="_blank"]:hover::after { content: " \2197"; font-weight: 400; opacity: .8; }
.brandmark.bm-card a.bm-name { color: var(--ink); }
.bm-logo-link { display: block; border-radius: 8px; }
.bm-logo-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.bm-logo-box { position: relative; display: block; }
.bm-zoom { display: none; position: absolute; left: 0; top: calc(100% + 10px); z-index: 60; width: min(340px, 80vw); height: auto; max-height: 240px; object-fit: contain;
  background: #fff; border-radius: 14px; padding: 16px 20px; box-shadow: 0 12px 36px rgba(0, 0, 0, .35); pointer-events: none; }
.bm-logo-link:hover .bm-zoom, .bm-logo-link:focus-visible .bm-zoom { display: block; }

/* audit trail */
tr.clickable { cursor: pointer; }
tr.clickable:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
dialog pre { max-width: 100%; overflow-x: auto; }
.sso-or { text-align: center; font-size: .85rem; }
a.button.sso { padding: 10px 14px; background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
a.button.sso:hover { filter: brightness(1.08); }

/* folders listed among the files */
.folder-row { display: flex; align-items: center; gap: 12px; padding: 2px 0; }
.folder-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
.folder-link:hover strong, .folder-link:hover .name { text-decoration: underline; }
.toast .undo { margin-left: 6px; }
.folder-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; flex: 1; min-width: 0; }
.folder-when { white-space: nowrap; }
.folder-icon { display: inline-block; flex: none; width: 26px; height: 20px; border-radius: 3px 5px 5px 5px; background: #f5b83d; position: relative; margin-top: 4px; }
.folder-icon::before { content: ""; position: absolute; top: -4px; left: 0; width: 11px; height: 6px; border-radius: 3px 3px 0 0; background: #e9a521; }
.folder-icon.big { width: 56%; max-width: 110px; height: auto; aspect-ratio: 5 / 4; border-radius: 6px 10px 10px 10px; margin: 0; }
.folder-icon.big::before { top: -10%; width: 36%; height: 14%; border-radius: 6px 6px 0 0; }
.tile.folder { background: color-mix(in srgb, #f5b83d 7%, var(--panel)); }
.folder-tile .folder-link { flex-direction: column; align-items: stretch; gap: 6px; }
@media (max-width: 640px) { .folder-when { display: none; } }

/* the guide */
.guide { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.guide-toc-wrap { position: sticky; top: 74px; }
.guide-toc-wrap summary { display: none; cursor: pointer; font-weight: 600; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.guide-toc ul { list-style: none; margin: 0 0 10px; padding: 0; }
.guide-toc a { display: block; padding: 6px 10px; border-radius: 7px; color: var(--ink); text-decoration: none; }
.guide-toc a:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.guide-toc a.active { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-weight: 600; }
.guide-part { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; margin: 12px 10px 4px; }
.guide-body { min-width: 0; }
.guide-body .body { max-width: 860px; line-height: 1.6; }
.guide-title { font-size: 1.6rem; margin: 2px 0 14px; }
.guide-body h2:not(.guide-title) { margin: 26px 0 8px; font-size: 1.25rem; }
.guide-body h3 { margin: 20px 0 6px; font-size: 1.05rem; }
.guide-body h4 { margin: 14px 0 4px; font-size: .95rem; color: var(--muted); }
.guide-body ul, .guide-body ol { padding-left: 1.4em; }
.guide-body li { margin: 4px 0; }
.guide-body li > p { margin: 4px 0; }
.guide-body code { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; font-size: .9em; }
.guide-code { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; }
.guide-code code { border: 0; padding: 0; background: none; }
.guide-table { border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; }
.guide-table th, .guide-table td { padding: 8px 12px; vertical-align: top; }
.guide-shot { display: block; margin: 10px 0 14px; }
.guide-shot img { max-width: min(100%, 760px); height: auto; border: 1px solid var(--line); border-radius: 8px; display: block; }
.callout { border-left: 4px solid var(--muted); background: var(--bg); border-radius: 0 8px 8px 0; padding: 4px 14px; margin: 12px 0; }
.callout.tip { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--panel)); }
.callout.warn { border-color: #b54708; background: #fef4e6; color: #3a2a12; }
.guide-steps { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 800px) {
  .guide { grid-template-columns: 1fr; }
  .guide-toc-wrap { position: static; }
  .guide-toc-wrap summary { display: block; }
  .guide-steps { flex-direction: column; }
}
