:root {
  --ink: #173b33;
  --ink-strong: #0d2923;
  --ink-soft: #61736e;
  --canvas: #f6f8f4;
  --paper: #ffffff;
  --line: #dfe7e2;
  --line-soft: #edf1ee;
  --green: #1f735d;
  --green-dark: #155947;
  --green-pale: #eaf5ee;
  --amber: #a85e19;
  --amber-pale: #fff5df;
  --red: #b73f3f;
  --shadow: 0 18px 50px rgba(19, 54, 45, 0.08);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 12% 2%, rgba(191, 228, 102, 0.14), transparent 22rem), var(--canvas); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; margin: -1px; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }
.app-shell { min-height: 100vh; display: grid; grid-template-rows: 72px minmax(0, 1fr); }
.topbar { position: relative; z-index: 10; display: grid; grid-template-columns: 278px minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 0 22px 0 26px; background: rgba(255, 255, 255, 0.9); border-bottom: 1px solid var(--line); box-shadow: 0 1px 14px rgba(17, 56, 46, 0.03); backdrop-filter: blur(14px); }
.brand { width: max-content; display: flex; align-items: center; gap: 11px; color: var(--ink-strong); text-decoration: none; }
.brand-mark { width: 42px; height: 43px; display: inline-flex; align-items: center; justify-content: center; flex: none; filter: drop-shadow(0 5px 8px rgba(25, 80, 65, 0.16)); }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand-copy { display: flex; align-items: baseline; gap: 7px; }
.brand-copy strong { font-family: Georgia, serif; font-size: 24px; letter-spacing: -1px; }
.brand-copy small { color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: 0.18em; }
.topbar-center { min-width: 0; display: flex; align-items: center; gap: 12px; }
.workspace-kicker { color: var(--ink-soft); font-size: 12px; font-weight: 750; letter-spacing: 0.03em; }
.topbar-divider, .meta-divider { width: 1px; height: 18px; background: var(--line); }
.filename-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.filename-input { min-width: 0; width: min(360px, 38vw); padding: 8px 10px; color: var(--ink-strong); background: transparent; border: 1px solid transparent; border-radius: 8px; font-family: var(--mono); font-size: 13px; font-weight: 650; outline: none; }
.filename-input:hover { background: #f7faf7; }
.filename-input:focus { border-color: #9bcdbb; background: white; box-shadow: 0 0 0 3px rgba(31, 115, 93, 0.08); }
.dirty-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #e7a23c; box-shadow: 0 0 0 3px #fff2d9; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.rules-trigger { padding-right: 10px; }
.rules-trigger-count { min-width: 38px; padding: 4px 7px; color: var(--green); background: var(--green-pale); border-radius: 6px; font-family: var(--mono); font-size: 9px; font-weight: 800; }
.nav-link { padding: 9px; color: var(--ink-soft); font-size: 13px; font-weight: 650; text-decoration: none; }
.nav-link:hover { color: var(--green); }
.button { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); cursor: pointer; font-size: 13px; font-weight: 750; transition: 150ms ease; }
.button svg, .import-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button:hover { transform: translateY(-1px); border-color: #b9c9c1; }
.button:disabled, .run-button:disabled { opacity: 0.65; cursor: wait; transform: none; }
.button-icon { width: 40px; padding: 0; }
.button-primary { color: white; background: var(--green); border-color: var(--green); box-shadow: 0 6px 16px rgba(31, 115, 93, 0.16); }
.button-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.workspace { min-height: 0; display: grid; grid-template-columns: 278px minmax(430px, 1fr) minmax(330px, 420px); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.file-rail, .editor-column, .results-panel { min-width: 0; min-height: 0; background: var(--paper); }
.file-rail { display: flex; flex-direction: column; }
.rail-heading { display: flex; align-items: center; justify-content: space-between; padding: 27px 22px 20px; }
.eyebrow { display: block; margin-bottom: 7px; color: #779188; font-size: 9px; font-weight: 850; letter-spacing: 0.15em; text-transform: uppercase; }
.rail-heading h2 { margin: 0; color: var(--ink-strong); font-family: Georgia, serif; font-size: 19px; font-weight: 600; }
.round-button { width: 34px; height: 34px; display: grid; place-items: center; flex: none; padding: 0; border: 1px solid #cddbd3; border-radius: 50%; background: white; color: var(--green); cursor: pointer; transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease; }
.round-button svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.round-button:hover { color: white; background: var(--green); border-color: var(--green); }
.file-list { flex: 1; overflow-y: auto; padding: 0 12px 18px; }
.file-item { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 30px; align-items: center; gap: 3px; margin-bottom: 4px; padding: 4px 5px 4px 7px; border: 1px solid transparent; border-radius: 10px; background: transparent; transition: 140ms ease; }
.file-item:hover { background: #f5f9f6; }
.file-item.is-active { background: var(--green-pale); border-color: #d4e9dc; }
.file-open { min-width: 0; display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 3px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.file-icon { width: 31px; height: 35px; display: grid; place-items: center; color: var(--green); background: white; border: 1px solid #bed7ca; border-radius: 6px; font-family: Georgia, serif; font-size: 13px; font-weight: 700; box-shadow: 0 2px 6px rgba(28, 91, 74, 0.05); }
.file-details { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.file-details strong { overflow: hidden; color: var(--ink-strong); font-family: var(--mono); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.file-details small { color: #8b9a95; font-size: 10px; }
.file-chevron { color: #92a59e; font-size: 20px; }
.file-delete { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; color: #8da099; background: transparent; border: 0; border-radius: 50%; cursor: pointer; transition: color 140ms ease, background-color 140ms ease; }
.file-delete svg { width: 15px; height: 15px; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.file-delete:hover { color: #a34444; background: #f8eaea; }
.file-open:focus-visible, .file-delete:focus-visible { outline: 2px solid #74af95; outline-offset: 1px; }
.empty-files { padding: 40px 24px; color: #8a9d96; text-align: center; }
.empty-files-icon { display: block; margin-bottom: 9px; color: #9bcbb3; font-size: 24px; }
.empty-files p { margin: 0; font-size: 12px; line-height: 1.5; }
.rail-footer { padding: 17px 19px 19px; border-top: 1px solid var(--line-soft); }
.import-button { width: 100%; height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--green); background: white; border: 1px dashed #abc9ba; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 750; }
.import-button:hover { background: var(--green-pale); border-style: solid; }
.rail-footer p { margin: 10px 0 0; color: #9ba9a4; font-size: 9.5px; text-align: center; }
.editor-column { display: grid; grid-template-rows: 56px minmax(0, 1fr) 35px; }
.panel-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line-soft); background: #fbfcfb; }
.toolbar-title { display: flex; align-items: center; gap: 9px; color: var(--ink-strong); font-size: 12px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #53b789; box-shadow: 0 0 0 4px #e6f5ed; }
.language-chip { padding: 3px 6px; color: #6e807a; background: #edf2ef; border-radius: 4px; font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: 0.08em; }
.editor-meta { display: flex; align-items: center; gap: 10px; color: #8b9a95; font-family: var(--mono); font-size: 9px; }
.editor-meta .meta-divider { height: 12px; }
.editor-wrap { position: relative; min-height: 0; display: grid; grid-template-columns: 58px minmax(0, 1fr); overflow: hidden; background: #fdfefd; }
.line-numbers { position: relative; min-height: 0; overflow: hidden; padding-top: 24px; color: #a4b1ac; background: #f7f9f7; border-right: 1px solid var(--line-soft); font-family: var(--mono); font-size: 12px; line-height: 25px; text-align: right; user-select: none; }
.line-numbers > div { position: absolute; top: 24px; left: 0; right: 0; }
.gutter-line { height: 25px; display: block; padding-right: 15px; border-right: 2px solid transparent; }
.gutter-line.has-issue { color: var(--amber); background: linear-gradient(90deg, transparent, rgba(244, 177, 80, 0.13)); border-right-color: #e8a43f; font-weight: 750; }
.code-surface { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.syntax-layer, .code-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 24px 28px 80px; border: 0; tab-size: 2; font-family: var(--mono); font-size: 13px; font-variant-ligatures: none; line-height: 25px; white-space: pre; }
.syntax-layer { width: max-content; min-width: 100%; overflow: visible; color: #415b53; pointer-events: none; }
.code-input { z-index: 2; resize: none; overflow: auto; outline: none; color: transparent; background: transparent; caret-color: #173b33; -webkit-text-fill-color: transparent; }
.code-input::selection { background: rgba(111, 176, 151, 0.28); }
.editor-line { display: block; height: 25px; padding: 0 6px; margin: 0 -6px; border-radius: 4px; }
.editor-line.has-issue { background: linear-gradient(90deg, rgba(255, 230, 180, 0.58), rgba(255, 244, 219, 0.2)); box-shadow: inset 2px 0 #e5a23e; }
.tok-section { color: #7562af; font-weight: 750; }
.tok-step { color: #197157; font-weight: 750; }
.tok-tag { color: #b05a22; font-weight: 650; }
.tok-comment { color: #93a29d; font-style: italic; }
.tok-variable { color: #bb4771; }
.tok-string { color: #a65b30; }
.tok-pipe { color: #7b62a8; font-weight: 750; }
.editor-footer { display: flex; align-items: center; justify-content: flex-end; gap: 21px; padding: 0 18px; color: #94a39e; background: #fbfcfb; border-top: 1px solid var(--line-soft); font-size: 9px; }
kbd { display: inline-grid; min-width: 18px; height: 18px; margin: 0 1px; padding: 0 4px; place-items: center; color: #71817c; background: white; border: 1px solid #d8e0dc; border-bottom-width: 2px; border-radius: 4px; font-family: var(--sans); font-size: 9px; }
.results-panel { display: flex; flex-direction: column; background: #fcfdfc; }
.results-toolbar { min-height: 56px; }
.result-mark { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 11px; font-weight: 800; }
.result-mark.has-issues { background: #d38a28; }
.issue-count { padding: 5px 8px; color: #758680; background: #edf2ef; border-radius: 6px; font-size: 9px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.issue-count.is-clean { color: var(--green); background: var(--green-pale); }
.issue-count.has-issues { color: #975a17; background: var(--amber-pale); }
.report-summary { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 16px; align-items: center; margin: 20px 18px 13px; padding: 20px; color: var(--ink); background: linear-gradient(145deg, #edf7f0, #f9fcf9); border: 1px solid #d8eade; border-radius: 14px; }
.report-summary.has-issues { background: linear-gradient(145deg, #fff6e6, #fffdf8); border-color: #f1dfbf; }
.summary-orbit { width: 62px; height: 62px; display: grid; place-items: center; border: 1px dashed #7fbea0; border-radius: 50%; background: rgba(255, 255, 255, 0.7); }
.summary-orbit span { width: 38px; height: 38px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 50%; font-family: Georgia, serif; font-size: 18px; font-weight: 700; box-shadow: 0 6px 12px rgba(31, 115, 93, 0.18); }
.has-issues .summary-orbit { border-color: #dda956; }
.has-issues .summary-orbit span { background: #d88a25; box-shadow: 0 6px 12px rgba(191, 121, 28, 0.16); }
.report-summary h2 { margin: 0 0 6px; color: var(--ink-strong); font-family: Georgia, serif; font-size: 18px; font-weight: 600; }
.report-summary p { margin: 0; color: #6f827b; font-size: 11px; line-height: 1.55; }
.issue-list { max-height: min(46vh, 480px); overflow-y: auto; padding: 0 18px; }
.issue-card { width: 100%; display: flex; flex-direction: column; gap: 9px; margin-bottom: 8px; padding: 13px 14px; color: var(--ink); background: white; border: 1px solid #eadfca; border-left: 3px solid #dfa24b; border-radius: 9px; box-shadow: 0 4px 14px rgba(38, 70, 59, 0.035); text-align: left; cursor: pointer; transition: 150ms ease; }
.issue-card:hover { transform: translateX(-2px); border-color: #d7bd8b; box-shadow: 0 6px 18px rgba(38, 70, 59, 0.075); }
.issue-card.severity-error { border-color: #f0ceca; border-left-color: var(--red); background: #fffdfd; }
.issue-topline { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.issue-topline strong { color: var(--ink-strong); font-size: 11.5px; }
.issue-topline > span { flex: none; color: var(--amber); font-family: var(--mono); font-size: 9px; font-weight: 750; }
.severity-error .issue-topline > span { color: var(--red); }
.issue-message { color: #596c66; font-size: 10.5px; line-height: 1.5; }
.issue-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #98a59f; font-family: var(--mono); font-size: 8.5px; text-transform: lowercase; }
.issue-doc-link { flex: none; padding: 3px 0; color: var(--green); background: transparent; border: 0; cursor: pointer; font-family: var(--sans); font-size: 9px; font-weight: 800; text-transform: none; }
.issue-doc-link:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.report-spacer { flex: 1; min-height: 18px; }
.run-area { padding: 15px 18px 19px; background: white; border-top: 1px solid var(--line-soft); }
.run-meta { display: flex; justify-content: space-between; margin: 0 1px 11px; color: #95a39e; font-size: 9px; }
.run-button { width: 100%; height: 47px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 0 11px 0 16px; color: white; background: var(--green); border: 0; border-radius: 10px; box-shadow: 0 8px 20px rgba(31, 115, 93, 0.18); cursor: pointer; font-size: 12px; font-weight: 800; text-align: left; transition: 150ms ease; }
.run-button:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(31, 115, 93, 0.24); }
.run-icon { width: 24px; height: 24px; display: grid; place-items: center; color: var(--green); background: white; border-radius: 50%; font-size: 8px; }
.run-button kbd { color: rgba(255, 255, 255, 0.75); background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); }
.toast { position: fixed; z-index: 30; right: 22px; bottom: 22px; max-width: min(390px, calc(100vw - 44px)); padding: 13px 16px; color: white; background: var(--ink-strong); border-radius: 10px; box-shadow: var(--shadow); font-size: 12px; font-weight: 650; animation: toast-in 180ms ease both; }
.toast.is-error { background: #8f3535; }
.toast.is-success { background: var(--green-dark); }
@keyframes toast-in { from { opacity: 0; transform: translateY(9px); } }
.drawer-open { overflow: hidden; }
.rules-overlay { position: fixed; z-index: 42; inset: 0; display: flex; justify-content: flex-end; background: rgba(8, 35, 28, 0.34); backdrop-filter: blur(4px); animation: overlay-in 160ms ease both; }
.rules-drawer { width: min(680px, 96vw); height: 100%; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; color: var(--ink); background: #f8faf8; box-shadow: -28px 0 70px rgba(12, 42, 34, 0.2); animation: drawer-in 240ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.rules-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 27px 30px 23px; background: linear-gradient(145deg, #ffffff, #f3f8f4); border-bottom: 1px solid var(--line); }
.rules-header h2 { margin: 0 0 7px; color: var(--ink-strong); font-family: Georgia, serif; font-size: 27px; font-weight: 600; letter-spacing: -0.02em; }
.rules-header p { margin: 0; color: #6c8079; font-size: 12px; line-height: 1.5; }
.rules-controls { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; align-items: center; gap: 8px; padding: 15px 30px; background: white; border-bottom: 1px solid var(--line-soft); }
.rules-controls > button { height: 38px; padding: 0 12px; color: #557168; background: white; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 10px; font-weight: 750; }
.rules-controls > button:hover { color: var(--green); border-color: #a9cbbb; background: #f8fbf9; }
.rules-search { min-width: 0; height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 11px; color: #82938d; background: #f6f8f6; border: 1px solid #e4eae6; border-radius: 9px; }
.rules-search:focus-within { color: var(--green); background: white; border-color: #91c3ae; box-shadow: 0 0 0 3px rgba(31, 115, 93, 0.07); }
.rules-search svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.rules-search input { min-width: 0; width: 100%; padding: 0; color: var(--ink-strong); background: transparent; border: 0; outline: 0; font-size: 11px; }
.rules-search input::placeholder { color: #96a59f; }
.rules-content { overflow-y: auto; padding: 22px 30px 48px; }
.syntax-rule-note { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 25px; padding: 14px 15px; background: linear-gradient(145deg, #edf7f0, #f8fcf9); border: 1px solid #d5e9dc; border-radius: 12px; }
.syntax-lock { width: 36px; height: 36px; display: grid; place-items: center; color: var(--green); background: white; border: 1px solid #cce2d5; border-radius: 10px; }
.syntax-lock svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.syntax-rule-note strong { display: block; margin-bottom: 3px; color: var(--ink-strong); font-size: 11.5px; }
.syntax-rule-note p { margin: 0; color: #71847d; font-size: 10px; }
.always-on-chip { padding: 5px 7px; color: var(--green); background: white; border: 1px solid #cce2d5; border-radius: 6px; font-size: 8px; font-weight: 850; letter-spacing: 0.05em; text-transform: uppercase; }
.rule-group { margin-bottom: 26px; }
.rule-group > header { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 9px; }
.rule-group h3 { margin: 0; color: var(--ink-strong); font-family: Georgia, serif; font-size: 16px; font-weight: 600; }
.rule-group > header span { color: #92a19c; font-size: 8px; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
.rule-options { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 5px 16px rgba(29, 67, 56, 0.025); }
.rule-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 74px; padding: 13px 14px; border-bottom: 1px solid var(--line-soft); transition: background-color 130ms ease; }
.rule-option:last-child { border-bottom: 0; }
.rule-option:hover { background: #fafcfb; }
.rule-option.is-hidden { display: none; }
.rule-toggle-label { min-width: 0; display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 13px; cursor: pointer; }
.rule-toggle-label input { position: absolute; opacity: 0; pointer-events: none; }
.rule-switch { position: relative; width: 36px; height: 21px; display: block; flex: none; background: #d6dfda; border: 1px solid #cad5cf; border-radius: 999px; transition: 150ms ease; }
.rule-switch span { position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; background: white; border-radius: 50%; box-shadow: 0 1px 4px rgba(24, 58, 48, 0.2); transition: transform 150ms ease; }
.rule-toggle-label input:checked + .rule-switch { background: var(--green); border-color: var(--green); }
.rule-toggle-label input:checked + .rule-switch span { transform: translateX(15px); }
.rule-toggle-label input:focus-visible + .rule-switch { outline: 2px solid #72b096; outline-offset: 2px; }
.rule-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rule-copy strong { color: var(--ink-strong); font-size: 11.5px; font-weight: 750; }
.rule-copy small { display: -webkit-box; overflow: hidden; color: #71827c; font-size: 9.5px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.rule-guide-button { padding: 7px 4px; color: #779087; background: transparent; border: 0; cursor: pointer; font-size: 8.5px; font-weight: 800; text-transform: uppercase; }
.rule-guide-button:hover { color: var(--green); }
.rule-configuration { display: none; grid-column: 1 / -1; margin: 2px 0 1px 49px; padding: 12px 13px; background: #f5f8f6; border: 1px solid #e2eae5; border-radius: 9px; }
.rule-option.is-enabled .rule-configuration { display: grid; }
.rule-field { min-width: 0; display: grid; grid-template-columns: minmax(150px, 0.65fr) minmax(180px, 1fr); align-items: center; gap: 5px 14px; color: #526a62; font-size: 9.5px; font-weight: 750; }
.rule-field > span { grid-column: 1; grid-row: 1; }
.rule-field > input, .rule-field > textarea { grid-column: 2; grid-row: 1 / span 2; width: 100%; padding: 8px 10px; color: var(--ink-strong); background: white; border: 1px solid #cedbd4; border-radius: 7px; outline: 0; font-family: var(--mono); font-size: 10px; line-height: 1.45; }
.rule-field > textarea { min-height: 54px; resize: vertical; }
.rule-field > input:focus, .rule-field > textarea:focus { border-color: #86bda5; box-shadow: 0 0 0 3px rgba(31, 115, 93, 0.07); }
.rule-field > small { grid-column: 1; grid-row: 2; color: #82938d; font-size: 8.5px; font-weight: 450; line-height: 1.4; }
.rules-empty { padding: 55px 20px; color: #84968f; text-align: center; font-size: 12px; }
.rules-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 30px; background: white; border-top: 1px solid var(--line); box-shadow: 0 -8px 25px rgba(17, 56, 46, 0.04); }
.rules-footer strong, .rules-footer small { display: block; }
.rules-footer strong { margin-bottom: 3px; color: var(--ink-strong); font-size: 10.5px; }
.rules-footer small { color: #91a09b; font-size: 8.5px; }
.rules-footer .button { min-width: 82px; }
.docs-overlay { position: fixed; z-index: 40; inset: 0; display: flex; justify-content: flex-end; background: rgba(8, 35, 28, 0.32); backdrop-filter: blur(3px); animation: overlay-in 160ms ease both; }
.docs-drawer { width: min(560px, 92vw); height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; color: var(--ink); background: #fbfcfb; box-shadow: -24px 0 60px rgba(12, 42, 34, 0.18); animation: drawer-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.docs-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px 28px 20px; background: white; border-bottom: 1px solid var(--line); }
.docs-header h2 { margin: 0; color: var(--ink-strong); font-family: Georgia, serif; font-size: 25px; font-weight: 600; }
.docs-close { width: 38px; height: 38px; display: grid; place-items: center; flex: none; padding: 0; color: #70847d; background: #f5f8f6; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }
.docs-close svg { width: 17px; height: 17px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.docs-close:hover { color: white; background: var(--green); border-color: var(--green); }
.docs-content { overflow-y: auto; padding: 26px 28px 50px; }
.docs-content p { margin: 0 0 20px; color: #536a62; font-size: 13px; line-height: 1.75; white-space: pre-line; }
.docs-content h3 { display: flex; align-items: center; gap: 9px; margin: 31px 0 12px; color: var(--ink-strong); font-family: Georgia, serif; font-size: 18px; font-weight: 600; }
.docs-content h3::before { width: 7px; height: 7px; content: ''; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(191, 228, 102, 0.2); }
.docs-content pre { max-width: 100%; overflow-x: auto; margin: 0 0 20px; padding: 17px 19px; color: #d9eee6; background: #143b31; border: 1px solid #245548; border-radius: 10px; box-shadow: inset 0 1px rgba(255, 255, 255, 0.06); font-family: var(--mono); font-size: 11px; line-height: 1.65; white-space: pre; }
.docs-loading { padding: 50px 0; color: #82948e; font-size: 12px; text-align: center; }
.docs-footer { display: flex; justify-content: flex-end; padding: 15px 28px; background: white; border-top: 1px solid var(--line); }
.docs-footer a { color: var(--green); font-size: 11px; font-weight: 750; text-decoration: none; }
.docs-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
@keyframes overlay-in { from { opacity: 0; } }
@keyframes drawer-in { from { transform: translateX(35px); opacity: 0; } }
@media (max-width: 1080px) {
  .topbar { grid-template-columns: 220px minmax(0, 1fr) auto; }
  .workspace { grid-template-columns: 220px minmax(400px, 1fr) 330px; }
  .nav-link { display: none; }
  .rules-trigger-label { display: none; }
}
@media (max-width: 860px) {
  .app-shell { display: block; }
  .topbar { position: sticky; top: 0; grid-template-columns: auto minmax(0, 1fr) auto; height: 66px; padding: 0 13px; }
  .brand-copy, .workspace-kicker, .topbar-divider, .button-icon { display: none; }
  .filename-input { width: 100%; }
  .workspace { display: grid; grid-template-columns: 1fr; background: var(--paper); }
  .file-rail { min-height: auto; border-bottom: 1px solid var(--line); }
  .rail-heading { padding: 16px 18px 10px; }
  .file-list { display: flex; gap: 7px; padding: 0 14px 13px; overflow-x: auto; }
  .file-item { min-width: 210px; margin: 0; }
  .empty-files { padding: 15px 20px; }
  .rail-footer { display: none; }
  .editor-column { height: 58vh; min-height: 470px; border-bottom: 1px solid var(--line); }
  .results-panel { min-height: 500px; }
  .issue-list { max-height: none; }
}
@media (max-width: 560px) {
  .topbar { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; }
  .brand-mark { width: 29px; height: 36px; }
  .button-primary { width: 42px; padding: 0; }
  .button-primary span { display: none; }
  .rules-trigger { width: 40px; padding: 0; }
  .rules-trigger-count { display: none; }
  .editor-wrap { grid-template-columns: 46px minmax(0, 1fr); }
  .syntax-layer, .code-input { padding-left: 17px; padding-right: 17px; font-size: 12px; }
  .report-summary { margin-left: 12px; margin-right: 12px; padding: 15px; grid-template-columns: 50px minmax(0, 1fr); }
  .summary-orbit { width: 48px; height: 48px; }
  .summary-orbit span { width: 31px; height: 31px; font-size: 14px; }
  .issue-list, .run-area { padding-left: 12px; padding-right: 12px; }
  .editor-footer span:first-child { display: none; }
  .docs-drawer { width: 100vw; }
  .rules-drawer { width: 100vw; }
  .rules-header, .rules-content, .rules-footer { padding-left: 18px; padding-right: 18px; }
  .rules-controls { grid-template-columns: 1fr 1fr; padding-left: 18px; padding-right: 18px; }
  .rules-search { grid-column: 1 / -1; }
  .rules-controls > button { width: 100%; }
  .rule-configuration { margin-left: 0; }
  .rule-field { grid-template-columns: 1fr; }
  .rule-field > span, .rule-field > input, .rule-field > textarea, .rule-field > small { grid-column: 1; grid-row: auto; }
  .docs-header, .docs-content { padding-left: 20px; padding-right: 20px; }
  .docs-header h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
