:root {
  font-family: Inter, "Segoe UI", "Malgun Gothic", sans-serif;
  color: #18243a;
  background: #f5f6fa;
  font-size: 14px;
  --ink: #18243a;
  --muted: #56657d;
  --line: #e1e6ef;
  --paper: #fff;
  --brand: #4737d5;
  --brand-strong: #3828b8;
  --brand-tint: #eeebff;
  --nav: #151c2b;
  --shadow: 0 2px 3px #19243c07, 0 8px 24px #19243c05;
  --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
body, button, input, textarea, select { font-family: inherit; }
button, input, textarea, select { font-size: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
a { color: var(--brand-strong); }
img { display: block; max-width: 100%; }
button, a, input, textarea, select, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid #7569fc; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
h1 { font-size: clamp(27px, 4vw, 37px); line-height: 1.16; letter-spacing: -.037em; }
h2 { font-size: 19px; line-height: 1.35; letter-spacing: -.022em; }
h3 { font-size: 14px; line-height: 1.42; }
p { line-height: 1.6; }
small { font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; }
.stack { display: grid; gap: 15px; min-width: 0; }
.stack > * { min-width: 0; }
.row, .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.actions-end { justify-content: flex-end; }
.spread { justify-content: space-between; }
.top-align { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.icon { display: inline-block; flex: none; width: 19px; height: 19px; vertical-align: middle; }
.skip-link { position: fixed; z-index: 20; top: 10px; left: 10px; padding: 12px; border-radius: 8px; background: white; clip-path: inset(50%); }
.skip-link:focus { clip-path: none; }
.boot-screen { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 14px; }
.logo-mark { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 11px; background: #c5bdff; color: #211354; font-weight: 850; font-size: 17px; letter-spacing: -.1em; padding-right: .12em; }
.brand { display: inline-flex; gap: 11px; align-items: center; }
.brand strong { display: block; font-size: 15px; letter-spacing: -.015em; }
.brand small { display: block; margin-top: 4px; color: #b0bad0; font-size: 11px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; padding: 9px 13px; min-height: 39px; line-height: 1.4; font-weight: 650; text-decoration: none; text-align: center; color: var(--ink); background: transparent; }
.btn:hover { background: #ecedf5; }
.btn .icon { width: 16px; height: 16px; }
.btn.primary { color: #fff; background: var(--brand); border-color: var(--brand); box-shadow: 0 2px 3px #4737d527; }
.btn.primary:hover { background: var(--brand-strong); }
.btn.secondary { background: #fff; border-color: #dce2ed; }
.btn.secondary:hover { background: #f7f7fc; border-color: #c8c9e4; }
.btn.soft { background: var(--brand-tint); color: var(--brand-strong); }
.btn.soft:hover { background: #e6e1ff; }
.btn.danger { color: #a22542; }
.btn.danger:hover { background: #fff0f2; }
.btn.icon-only { width: 39px; min-height: 39px; padding: 0; }
.btn.block { width: 100%; }
.auth-page { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr); min-height: 100vh; background: #fbfbfe; }
.auth-photo { min-height: 690px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; position: relative; padding: clamp(25px, 5vw, 66px); color: #fff; background: linear-gradient(180deg, #10152bcc 0%, #17162d20 43%, #15172fe8 86%), #1b2348 url("./workshop.webp") 49% 51% / cover; }
.auth-photo h1 { font-size: clamp(39px, 6.4vw, 83px); letter-spacing: -.06em; line-height: 1; max-width: 670px; }
.auth-photo p { color: #e0dff0; max-width: 370px; margin-top: 18px; }
.auth-photo .auth-credit { font-size: 11px; color: #d1d4e7; margin-top: 32px; }
.auth-main { display: grid; grid-template-rows: auto 1fr auto; padding: clamp(22px, 4vw, 55px); }
.auth-top { justify-content: flex-end; }
.auth-box { place-self: center; width: min(100%, 390px); display: grid; gap: 20px; padding: 42px 0; }
.auth-box h2 { font-size: clamp(30px, 4vw, 43px); line-height: 1.08; letter-spacing: -.05em; }
.auth-form { display: grid; gap: 16px; }
.auth-form .btn { min-height: 46px; }
.auth-note { font-size: 12px; color: var(--muted); text-align: center; }
.app-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 23px 13px 15px; background: var(--nav); color: #fff; z-index: 6; }
.sidebar .brand { margin: 0 8px 28px; }
.site-switch { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 25px; border: 1px solid #30384d; border-radius: 10px; background: #20283b; }
.site-switch .tile-icon { width: 32px; height: 32px; border-radius: 8px; color: #dddaff; background: #3e3a69; }
.site-switch .tile-icon .icon { width: 17px; height: 17px; }
.site-switch strong, .profile strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.site-switch small, .profile small { display: block; margin-top: 4px; color: #b6bfd2; font-size: 11px; }
.nav-caption { color: #a8b2c7; font-size: 10px; letter-spacing: .11em; text-transform: uppercase; padding: 0 11px; margin-bottom: 7px; font-weight: 650; }
.nav { display: grid; gap: 4px; overflow: auto; }
.nav-button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px; min-height: 43px; border: 1px solid transparent; border-radius: 8px; color: #c4ccdc; background: transparent; text-align: left; font-weight: 580; }
.nav-button:hover { background: #252e44; color: #fff; }
.nav-button[aria-current="page"] { color: #fff; background: #333067; border-color: #464381; }
.nav-button .icon { width: 17px; height: 17px; }
.nav-count { margin-left: auto; color: #eeeaff; font-size: 11px; border-radius: 10px; padding: 2px 6px; background: #554d86; }
.sidebar-footer { margin-top: auto; padding-top: 18px; }
.sidebar-footer .nav-button { margin-bottom: 10px; }
.profile { display: flex; align-items: center; gap: 9px; padding: 13px 7px 3px; border-top: 1px solid #343b4f; }
.profile .btn { color: #c4ccdc; margin-left: auto; }
.profile .btn:hover { background: #2a3348; }
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; width: 33px; height: 33px; background: #5f5696; color: #fff; font-weight: 750; font-size: 11px; }
.app-main { min-width: 0; }
.topbar { position: sticky; z-index: 5; top: 0; min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--line); background: #ffffffed; backdrop-filter: blur(12px); }
.crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.crumb .icon { width: 16px; height: 16px; }
.crumb strong { color: var(--ink); }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #f6f7fb; }
.lang-switch button { min-height: 29px; padding: 4px 8px; border: 0; border-radius: 5px; font-weight: 700; font-size: 11px; color: var(--muted); background: transparent; }
.lang-switch button[aria-pressed="true"] { color: var(--brand-strong); background: white; box-shadow: 0 1px 4px #18243a23; }
.content { max-width: 1510px; margin: 0 auto; padding: 27px clamp(16px, 3vw, 40px) 35px; }
.page-title { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.page-title p { margin-top: 7px; }
.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end; overflow: hidden; padding: 30px; margin-bottom: 19px; color: #fff; border-radius: 18px; background: linear-gradient(112deg, #28235e 0%, #332c7b 56%, #4b3a99 100%); }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: repeating-linear-gradient(124deg, transparent 0 13px, #ccc1ff19 14px 15px, transparent 16px 29px); mask-image: linear-gradient(90deg, transparent 40%, #000 100%); }
.hero p { max-width: 520px; color: #efecff; margin-top: 10px; }
.hero h1 { word-break: keep-all; overflow-wrap: anywhere; }
.hero .btn { background: #fff; color: #302474; padding-inline: 15px; }
.hero .btn:hover { background: #f0ebff; }
.hero .hero-label { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 9px; color: #ded8ff; font-size: 12px; font-weight: 650; }
.hero-label .icon { width: 14px; height: 14px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-bottom: 22px; }
.metric, .card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric { padding: 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 13px; }
.metric strong { display: block; font-size: 23px; margin-top: 3px; letter-spacing: -.045em; overflow-wrap: anywhere; }
.metric small { color: var(--muted); }
.tile-icon { display: inline-grid; place-items: center; flex: none; width: 41px; height: 41px; border-radius: 11px; background: var(--brand-tint); color: var(--brand-strong); }
.tile-icon.amber { color: #8f5012; background: #fff0d9; }
.tile-icon.green { color: #17694b; background: #e3f6ec; }
.tile-icon.blue { color: #1e59aa; background: #e7f0ff; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(265px, 320px); gap: 16px; align-items: start; }
.card { min-width: 0; }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 17px 18px; }
.card-head p { margin-top: 4px; font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th { padding: 9px 14px; white-space: nowrap; color: #56637a; background: #f7f8fc; border-block: 1px solid #edf0f6; font-size: 11px; font-weight: 700; }
td { padding: 10px 14px; border-bottom: 1px solid #edf0f6; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
td:first-child, th:first-child { padding-left: 18px; }
td:last-child, th:last-child { padding-right: 18px; }
td .btn { white-space: nowrap; min-height: 33px; }
td .badge { white-space: nowrap; }
td:first-child { overflow-wrap: anywhere; }
.subline { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.badge { display: inline-flex; align-items: center; gap: 5px; color: #4d4474; background: #f0edf9; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 700; line-height: 1.35; }
.badge.green { color: #17654b; background: #e7f7ed; }
.badge.amber { color: #815015; background: #fff1d9; }
.badge.red { color: #922840; background: #ffebef; }
.badge.blue { color: #234f96; background: #e8efff; }
.divider { border: 0; height: 1px; background: var(--line); margin: 0; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 31px 19px; text-align: center; }
.empty p { max-width: 340px; }
.step-list { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; }
.step-list li { display: flex; gap: 10px; align-items: center; }
.step-mark { display: inline-grid; place-items: center; border: 1px solid #dce1ed; border-radius: 50%; width: 26px; height: 26px; background: #f3f4fb; color: #4b4886; flex: none; font-size: 11px; font-weight: 750; }
.step-mark.current { background: var(--brand); color: white; border-color: var(--brand); }
.step-mark .icon { width: 13px; height: 13px; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; background: #efedff; color: #3d2f89; line-height: 1.52; }
.callout.amber { background: #fff2dc; color: #7f4c12; }
.callout.error { background: #ffedf1; color: #92243b; }
.callout .icon { width: 17px; height: 17px; margin-top: 2px; }
.callout p { font-size: 12px; }
.field { display: grid; gap: 6px; min-width: 0; font-weight: 650; font-size: 13px; }
.field + .field { min-width: 0; }
.field small { font-weight: 400; line-height: 1.45; }
.field input, .field textarea, .field select, .search input, select.filter { width: 100%; min-height: 41px; border: 1px solid #d4dce9; border-radius: 8px; padding: 9px 10px; background: #fff; color: var(--ink); }
.field textarea { min-height: 87px; resize: vertical; line-height: 1.45; }
.field input[readonly], .field textarea[readonly] { background: #f5f6fa; }
.field input[aria-invalid="true"] { border-color: #ce5d72; }
.field input::placeholder, .field textarea::placeholder { color: #66728a; opacity: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.full-row { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.req { color: #a52a42; }
.compact-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.config-row { border: 1px solid var(--line); border-radius: 11px; padding: 12px; }
.search { display: flex; align-items: center; gap: 8px; }
.search .icon { color: var(--muted); }
.list-head { display: grid; gap: 9px; padding: 14px; border-bottom: 1px solid var(--line); }
.thread-layout { display: grid; grid-template-columns: minmax(220px, 310px) minmax(0, 1fr); gap: 16px; align-items: start; }
.thread-link { display: grid; gap: 7px; width: 100%; text-align: left; border: none; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; padding: 12px; background: #fff; color: var(--ink); }
.thread-link:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.thread-link:hover, .thread-link.selected { background: #f4f2ff; }
.thread-link.selected { border-left-color: var(--brand); }
.thread-link strong { overflow-wrap: anywhere; }
.thread-link .badge { justify-self: start; }
.mobile-thread-back { display: none; }
.thread-section { padding: 16px 18px; border-top: 1px solid var(--line); }
.thread-section h3 { margin-bottom: 8px; }
.thread-section .form-grid > * { min-width: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; margin-left: 7px; padding: 0 0 17px 17px; border-left: 1px solid #d5cfed; }
.timeline li::before { content: ""; position: absolute; top: 4px; left: -5px; width: 9px; height: 9px; background: var(--brand); border: 2px solid #fff; outline: 1px solid #d5cfed; border-radius: 50%; }
.timeline li:last-child { padding-bottom: 0; }
.timeline p { margin-top: 4px; }
.details { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.details summary { cursor: pointer; font-weight: 650; }
.details[open] summary { margin-bottom: 10px; }
.work-order { min-height: 300px !important; font-family: ui-monospace, Consolas, monospace; }
.lower { margin-top: 16px; }
.capture-area { display: grid; gap: 8px; padding: 14px; border: 1px dashed #a7a6cb; border-radius: 11px; background: #faf9ff; }
.capture-area.dragging { background: #e9e4ff; }
.capture-area input { width: 100%; }
.capture-list { display: flex; flex-wrap: wrap; gap: 10px; }
.capture { display: grid; align-items: start; width: 126px; gap: 5px; overflow-wrap: anywhere; }
.capture img { width: 126px; height: 83px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; background: #f4f5f9; }
.capture .btn { justify-self: start; padding: 4px 7px; min-height: 30px; }
.chat-shell { overflow: hidden; }
.chat-feed { display: grid; align-content: start; gap: 13px; min-height: 220px; max-height: 530px; overflow-y: auto; background: #fafaff; border-block: 1px solid var(--line); padding: 16px; }
.message { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: flex-start; gap: 9px; max-width: 90%; }
.message .tile-icon { width: 32px; height: 32px; border-radius: 8px; }
.message .tile-icon .icon { width: 16px; height: 16px; }
.message.you { justify-self: end; grid-template-columns: minmax(0, 1fr); }
.message p { border: 1px solid var(--line); padding: 9px 11px; border-radius: 10px; background: #fff; }
.message.you p { background: #ebe7ff; border-color: #e2dcfc; }
.chat-form { display: flex; align-items: end; gap: 9px; padding: 14px; }
.chat-form .field { flex: 1; }
.chat-form textarea { min-height: 41px; max-height: 150px; }
.survey-card { padding: 15px; border: 1px solid #ded8ff; border-radius: 11px; background: #fbfaff; }
progress { width: 100%; height: 8px; accent-color: var(--brand); }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.mobile-menu, .mobile-close { display: none; }
dialog { max-width: min(calc(100% - 26px), 680px); width: 100%; max-height: min(92vh, 900px); padding: 0; color: var(--ink); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 20px 75px #11172b55; }
dialog::backdrop { background: #19213c83; }
.dialog-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 15px 19px; border-bottom: 1px solid var(--line); background: #fff; }
.dialog-body { padding: 18px 19px; }
.dialog-head .btn { margin: -5px -5px -5px 0; }
.toast { position: fixed; z-index: 10; right: 18px; bottom: 18px; max-width: min(calc(100% - 36px), 450px); display: flex; align-items: flex-start; gap: 9px; padding: 12px 15px; border-radius: 10px; box-shadow: 0 7px 30px #151c2b40; background: #202344; color: white; }
.toast.error { background: #8c2840; }
.form-error { color: #962940; font-size: 12px; line-height: 1.5; }
.workbook-boundary { margin-bottom: 16px; }
.workbook-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 14px; }
.workbook-card { display: grid; align-content: start; gap: 10px; padding: 17px; text-align: left; color: var(--ink); }
.workbook-card:hover { background: #f9f8ff; border-color: #bdb5f1; }
.workbook-card .row { margin-bottom: 2px; }
.workbook-card > strong { font-size: 16px; line-height: 1.35; letter-spacing: -.025em; }
.workbook-card .row > .icon { color: var(--brand); }
.workbook-card > .muted { line-height: 1.5; }
.workbook-detail .page-title, .workbook-editor .page-title { margin-bottom: 0; }
.workbook-source { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.workbook-source summary, .workbook-paste summary { padding: 12px 15px; cursor: pointer; font-weight: 650; }
.workbook-source summary .icon, .workbook-paste summary .icon { margin-right: 6px; color: var(--brand); width: 16px; }
.workbook-source > div, .workbook-paste > div { display: grid; justify-items: start; gap: 7px; padding: 0 15px 15px; }
.workbook-search { padding: 0 16px 12px; }
.workbook-record-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 2fr) auto; align-items: center; gap: 10px; width: 100%; color: var(--ink); border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; padding: 13px 16px; }
.workbook-record-row:hover { background: #f7f6ff; }
.workbook-record-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.workbook-record-row > span:first-child small { display: block; }
.workbook-row-end { display: grid; gap: 6px; justify-items: end; justify-self: end; grid-column: 3; }
.workbook-row-badges { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.workbook-row-cta { display: inline-flex; align-items: center; gap: 3px; color: var(--brand); font-size: 12px; font-weight: 650; }
.workbook-row-cta .icon { width: 15px; height: 15px; }
.workbook-migration { background: #f7f8ff; border-color: #dce1f7; }
.workbook-migration .row { flex-wrap: wrap; }
.workbook-migration-source { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; overflow-wrap: anywhere; }
.workbook-migration-source span { color: var(--muted); font-size: 13px; }
.workbook-migration dl { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; }
.workbook-migration dt { color: var(--muted); font-size: 12px; }
.workbook-migration dd { margin: 3px 0 0; font-weight: 600; }
.workbook-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); gap: 7px; margin: 0; }
.workbook-metrics > div { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #f8f8fc; }
.workbook-metrics dt { color: var(--muted); font-size: 11px; line-height: 1.4; }
.workbook-metrics dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.workbook-metrics dd small { font-weight: 500; color: var(--muted); }
.workbook-form-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 192px), 1fr)); }
.workbook-table { width: 100%; overflow-x: auto; }
.workbook-table table { width: max-content; min-width: 100%; }
.workbook-table thead th { vertical-align: bottom; }
.workbook-table tbody th { border-right: 1px solid var(--line); color: var(--muted); }
.workbook-table .field { width: 135px; }
.workbook-table .field > span, .workbook-table .field > small { display: none; }
.workbook-table .field input, .workbook-table .field select { min-height: 37px; padding: 7px 8px; }
.workbook-table .field textarea { min-height: 42px; }
.workbook-table .workbook-row-action { text-align: right; }
.workbook-readtable td { font-variant-numeric: tabular-nums; max-width: 280px; white-space: pre-line; overflow-wrap: anywhere; }
.workbook-section-action { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 11px 15px; }
.workbook-section-action:empty { display: none; }
.workbook-pagination { margin-left: auto; max-width: 100%; flex-wrap: wrap; justify-content: flex-end; }
.workbook-pagination .btn { min-height: 34px; }
.workbook-pagination small { white-space: nowrap; }
.workbook-paste { border-top: 1px solid var(--line); }
.workbook-paste > div { justify-items: stretch; }
.workbook-paste textarea { font-family: "IBM Plex Mono", Consolas, monospace; }
.workbook-no-rows { padding: 12px 15px; }
.workbook-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 15px 12px; }
.workbook-output-title { flex-wrap: wrap; padding: 11px 15px; border-top: 1px solid var(--line); }
.workbook-reuse { display: grid; grid-template-columns: minmax(0, 340px) auto; align-items: end; justify-content: start; gap: 9px; }
.workbook-checks { display: grid; gap: 9px; list-style: none; margin: 0; padding: 0; }
.workbook-checks li { display: flex; align-items: flex-start; gap: 8px; padding: 9px 11px; border-radius: 8px; background: #fff3de; color: #765017; }
.workbook-checks .icon { width: 16px; height: 16px; }
.workbook-save { display: grid; gap: 9px; }
@media (max-width: 530px) {
  .workbook-record-row { grid-template-columns: minmax(0, 1fr) auto; }
  .workbook-row-end { grid-column: 2; grid-row: 1; max-width: 126px; }
  .workbook-record-row .workbook-metrics { grid-column: 1 / -1; }
  .workbook-reuse { grid-template-columns: minmax(0, 1fr); }
  .workbook-reuse > .btn { justify-self: start; }
}
@media (max-width: 1150px) {
  .app-shell { grid-template-columns: 195px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .sidebar .brand { margin-inline: 4px; }
  .grid-main { grid-template-columns: minmax(0, 1fr) minmax(240px, 275px); }
  .metric { padding: 13px; gap: 10px; }
}
@media (max-width: 950px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .grid-main > aside.stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; width: 228px; height: 100dvh; transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility .2s; }
  .sidebar.open { transform: none; visibility: visible; box-shadow: 0 0 0 100vmax #19213c78; }
  .mobile-menu { display: inline-flex; margin-left: -5px; }
  .mobile-close { display: inline-flex; margin-left: auto; color: #e5e8f4; }
  .mobile-close:hover { background: #323850; }
  .topbar { min-height: 55px; }
  .content { padding-top: 20px; }
  .thread-layout { grid-template-columns: minmax(0, 1fr); }
  .thread-layout:not(.thread-open) .thread-detail { display: none; }
  .thread-open .thread-list { display: none; }
  .mobile-thread-back { display: block; }
  .hero { padding: 23px 18px; }
  .auth-photo { min-height: 430px; }
}
@media (max-width: 530px) {
  .auth-page { grid-template-columns: minmax(0, 1fr); }
  .auth-photo { min-height: 238px; gap: 24px; padding: 22px; background-position: center 56%; }
  .auth-photo h1 { font-size: 34px; }
  .auth-photo p { margin-top: 8px; }
  .auth-photo .auth-credit { margin-top: 9px; }
  .auth-box { padding-block: 22px; }
  .topbar { gap: 5px; }
  .crumb > span, .crumb > .icon { display: none; }
  .topbar .prototype-label { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hero .btn { justify-self: start; }
  .metric-grid { gap: 7px; }
  .metric { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 9px; align-items: start; }
  .metric .tile-icon { width: 29px; height: 29px; border-radius: 7px; }
  .metric .tile-icon .icon { width: 15px; height: 15px; }
  .metric small { font-size: 11px; }
  .metric strong { font-size: 18px; }
  .grid-main > aside.stack, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .card-pad, .card-head, .thread-section { padding: 13px; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-wrap tbody, .table-wrap tr { display: grid; }
  .table-wrap tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 11px 13px; border-top: 1px solid #edf0f6; }
  .table-wrap td, .table-wrap td:first-child, .table-wrap td:last-child { padding: 0; border: 0; }
  .table-wrap td:first-child { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
  .table-wrap td .badge { white-space: normal; word-break: keep-all; }
  .chat-form { padding: 10px; }
  .message { max-width: 97%; }
  .foot { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
.workbook-import-records { display:grid; gap:.55rem; max-height:20rem; overflow:auto; }
.workbook-import-records label { display:flex; align-items:flex-start; gap:.65rem; padding:.65rem .75rem; border:1px solid var(--line,#dce1ed); border-radius:.6rem; }
.workbook-import-records input { margin-top:.18rem; }
.workbook-import-records small { display:block; }
.workbook-record-filters { display:flex; gap:.8rem; align-items:center; flex-wrap:wrap; padding:.75rem 1rem 0; }
.workbook-record-filters .search { margin:0; flex:1 1 14rem; }
