:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f9fafb; --line: #e6e8ec; --line-2: #eef0f3;
  --text: #15171c; --text-2: #4b5160; --muted: #7c8293;
  --accent: #4f46e5; --accent-2: #4338ca; --accent-soft: #eef2ff;
  --ok: #059669; --ok-soft: #ecfdf5; --err: #dc2626; --err-soft: #fef2f2; --warn: #b45309; --warn-soft: #fffbeb;
  --r: 10px; --r-sm: 7px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 40px rgba(16,24,40,.14), 0 2px 6px rgba(16,24,40,.06);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
code { background: var(--line-2); padding: .1em .35em; border-radius: 4px; }
h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.02em; }
h3 { font-size: 15px; margin: 0 0 12px; }
p { margin: 0 0 10px; line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.err { color: var(--err); }
.accent { color: var(--accent); }
.warn-text { color: var(--warn); }
.center { text-align: center; margin: 16px 0; }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }
.ic { flex: 0 0 auto; display: block; }
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s, box-shadow .12s; box-shadow: 0 1px 1px rgba(16,24,40,.03); }
.btn:hover { background: var(--surface-2); border-color: #d6d9e0; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-primary:disabled { background: #a5a8d6; border-color: #a5a8d6; opacity: 1; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-danger-ghost { color: var(--err); border-color: transparent; background: transparent; box-shadow: none; }
.btn-danger-ghost:hover { background: var(--err-soft); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-block { width: 100%; height: 40px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--line-2); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.danger:hover { color: var(--err); background: var(--err-soft); }
.icon-btn:disabled { opacity: .3; cursor: default; background: transparent; }

/* Inputs */
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld-label { font-weight: 550; font-size: 12.5px; color: var(--text-2); }
.fld-hint { font-size: 12px; color: var(--muted); line-height: 1.4; word-break: break-word; }
.inp { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.inp { height: auto; padding: 8px 10px; line-height: 1.5; resize: vertical; }
select.inp { appearance: none; padding-right: 30px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%237c8293'%3E%3Cpath d='M5.3 7.3a1 1 0 011.4 0L10 10.6l3.3-3.3a1 1 0 111.4 1.4l-4 4a1 1 0 01-1.4 0l-4-4a1 1 0 010-1.4z'/%3E%3C/svg%3E") no-repeat right 8px center / 16px; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.14); }
.inp::placeholder { color: #a3a8b5; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.row2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; margin: 8px 0 10px; }
.inline-form .inp { flex: 1; }

.toggle { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { flex: 0 0 auto; width: 34px; height: 20px; border-radius: 99px; background: #d5d8df; position: relative; transition: background .15s; margin-top: 1px; }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(14px); }
.toggle input:focus-visible + .toggle-track { box-shadow: 0 0 0 3px rgba(79,70,229,.25); }
.toggle-text { display: flex; flex-direction: column; gap: 2px; font-weight: 500; }
.toggle-text small { font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.4; }
.toggle.disabled { opacity: .55; cursor: not-allowed; }

.seg { display: inline-flex; background: var(--line-2); padding: 3px; border-radius: 8px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 10px; border-radius: 6px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.color { display: flex; align-items: center; gap: 6px; }
.color input[type=color] { width: 36px; height: 36px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; flex: 0 0 auto; }
.color input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color input[type=color]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.range { display: flex; align-items: center; gap: 10px; height: 36px; }
.range input { flex: 1; accent-color: var(--accent); }
.range span { min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 12.5px; }

details.adv { border-top: 1px dashed var(--line); padding-top: 10px; }
details.adv summary { cursor: pointer; font-size: 12.5px; font-weight: 550; color: var(--text-2); margin-bottom: 8px; }

/* Cards & banners */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.card h3 { margin: 0; }
.card.no-pad { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--accent-soft); color: #3730a3; border: 1px solid #dfe3fb; line-height: 1.5; margin-bottom: 16px; }
.banner.warn { background: var(--warn-soft); color: #92400e; border-color: #fde9c3; }
.banner code { background: rgba(0,0,0,.06); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-err { background: var(--err-soft); color: var(--err); }
.badge-wait { background: var(--warn-soft); color: var(--warn); }
.badge-muted { background: var(--line-2); color: var(--muted); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-2); font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-muted { background: var(--line-2); color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c5c9d3; flex: 0 0 auto; }
.dot-on { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.15); }

/* Shell */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; height: 58px; padding: 0 24px; background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; color: var(--text); letter-spacing: -.01em; text-decoration: none !important; }
.brand .logo { color: var(--accent); display: grid; }
.brand-lg { font-size: 22px; margin-bottom: 6px; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a { padding: 7px 12px; border-radius: 7px; color: var(--text-2); font-weight: 500; text-decoration: none; }
.topnav a:hover { background: var(--line-2); }
.topnav a.on { color: var(--text); background: var(--line-2); }
.main { padding: 32px 24px 64px; }
.page { max-width: 1160px; margin: 0 auto; }
.narrow-page { max-width: 760px; }
.narrow-page .card { margin-bottom: 16px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 0; }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; justify-content: space-between; }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); min-width: 260px; flex: 0 1 340px; }
.search input { border: 0; outline: none; font: inherit; flex: 1; background: transparent; color: var(--text); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.14); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.chip-btn.on { background: var(--text); border-color: var(--text); color: #fff; }

/* Dashboard */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.form-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); color: var(--text); text-decoration: none !important; transition: border-color .12s, box-shadow .12s, transform .12s; }
.form-card:hover { border-color: #cfd3fb; box-shadow: 0 6px 20px rgba(79,70,229,.08); transform: translateY(-1px); }
.form-card h3 { margin: 2px 0 0; font-size: 16px; }
.fc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -4px -6px 0 0; }
.fc-slug { align-self: flex-start; font-size: 12px; color: var(--muted); background: none; padding: 0; }
.fc-stats { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 6px; color: var(--text-2); font-size: 13px; }
.fc-stats .sep { color: #c5c9d3; }
.fc-foot { border-top: 1px solid var(--line-2); padding-top: 10px; margin-top: 4px; }
.empty { align-items: center; text-align: center; padding: 48px 24px; }
.empty-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin: 0 auto 6px; }
.empty p { max-width: 440px; margin: 0 auto 6px; }
.empty-small { padding: 24px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--r); }

.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 36px; z-index: 30; min-width: 210px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.menu-pop button { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 0; background: none; border-radius: 6px; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.menu-pop button:hover { background: var(--line-2); }
.menu-pop button.danger { color: var(--err); }
.menu-pop button.danger:hover { background: var(--err-soft); }

/* Modal */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(15,18,28,.45); display: grid; place-items: center; padding: 20px; animation: fade .15s ease-out; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); animation: rise .18s ease-out; }
.modal-wide { max-width: 720px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 6px 22px; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 10px 22px 20px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 14px 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tpl { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.tpl span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.tpl.on { border-color: var(--accent); background: var(--accent-soft); }

/* Toasts */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; background: #15171c; color: #fff; box-shadow: var(--shadow-lg); font-weight: 500; animation: rise .2s ease-out; }
.toast-ok .ic { color: #34d399; }
.toast-error { background: #7f1d1d; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 50% -10%, #e8eaff, transparent), var(--bg); }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }
.login-card p { margin: -8px 0 4px; }

/* Editor */
.editor { height: 100vh; display: flex; flex-direction: column; }
.ed-top { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.ed-title { display: flex; flex-direction: column; min-width: 0; flex: 0 1 260px; }
.ed-name { font: inherit; font-weight: 650; font-size: 15px; border: 1px solid transparent; border-radius: 6px; padding: 2px 6px; margin-left: -6px; background: transparent; color: var(--text); outline: none; min-width: 0; text-overflow: ellipsis; }
.ed-name:hover { border-color: var(--line); }
.ed-name:focus { border-color: var(--accent); background: var(--surface); }
.ed-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ed-sub .chip { height: 18px; font-size: 11px; padding: 0 6px; }
.ed-tabs { display: flex; gap: 2px; margin: 0 auto; background: var(--line-2); padding: 3px; border-radius: 9px; overflow-x: auto; }
.ed-tabs a { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 7px; color: var(--text-2); font-weight: 500; text-decoration: none !important; white-space: nowrap; }
.ed-tabs a:hover { color: var(--text); }
.ed-tabs a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ed-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.ed-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(400px, 500px) 1fr; }
.ed-body.ed-full { grid-template-columns: 1fr; }
.ed-panel { min-height: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); }
.ed-full .ed-panel { background: var(--bg); border: 0; }
.panel-scroll { overflow: auto; flex: 1; }
.sections { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.ed-full .sections { max-width: 820px; margin: 0 auto; padding: 28px 20px 60px; }
.ed-full .sections.wide { max-width: 1160px; }
.ed-panel:not(.ed-full .ed-panel) .card { box-shadow: none; }

.ed-preview { min-height: 0; display: flex; flex-direction: column; background: var(--bg); background-image: radial-gradient(#dfe2e8 1px, transparent 1px); background-size: 18px 18px; }
.pv-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
.pv-stage { flex: 1; overflow: auto; padding: 8px 24px 48px; }
.pv-frame { margin: 0 auto; max-width: 680px; padding: 32px; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 10px 30px rgba(0,0,0,.06); transition: max-width .25s; }
.pv-mobile { max-width: 390px; padding: 22px 18px; border-radius: 26px; border: 8px solid #1f2128; }

/* Fields tab */
.fields-tab { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.palette { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex: 0 0 auto; max-height: 45%; overflow: auto; }
.palette-group + .palette-group { margin-top: 8px; }
.palette-title { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.palette-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.palette-item { display: flex; align-items: center; gap: 7px; padding: 4px 8px 4px 5px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer; text-align: left; transition: border-color .1s, background .1s; }
.palette-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.palette-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-ic { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--line-2); color: var(--text-2); flex: 0 0 auto; }
.flist { flex: 1; overflow: auto; padding: 14px 16px 40px; display: flex; flex-direction: column; gap: 6px; }
.flist-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.flist-head h3 { margin: 0; }
.fitem { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .12s, box-shadow .12s; position: relative; }
.fitem.open { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.fitem.dragging { opacity: .4; }
.fitem.over-before::before, .fitem.over-after::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; background: var(--accent); border-radius: 3px; }
.fitem.over-before::before { top: -5px; }
.fitem.over-after::after { bottom: -5px; }
.fitem-head { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 6px; cursor: pointer; min-height: 44px; }
.grip { color: #b6bac5; cursor: grab; display: grid; }
.fitem-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.req-badge { color: var(--err); font-weight: 700; }
.fitem-type { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.fitem-actions { display: none; gap: 0; }
.fitem:hover .fitem-actions, .fitem.open .fitem-actions { display: flex; }
.fitem:hover .fitem-type, .fitem.open .fitem-type { display: none; }
.fitem-body { padding: 6px 14px 16px; border-top: 1px solid var(--line-2); }
.fitem-body .stack { gap: 12px; padding-top: 10px; }

/* Design tab */
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset { display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding: 6px 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--text); }
.preset:hover { border-color: var(--accent); }
.preset-sw { display: flex; flex-direction: column; gap: 5px; padding: 10px; border-radius: 5px; border: 1px solid var(--line-2); }
.preset-sw b { display: block; height: 10px; border: 1.5px solid; background: rgba(255,255,255,.5); }
.preset-sw i { display: block; height: 10px; width: 50%; order: 2; }

/* Embed tab */
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.method { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.method span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.method.on { border-color: var(--accent); background: var(--accent-soft); }
.codebox { position: relative; }
.codebox pre { margin: 0; padding: 14px 16px; padding-right: 100px; background: #15171c; color: #e5e7eb; border-radius: var(--r-sm); overflow: auto; max-height: 420px; font-size: 12.5px; line-height: 1.6; }
.codebox code { background: none; padding: 0; color: inherit; white-space: pre; }
.codebox .btn { position: absolute; top: 8px; right: 8px; background: #2a2d36; border-color: #3a3e4a; color: #fff; }
.codebox .btn:hover { background: #363a46; }
.steps { margin: 0; padding-left: 20px; line-height: 1.8; }

/* Responses */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); max-width: 280px; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table tr.unread td { font-weight: 600; }
.table .trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .w-dot { width: 20px; padding-right: 0; }
.sub-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); margin-bottom: 14px; }
.answers { margin: 0 0 14px; display: flex; flex-direction: column; }
.answers > div { padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.answers dt { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.answers dd { margin: 0; white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.files { display: flex; flex-direction: column; gap: 6px; }
.file-link { display: inline-flex; align-items: center; gap: 6px; }

/* Settings */
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; align-items: center; }
.kv > span:nth-child(odd) { color: var(--muted); }

@media (max-width: 1100px) {
  .ed-tabs span { display: none; }
  .hide-sm { display: none; }
}
@media (max-width: 860px) {
  .ed-body { grid-template-columns: 1fr; }
  .ed-preview { display: none; }
  .methods { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; gap: 12px; }
  .main { padding: 20px 14px 48px; }
  .ed-title { display: none; }
}
