/* Stash — styles */
:root {
  --bg: #F4F5F7; --surface: #FFFFFF; --ink: #12151A; --ink-2: #3A404B; --muted: #5B6270;
  --line: #E2E5EA; --line-2: #D5D9E0; --soft: #EEF0F3;
  --accent: #2B55E6; --accent-ink: #1C3DB0; --accent-soft: #E8EEFF;
  --warn: #B45309; --warn-ink: #8A4108; --warn-soft: #FEF3E2;
  --bad: #B42318; --bad-ink: #7A1A12; --bad-soft: #FDECEA;
  --good: #16794A; --good-ink: #0F5132; --good-soft: #E6F4EC;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --r: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.45; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
h1, h2, h3 { line-height: 1.2; }
.muted { color: var(--muted); }
.center { text-align: center; }
.inline { display: inline; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; }
code, pre, .mono { font-family: var(--mono); }
code { font-size: .92em; background: var(--soft); padding: 1px 5px; border-radius: 4px; }
input, select, textarea, button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #B9C0CA; color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.btn-dark:hover { background: #2A2F38; color: #fff; }
.btn-danger { background: #fff; border-color: #F1C5C0; color: var(--bad); font-weight: 600; }
.btn-danger:hover { background: var(--bad-soft); color: var(--bad); border-color: #E8A39B; }
.btn-danger-solid { background: #D9382B; border-color: #D9382B; color: #fff; font-weight: 600; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost-light { border: 1px solid #5B6270; background: transparent; color: #fff; min-height: 34px; padding: 0 12px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.btn-sm { min-height: 36px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.link-btn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0 8px; min-height: 36px; font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; border-radius: 8px; }
.link-btn.danger { color: var(--bad); }
.link-btn:hover { background: var(--soft); }
.icon-btn { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--muted); border-radius: var(--r); cursor: pointer; }
.icon-btn:hover { background: var(--soft); color: var(--ink); }

/* Top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 18px; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.brand.big { justify-content: center; margin-bottom: 18px; }
.brand.big .brand-mark { width: 40px; height: 40px; font-size: 22px; border-radius: 10px; }
.brand.big .brand-name { font-size: 26px; }
.mainnav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
.mainnav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.mainnav a:hover { background: var(--soft); color: var(--ink); }
.mainnav a[aria-current] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

/* Flash */
.flash { max-width: 1600px; margin: 16px auto 0; padding: 12px 16px; border-radius: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; width: calc(100% - 48px); }
.flash span { flex: 1; }
.flash-ok { background: var(--ink); color: #fff; }
.flash-error { background: var(--bad-soft); color: var(--bad-ink); }
.flash-warn { background: var(--warn-soft); color: var(--warn-ink); }

/* Alerts */
.alert { padding: 10px 14px; border-radius: var(--r); margin: 0 0 14px; }
.alert-error { background: var(--bad-soft); color: var(--bad-ink); }
.alert-ok { background: var(--good-soft); color: var(--good-ink); }
.alert-warn { background: var(--warn-soft); color: var(--warn-ink); }

/* Layout */
.page { max-width: 1600px; margin: 0 auto; padding: 24px; }
.page-narrow { max-width: 1100px; }
.page-mid { max-width: 1440px; }
.layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.sidebar { flex: 1 1 240px; display: flex; flex-direction: column; gap: 22px; }
.content { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head h1 { margin: 0; font-family: var(--display); font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
.card > p:first-child { margin-top: 0; }
.section-title { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea, .input, .select { width: 100%; min-height: 44px; border: 1px solid var(--line-2); border-radius: var(--r); padding: 0 12px; background: #fff; }
.field textarea, textarea.input { padding: 10px 12px; resize: vertical; min-height: 96px; }
.hint { font-size: 12px; color: var(--muted); margin: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.check input { width: 18px; height: 18px; flex: none; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 6px; margin: 0 0 16px; }
legend { font-weight: 600; padding: 0 6px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row > .grow { flex: 1 1 220px; min-width: 0; }

/* Search */
.search { flex: 1 1 260px; max-height: 46px; min-width: 0; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 0 12px; min-height: 44px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; min-height: 42px; }
.search .ic { color: var(--muted); }
.kbd { font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }

/* Sidebar filters */
.filters { display: flex; flex-direction: column; gap: 2px; }
.filter { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.filter:hover { background: #E9EBEF; color: var(--ink); }
.filter[aria-current] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.filter .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter .count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 4px; flex: none; display: inline-block; }
.pill { font-family: var(--mono); font-size: 12px; padding: 1px 8px; border-radius: 10px; }
.pill-warn { background: var(--warn-soft); color: var(--warn-ink); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; background: #fff; }
a.chip:hover { border-color: #B9C0CA; color: var(--ink); }
.chip-cat { background: var(--bg); border-color: transparent; color: var(--ink); font-weight: 500; }
.chip-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn-ink); font-weight: 600; }
.chip-bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); font-weight: 600; }
.chip-good { background: var(--good-soft); border-color: transparent; color: var(--good-ink); font-weight: 600; }
.chip-blue { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); font-weight: 600; }

/* Queue strip */
.strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.strip:hover { border-color: var(--line-2); color: var(--ink); }
.strip b { display: inline-flex; align-items: center; gap: 8px; }
.meter { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.bar { display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; vertical-align: middle; }
.bar > i { display: block; height: 100%; background: var(--good); }
.bar.full > i { background: var(--warn); }
.bar.wide { width: 100%; height: 8px; border-radius: 4px; }
.bar.blue > i { background: var(--accent); }

/* Card grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 20px; }
.lcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.lcard:hover { box-shadow: 0 6px 24px rgba(18, 21, 26, .08); }
.shot { position: relative; display: block; aspect-ratio: 16 / 10; background: #E9ECF0; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.shot-badge { position: absolute; left: 10px; bottom: 10px; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 6px; background: var(--warn-soft); color: var(--warn-ink); }
.shot-letter { display: flex; align-items: center; justify-content: center; }
.shot-tile { width: 64px; height: 64px; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 30px; }
.shot-dead { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: #ECEDEF; color: var(--bad); font-family: var(--mono); font-size: 12px; font-weight: 500; }
.lbody { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lmeta { display: flex; align-items: center; gap: 8px; }
.fav { width: 20px; height: 20px; border-radius: 5px; flex: none; object-fit: contain; }
.fav-letter { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; }
.domain { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.star { width: 36px; height: 36px; margin: -8px -8px -8px 0; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #8A919C; border-radius: 8px; }
.star:hover { background: var(--soft); }
.star.on svg { fill: #F2A900; stroke: #B07A00; }
.ltitle { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; line-height: 1.3; }
.ltitle:hover { color: var(--accent); }
.lsum { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lfoot { display: flex; align-items: center; gap: 2px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--soft); }
.lfoot .when { font-size: 12px; color: var(--muted); flex: 1; }

/* Table */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table.tbl { width: 100%; min-width: 1000px; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 16px; width: 44px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 16px; text-align: right; white-space: nowrap; }
.tbl tr.sel td { background: #F3F6FF; }
.tbl input[type=checkbox] { width: 18px; height: 18px; }
.tbl .thumb { width: 72px; height: 45px; border-radius: 6px; object-fit: cover; object-position: top; background: #E9ECF0; flex: none; display: block; }
.tbl .thumb-letter { display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--display); font-weight: 700; font-size: 18px; }
.tbl .tcell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tbl .tcell a { color: var(--ink); text-decoration: none; font-weight: 600; display: block; }
.tbl .tcell a:hover { color: var(--accent); }
.tbl select { width: 100%; min-height: 38px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 8px; background: #fff; font-size: 13px; }
.src { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.src.manual { color: var(--accent-ink); }
.src.unsure { color: var(--warn-ink); }

/* Bulk bar */
.bulk { position: sticky; top: 70px; z-index: 10; display: none; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 12px; }
.bulk.show { display: flex; }
.bulk label { font-size: 13px; color: #C9CED6; }
.bulk select, .bulk input { min-height: 38px; border: 1px solid #3A404B; border-radius: 8px; padding: 0 8px; background: #1E232B; color: #fff; }
.bulk .btn { min-height: 38px; border-radius: 8px; background: transparent; color: #fff; border-color: #3A404B; }
.bulk .btn:hover { border-color: #5B6270; }
.bulk .btn-white { background: #fff; color: var(--ink); border-color: #fff; font-weight: 600; }
.bulk .btn-danger-solid { background: #D9382B; border-color: #D9382B; }
.bulk .sep { width: 1px; height: 24px; background: #3A404B; }

/* Pagination */
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin-top: 8px; }
.pager a, .pager span { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); text-decoration: none; padding: 0 10px; }
.pager span.cur { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Detail */
.detail { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.detail-main { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.detail-side { flex: 2 1 380px; min-width: 0; }
.browser { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.browser-bar { height: 34px; background: #DDE1E7; display: flex; align-items: center; gap: 7px; padding: 0 14px; }
.browser-bar i { width: 10px; height: 10px; border-radius: 5px; background: #B9C0CA; flex: none; }
.browser-bar span { margin-left: 10px; flex: 1; min-width: 0; height: 20px; border-radius: 10px; background: var(--bg); font-family: var(--mono); font-size: 11px; color: var(--muted); display: flex; align-items: center; padding: 0 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.browser .shot { aspect-ratio: 16 / 10; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin: 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.title-input { width: 100%; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; margin: -4px -6px; font-family: var(--display); font-size: 24px; font-weight: 700; background: transparent; }
.title-input:hover, .title-input:focus { border-color: var(--line-2); background: #fff; }
.aibox { padding: 14px; background: var(--bg); border-radius: 12px; margin-bottom: 16px; }
.aibox p { margin: 6px 0 0; }

/* Import */
.drop { background: #fff; border: 2px dashed #B9C6F5; border-radius: 16px; padding: 36px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; transition: background .15s, border-color .15s; }
.drop.over { background: var(--accent-soft); border-color: var(--accent); }
.drop .icon-tile { width: 56px; height: 56px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.drop h2 { margin: 0; font-size: 18px; }
.drop p { margin: 0; max-width: 460px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { padding: 12px; background: var(--bg); border-radius: 10px; }
.stat b { display: block; font-family: var(--display); font-size: 26px; }
.stat span { font-size: 12px; color: var(--muted); }
.stat.good { background: var(--good-soft); } .stat.good b, .stat.good span { color: var(--good-ink); }
.stat.warn { background: var(--warn-soft); } .stat.warn b, .stat.warn span { color: var(--warn-ink); }
.stat.bad { background: var(--bad-soft); } .stat.bad b, .stat.bad span { color: var(--bad); }
.progress { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.progress li { display: flex; flex-direction: column; gap: 6px; }
.progress .row1 { display: flex; justify-content: space-between; gap: 8px; }
.progress .num { font-family: var(--mono); font-size: 12px; }
.bookmarklet { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; cursor: grab; }
.bookmarklet:hover { color: #fff; }
.side-stack { display: flex; flex-direction: column; gap: 16px; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.cols > .main { flex: 3 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cols > .side { flex: 2 1 320px; min-width: 0; }

/* Settings */
.stack { display: flex; flex-direction: column; gap: 20px; }
.svc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.svc-item { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.svc-item.off { background: var(--bg); }
.svc-pos { width: 28px; height: 28px; border-radius: 14px; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.svc-name { flex: 1 1 200px; min-width: 0; }
.svc-use { flex: 1 1 200px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.svc-use .row1 { display: flex; justify-content: space-between; gap: 8px; }
.catlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.catrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.catrow input[type=color] { width: 36px; height: 36px; border: 0; padding: 0; background: none; cursor: pointer; flex: none; }
.catrow .name-in { flex: 1 1 180px; min-height: 38px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; font-weight: 500; }
.catrow .kw-in { flex: 3 1 300px; min-height: 38px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; font-size: 13px; color: var(--ink-2); }
pre.code { background: var(--ink); color: #E6E8EB; padding: 12px 14px; border-radius: 10px; font-size: 13px; white-space: pre-wrap; word-break: break-all; margin: 8px 0; cursor: copy; }
.log { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; font-size: 13px; }
.log li { padding: 6px 0; border-bottom: 1px solid var(--soft); display: flex; gap: 12px; }
.log time { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: none; }

/* Auth & setup */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; }
.setup-wrap { max-width: 640px; margin: 0 auto; padding: 40px 20px 60px; }
.setup-card h1 { font-family: var(--display); font-size: 26px; margin: 0 0 6px; }
.setup-card > .muted { margin: 0 0 18px; }
.setup-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.steps { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 6px 10px 6px 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.steps .step-n { width: 24px; height: 24px; border-radius: 12px; background: var(--soft); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; }
.steps li.current { color: var(--ink); border-color: var(--accent); font-weight: 600; }
.steps li.current .step-n { background: var(--accent); color: #fff; }
.steps li.done .step-n { background: var(--good-soft); color: var(--good-ink); }
.howto { background: var(--bg); border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; }
.howto summary { font-weight: 600; cursor: pointer; min-height: 28px; }
.howto ol { margin: 10px 0 6px; padding-left: 20px; line-height: 1.7; }
.svc .btn-sm { margin-bottom: 10px; }

.empty { padding: 48px 24px; text-align: center; background: #fff; border: 1px dashed var(--line-2); border-radius: 14px; color: var(--muted); }
.empty h2 { color: var(--ink); margin: 0 0 6px; font-size: 18px; }

@media (max-width: 640px) {
  .page { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .page-head h1 { font-size: 26px; }
  .flash { width: calc(100% - 32px); }
  .bulk { top: 0; }
}

/* fixes */
.search-top { flex: none; width: 100%; }
.lcard > a { text-decoration: none; color: inherit; }
.lfoot .when { white-space: nowrap; }
.lfoot .link-btn { padding: 0 6px; }
textarea.title-input { resize: none; overflow: hidden; line-height: 1.2; min-height: 0; }
@media (max-width: 900px) {
  .sidebar { order: 2; }
}
@media (max-width: 640px) {
  .mainnav { order: 5; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; }
  .topbar .btn-primary { margin-left: auto; }
  .grid { grid-template-columns: 1fr; }
}
