:root {
  --paper: #f4f0e7;
  --paper-soft: #faf8f2;
  --paper-deep: #e9e3d7;
  --ink: #151714;
  --ink-soft: #4f554f;
  --muted: #73776f;
  --line: #cec8bc;
  --line-strong: #a8a194;
  --green: #2e6958;
  --green-deep: #1e4e41;
  --green-wash: #dfe9e3;
  --blue: #315b9b;
  --blue-wash: #e1e7f0;
  --amber: #a86d24;
  --amber-wash: #f3e6d1;
  --danger: #9a3f39;
  --danger-wash: #f1dedb;
  --white: #fffdf8;
  --shadow: 0 24px 70px rgba(35, 38, 33, .10);
  --shadow-soft: 0 12px 34px rgba(35, 38, 33, .07);
  --serif: "Iowan Old Style", "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --sans: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius: 4px;
  --radius-lg: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 75% 5%, rgba(49, 91, 155, .055), transparent 24rem),
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(21, 23, 20, .025) calc(100% - 1px)) 0 0 / 72px 72px,
    var(--paper);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 9999;
  transform: translateY(-140%); padding: 8px 12px; background: var(--ink); color: white;
}
.skip-link:focus { transform: none; }

.site-header {
  height: 76px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 240, 231, .92);
  backdrop-filter: blur(16px);
  position: sticky; top: 0; z-index: 90;
}
.site-header__inner {
  width: min(1480px, calc(100% - 56px)); height: 100%; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 38px;
}
.brand { display: inline-flex; align-items: center; gap: 13px; min-width: max-content; }
.brand__mark {
  width: 33px; height: 33px; display: grid; place-items: center;
  border: 1px solid var(--ink); border-radius: 50%; font: 700 12px/1 var(--serif);
  position: relative; background: var(--paper-soft);
}
.brand__mark::after { content: ""; position: absolute; width: 7px; height: 7px; right: -2px; top: 2px; border-radius: 50%; background: var(--green); }
.brand__name { font: 700 19px/1 var(--serif); letter-spacing: .03em; }
.brand__sub { display: block; margin-top: 5px; color: var(--muted); font: 600 9px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.site-nav { display: flex; justify-content: center; align-items: stretch; height: 100%; }
.site-nav a { display: grid; place-items: center; padding: 0 18px; color: var(--ink-soft); font-size: 13px; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--green); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  min-height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 9px 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--ink); font-weight: 650; font-size: 13px; cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--ink); background: rgba(255,255,255,.45); }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn--primary:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn--green { background: var(--green); color: white; border-color: var(--green); }
.btn--green:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn--blue { background: var(--blue); color: white; border-color: var(--blue); }
.btn--danger { color: var(--danger); border-color: rgba(154,63,57,.45); }
.btn--danger:hover { background: var(--danger-wash); border-color: var(--danger); }
.btn--ghost { border-color: transparent; }
.btn--small { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.btn--icon { width: 38px; padding: 0; }

.eyebrow { color: var(--green); font: 750 11px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.rule-title { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.rule-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

.hero { width: min(1480px, calc(100% - 56px)); margin: 0 auto; padding: 82px 0 64px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(420px, .98fr); min-height: 580px; border-bottom: 1px solid var(--line); }
.hero__copy { padding: 22px 72px 74px 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.hero h1 { margin: 28px 0 22px; max-width: 760px; font: 500 clamp(48px, 5.4vw, 88px)/.98 var(--serif); letter-spacing: -.045em; }
.hero h1 em { display: block; color: var(--green); font-style: italic; }
.hero__lede { margin: 0 0 32px; max-width: 620px; color: var(--ink-soft); font-size: 17px; line-height: 1.85; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 11px; }
.hero__note { margin-top: 22px; display: flex; gap: 20px; color: var(--muted); font-size: 11px; }
.hero__note span::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--green); }
.hero__figure { border-left: 1px solid var(--line); padding: 0 0 40px 52px; display: flex; align-items: center; }
.research-figure { width: 100%; background: rgba(250,248,242,.6); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.figure-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.figure-head h2 { margin: 0; font: 600 17px/1.3 var(--serif); }
.figure-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.figure-tag { border: 1px solid var(--green); padding: 4px 7px; color: var(--green); font: 700 9px/1 var(--sans); letter-spacing: .12em; }
.research-chart { display: block; width: 100%; height: auto; padding: 12px; }
.figure-foot { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); }
.figure-stat { padding: 16px 18px; border-right: 1px solid var(--line); }
.figure-stat:last-child { border-right: 0; }
.figure-stat span { display: block; color: var(--muted); font-size: 10px; }
.figure-stat strong { display: block; margin-top: 5px; font: 600 17px/1 var(--serif); }

.trust-strip { display: grid; grid-template-columns: 1.2fr repeat(3,1fr); border-bottom: 1px solid var(--line); }
.trust-strip > div { min-height: 96px; padding: 24px 26px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.trust-strip > div:last-child { border-right: 0; }
.trust-strip strong { font: 600 20px/1.2 var(--serif); }
.trust-strip span { margin-top: 7px; color: var(--muted); font-size: 11px; }

.landing-section { width: min(1480px, calc(100% - 56px)); margin: 0 auto; padding: 86px 0; border-bottom: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 48px; }
.section-heading h2 { margin: 16px 0 0; font: 500 clamp(34px, 4vw, 56px)/1.04 var(--serif); letter-spacing: -.03em; }
.section-heading p { margin: 0; color: var(--ink-soft); line-height: 1.9; }
.capability-grid { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); }
.capability-card { min-height: 330px; padding: 32px; border-right: 1px solid var(--line); background: rgba(250,248,242,.42); transition: background .2s ease, transform .2s ease; }
.capability-card:last-child { border-right: 0; }
.capability-card:hover { background: var(--paper-soft); transform: translateY(-3px); }
.capability-card__index { color: var(--green); font: 700 11px/1 var(--mono); }
.capability-card h3 { margin: 72px 0 16px; font: 600 26px/1.2 var(--serif); }
.capability-card p { color: var(--ink-soft); font-size: 14px; line-height: 1.85; }
.capability-card a { display: inline-flex; margin-top: 26px; padding-bottom: 3px; border-bottom: 1px solid var(--ink); font-size: 12px; font-weight: 700; }

.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.method-tile { min-height: 170px; padding: 24px; background: var(--paper); }
.method-tile:hover { background: var(--paper-soft); }
.method-tile code { color: var(--blue); font: 700 10px var(--mono); }
.method-tile h3 { margin: 38px 0 8px; font: 600 19px var(--serif); }
.method-tile p { margin: 0; color: var(--muted); font-size: 11px; }

.cta-band { width: min(1480px, calc(100% - 56px)); margin: 0 auto; padding: 74px 0 90px; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.cta-band h2 { margin: 0; font: 500 clamp(35px,4vw,58px)/1.05 var(--serif); letter-spacing: -.03em; }
.cta-band p { margin: 12px 0 0; color: var(--ink-soft); }
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; }
.site-footer__inner { width: min(1480px, calc(100% - 56px)); margin: 0 auto; display: grid; grid-template-columns: auto minmax(220px,1fr) auto; align-items: center; gap: 30px; color: var(--muted); font-size: 11px; }
.site-footer__summary { text-align: center; }
.site-footer__records { display: flex; align-items: center; justify-content: flex-end; gap: 18px; flex-wrap: wrap; }
.site-footer__record { display: inline-flex; align-items: center; min-height: 24px; color: var(--muted); line-height: 1.4; white-space: nowrap; transition: color .18s ease; }
.site-footer__record:hover { color: var(--ink); }
.site-footer__record:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 2px; }
.site-footer__record--public-security { gap: 6px; }
.site-footer__record--public-security img { width: 18px; height: 20px; flex: 0 0 auto; object-fit: contain; }

/* Authentication */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(420px,.92fr) minmax(520px,1.08fr); }
.auth-story { padding: 46px clamp(36px,6vw,92px); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.auth-story__main { max-width: 620px; margin: auto 0; }
.auth-story h1 { margin: 24px 0; font: 500 clamp(47px,5vw,76px)/1 var(--serif); letter-spacing: -.04em; }
.auth-story p { max-width: 540px; color: var(--ink-soft); line-height: 1.9; }
.auth-proof { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 58px; border-top: 1px solid var(--line); }
.auth-proof div { padding: 18px 14px 0 0; }
.auth-proof strong { display: block; font: 600 18px var(--serif); }
.auth-proof span { color: var(--muted); font-size: 10px; }
.auth-panel { min-height: 100vh; display: grid; place-items: center; padding: 42px; background: rgba(250,248,242,.58); }
.auth-card { width: min(440px, 100%); padding: 42px; border: 1px solid var(--line); background: var(--paper-soft); box-shadow: var(--shadow); }
.auth-card h2 { margin: 9px 0 8px; font: 600 32px var(--serif); }
.auth-card__intro { margin: 0 0 30px; color: var(--muted); font-size: 13px; }
.form-field { display: grid; gap: 8px; margin: 0 0 18px; }
.form-field label { font-size: 11px; font-weight: 750; letter-spacing: .04em; }
.input, .select, .textarea {
  width: 100%; min-height: 43px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: rgba(255,253,248,.75); color: var(--ink); padding: 9px 12px;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-soft); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49,91,155,.10); outline: none; }
