@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #f3f3f1;
  --white: #fff;
  --ink: #151515;
  --text: #353533;
  --muted: #5b5b55;
  --line: #dcdcd5;
  --fine: #ecece7;
  --soft: #eeeee9;
  --gold: #77511c;
  --red: #9d312b;
  --radius: 10px;
  --top: 68px;
  --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.6 var(--font); }
h1, h2, h3, p, pre { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
:focus-visible { outline: 2px solid #45453f; outline-offset: 3px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--red); }
.thin, .caption { color: var(--muted); font-size: 14px; }
.eyebrow { color: var(--muted); font-size: 14px; font-weight: 650; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.skip { position: fixed; z-index: 20; top: 8px; left: 8px; transform: translateY(-150%); padding: 9px 14px; background: white; }
.skip:focus { transform: none; }

.icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon-flow { --icon: url("icons/flow.png"); }
.icon-grid { --icon: url("icons/grid.png"); }
.icon-media { --icon: url("icons/media.png"); }
.icon-book { --icon: url("icons/book.png"); }
.icon-folder { --icon: url("icons/folder.png"); }
.icon-right { --icon: url("icons/right.png"); }
.icon-chevron { --icon: url("icons/chevron.png"); }
.icon-check { --icon: url("icons/check.png"); }
.icon-close { --icon: url("icons/close.png"); }
.icon-plus { --icon: url("icons/plus.png"); }
.icon-minus { --icon: url("icons/minus.png"); }
.icon-copy { --icon: url("icons/copy.png"); }
.icon-file { --icon: url("icons/file.png"); }
.icon-upload { --icon: url("icons/upload.png"); }
.icon-download { --icon: url("icons/download.png"); }
.icon-play { --icon: url("icons/play.png"); }
.icon-stop { --icon: url("icons/stop.png"); }
.icon-info { --icon: url("icons/info.png"); }
.icon-alert { --icon: url("icons/alert.png"); }
.icon-logout { --icon: url("icons/logout.png"); }
.icon-link { --icon: url("icons/link.png"); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 7px 14px;
  border: 1px solid #d3d3cc;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
}
.btn:hover:not(:disabled) { background: #eeeee9; border-color: #bcbcb2; }
.btn.primary { background: var(--ink); color: white; border-color: var(--ink); }
.btn.primary:hover:not(:disabled) { background: #373732; border-color: #373732; }
.btn.small { min-height: 38px; padding: 6px 10px; font-size: 14px; }
.btn.small .icon { width: 16px; height: 16px; }
.btn.subtle { border-color: transparent; background: transparent; }
.btn.danger { color: var(--red); border-color: #ebc4c0; }
.btn.danger:hover { background: #fff0ee; }
.btn.icon-only { width: 38px; }

.topbar { position: sticky; top: 0; z-index: 4; height: var(--top); display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--white); padding: 0 26px; border-bottom: 1px solid var(--line); }
.brand, .account { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand img { width: 122px; height: 32px; object-fit: contain; flex: 0 0 auto; }
.brand span { font-size: 15px; font-weight: 650; border-left: 1px solid var(--line); padding-left: 13px; white-space: nowrap; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 50%; font-size: 14px; font-weight: 700; }
.member { color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode { color: var(--gold); background: #f9f0dd; border-radius: 6px; padding: 3px 8px; font-size: 13px; white-space: nowrap; }
.account .btn { flex: 0 0 auto; }

.shell { display: grid; grid-template-columns: 248px minmax(0,1fr); min-height: calc(100dvh - var(--top)); }
.sidebar {
  --sidebar-bg: #1a1a19;
  --sidebar-text: #f1f1ed;
  --sidebar-muted: #c2c2b9;
  --sidebar-line: #3e3e3b;
  --sidebar-tile: #313130;
  position: sticky;
  top: var(--top);
  height: calc(100dvh - var(--top));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 14px 16px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-line);
}
.sidebar-nav { display: grid; gap: 17px; min-width: 0; }
.nav-group { min-width: 0; }
.nav-group + .nav-group { border-top: 1px solid var(--sidebar-line); padding-top: 17px; }
.nav-group h2 { padding-inline: 10px; margin-bottom: 8px; color: var(--sidebar-muted); font-size: 13px; font-weight: 650; }
.nav-group ul { display: grid; gap: 5px; list-style: none; margin: 0; padding: 0; }
.nav-group li { min-width: 0; }
.nav-item, .sidebar > nav:not(.sidebar-nav) > a {
  display: grid;
  grid-template-columns: 32px minmax(0,1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 53px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.sidebar > nav:not(.sidebar-nav) { display: grid; gap: 5px; }
.sidebar > nav:not(.sidebar-nav) > a { display: flex; flex-wrap: wrap; border-color: var(--sidebar-line); }
.sidebar > nav:not(.sidebar-nav) .nav-dot { display: none; }
.sidebar > nav:not(.sidebar-nav) small { color: var(--sidebar-muted); margin-inline-start: auto; }
.nav-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--sidebar-tile); color: inherit; }
.nav-text { min-width: 0; overflow-wrap: anywhere; }
.nav-arrow { width: 16px; height: 16px; visibility: hidden; }
.nav-status { justify-self: start; padding: 3px 6px; border-radius: 5px; background: var(--sidebar-tile); color: var(--sidebar-muted); font-size: 12px; white-space: nowrap; }
.nav-item:hover { background: #272726; border-color: var(--sidebar-line); }
.nav-item:focus-visible, .sidebar > nav:not(.sidebar-nav) > a:focus-visible { outline-color: var(--white); outline-offset: 2px; }
.nav-item[aria-current="page"] { background: #fafaf7; border-color: #fafaf7; color: var(--ink); font-weight: 700; }
.nav-item[aria-current="page"] .nav-icon,
.nav-item[aria-current="page"] .nav-status { background: #e8e8e3; color: var(--ink); }
.nav-item[aria-current="page"] .nav-arrow,
.nav-item:hover .nav-arrow,
.nav-item:focus-visible .nav-arrow { visibility: visible; }
.sidebar-foot { display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--sidebar-line); padding: 14px 9px 0; color: var(--sidebar-muted); font-size: 13px; }
.sidebar-foot img { flex: none; width: 19px; height: 19px; filter: invert(1); }
.shell > main { min-width: 0; width: 100%; max-width: 1570px; margin: 0 auto; padding: 24px clamp(20px, 2.5vw, 40px) 44px; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 42px; margin-bottom: 14px; }
.crumb { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; min-width: 0; color: var(--muted); font-size: 14px; }
.crumb a:hover { text-decoration: underline; }
.crumb strong { color: var(--ink); overflow-wrap: anywhere; }
.select-wrap { position: relative; display: block; min-width: 0; }
.select-wrap select { appearance: none; padding-right: 38px; }
.select-wrap > .icon { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: none; }
.select-wrap > .icon-chevron { right: 11px; }
.project-picker { flex: 0 1 248px; }
.project-picker > .icon-folder { left: 11px; }
.project-select { width: 100%; min-height: 42px; padding: 8px 38px; background: white; border: 1px solid #d3d3cc; border-radius: 6px; text-overflow: ellipsis; font-size: 15px; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  align-items: center;
  gap: 24px;
  overflow: hidden;
  min-height: 218px;
  padding: 28px clamp(20px,3vw,38px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.board-hero { grid-template-columns: minmax(0,1fr) minmax(270px,330px); }
.hero::after, .login-art::after { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: -28% -6% -24% 41%; background: url("brand/TiSpark-graphic-white.png") center right / contain no-repeat; }
.hero::after { opacity: .055; filter: invert(1); }
.hero h1 { font-size: clamp(34px,3.3vw,50px); font-weight: 750; letter-spacing: -.035em; line-height: 1.16; margin: 5px 0 12px; }
.hero-copy p { margin-bottom: 19px; max-width: 560px; color: var(--text); }
.project-summary {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.ring {
  flex: none;
  display: grid;
  place-items: center;
  grid-template: 1fr / 1fr;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(var(--ink) 0 var(--fill, 0%), #e3e3de var(--fill, 0%) 100%);
}
.ring-face { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--white); }
.ring-value { font-size: 21px; line-height: 1; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.project-summary-details { min-width: 0; }
.project-summary h2 { font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.project-summary-counts { display: flex; flex-wrap: wrap; column-gap: 10px; margin-top: 5px; color: var(--muted); font-size: 13px; }
.summary-progress { display: flex; gap: 5px; margin-top: 7px; }
.summary-progress span { width: 21px; height: 6px; border: 1px solid var(--line); border-radius: 2px; background: var(--soft); }
.summary-progress .finalized { border-color: var(--ink); background: var(--ink); }
.summary-progress .generated { background: repeating-linear-gradient(135deg,#787872 0 1px,#fafaf8 1px 3px); border-color: #66665e; }

.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px; margin: 26px 0 13px; }
.section-heading h2 { font-size: 24px; line-height: 1.25; margin-bottom: 4px; }
.step-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.step-card { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: start; gap: 13px; min-height: 162px; padding: 16px; border: 1px solid var(--line); background: white; border-radius: var(--radius); }
.step-number { display: grid; place-items: center; width: 42px; height: 42px; font-size: 18px; line-height: 1; font-weight: 750; font-variant-numeric: tabular-nums; border: 1px solid var(--fine); border-radius: 7px; background: #fbfbfa; }
.step-card.finalized .step-number { background: var(--ink); border-color: var(--ink); color: white; }
.step-card.generated .step-number { border-color: var(--line); background: var(--soft); }
.step-card-body { height: 100%; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.step-card-body h3 { font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
.line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.step-copy { font-size: 15px; line-height: 1.55; color: var(--text); }
.step-card-footer { margin-top: auto; padding-top: 3px; }
.step-source, .asset-label { display: flex; align-items: center; gap: 6px; min-width: 0; }
.step-source { color: var(--muted); font-size: 14px; }
.step-source .icon { width: 16px; height: 16px; }
.status { white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; border: 1px solid #d3d3cc; padding: 2px 9px; border-radius: 20px; font-size: 13px; font-weight: 650; background: white; }
.status::before { content: ""; flex: none; width: 6px; height: 6px; border: 1px solid #686860; border-radius: 1px; }
.status.finalized { color: white; background: var(--ink); border-color: var(--ink); }
.status.finalized::before { border-color: white; background: white; }
.status.generated { background: #f0f0ec; }
.status.generated::before { background: linear-gradient(135deg,#44443e 50%,#fff 50%); }

.empty { min-height: 300px; display: grid; justify-items: center; align-content: center; gap: 10px; padding: 24px; text-align: center; }
.empty-projects { margin-top: 16px; }
.empty-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--soft); color: #43433e; }
.empty-mark .icon { width: 24px; height: 24px; }
.empty h2, .empty h3 { font-size: 20px; line-height: 1.35; }
.empty p { max-width: 380px; }
.module { min-width: 0; border: 1px solid var(--line); background: white; border-radius: var(--radius); padding: 20px; }
.methods { margin-top: 16px; display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); gap: 14px; }
.methods .module:first-child { grid-row: span 2; }
.methods h2, .sheet h2 { font-size: 20px; line-height: 1.35; }
.method-row { display: grid; grid-template-columns: 28px 1fr; gap: 10px; border-top: 1px solid var(--fine); padding: 13px 0; }
.method-row:first-of-type { margin-top: 12px; }
.method-row h3 { font-size: 16px; }
.method-row p { font-size: 15px; color: var(--text); margin-top: 3px; }
.beats { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.beats li { border-top: 3px solid #41413d; padding-top: 6px; }
.beats li b, .beats li span { display: block; }
.beats li span { color: var(--muted); font-size: 14px; }
.weight-bars { display: grid; gap: 9px; margin: 12px 0 0; padding: 0; list-style: none; }
.weight-bars li { display: grid; grid-template-columns: minmax(95px,116px) minmax(0,1fr) 40px; gap: 9px; align-items: center; font-size: 14px; }
.weight-bars b { text-align: end; font-variant-numeric: tabular-nums; }
.weight-track { height: 7px; border-radius: 8px; overflow: hidden; background: var(--soft); }
.weight-track span { display: block; width: var(--weight); height: 100%; border-radius: inherit; background: var(--ink); }

.work-heading { margin: 6px 0 16px; }
.work-heading > .line .eyebrow { min-width: 0; overflow-wrap: anywhere; }
.work-heading h1 { font-size: clamp(29px,3.25vw,42px); letter-spacing: -.035em; margin: 4px 0 5px; line-height: 1.22; overflow-wrap: anywhere; }
.work-heading .caption { color: var(--text); font-size: 16px; }
.workflow-nav, .output-nav { width: fit-content; max-width: 100%; display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 7px; background: #e9e9e5; }
.workflow-nav { margin-bottom: 16px; }
.workflow-nav a, .output-nav button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 6px 11px; background: transparent; border: 1px solid transparent; border-radius: 5px; color: var(--text); font-size: 14px; font-weight: 650; line-height: 1.35; }
.workflow-nav a:hover, .output-nav button:hover { background: #f4f4f0; }
.workflow-nav a[aria-current], .output-nav button[aria-selected="true"] { background: white; color: var(--ink); border-color: #d8d8d2; font-weight: 700; }
.workflow-nav .num { font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; }
.workspace { display: grid; grid-template-columns: minmax(340px,.9fr) minmax(0,1.25fr); gap: 16px; align-items: start; }
.sheet { min-width: 0; background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; scroll-margin-top: calc(var(--top) + 12px); }
.sheet-head, .sheet-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; padding: 15px 17px; border-bottom: 1px solid var(--fine); }
.sheet-head h2 { margin-bottom: 3px; }
.sheet-footer { border-bottom: 0; border-top: 1px solid var(--fine); }
.sheet-body { padding: 15px 17px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; color: var(--text); font-size: 15px; font-weight: 650; margin-bottom: 13px; }
.field input, .field select, .field textarea, .inline-input, .table-editor input { width: 100%; min-width: 0; padding: 8px 10px; background: white; border: 1px solid #d1d1ca; border-radius: 5px; font-weight: 400; font-size: 16px; }
.field .select-wrap select { padding-right: 38px; }
.field input, .field select, .inline-input { min-height: 43px; }
.field textarea { min-height: 84px; resize: vertical; }
.field ::placeholder, .inline-input::placeholder { color: var(--muted); opacity: 1; }
.two-fields, .weights-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0 0 12px; }
legend { font-weight: 700; font-size: 15px; margin-bottom: 7px; }
#weights-total { margin-left: 6px; }
#weights-total.error { color: var(--red); }
.weights-grid { gap: 8px 12px; }
.weight-field { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 0 6px; padding: 8px 9px; border: 1px solid var(--fine); border-radius: 6px; font-size: 14px; }
.weight-field output { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.weight-slider { appearance: none; grid-column: 1 / -1; height: 24px; width: 100%; margin: 0; border: 0; background: transparent; cursor: pointer; }
.weight-slider::-webkit-slider-runnable-track { height: 5px; border-radius: 5px; background: linear-gradient(to right,var(--ink) var(--weight),#e9e9e3 var(--weight)); }
.weight-slider::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; margin-top: -4.5px; border: 1px solid white; border-radius: 3px; background: var(--ink); }
.weight-slider::-moz-range-track { height: 5px; border-radius: 5px; background: linear-gradient(to right,var(--ink) var(--weight),#e9e9e3 var(--weight)); }
.weight-slider::-moz-range-thumb { width: 12px; height: 12px; border: 1px solid white; border-radius: 3px; background: var(--ink); }
.checks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.checks label { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 5px 7px; border: 1px solid var(--fine); border-radius: 5px; font-size: 14px; cursor: pointer; }
.checks input { flex: none; accent-color: var(--ink); }
.material { border-top: 1px solid var(--fine); margin-top: 14px; padding-top: 13px; }
.drop { display: grid; justify-items: center; gap: 4px; border: 1px dashed #aaa99f; padding: 13px 8px; margin: 8px 0; background: #f9f9f6; border-radius: 6px; cursor: pointer; text-align: center; }
.drop b { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.drop:focus-within, .drop:hover, .drop.over { background: var(--soft); }
.drop input { width: 1px; height: 1px; opacity: 0; position: absolute; }
.url-line { display: flex; gap: 7px; }
.url-line .btn { flex: none; }
.file-list { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.file-list:empty { margin: 0; }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: 6px; background: var(--paper); border-radius: 5px; padding: 5px 8px; font-size: 14px; overflow-wrap: anywhere; }
.file-list li span { min-width: 0; }
.notice { color: var(--text); background: #f7f7f5; border: 1px solid #e3e3dc; border-radius: 6px; padding: 9px 11px; margin: 0 0 10px; font-size: 14px; overflow-wrap: anywhere; }
.notice.warning { color: var(--gold); background: #fbf3df; border-color: #eddfb9; }
.notice.error { color: var(--red); background: #fff0ee; border-color: #f1cbc8; }
.notice .actions { margin-top: 7px; gap: 6px; }
.notice .actions:empty { margin: 0; }
.notice-label { display: flex; align-items: start; gap: 7px; }
.notice-label .icon { margin-top: 2px; }
.output-nav { max-width: calc(100% - 34px); margin: 12px 17px 0; }
.editor-tools { margin-top: 12px; padding: 8px 17px; display: flex; flex-wrap: wrap; gap: 6px; background: #f8f8f5; border-block: 1px solid var(--fine); }
.editor-input { display: block; border: 0; resize: vertical; min-height: 340px; width: 100%; background: #fff; font-size: 16px; line-height: 1.7; padding: 16px 17px; }
.rich-output { padding: 16px 17px; min-height: 308px; max-height: 680px; overflow: auto; overflow-wrap: anywhere; }
.rich-output h1 { font-size: 26px; line-height: 1.3; margin-bottom: 10px; }
.rich-output h2 { font-size: 20px; margin: 13px 0 7px; }
.rich-output h3, .rich-output h4 { font-size: 17px; margin: 10px 0 5px; }
.rich-output p { margin-bottom: 9px; }
.rich-output table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.rich-output th, .rich-output td { border: 1px solid var(--line); padding: 6px 8px; font-size: 14px; text-align: start; }
.rich-output th { background: var(--soft); }
.rich-output .key, .copy-card { border: 1px solid var(--fine); background: #f8f8f6; padding: 12px; border-radius: 6px; margin-bottom: 9px; }
.rich-output .key p, .copy-card pre, .stream, .diff pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.stream, .copy-card pre { font: inherit; }
.copy-card pre { margin-top: 7px; }
.mobile-jump { display: none; }

dialog { width: min(calc(100vw - 26px),560px); max-height: calc(100dvh - 32px); border: 1px solid #bfbfb4; border-radius: var(--radius); padding: 0; color: var(--ink); }
dialog.wide { width: min(calc(100vw - 26px),920px); }
dialog::backdrop { background: #1616148c; }
.dialog-head { padding: 14px 18px; border-bottom: 1px solid var(--fine); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dialog-head h2 { font-size: 21px; overflow-wrap: anywhere; }
.dialog-body { padding: 16px 18px; }
.dialog-body > p { margin: 0 0 10px; }
.dialog-body .actions { margin-top: 12px; }
.dialog-body iframe { width: 100%; height: 56dvh; display: block; border: 1px solid var(--line); border-radius: 5px; margin-top: 9px; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.diff div { min-width: 0; }
.diff pre { min-height: 71px; max-height: 260px; overflow: auto; padding: 8px; background: var(--paper); font: inherit; font-size: 14px; }
.table-editor { overflow: auto; }
.table-editor table { border-collapse: collapse; width: 100%; }
.table-editor td, .table-editor th { padding: 4px; border: 1px solid var(--line); min-width: 105px; }
.table-editor th { background: var(--soft); }
#toast { position: fixed; z-index: 12; bottom: 16px; right: 16px; max-width: min(440px,calc(100vw - 32px)); padding: 10px 14px; border-radius: 6px; background: var(--ink); color: white; box-shadow: 0 4px 15px #0003; font-size: 15px; }
#toast:empty, .error:empty { display: none; }

.login { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); min-height: 100dvh; background: white; }
.login-art { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: clamp(26px,6vw,82px); background: #151515; color: white; }
.login-art::after { opacity: .45; inset: 10% -8% -12% 10%; }
.lockup { width: 154px; max-height: 42px; object-fit: contain; }
.login-art h1 { font-size: clamp(43px,6vw,82px); font-weight: 800; line-height: 1.07; letter-spacing: -.045em; margin: 10px 0 14px; }
.login-art p, .login-art .eyebrow { color: #e2e2db; }
.login-main { display: grid; place-items: center; padding: 28px; }
.login-form { width: min(100%,405px); }
.login-form h2 { font-size: 33px; letter-spacing: -.035em; }
.login-form > p { margin-bottom: 16px; }
.login-form button { width: 100%; justify-content: space-between; margin-top: 5px; }
.error-page { padding: 40px 26px; }
.error-page p { margin: 10px 0; }

@media (max-width: 1110px) {
  .shell { grid-template-columns: 234px minmax(0,1fr); }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .mobile-jump { display: flex; gap: 7px; margin-bottom: 10px; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: static; height: auto; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--sidebar-line); overflow: visible; }
  .sidebar-nav { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
  .nav-group + .nav-group { border-top: 0; border-left: 1px solid var(--sidebar-line); padding: 0 0 0 12px; }
  .nav-group ul { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .nav-item { grid-template-columns: 32px minmax(0,1fr); height: 100%; min-height: 46px; }
  .nav-item-planned { row-gap: 3px; }
  .nav-item-planned .nav-icon { grid-row: 1 / span 2; }
  .nav-status { grid-column: 2; padding-block: 1px; }
  .nav-arrow { display: none; }
  .sidebar > nav:not(.sidebar-nav) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sidebar-foot { display: none; }
  .topbar { padding-inline: 14px; }
}

@media (max-width: 690px) {
  :root { --top: 59px; }
  .brand, .account { gap: 7px; }
  .brand img { width: 87px; }
  .brand span { font-size: 13px; padding-left: 7px; }
  .account .member, .avatar { display: none; }
  .sidebar-nav { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .nav-group + .nav-group { border-left: 0; border-top: 1px solid var(--sidebar-line); padding: 9px 0 0; }
  .nav-group h2 { margin-bottom: 4px; }
  .nav-item { border-color: var(--sidebar-line); }
  .shell > main { padding: 15px 14px 30px; }
  .bar { flex-wrap: wrap; margin-bottom: 11px; }
  .project-picker { flex-basis: min(100%,220px); }
  .hero, .board-hero { grid-template-columns: minmax(0,1fr); gap: 16px; min-height: 0; padding: 17px; }
  .hero h1 { margin: 5px 0 8px; }
  .hero-copy p { margin-bottom: 14px; }
  .project-summary { padding: 11px; }
  .ring { width: 56px; height: 56px; }
  .ring-face { width: 46px; height: 46px; }
  .ring-value { font-size: 17px; }
  .step-grid, .methods, .login { grid-template-columns: minmax(0,1fr); }
  .methods .module:first-child { grid-row: auto; }
  .workflow-nav a { padding-inline: 8px; }
  .empty { min-height: 225px; }
  .login-art { min-height: 272px; }
  .login-main { align-content: start; }
  .diff { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .brand span { display: none; }
  .nav-item { grid-template-columns: 27px minmax(0,1fr); column-gap: 6px; padding: 6px; font-size: 14px; }
  .nav-icon { width: 27px; height: 27px; }
  .nav-icon .icon { width: 16px; height: 16px; }
  .nav-status { padding-inline: 4px; font-size: 11px; }
  .step-card { padding: 12px; gap: 9px; }
  .sheet-head, .sheet-body, .sheet-footer { padding-inline: 12px; }
  .output-nav { margin-inline: 12px; max-width: calc(100% - 24px); }
  .output-nav button { padding-inline: 8px; }
  .two-fields { column-gap: 7px; }
}
.language-switch { display: inline-flex; white-space: nowrap; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; font-size: .77rem; }
.language-switch a { padding: 2px 6px; border-radius: 4px; color: var(--muted); text-decoration: none; }
.language-switch a[aria-current] { background: var(--ink); color: var(--white); font-weight: 700; }
