@font-face { font-family: "Mark"; src: url("markpro-book.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Mark"; src: url("markpro-medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Mark"; src: url("markpro-bold.otf") format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Mark"; src: url("markpro-heavy.otf") format("opentype"); font-weight: 800; font-display: swap; }

:root {
    --ink: #1a1a16;
    --muted: #77756c;
    --muted-2: #9b998f;
    --paper: #f4f3ef;
    --white: #fff;
    --line: #e6e4dc;
    --line-dark: #d5d2c8;
    --accent: #ffe600;
    --accent-dark: #dcc600;
    --accent-border: #dcc600;
    --accent-soft: #fffbd6;
    --green: #4cb16e;
    --green-dark: #2e7d49;
    --green-soft: #e9f6ed;
    --blue: #3bb4ff;
    --blue-soft: #eaf7ff;
    --orange: #ff5500;
    --orange-soft: #fff0e8;
    --red: #d94a4a;
    --red-soft: #fff0f0;
    --amber: #d69218;
    --amber-soft: #fff8e7;
    --shadow: 0 12px 36px rgba(27, 27, 20, .055);
    --font: "Mark", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, select, input[type="checkbox"], input[type="file"] { cursor: pointer; }
button { color: inherit; }
[hidden] { display: none !important; }
code { padding: 2px 5px; border-radius: 5px; background: #eeece6; color: #4c4a43; font: 500 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }

.app-header {
    position: sticky; z-index: 40; top: 0; display: flex; min-height: 68px; align-items: center; gap: 28px;
    padding: 10px max(24px, calc((100vw - 1420px) / 2)); border-bottom: 1px solid rgba(215, 212, 202, .86);
    background: rgba(250, 249, 246, .92); backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 13px; background: var(--ink); box-shadow: 0 5px 15px rgba(23, 23, 16, .13); }
.brand-mark img { width: 42px; height: 42px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.view-switcher { display: flex; align-items: center; gap: 3px; margin-left: 18px; padding: 4px; border-radius: 11px; background: var(--paper); }
.view-button { padding: 7px 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.view-button:hover { color: var(--ink); }
.view-button.is-active { background: var(--white); color: var(--ink); box-shadow: 0 2px 8px rgba(23, 23, 16, .06); }
.header-user { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.user-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 800; }
.user-copy strong, .user-copy small { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: 12px; }
.user-copy small { color: var(--muted); font-size: 10px; }
.icon-button { display: grid; width: 34px; height: 34px; margin-left: 2px; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); text-decoration: none; transform: rotate(90deg); }
.icon-button:hover { border-color: var(--line-dark); color: var(--ink); }

.app-shell { width: min(1420px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(430px, .85fr); align-items: center; gap: 60px; padding: 7px 4px 28px; }
.eyebrow, .panel-kicker { margin: 0; color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.hero-copy h1, .settings-intro h1 { max-width: 760px; margin: 8px 0 10px; font-size: 38px; font-weight: 800; letter-spacing: -.038em; line-height: 1.08; }
.hero-copy > p:last-child, .settings-intro p:last-child { max-width: 690px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .65); }
.hero-stats > div { min-height: 100px; padding: 17px 18px; border-right: 1px solid var(--line); }
.hero-stats > div:last-child { border-right: 0; }
.hero-stats strong, .hero-stats span { display: block; }
.hero-stats strong { margin-bottom: 9px; overflow: hidden; font-size: 23px; font-weight: 800; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.hero-stats span { color: var(--muted); font-size: 11px; line-height: 1.35; }

.workflow-rail { display: flex; max-width: 900px; align-items: center; margin: 1px auto 25px; color: var(--muted-2); }
.workflow-step { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: inherit; font-size: 11px; font-weight: 700; }
.workflow-step b { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid var(--line-dark); border-radius: 50%; background: var(--paper); color: var(--muted); font-size: 10px; }
.workflow-step:not(:disabled):hover { color: var(--ink); }
.workflow-step:not(:disabled):hover b { border-color: var(--accent-border); }
.workflow-step:focus-visible { outline: 0; }
.workflow-step:focus-visible b { box-shadow: 0 0 0 3px rgba(255, 230, 0, .28); }
.workflow-step:disabled { cursor: not-allowed; opacity: .62; }
.workflow-step.is-active { color: var(--ink); }
.workflow-step.is-active b { border-color: var(--ink); background: var(--ink); color: var(--white); }
.workflow-step.is-complete { color: var(--accent-dark); }
.workflow-step.is-complete b { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent-dark); }
.workflow-line { height: 1px; flex: 1; margin: 0 12px; background: var(--line-dark); }
.workflow-line.is-complete { background: var(--accent-border); }
.workflow-stage { scroll-margin-top: 88px; }

.panel { position: relative; display: grid; grid-template-columns: 62px minmax(0, 1fr); margin-bottom: 22px; overflow: hidden; scroll-margin-top: 88px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow); }
.step-number { display: grid; align-content: start; justify-content: center; padding-top: 28px; border-right: 1px solid var(--line); color: var(--accent-dark); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.panel-main { min-width: 0; padding: 28px 31px 30px; }
.panel-main-wide { padding-right: 0; padding-left: 0; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.panel-heading h2, .section-heading h2 { margin: 5px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.028em; line-height: 1.2; }
.padded-heading { padding-right: 31px; padding-left: 31px; }
.subtle-badge, .settings-state { display: inline-flex; min-height: 28px; align-items: center; padding: 5px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-dark); font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-badge { display: inline-flex; min-height: 28px; align-items: center; padding: 5px 10px; border-radius: 99px; background: var(--green-soft); color: var(--green-dark); font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-badge.status-running { background: var(--blue-soft); color: #2177aa; }
.status-badge.status-error { background: var(--red-soft); color: var(--red); }
.status-badge.status-success { background: var(--green-soft); color: var(--green-dark); }

.form-grid { display: grid; gap: 18px; }
.form-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-three { grid-template-columns: minmax(180px, .65fr) minmax(0, 1fr) minmax(0, 1fr); }
.field-span-two { grid-column: span 2; }
.field-group { display: block; min-width: 0; }
.field-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.field-group > small { display: block; margin-top: 6px; color: var(--muted-2); font-size: 10px; line-height: 1.45; }
input, textarea, select { width: 100%; min-height: 43px; border: 1px solid var(--line-dark); border-radius: 10px; background: var(--white); color: var(--ink); outline: 0; }
input, select { padding: 9px 11px; }
textarea { min-height: 80px; padding: 11px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 230, 0, .26); }
input::placeholder, textarea::placeholder { color: #afada5; }
input[type="checkbox"] { width: 16px; min-height: 16px; accent-color: var(--ink); }
.input-with-suffix { display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line-dark); border-radius: 10px; }
.input-with-suffix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 230, 0, .26); }
.input-with-suffix input { border: 0; box-shadow: none; }
.input-with-suffix span { padding: 0 11px; color: var(--muted); font-size: 11px; }
.switch-field { display: flex; min-height: 67px; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f6; }
.switch-field .field-label { margin-bottom: 2px; }
.switch-field small { color: var(--muted-2); font-size: 10px; }

.upload-zone { display: flex; min-height: 150px; align-items: center; justify-content: center; gap: 18px; margin-top: 23px; padding: 28px; border: 1px dashed #c5c2b8; border-radius: 16px; background: #fafaf7; transition: border-color .15s, background .15s; }
.upload-zone:hover, .upload-zone.is-dragging { border-color: var(--accent-border); background: var(--accent-soft); }
.upload-zone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.upload-symbol { display: grid; width: 45px; height: 45px; flex: 0 0 auto; place-items: center; border-radius: 13px; background: var(--ink); color: white; font-size: 22px; }
.upload-copy strong, .upload-copy small { display: block; }
.upload-copy strong { margin-bottom: 4px; font-size: 15px; }
.upload-copy small { color: var(--muted); font-size: 11px; }
.file-pill { margin-left: 20px; padding: 6px 9px; border-radius: 99px; background: var(--white); color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.checklist-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.checklist-strip span { padding: 10px 12px; background: #faf9f6; color: var(--muted); font-size: 10px; }
.checklist-strip b { display: inline-grid; width: 19px; height: 19px; margin-right: 5px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 9px; }
.form-footer, .dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-footer p { margin: 0; color: var(--muted); font-size: 11px; }

.button { display: inline-flex; min-height: 41px; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 800; text-decoration: none; transition: transform .15s, border-color .15s, background .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { background: var(--ink); color: var(--white); box-shadow: 0 7px 18px rgba(23, 23, 16, .13); }
.button-primary:hover:not(:disabled) { background: #303029; }
.button-secondary { border-color: var(--line-dark); background: var(--white); color: var(--ink); }
.button-quiet { border-color: var(--line); background: #fbfbf9; color: var(--muted); }
.button-small { min-height: 33px; padding: 6px 10px; border-radius: 8px; font-size: 11px; }
.button-wide { width: 100%; min-height: 47px; }
.text-button { padding: 3px 0; border: 0; background: transparent; color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.text-button.is-danger { color: var(--red); }

.progress-panel { grid-template-columns: 1fr; padding: 0; }
.progress-panel .progress-head, .progress-panel .progress-track, .progress-panel .progress-meta { margin-right: 31px; margin-left: 31px; }
.progress-panel .progress-head { margin-top: 26px; }
.progress-panel .progress-meta { margin-bottom: 26px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.progress-head > div { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; }
.progress-head small { grid-column: 2; margin-top: 2px; color: var(--muted); font-size: 10px; }
.activity-pulse { display: block; grid-row: span 2; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(255, 230, 0, .18); animation: pulse 1.4s infinite; }
.activity-pulse.is-still { animation: none; }
.progress-track { height: 7px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: #eceae3; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); box-shadow: inset 0 0 0 1px rgba(220, 198, 0, .32); transition: width .25s ease; }
.progress-track.is-indeterminate span { width: 35%; animation: indeterminate 1.3s ease-in-out infinite; }
.progress-meta { display: flex; justify-content: space-between; gap: 15px; margin-top: 8px; color: var(--muted); font-size: 10px; }
.compact-progress-head { margin-top: 5px; }

.analysis-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 0 31px 18px; }
.analysis-stat { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #faf9f6; }
.analysis-stat strong, .analysis-stat span { display: block; }
.analysis-stat strong { margin-bottom: 4px; font-size: 20px; font-weight: 800; }
.analysis-stat span { color: var(--muted); font-size: 10px; }
.analysis-notices { display: grid; gap: 8px; padding: 0 31px 20px; }
.notice { padding: 11px 13px; border: 1px solid #eddcae; border-radius: 10px; background: var(--amber-soft); color: #735820; font-size: 11px; }
.notice strong { display: block; margin-bottom: 2px; }
.notice.notice-error { border-color: #efcaca; background: var(--red-soft); color: #8a3232; }
.notice.notice-success { border-color: #cce7d4; background: var(--green-soft); color: var(--green-dark); }
.notice-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.notice-actions button { padding: 4px 7px; border: 1px solid rgba(115, 88, 32, .25); border-radius: 6px; background: rgba(255, 255, 255, .55); color: inherit; font-size: 9px; font-weight: 800; }

.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 31px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #faf9f6; }
.table-toolbar > div { display: flex; align-items: baseline; gap: 9px; }
.table-toolbar strong { font-size: 12px; }
.table-toolbar span { color: var(--muted); font-size: 10px; }
.compact-check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfcfa; }
.data-table tr.is-unselected { opacity: .5; }
.data-table strong { display: block; font-size: 11px; }
.data-table small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.check-column { width: 38px; padding-right: 0 !important; text-align: center !important; }
.issue-table th:nth-child(2) { width: 17%; }
.issue-table th:nth-child(3) { width: 29%; }
.issue-table th:nth-child(4) { width: 14%; }
.issue-table th:nth-child(5) { width: 16%; }
.issue-table th:nth-child(6) { width: 13%; }
.label-list { display: flex; flex-wrap: wrap; gap: 4px; }
.label-pill { --label-fill: #2373a2; --label-tint: rgba(59, 180, 255, .11); display: inline-flex; align-items: stretch; padding: 3px 6px; border-radius: 5px; background: var(--label-tint); color: var(--label-fill); font-size: 8px; font-weight: 800; line-height: 1.4; }
.label-pill.is-automated { --label-fill: #260057; --label-tint: rgba(38, 0, 87, .1); }
.label-pill.is-custom { --label-fill: #e900e9; --label-tint: rgba(233, 0, 233, .1); }
.label-pill.is-acceptance { --label-fill: #cb072e; --label-tint: rgba(203, 7, 46, .1); }
.label-pill.is-scoped { overflow: hidden; padding: 0; background: transparent; }
.label-pill-scope { padding: 3px 6px; border-radius: 5px 0 0 5px; background: var(--label-fill); color: var(--white); }
.label-pill-value { padding: 2px 6px; border: 1px solid var(--label-fill); border-left: 0; border-radius: 0 5px 5px 0; background: transparent; color: var(--ink); }
.label-pill.is-muted { background: #efeee9; color: var(--muted); }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.state-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--muted-2); }
.state-dot.pending { background: var(--muted-2); }
.state-dot.ready, .state-dot.created { background: var(--green); }
.state-dot.duplicate, .state-dot.skipped { background: var(--amber); }
.state-dot.error { background: var(--red); }
.ticket-link { color: var(--accent-dark); font-weight: 800; text-decoration: none; }
.ticket-link:hover { text-decoration: underline; }
.empty-cell { padding: 32px !important; color: var(--muted); text-align: center; }
.panel-action-bar { display: flex; align-items: center; justify-content: flex-end; gap: 28px; padding: 20px 31px; border-top: 1px solid var(--line); background: #faf9f6; }
.panel-action-bar > div:first-child { margin-right: auto; }
.panel-action-bar strong, .panel-action-bar span { display: block; }
.panel-action-bar strong { font-size: 12px; }
.panel-action-bar span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.result-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.result-strip > div { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f6; }
.result-strip strong, .result-strip span { display: block; }
.result-strip strong { font-size: 18px; }
.result-strip span { color: var(--muted); font-size: 9px; }
.create-gate { margin: 25px -31px -30px; }
.confirm-check { display: flex; max-width: 330px; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.confirm-check input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; flex: 0 0 16px; margin: 0; }
.execution-log { display: grid; gap: 7px; max-height: 360px; margin-top: 20px; overflow-y: auto; }
.log-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #faf9f6; font-size: 10px; }
.log-row.success { border-left: 3px solid var(--green); }
.log-row.error { border-left: 3px solid var(--red); }
.log-row.skipped { border-left: 3px solid var(--amber); }
.completion-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.settings-intro { padding: 7px 4px 31px; }
.settings-intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; }
.settings-section { margin-bottom: 38px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 13px; padding: 0 4px; }
.section-heading > p { max-width: 420px; margin: 0; color: var(--muted); font-size: 11px; text-align: right; }
.section-heading-actions { align-items: center; }
.heading-actions { display: flex; gap: 9px; }
.search-input { width: 270px; min-height: 41px; }
.settings-card { padding: 25px 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }
.table-card { padding: 0; overflow: hidden; }
.settings-table-scroll { max-height: 560px; overflow: auto; }
.settings-table thead { position: sticky; z-index: 2; top: 0; background: #faf9f6; }
.settings-table td:first-child, .settings-table th:first-child { padding-left: 20px; }
.settings-table td:last-child, .settings-table th:last-child { padding-right: 20px; }
.simple-panel { grid-template-columns: 1fr; }

.app-dialog { width: min(720px, calc(100% - 30px)); max-height: calc(100vh - 40px); padding: 0; overflow: hidden; border: 1px solid var(--line-dark); border-radius: 19px; background: var(--white); box-shadow: 0 30px 90px rgba(25, 25, 20, .22); }
.app-dialog::backdrop { background: rgba(24, 24, 20, .4); backdrop-filter: blur(3px); }
.app-dialog > form { display: flex; max-height: calc(100vh - 42px); flex-direction: column; }
.dialog-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 21px 23px 14px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 4px 0 0; font-size: 23px; letter-spacing: -.025em; }
.dialog-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #faf9f6; color: var(--muted); font-size: 22px; line-height: 1; }
.dialog-body { display: grid; gap: 17px; padding: 22px 23px; overflow-y: auto; }
.dialog-footer { flex: 0 0 auto; justify-content: flex-end; margin: 0; padding: 15px 23px; background: #faf9f6; }
.source-details { border: 1px solid var(--line); border-radius: 9px; background: #faf9f6; font-size: 10px; }
.source-details summary { padding: 10px 12px; cursor: pointer; font-weight: 800; }
.source-details > div { max-height: 180px; padding: 0 12px 12px; overflow: auto; color: var(--muted); }
.source-row { padding: 7px 0; border-top: 1px solid var(--line); }
.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.option-check { display: flex; min-height: 77px; align-items: flex-start; gap: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f6; }
.option-check input { flex: 0 0 auto; margin-top: 2px; }
.option-check strong, .option-check small { display: block; }
.option-check strong { font-size: 10px; }
.option-check small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.project-picker { position: relative; }
.project-results { position: absolute; z-index: 5; right: 0; left: 0; max-height: 220px; margin-top: 5px; overflow-y: auto; border: 1px solid var(--line-dark); border-radius: 10px; background: var(--white); box-shadow: 0 12px 25px rgba(23, 23, 16, .12); }
.project-result { display: block; width: 100%; padding: 9px 11px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.project-result:last-child { border-bottom: 0; }
.project-result:hover { background: #faf9f6; }
.project-result strong, .project-result small { display: block; }
.project-result small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(370px, calc(100% - 40px)); }
.toast { padding: 13px 15px; border: 1px solid var(--line-dark); border-left: 4px solid var(--blue); border-radius: 10px; background: var(--white); box-shadow: 0 12px 35px rgba(23, 23, 16, .16); font-size: 11px; animation: toast-in .2s ease; }
.toast.is-error { border-left-color: var(--red); }
.toast.is-success { border-left-color: var(--green); }
.alert { margin: 18px 0; padding: 12px 14px; border-radius: 10px; font-size: 11px; }
.alert-error { border: 1px solid #efcccc; background: var(--red-soft); color: #8c3434; }

.login-page { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(circle at 20% 15%, rgba(255, 230, 0, .18), transparent 34%), var(--paper); }
.login-card { width: min(470px, 100%); padding: 31px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); box-shadow: 0 24px 65px rgba(23, 23, 16, .1); }
.login-copy { margin: 45px 0 25px; }
.login-copy h1 { margin: 8px 0 10px; font-size: 32px; line-height: 1.1; letter-spacing: -.035em; }
.login-copy p:last-child { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.login-hint { margin: 12px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.setup-box { padding: 15px; border: 1px solid #eddaa8; border-radius: 11px; background: var(--amber-soft); font-size: 11px; }
.setup-box p { margin: 7px 0; color: #6d5728; }
.setup-box code { display: block; overflow-wrap: anywhere; }

@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(59, 180, 255, 0); } }
@keyframes indeterminate { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } }

@media (max-width: 1100px) {
    .hero-grid { grid-template-columns: 1fr; gap: 24px; }
    .hero-stats { max-width: 700px; }
    .analysis-summary { grid-template-columns: repeat(3, 1fr); }
    .panel-action-bar { flex-wrap: wrap; }
    .create-gate > div:first-child { width: 100%; }
    .confirm-check { margin-right: auto; }
}

@media (max-width: 820px) {
    .app-header { flex-wrap: wrap; gap: 10px 16px; padding: 10px 18px; }
    .view-switcher { order: 3; width: 100%; margin: 0; }
    .view-button { flex: 1; }
    .user-copy { display: none; }
    .app-shell { width: min(100% - 26px, 1420px); padding-top: 28px; }
    .hero-copy h1, .settings-intro h1 { font-size: 31px; }
    .workflow-step { font-size: 0; }
    .workflow-line { margin: 0 5px; }
    .form-grid-three, .form-grid-two { grid-template-columns: 1fr; }
    .field-span-two { grid-column: auto; }
    .checklist-strip { grid-template-columns: repeat(2, 1fr); }
    .analysis-summary { grid-template-columns: repeat(2, 1fr); }
    .settings-intro-row, .section-heading, .section-heading-actions { align-items: flex-start; flex-direction: column; }
    .section-heading > p { text-align: left; }
    .heading-actions { width: 100%; }
    .search-input { flex: 1; width: auto; }
    .option-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .brand small { display: none; }
    .hero-stats { grid-template-columns: 1fr; }
    .hero-stats > div { min-height: 74px; border-right: 0; border-bottom: 1px solid var(--line); }
    .hero-stats > div:last-child { border-bottom: 0; }
    .panel { grid-template-columns: 1fr; border-radius: 15px; }
    .step-number { display: none; }
    .panel-main { padding: 22px 18px; }
    .padded-heading, .analysis-summary, .analysis-notices { padding-right: 18px; padding-left: 18px; }
    .table-toolbar, .panel-action-bar { padding-right: 18px; padding-left: 18px; }
    .upload-zone { align-items: flex-start; flex-direction: column; }
    .file-pill { margin: 0; }
    .checklist-strip { grid-template-columns: 1fr; }
    .analysis-summary { grid-template-columns: 1fr 1fr; }
    .form-footer { align-items: stretch; flex-direction: column; }
    .form-footer .button { width: 100%; }
    .create-gate { margin-right: -18px; margin-bottom: -22px; margin-left: -18px; }
    .result-strip { grid-template-columns: 1fr; }
    .settings-card { padding: 20px 18px; }
    .heading-actions { flex-direction: column; }
    .search-input, .heading-actions .button { width: 100%; }
    .login-page { padding: 14px; }
    .login-card { padding: 23px; }
}