.textarea { resize: vertical; min-height: 90px; }
.field-hint { color: var(--muted); font-size: 10px; }
.verification-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
.verification-code { font-variant-numeric: tabular-nums; letter-spacing: .12em; }
.code-send { min-width: 126px; padding-inline: 13px; white-space: nowrap; }
.auth-secondary { margin: -6px 0 14px; text-align: right; font-size: 11px; }
.auth-secondary a { color: var(--green-deep); border-bottom: 1px solid rgba(61,111,91,.35); }
.form-error { min-height: 20px; margin: -4px 0 12px; color: var(--danger); font-size: 12px; }
.auth-submit { width: 100%; margin-top: 8px; }
.auth-switch { margin: 22px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.auth-switch a { color: var(--green-deep); font-weight: 750; border-bottom: 1px solid var(--green); }

/* Signed-in shell */
.app-shell { min-height: 100vh; background: var(--paper); }
.app-topbar { height: 68px; border-bottom: 1px solid var(--line); background: rgba(244,240,231,.96); position: sticky; top: 0; z-index: 80; }
.app-topbar__inner { height: 100%; padding: 0 24px; display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.app-links { justify-self: center; display: flex; gap: 6px; }
.app-links a { padding: 8px 12px; color: var(--muted); font-size: 12px; border-bottom: 1px solid transparent; }
.app-links a:hover, .app-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--green); }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 5px; border: 1px solid var(--line); background: var(--paper-soft); }
.user-avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font: 700 11px var(--serif); }
.user-copy strong { display: block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.user-copy span { display: block; color: var(--muted); font-size: 9px; }

.page { width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding: 46px 0 78px; }
.page-head { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 12px 0 8px; font: 500 clamp(38px,4vw,58px)/1 var(--serif); letter-spacing: -.035em; }
.page-head p { margin: 0; max-width: 660px; color: var(--ink-soft); }
.page-actions { display: flex; gap: 10px; }
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--line); margin-top: 30px; }
.stat-card { padding: 20px 22px; border-right: 1px solid var(--line); background: rgba(250,248,242,.5); }
.stat-card:last-child { border-right: 0; }
.stat-card span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.stat-card strong { display: block; margin-top: 12px; font: 600 27px var(--serif); }

.section-block { margin-top: 48px; }
.section-block__head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 18px; }
.section-block__head h2 { margin: 8px 0 0; font: 600 27px var(--serif); }
.section-block__head p { margin: 0; color: var(--muted); font-size: 12px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.project-card { min-height: 230px; padding: 24px; border: 1px solid var(--line); background: rgba(250,248,242,.52); display: flex; flex-direction: column; transition: .2s ease; }
.project-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); background: var(--paper-soft); }
.project-card__top { display: flex; justify-content: space-between; gap: 16px; align-items: center; color: var(--muted); font-size: 10px; }
.project-status { display: inline-flex; align-items: center; gap: 6px; }
.project-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.project-card h3 { margin: 36px 0 8px; font: 600 23px var(--serif); }
.project-card p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.75; }
.project-card__foot { margin-top: auto; padding-top: 24px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); }
.project-card__foot span { color: var(--muted); font-size: 10px; }
.empty-state { padding: 70px 24px; border: 1px dashed var(--line-strong); text-align: center; background: rgba(250,248,242,.4); }
.empty-state__mark { width: 52px; height: 52px; margin: 0 auto 18px; border: 1px solid var(--line-strong); display: grid; place-items: center; border-radius: 50%; color: var(--green); font: 500 26px var(--serif); }
.empty-state h3 { margin: 0 0 8px; font: 600 21px var(--serif); }
.empty-state p { margin: 0 0 20px; color: var(--muted); font-size: 12px; }

/* Workbench */
.workspace-page { height: calc(100vh - 68px); overflow: hidden; display: grid; grid-template-rows: 58px minmax(0,1fr); }
.workspace-commandbar { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); background: var(--paper-soft); }
.workspace-title { min-width: 0; display: flex; align-items: center; gap: 12px; }
.workspace-title__copy { min-width: 0; }
.workspace-title strong, .workspace-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-title strong { font: 600 14px var(--serif); }
.workspace-title span { color: var(--muted); font-size: 9px; }
.command-search { position: relative; width: min(420px, 38vw); }
.command-search input { padding-left: 36px; }
.command-search::before { content: "⌕"; position: absolute; left: 12px; top: 8px; z-index: 1; color: var(--muted); font-size: 19px; }
.history-controls { display: flex; gap: 6px; }

.workspace-layout { min-height: 0; display: grid; grid-template-columns: 252px minmax(0,1fr) 330px; }
.workspace-sidebar, .workspace-inspector { min-height: 0; overflow: auto; background: rgba(250,248,242,.65); }
.workspace-sidebar { border-right: 1px solid var(--line); }
.workspace-inspector { border-left: 1px solid var(--line); }
.sidebar-section { padding: 18px 15px; border-bottom: 1px solid var(--line); }
.sidebar-section__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sidebar-section__head strong { font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.sidebar-section__head span { color: var(--muted); font-size: 9px; }
.tree-list, .history-list, .variable-list { display: grid; gap: 4px; }
.tree-item, .history-item, .variable-item { width: 100%; border: 1px solid transparent; background: transparent; color: var(--ink); text-align: left; padding: 9px 10px; cursor: pointer; }
.tree-item:hover, .history-item:hover, .variable-item:hover { background: var(--paper-deep); }
.tree-item.is-active { background: var(--green-wash); border-color: rgba(46,105,88,.35); }
.tree-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.tree-item span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.upload-zone { padding: 22px 12px; border: 1px dashed var(--line-strong); text-align: center; background: rgba(255,253,248,.58); cursor: pointer; }
.upload-zone:hover, .upload-zone.is-dragover { border-color: var(--green); background: var(--green-wash); }
.upload-zone strong { display: block; font: 600 14px var(--serif); }
.upload-zone span { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.upload-zone input { display: none; }
.upload-progress { margin-top: 10px; height: 2px; background: var(--line); overflow: hidden; }
.upload-progress i { display: block; width: 0; height: 100%; background: var(--green); transition: width .2s ease; }

.workspace-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: 46px 44px minmax(0,1fr) 44px; background: var(--white); }
.table-tabs { display: flex; align-items: end; gap: 2px; padding: 0 12px; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--paper); }
.table-tab { min-width: max-content; height: 38px; margin-top: 7px; border: 1px solid transparent; border-bottom: 0; padding: 0 14px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.table-tab.is-active { color: var(--ink); background: var(--white); border-color: var(--line); }
.grid-toolbar { display: flex; align-items: center; gap: 7px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--paper-soft); overflow-x: auto; }
.toolbar-separator { width: 1px; height: 20px; flex: 0 0 auto; background: var(--line); margin: 0 3px; }
.toolbar-meta { margin-left: auto; min-width: max-content; color: var(--muted); font-size: 9px; }
.data-grid-wrap { min-height: 0; overflow: auto; position: relative; background: var(--white); }
.data-grid { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font: 11px/1.35 var(--sans); }
.data-grid th, .data-grid td { height: 34px; max-width: 320px; padding: 6px 10px; border-right: 1px solid #e3ded4; border-bottom: 1px solid #e7e2d9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--white); }
.data-grid th { position: sticky; top: 0; z-index: 4; height: 42px; background: var(--paper-deep); text-align: left; font-weight: 750; cursor: pointer; }
.data-grid th:hover { background: #dfd8cb; }
.data-grid .row-number { position: sticky; left: 0; z-index: 3; width: 54px; min-width: 54px; color: var(--muted); background: var(--paper-soft); text-align: right; font-family: var(--mono); }
.data-grid th.row-number { z-index: 6; background: var(--paper-deep); }
.data-grid th.is-selected, .data-grid td.is-selected { background: var(--blue-wash); }
.data-grid td[contenteditable="true"]:focus { outline: 2px solid var(--blue); outline-offset: -2px; background: white; }
.grid-empty { height: 100%; display: grid; place-items: center; text-align: center; padding: 40px; color: var(--muted); }
.grid-empty strong { display: block; color: var(--ink); font: 600 22px var(--serif); }
.grid-empty span { display: block; margin-top: 8px; font-size: 11px; }
.grid-loading { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(255,253,248,.76); backdrop-filter: blur(2px); }
.spinner { width: 26px; height: 26px; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 6px 10px; border-top: 1px solid var(--line); background: var(--paper-soft); }
.pagination__summary { color: var(--muted); font-size: 9px; }
.pagination__controls { display: flex; align-items: center; gap: 6px; }
.pagination__right { justify-self: end; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }

.inspector-tabs { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: repeat(3,1fr); border-bottom: 1px solid var(--line); background: var(--paper-soft); }
.inspector-tab { height: 44px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.inspector-tab:last-child { border-right: 0; }
.inspector-tab.is-active { color: var(--ink); box-shadow: inset 0 -2px var(--green); }
.inspector-panel { display: none; padding: 18px 16px 30px; }
.inspector-panel.is-active { display: block; }
.inspector-panel h3 { margin: 0 0 15px; font: 600 19px var(--serif); }
.tool-card { margin-bottom: 10px; border: 1px solid var(--line); background: var(--paper-soft); }
.tool-card summary { list-style: none; padding: 13px 14px; cursor: pointer; font-size: 11px; font-weight: 750; display: flex; justify-content: space-between; }
.tool-card summary::-webkit-details-marker { display: none; }
.tool-card summary::after { content: "+"; color: var(--green); }
.tool-card[open] summary::after { content: "−"; }
.tool-card__body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.tool-card__body .form-field { margin-top: 12px; margin-bottom: 12px; }
.tool-actions { display: flex; gap: 7px; margin-top: 12px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 5px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft); font-size: 9px; }
.quality-score { width: 116px; height: 116px; margin: 10px auto 20px; border: 7px solid var(--green-wash); border-top-color: var(--green); border-radius: 50%; display: grid; place-items: center; }
.quality-score strong { font: 600 29px var(--serif); }
.quality-score span { display: block; color: var(--muted); font: 9px var(--sans); text-align: center; }
.quality-list { display: grid; gap: 7px; }
.quality-item { padding: 10px; border-left: 2px solid var(--amber); background: var(--amber-wash); font-size: 10px; }
.history-item { border-bottom: 1px solid var(--line); padding: 10px 2px; cursor: default; }
.history-item strong { display: block; font-size: 10px; }
.history-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

/* Dialogs, toasts and reusable states */
.dialog { width: min(560px, calc(100vw - 34px)); border: 1px solid var(--line); border-radius: 0; padding: 0; color: var(--ink); background: var(--paper-soft); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(21,23,20,.48); backdrop-filter: blur(3px); }
.dialog__head { padding: 22px 24px 17px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.dialog__head h2 { margin: 0; font: 600 24px var(--serif); }
.dialog__head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.dialog__body { padding: 22px 24px; }
.dialog__foot { padding: 15px 24px 22px; display: flex; justify-content: flex-end; gap: 8px; }
.icon-close { border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--muted); }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 999; display: grid; gap: 8px; width: min(360px, calc(100vw - 40px)); }
.toast { padding: 13px 15px; border: 1px solid var(--line-strong); background: var(--paper-soft); box-shadow: var(--shadow-soft); font-size: 11px; animation: toastIn .25s ease both; }
.toast--success { border-left: 3px solid var(--green); }
.toast--error { border-left: 3px solid var(--danger); }
.toast--info { border-left: 3px solid var(--blue); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.skeleton { border-radius: 2px; background: linear-gradient(90deg,var(--paper-deep),var(--paper-soft),var(--paper-deep)); background-size: 220% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }
.badge { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; border: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.badge--green { color: var(--green-deep); background: var(--green-wash); border-color: rgba(46,105,88,.28); }
.badge--blue { color: var(--blue); background: var(--blue-wash); border-color: rgba(49,91,155,.25); }
.badge--danger { color: var(--danger); background: var(--danger-wash); border-color: rgba(154,63,57,.25); }
.hidden { display: none !important; }

.admin-table-wrap { overflow: auto; border: 1px solid var(--line); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--paper-soft); font-size: 11px; }
.admin-table th, .admin-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.admin-table th { color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; background: var(--paper-deep); }

/* Administrator registration codes · 2026-08-19.3 */
.invite-admin-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .55fr);
  gap: 22px;
  align-items: end;
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(250, 248, 242, .54);
}
.invite-create-form {
  display: grid;
  grid-template-columns: minmax(120px, .38fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  min-width: 0;
}
.invite-create-form .form-field { min-width: 0; margin: 0; }
.invite-create-form .btn { min-height: 44px; white-space: nowrap; }
.invite-security-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.invite-stat-row { margin-top: 14px; }
.invite-table-wrap { margin-top: 14px; }
.invite-table { min-width: 920px; }
.invite-code,
.invite-code-input { font-family: var(--mono); letter-spacing: .035em; }
.invite-code {
  display: inline-block;
  max-width: 100%;
  padding: 5px 7px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--green-deep);
  font-size: 11px;
  user-select: all;
  overflow-wrap: anywhere;
}
.invite-code--masked { color: var(--muted); }
.invite-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Unified fit and interaction feedback */
.btn,
button,
[role="button"],
.capability-card,
.method-tile,
.project-card,
.tree-item,
.history-item,
.variable-item {
  position: relative;
  isolation: isolate;
}

.btn,
.project-card,
.tool-card,
.stat-card,
.form-field,
.workspace-title,
.user-copy,
.section-block__head > *,
.page-head > * {
  min-width: 0;
}

.btn {
  max-width: 100%;
  white-space: normal;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.btn:active:not(:disabled),
button:active:not(:disabled),
[role="button"]:active:not([aria-disabled="true"]) {
  transform: translateY(1px) scale(.975) !important;
  filter: saturate(.9) brightness(.94);
  box-shadow: inset 0 2px 5px rgba(21,23,20,.18) !important;
}

.project-card:active,
.capability-card:active,
.method-tile:active,
.tree-item:active,
.history-item:active,
.variable-item:active {
  transform: translateY(1px) scale(.992) !important;
}

.btn[aria-pressed="true"],
.btn.is-active,
.tree-item.is-active,
.history-item.is-active,
.variable-item.is-active {
  border-color: rgba(46,105,88,.42);
  background: var(--green-wash);
  color: var(--green-deep);
  box-shadow: inset 0 -2px var(--green);
}

.pr-click-feedback { overflow: hidden; }
.pr-click-feedback::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: var(--pr-click-x, 50%);
  top: var(--pr-click-y, 50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  pointer-events: none;
  background: currentColor;
  opacity: .16;
  transform: translate(-50%,-50%) scale(.2);
  animation: pr-click-wave .46s ease-out forwards;
}

@keyframes pr-click-wave {
  to { opacity: 0; transform: translate(-50%,-50%) scale(11); }
}

.btn[aria-busy="true"],
button[aria-busy="true"],
.is-busy { cursor: progress !important; }

.btn[aria-busy="true"]::before,
button[aria-busy="true"]::before,
.is-busy::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  display: inline-block;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: pr-busy-spin .7s linear infinite;
}

@keyframes pr-busy-spin { to { transform: rotate(360deg); } }

.input,
.select,
.textarea,
.admin-table th,
.admin-table td,
.project-card h3,
.project-card p,
.tool-card summary,
.tree-item strong,
.tree-item span {
  overflow-wrap: anywhere;
}

.input,
.select,
.textarea { min-width: 0; max-width: 100%; }
.admin-table-wrap { max-width: 100%; scrollbar-gutter: stable; }
.admin-table { min-width: 760px; }
.admin-table th { white-space: normal; line-height: 1.4; }
.admin-table td { max-width: 360px; white-space: normal; line-height: 1.45; }
.page-actions,
.hero__actions,
.header-actions,
.tool-actions,
.history-controls { flex-wrap: wrap; }

@media (max-width: 1100px) {
  .site-nav { display: none; }
  .site-header__inner { grid-template-columns: 1fr auto; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__copy { padding-right: 0; }
  .hero__figure { border-left: 0; border-top: 1px solid var(--line); padding: 48px 0; }
  .capability-grid { grid-template-columns: 1fr; }
  .capability-card { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .capability-card:last-child { border-bottom: 0; }
  .capability-card h3 { margin-top: 35px; }
  .method-grid { grid-template-columns: repeat(2,1fr); }
  .auth-page { grid-template-columns: 1fr; }
  .auth-story { min-height: 54vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace-layout { grid-template-columns: 220px minmax(0,1fr); }
  .workspace-inspector { position: fixed; right: 0; top: 126px; bottom: 0; z-index: 60; width: min(360px, 90vw); box-shadow: var(--shadow); transform: translateX(101%); transition: transform .25s ease; }
  .workspace-inspector.is-open { transform: none; }
  .project-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 720px) {
  .site-header { height: 64px; }
  .site-header__inner, .hero, .landing-section, .cta-band, .site-footer__inner, .page { width: min(100% - 30px, 1480px); }
  .brand__sub, .header-actions .btn--ghost { display: none; }
  .hero { padding-top: 48px; }
  .hero h1 { font-size: clamp(42px,14vw,64px); }
  .hero__copy { padding-bottom: 48px; }
  .hero__figure { padding-top: 30px; }
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .trust-strip > div { border-bottom: 1px solid var(--line); }
  .section-heading { grid-template-columns: 1fr; gap: 18px; }
  .method-grid, .project-grid, .stat-row { grid-template-columns: 1fr; }
  .stat-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .cta-band, .page-head { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr; align-items: flex-start; gap: 18px; }
  .site-footer__summary { text-align: left; }
  .site-footer__records { justify-content: flex-start; gap: 10px 18px; }
  .auth-story { min-height: 48vh; padding: 28px 24px; }
  .auth-proof { display: none; }
  .auth-panel { padding: 24px 15px; }
  .auth-card { padding: 30px 22px; }
  .app-links { display: none; }
  .app-topbar__inner { padding: 0 12px; gap: 10px; }
  .user-copy { display: none; }
  .page { padding-top: 28px; }
  .workspace-commandbar { grid-template-columns: 1fr auto; }
  .command-search { display: none; }
  .workspace-layout { grid-template-columns: 1fr; }
  .workspace-sidebar { position: fixed; left: 0; top: 126px; bottom: 0; z-index: 60; width: min(300px,88vw); box-shadow: var(--shadow); transform: translateX(-101%); transition: transform .25s ease; }
  .workspace-sidebar.is-open { transform: none; }
  .workspace-main { grid-template-rows: 42px 44px minmax(0,1fr) 44px; }
  .toolbar-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* Final cross-page consistency and edge-width fit · 2026-08-19.2 */
:root { color-scheme: light; }
html { max-width: 100%; overflow-x: clip; }
body { max-width: 100%; }

:where(
  .site-header__inner, .hero__grid, .hero__copy, .hero__figure,
  .section-heading, .cta-band, .site-footer__inner, .auth-page,
  .auth-story, .auth-panel, .auth-card, .app-topbar__inner,
  .page, .page-head, .section-block__head, .project-card,
  .workspace-commandbar, .workspace-layout, .workspace-main,
  .dialog, .dialog__head, .dialog__body, .dialog__foot
) > * { min-width: 0; }

:where(
  h1, h2, h3, h4, p, label, small, .muted, .field-hint,
  .project-card, .project-card__top, .project-card__foot,
  .page-head, .section-block__head, .dialog, .toast
) { overflow-wrap: anywhere; }

.hero__note,
.figure-head,
.project-card__top,
.project-card__foot,
.section-block__head,
.dialog__head,
.dialog__foot,
.pagination__controls,
.pagination__right,
.user-menu { flex-wrap: wrap; }

.site-footer__record {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.btn,
button,
[role="button"] { touch-action: manipulation; }

.btn:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(49, 91, 155, .42);
  outline-offset: 3px;
}

.btn:disabled,
button:disabled,
[aria-disabled="true"] {
  opacity: .48;
  cursor: not-allowed !important;
  pointer-events: none;
  filter: grayscale(.16);
  transform: none !important;
  box-shadow: none !important;
}

.project-card,
.capability-card,
.method-tile,
.stat-card,
.auth-card,
.tool-card,
.dialog,
.toast {
  border-color: var(--line);
}

.project-card:hover,
.capability-card:hover,
.method-tile:hover,
.tool-card:hover {
  border-color: var(--line-strong);
}

.stat-row > *,
.project-grid > *,
.method-grid > * { min-width: 0; }

.dialog {
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}

.dialog__body {
  max-height: calc(100dvh - 190px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.dialog__foot .btn { min-width: 96px; }

.toast-stack {
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
}

.toast { min-width: 0; max-width: 100%; }

.admin-table-wrap,
.data-grid-wrap,
.table-tabs,
.grid-toolbar {
  max-width: 100%;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.admin-table td,
.admin-table th { overflow-wrap: anywhere; word-break: break-word; }
.project-card__foot { gap: 10px 16px; }

@media (max-width: 1100px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card:nth-child(2n) { border-right: 0; }
  .stat-card:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .site-header__inner,
  .hero,
  .landing-section,
  .cta-band,
  .site-footer__inner,
  .page { width: min(100% - 24px, 1480px); }

  .site-header__inner { gap: 12px; }
  .header-actions { gap: 6px; }
  .header-actions .btn { min-height: 38px; padding-inline: 10px; }
  .hero__note { gap: 8px 16px; }
  .figure-head { gap: 12px; }
  .figure-tag { flex: 0 0 auto; }
  .figure-foot { grid-template-columns: 1fr; }
  .figure-stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .figure-stat:last-child { border-bottom: 0; }

  .auth-page { min-width: 0; }
  .auth-story { min-height: auto; padding: 28px 20px 32px; gap: 36px; }
  .auth-story__main { margin-top: 42px; }
  .auth-story h1 { font-size: clamp(40px, 13vw, 60px); }
  .auth-panel { min-height: auto; padding: 20px 12px 34px; }
  .auth-card { padding: 28px 20px; }
  .verification-row { grid-template-columns: minmax(0, 1fr); }
  .code-send { width: 100%; min-width: 0; white-space: normal; }

  .invite-admin-panel { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .invite-create-form { grid-template-columns: minmax(0, 1fr); }
  .invite-create-form .btn { width: 100%; }

  .page-head,
  .section-block__head { align-items: start; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 132px; }
  .project-card__top,
  .project-card__foot { align-items: flex-start; }

  .workspace-page {
    height: calc(100dvh - 64px);
    grid-template-rows: minmax(58px, auto) minmax(0, 1fr);
  }
  .workspace-commandbar { min-width: 0; padding-inline: 10px; }
  .workspace-title strong,
  .workspace-title span { white-space: normal; overflow-wrap: anywhere; }
  .history-controls { min-width: 0; max-width: 100%; overflow-x: auto; }
  .workspace-sidebar,
  .workspace-inspector { top: 122px; max-width: calc(100vw - 18px); }
  .pagination {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    min-height: 72px;
    overflow: auto;
  }
  .pagination__controls { justify-content: flex-start; overflow-x: auto; }
  .pagination__right { justify-self: start; }

  .dialog { width: calc(100vw - 20px); max-width: none; max-height: calc(100dvh - 20px); }
  .dialog__head { padding: 18px 16px 14px; }
  .dialog__body { padding: 18px 16px; max-height: calc(100dvh - 178px); }
  .dialog__foot { padding: 12px 16px 18px; }
  .dialog__foot .btn { flex: 1 1 120px; }

  .toast-stack { right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100vw - 20px); }
  .admin-table { min-width: 680px; }
}

@media (max-width: 480px) {
  .brand { gap: 9px; }
  .brand__name { font-size: 17px; }
  .site-header__inner { width: calc(100% - 18px); }
  .hero,
  .landing-section,
  .cta-band,
  .site-footer__inner,
  .page { width: calc(100% - 20px); }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: clamp(38px, 13vw, 54px); }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 100%; }
  .trust-strip { grid-template-columns: minmax(0, 1fr); }
  .trust-strip > div { border-right: 0; }
  .landing-section { padding-block: 62px; }
  .method-tile { min-height: 148px; padding: 20px; }
  .method-tile h3 { margin-top: 26px; }

  .auth-story { padding-inline: 16px; }
  .auth-card { padding: 24px 16px; }
  .auth-card h2 { font-size: 28px; }
  .input, .select, .textarea { font-size: 16px; }
  .auth-secondary { text-align: left; }

  .app-topbar__inner { grid-template-columns: minmax(0, 1fr) auto; padding-inline: 9px; }
  .app-topbar .brand { min-width: 0; }
  .app-topbar .brand__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-menu { justify-content: flex-end; }
  .page { padding-top: 22px; }
  .page-head h1 { font-size: clamp(34px, 11vw, 48px); }
  .stat-row { grid-template-columns: minmax(0, 1fr); }
  .stat-card { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .stat-card:last-child { border-bottom: 0; }
  .project-card { min-height: 208px; padding: 20px; }
  .project-card h3 { margin-top: 26px; }

  .workspace-commandbar { grid-template-columns: minmax(0, 1fr); }
  .history-controls { width: 100%; }
  .history-controls .btn { flex: 1 1 0; }
  .workspace-sidebar,
  .workspace-inspector { top: 180px; }
  .grid-toolbar .btn { flex: 0 0 auto; }
}

/* Resilient native dialogs · 2026-08-20.2 */
.dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(620px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}

.dialog[open] > form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}

.dialog__head,
.dialog__foot {
  position: sticky;
  z-index: 2;
  background: var(--paper-soft);
}

.dialog__head { top: 0; align-items: flex-start; }
.dialog__foot { bottom: 0; }

.dialog .icon-close {
  position: relative;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  margin: -5px -6px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-soft);
  line-height: 1;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  touch-action: manipulation;
}

.dialog .icon-close:hover {
  border-color: rgba(154, 54, 54, .55);
  background: var(--danger-wash);
  color: var(--danger);
}

@media (max-width: 560px) {
  .dialog[open],
  .dialog[open] > form {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .dialog__head { padding: 14px 14px 11px; }
  .dialog__body { padding: 14px; max-height: none; }
  .dialog__foot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 14px 14px;
  }
  .dialog__foot .btn { width: 100%; min-width: 0; }
  .dialog__foot .btn:last-child:nth-child(3) { grid-column: 1 / -1; }
}


/* workspace table/history destructive controls 20260905 */
.history-actions{display:flex;align-items:center;gap:6px}
#clearHistory{color:#b42318;border-color:rgba(180,35,24,.22);background:rgba(255,255,255,.9)}
#clearHistory:hover{color:#8f1d14;border-color:rgba(180,35,24,.38);background:#fff5f4}
.table-tab-shell{position:relative;display:inline-flex;align-items:center;flex:0 0 auto}
.table-tab-shell .table-tab{padding-right:32px}
.table-tab-delete{position:absolute;right:5px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:22px;height:22px;padding:0;border:0;border-radius:7px;background:transparent;color:#94a3b8;font-size:17px;line-height:1;cursor:pointer;transition:background .16s ease,color .16s ease,transform .16s ease}
.table-tab-delete:hover,.table-tab-delete:focus-visible{background:#fff0ee;color:#c43227;outline:none;transform:translateY(-50%) scale(1.06)}
.table-tab-shell.is-active .table-tab-delete{color:#55709a}
.table-tab-shell.is-active .table-tab-delete:hover{color:#b42318;background:#fff}
@media(max-width:760px){.history-actions{gap:4px}.table-tab-shell .table-tab{padding-right:30px}.table-tab-delete{right:4px}}

/* workspace-responsive-v2 */
.grid-toolbar .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 1500px) and (min-width: 721px) {
  .workspace-layout {
    grid-template-columns: minmax(0, 1fr) clamp(300px, 22vw, 330px);
  }

  .workspace-sidebar {
    position: fixed;
    left: 0;
    top: 126px;
    bottom: 0;
    z-index: 70;
    width: min(300px, 88vw);
    max-width: calc(100vw - 24px);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateX(-101%);
    transition: transform .25s ease;
  }

  .workspace-sidebar.is-open {
    transform: translateX(0);
  }
}

@media (max-width: 1240px) and (min-width: 721px) {
  .workspace-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-inspector {
    position: fixed;
    right: 0;
    top: 126px;
    bottom: 0;
    z-index: 70;
    width: min(360px, 90vw);
    max-width: calc(100vw - 24px);
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateX(101%);
    transition: transform .25s ease;
  }

  .workspace-inspector.is-open {
    transform: translateX(0);
  }
}

/* workspace-responsive-v2-opaque-drawers */
@media (max-width: 1500px) and (min-width: 721px) {
  .workspace-sidebar { background: var(--paper-soft); }
}
@media (max-width: 1240px) and (min-width: 721px) {
  .workspace-inspector { background: var(--paper-soft); }
}

