:root {
  --ink: #172033;
  --blue: #295bff;
  --blue-strong: #1e46d0;
  --signal: #087a65;
  --paper: #f3f6fa;
  --card: #ffffff;
  --muted: #667085;
  --line: #d9e2ec;
  --danger: #b42318;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow-panel: 0 30px 80px rgba(23, 32, 51, 0.13);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(41, 91, 255, 0.35); outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 100; padding: 10px 14px; border-radius: 8px; color: white; background: var(--blue-strong); text-decoration: none; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.brand { min-height: 44px; display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 16px; font-weight: 700; text-decoration: none; letter-spacing: -0.02em; }
.brand--light { color: #fff; }
.brand-mark { display: inline-grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: var(--ink); color: #fff; flex: 0 0 auto; }
.brand--light .brand-mark { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16); }
.brand-mark svg { width: 25px; height: 25px; fill: currentColor; }
.brand-mark .brand-mark-accent { fill: #49d6bb; }
.eyebrow { margin: 0 0 18px; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }

.login-body { min-height: 100vh; min-height: 100dvh; background: var(--paper); }
.login-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(440px, 0.92fr); }
.login-story { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(32px, 5vw, 76px); color: white; background: var(--ink); isolation: isolate; }
.login-story::before, .login-story::after { content: ""; position: absolute; z-index: -1; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 50%; }
.login-story::before { width: 640px; height: 640px; right: -310px; top: -170px; }
.login-story::after { width: 920px; height: 920px; right: -470px; top: -310px; }
.story-copy { max-width: 710px; margin: auto 0; padding: 72px 0; }
.story-copy .eyebrow { color: #7ee7d3; }
.story-copy h1 { max-width: 700px; margin: 0; font-size: clamp(42px, 5vw, 76px); line-height: 1.12; letter-spacing: -0.06em; }
.story-lead { max-width: 600px; margin: 30px 0 0; color: #b8c3d2; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.9; }
.time-rail { max-width: 680px; }
.time-rail-line { height: 1px; background: rgba(255, 255, 255, 0.18); position: relative; }
.time-rail-line::before, .time-rail-line::after, .time-rail-progress::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: #758297; transform: translate(-50%, -50%); }
.time-rail-line::before { left: 0; }
.time-rail-line::after { left: 50%; }
.time-rail-progress { display: block; width: 72%; height: 1px; background: #49d6bb; }
.time-rail-progress::after { left: 72%; width: 11px; height: 11px; background: #49d6bb; box-shadow: 0 0 0 6px rgba(73, 214, 187, 0.12); }
.time-rail-labels { display: flex; justify-content: space-between; margin-top: 15px; color: #8592a4; font-size: 12px; }
.time-rail-labels span { display: grid; gap: 4px; }
.time-rail-labels span:nth-child(2) { text-align: center; }
.time-rail-labels span:last-child { text-align: right; }
.time-rail-labels b { color: #d6ddea; font-family: var(--mono); font-size: 12px; }

.login-action { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px clamp(28px, 6vw, 96px); background: var(--paper); }
.login-panel { width: min(100%, 510px); padding: clamp(32px, 5vw, 58px); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-panel); animation: panel-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 7px 11px; color: #31524b; background: #eef8f5; border: 1px solid #cae9e2; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status-pill span, .system-state span { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(8, 122, 101, 0.1); }
.login-panel h2 { margin: 30px 0 10px; font-size: clamp(30px, 3vw, 42px); letter-spacing: -0.04em; }
.login-panel > p { margin: 0 0 32px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.primary-button { width: 100%; min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 11px; color: white; background: var(--blue); font-weight: 650; text-decoration: none; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 10px 24px rgba(41, 91, 255, 0.2); }
.primary-button svg { width: 22px; height: 22px; fill: currentColor; }
.primary-button:hover { background: var(--blue-strong); transform: translateY(-1px); box-shadow: 0 14px 30px rgba(41, 91, 255, 0.25); }
.primary-button:active { transform: translateY(0); box-shadow: 0 7px 16px rgba(41, 91, 255, 0.2); }
.primary-button.is-loading { pointer-events: none; opacity: 0.72; }
.security-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; padding-top: 20px; border-top: 1px solid #e8edf3; color: var(--muted); font-size: 12px; line-height: 1.65; }
.security-note svg { width: 19px; height: 19px; flex: 0 0 auto; fill: var(--signal); }
.inline-message { display: grid; gap: 4px; margin: -12px 0 22px; padding: 12px 14px; border: 1px solid #cfe3dd; border-radius: 10px; color: #31524b; background: #f2faf7; font-size: 13px; line-height: 1.5; }
.inline-message--error { color: #7a271a; background: #fff5f3; border-color: #f2c9c4; }
.inline-message span { color: inherit; opacity: 0.78; }
.login-footer { width: min(100%, 510px); margin-top: 24px; color: var(--muted); font-family: var(--mono); font-size: 11px; text-align: center; letter-spacing: 0.05em; }

.app-body { min-height: 100vh; min-height: 100dvh; background: var(--paper); }
.app-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 22px; background: #fff; border-right: 1px solid var(--line); }
.main-nav { display: grid; gap: 6px; margin-top: 54px; }
.main-nav a, .main-nav button { min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border: 0; border-radius: 10px; color: #4f5b6e; background: transparent; font-size: 14px; font-weight: 600; text-align: left; text-decoration: none; }
.main-nav a { cursor: pointer; }
.main-nav a[aria-current="page"] { color: var(--blue-strong); background: #eef2ff; }
.main-nav svg { width: 20px; height: 20px; fill: currentColor; }
.main-nav button:disabled { cursor: not-allowed; opacity: 0.55; }
.nav-soon { margin-left: auto; font-size: 10px; font-weight: 500; }
.sidebar-foot { display: grid; gap: 12px; margin-top: auto; padding: 18px 8px 4px; border-top: 1px solid #e8edf3; }
.system-state { display: flex; align-items: center; gap: 9px; color: #4f5b6e; font-size: 12px; }
.system-state span { display: inline-block; }
.sidebar-foot small { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; }
.workspace { min-width: 0; }
.topbar { min-height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4vw, 58px); background: rgba(243, 246, 250, 0.86); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar > p { margin: 0; color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-guide-link { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 9px; color: #536075; font-size: 12px; font-weight: 650; text-decoration: none; transition: color 0.16s ease, background 0.16s ease; }
.topbar-guide-link:hover { color: var(--blue-strong); background: #e9eef8; }
.topbar-guide-link:active { background: #dde6f6; }
.topbar-guide-link svg { width: 19px; fill: currentColor; }
.user-menu { display: flex; align-items: center; gap: 11px; }
.user-menu > span, .user-menu > img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.user-menu > span { display: grid; place-items: center; color: white; background: var(--ink); font-weight: 700; }
.user-menu div { display: grid; gap: 2px; min-width: 90px; }
.user-menu strong { max-width: 140px; overflow: hidden; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.user-menu small { color: var(--signal); font-size: 11px; }
.user-menu form { margin: 0; }
.user-menu button { min-width: 48px; min-height: 44px; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.user-menu button:hover { color: var(--ink); }
.mobile-brand { width: 44px; height: 44px; display: none; place-items: center; border: 0; padding: 0; background: transparent; cursor: pointer; }
.workspace-content { width: min(1220px, 100%); margin: 0 auto; padding: clamp(34px, 5vw, 72px) clamp(24px, 4vw, 58px) 72px; }
.welcome-section { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 38px; }
.welcome-section .eyebrow { margin-bottom: 12px; color: var(--blue-strong); }
.welcome-section h1 { margin: 0; font-size: clamp(34px, 4vw, 54px); letter-spacing: -0.05em; }
.welcome-section > div > p:last-child { margin: 14px 0 0; color: var(--muted); line-height: 1.7; }
.verified-badge { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid #cde6df; border-radius: 10px; color: #31524b; background: #f5fbf9; font-size: 12px; font-weight: 600; white-space: nowrap; }
.verified-badge svg { width: 18px; fill: var(--signal); }
.dayline-card { padding: clamp(24px, 4vw, 40px); background: var(--ink); border-radius: 16px; color: white; overflow: hidden; position: relative; }
.dayline-card::after { content: ""; position: absolute; right: -90px; top: -150px; width: 320px; height: 320px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 50%; }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; position: relative; z-index: 1; }
.section-kicker { margin: 0 0 8px; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; }
.dayline-card .section-kicker { color: #7ee7d3; }
.card-heading h2, .section-heading h2 { margin: 0; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -0.03em; }
.card-heading > span { font-family: var(--mono); font-size: clamp(22px, 3vw, 34px); font-weight: 700; }
.dayline { height: 2px; margin-top: 52px; position: relative; }
.dayline-base, .dayline-fill { position: absolute; inset: 0; display: block; }
.dayline-base { background: rgba(255, 255, 255, 0.16); }
.dayline-fill { width: 0; background: #49d6bb; transition: width 0.5s ease; }
.dayline-dot { width: 12px; height: 12px; position: absolute; top: 50%; left: 0; border: 3px solid var(--ink); border-radius: 50%; background: #49d6bb; transform: translate(-50%, -50%); transition: left 0.5s ease; box-shadow: 0 0 0 5px rgba(73, 214, 187, 0.16); }
.dayline-labels { display: flex; justify-content: space-between; margin-top: 15px; color: #8b98ab; font-family: var(--mono); font-size: 10px; }
.tools-section { margin-top: 48px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading > span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: white; font-size: 11px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.tool-card { min-height: 270px; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: white; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.tool-card:hover { border-color: #bcc9d7; box-shadow: 0 12px 30px rgba(23, 32, 51, 0.06); }
.tool-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; color: var(--blue-strong); background: #eef2ff; }
.tool-icon svg { width: 23px; fill: currentColor; }
.tool-card-copy { margin-top: 26px; }
.tool-card-copy > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tool-card h3 { margin: 0; font-size: 17px; }
.tool-card-copy span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.tool-card p { margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.tool-card > button { min-height: 40px; margin-top: auto; border: 1px solid var(--line); border-radius: 9px; color: #8a94a3; background: #f8fafc; font-size: 12px; }
.tool-card > button:disabled { cursor: not-allowed; }
.tool-card-action { min-height: 42px; display: flex; align-items: center; justify-content: center; margin-top: auto; border: 1px solid var(--blue); border-radius: 9px; color: white; background: var(--blue); font-size: 12px; font-weight: 650; text-decoration: none; }
.tool-card-action:hover { background: var(--blue-strong); }
.tool-card--ready { border-color: #cad5ff; }
.not-found { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--paper); }
.not-found main { width: min(100%, 520px); padding: 48px; border: 1px solid var(--line); border-radius: 16px; background: white; text-align: center; }
.not-found h1 { font-size: clamp(32px, 5vw, 48px); }
.not-found p:not(.eyebrow) { color: var(--muted); }
.not-found .primary-button { width: auto; margin-top: 18px; padding: 0 26px; }
.mobile-nav { position: fixed; inset: 74px 16px auto; z-index: 20; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow-panel); }
.mobile-nav a { min-height: 48px; display: flex; align-items: center; padding: 0 14px; border-radius: 8px; color: var(--blue-strong); background: #eef2ff; font-weight: 600; text-decoration: none; }

@keyframes panel-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-story { min-height: 54vh; padding: 30px; }
  .story-copy { padding: 70px 0; }
  .login-action { min-height: auto; padding: 50px 24px 64px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-brand { display: inline-grid; }
  .topbar { padding: 0 24px; }
  .topbar > p { display: none; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .login-story { min-height: 510px; }
  .story-copy { padding: 58px 0; }
  .story-copy h1 { font-size: 43px; }
  .story-lead { font-size: 15px; }
  .time-rail-labels span:nth-child(2) { display: none; }
  .login-panel { padding: 30px 22px; }
  .topbar { min-height: 74px; }
  .user-menu div { min-width: 0; }
  .user-menu strong { max-width: 78px; }
  .user-menu small { display: none; }
  .user-menu button { padding: 0 4px; }
  .topbar-actions { gap: 2px; }
  .topbar-guide-link { width: 44px; justify-content: center; padding: 0; }
  .topbar-guide-link span { display: none; }
  .welcome-section { display: block; }
  .verified-badge { margin-top: 22px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 245px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Workbench guide center */
.guide-workspace { width: min(1100px, 100%); margin: 0 auto; padding: clamp(34px, 5vw, 64px) clamp(24px, 4vw, 58px) 88px; }
.guide-hero { min-height: 280px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 42px; padding: clamp(30px, 5vw, 52px); overflow: hidden; position: relative; border-radius: 16px; color: white; background: var(--ink); }
.guide-hero::after { content: ""; width: 420px; height: 420px; position: absolute; right: -170px; top: -210px; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 50%; box-shadow: 0 0 0 72px rgba(255, 255, 255, 0.025); }
.guide-hero > div:first-child { min-width: 0; position: relative; z-index: 1; }
.guide-hero .eyebrow { margin-bottom: 13px; color: #7ee7d3; }
.guide-hero h1 { margin: 0; font-size: clamp(38px, 6vw, 64px); line-height: 1.06; letter-spacing: -0.055em; text-wrap: balance; }
.guide-hero p:last-child { max-width: 680px; margin: 20px 0 0; color: #b8c3d2; font-size: 15px; line-height: 1.8; }
.guide-hero-count { min-width: 150px; display: grid; gap: 3px; padding-left: 24px; position: relative; z-index: 1; border-left: 1px solid rgba(255, 255, 255, 0.2); }
.guide-hero-count strong { font: 700 clamp(34px, 5vw, 54px)/1 var(--mono); }
.guide-hero-count span { color: #9eabba; font-size: 11px; }
.guide-library { margin-top: 42px; }
.guide-list { display: grid; gap: 12px; }
.guide-card { min-height: 190px; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: start; gap: 22px; padding: 26px; border: 1px solid var(--line); border-radius: 14px; color: inherit; background: white; text-decoration: none; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.guide-card:hover { border-color: #9bb2dc; box-shadow: 0 14px 34px rgba(23, 32, 51, 0.07); transform: translateY(-1px); }
.guide-card:active { box-shadow: 0 7px 18px rgba(23, 32, 51, 0.06); transform: translateY(0); }
.guide-card-number { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 12px; color: var(--blue-strong); background: #eef2ff; font: 750 13px/1 var(--mono); }
.guide-card-copy { min-width: 0; display: grid; justify-items: start; }
.guide-card-category { margin-bottom: 10px; color: var(--blue-strong); font: 700 10px/1.3 var(--mono); letter-spacing: 0.1em; }
.guide-card-copy > strong { font-size: 20px; letter-spacing: -0.025em; }
.guide-card-copy > small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.guide-card-description { max-width: 730px; margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.guide-card-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.guide-card-meta > span { padding: 5px 8px; border: 1px solid #e2e8f0; border-radius: 7px; color: #596579; background: #f8fafc; font-size: 10px; }
.guide-card-action { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 4px; color: var(--blue-strong); font-size: 12px; font-weight: 700; white-space: nowrap; }
.guide-card-action svg { width: 18px; fill: currentColor; }
.guide-empty { padding: 34px; border: 1px dashed #bdc8d7; border-radius: 12px; color: var(--muted); background: white; text-align: center; }

@media (max-width: 640px) {
  .guide-hero { min-height: 0; grid-template-columns: 1fr; align-items: start; gap: 28px; padding: 28px 22px; }
  .guide-hero h1 { font-size: 40px; }
  .guide-hero-count { min-width: 0; grid-template-columns: auto 1fr; align-items: end; gap: 10px; padding: 18px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.2); }
  .guide-hero-count strong { font-size: 34px; }
  .guide-card { grid-template-columns: 46px minmax(0, 1fr); gap: 15px; padding: 20px 18px; }
  .guide-card-number { width: 44px; height: 44px; }
  .guide-card-action { grid-column: 2; min-height: 36px; padding: 0; }
}

/* Keyword knowledge center */
.kc-body { --kc-amber: #9a5b00; --kc-amber-bg: #fff7e8; --kc-risk-bg: #fff1ef; }
.kc-workspace { width: min(1540px, 100%); margin: 0 auto; padding: clamp(28px, 3.6vw, 52px) clamp(18px, 3.2vw, 48px) 88px; }
.kc-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.kc-hero .eyebrow { margin-bottom: 10px; color: var(--blue-strong); }
.kc-hero h1 { margin: 0; font-size: clamp(34px, 4vw, 54px); line-height: 1.08; letter-spacing: -0.055em; text-wrap: balance; }
.kc-hero p:last-child { margin: 12px 0 0; color: var(--muted); line-height: 1.7; }
.kc-hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.kc-view-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 22px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #e9eef4; }
.kc-view-nav a { min-height: 44px; display: inline-flex; flex: 1 1 125px; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; border-radius: 8px; color: #556176; font-size: 12px; font-weight: 650; text-align: center; text-decoration: none; transition: color .16s ease, background .16s ease, box-shadow .16s ease; }
.kc-view-nav a[aria-current="page"] { color: var(--blue-strong); background: white; box-shadow: 0 1px 3px rgba(23, 32, 51, .08); }
.kc-view-nav b { min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; border-radius: 10px; color: white; background: var(--danger); font-family: var(--mono); font-size: 9px; }
.kc-context-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: -12px 0 22px; padding: 0 4px; }
.kc-context-nav[hidden] { display: none; }
.kc-context-nav a { min-height: 40px; display: inline-flex; align-items: center; padding: 7px 11px; border-bottom: 2px solid transparent; color: #667085; font-size: 10px; font-weight: 650; text-decoration: none; }
.kc-context-nav a[aria-current="page"] { border-bottom-color: var(--blue); color: var(--blue-strong); }
.kc-context-nav a:focus-visible { outline: 3px solid rgba(41, 91, 255, .16); outline-offset: 2px; }
.kc-view { min-width: 0; animation: panel-in .24s ease both; }
.kc-section-heading { min-height: 62px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 26px 0 16px; }
.kc-section-heading h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.kc-section-heading > span { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.review-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; }
.review-heading-actions > span { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.kc-error-summary { margin: 0 0 16px; padding: 14px 16px; border: 1px solid #efc4bf; border-radius: 10px; color: #7a271a; background: var(--kc-risk-bg); font-size: 13px; line-height: 1.6; }
.kc-loading { min-height: 46px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.kc-loading span { width: 17px; height: 17px; border: 2px solid #c8d1dd; border-top-color: var(--blue); border-radius: 50%; animation: kc-spin .8s linear infinite; }
@keyframes kc-spin { to { transform: rotate(360deg); } }

.kc-kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.kc-kpi { min-height: 132px; display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-top: 3px solid #a9bbff; border-radius: 11px; background: white; }
.kc-kpi > span { color: #475467; font-size: 12px; font-weight: 650; }
.kc-kpi strong { margin-top: 14px; font-family: var(--mono); font-size: clamp(27px, 2.8vw, 38px); line-height: 1; font-variant-numeric: tabular-nums; }
.kc-kpi small { margin-top: auto; padding-top: 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.kc-kpi--attention { border-top-color: #d79a3b; }
.kc-kpi--risk { border-top-color: #d92d20; }
.pipeline-health { margin-bottom: 14px; padding: 16px; border: 1px solid #cfd9ee; border-radius: 11px; background: #f8faff; }
.pipeline-health .panel-heading { min-height: 36px; margin-bottom: 10px; }
.pipeline-health .panel-heading h3 { font-size: 15px; }
.pipeline-health .panel-heading > span { max-width: 55%; line-height: 1.5; text-align: right; }
.pipeline-health-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.pipeline-health-card { min-width: 0; display: grid; gap: 5px; padding: 11px; border: 1px solid #e0e6f0; border-radius: 8px; background: white; color: inherit; text-align: left; cursor: pointer; }
.pipeline-health-card { text-decoration: none; }
.pipeline-health-card:hover { border-color: #9eb5e8; background: #f8faff; }
.pipeline-health-card:focus-visible { outline: 3px solid rgba(37, 88, 230, .28); outline-offset: 2px; }
.pipeline-health-card i { color: #2558e6; font-size: 8px; font-style: normal; font-weight: 750; }
.pipeline-health-grid span { color: #475467; font-size: 9px; font-weight: 700; }
.pipeline-health-grid strong { overflow: hidden; font-family: var(--mono); font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.pipeline-health-grid small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.score-guide { margin: 0 0 14px; overflow: hidden; border: 1px solid #cfd9ee; border-radius: 11px; background: white; }
.score-guide > summary { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 15px; color: #344054; background: #f8faff; cursor: pointer; }
.score-guide > summary:focus-visible { outline: 3px solid rgba(37, 88, 230, .28); outline-offset: -3px; }
.score-guide > summary span { min-width: 0; display: grid; gap: 3px; }
.score-guide > summary strong { font-size: 12px; }
.score-guide > summary small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.score-guide > summary b { min-width: 76px; color: var(--blue-strong); font-size: 9px; text-align: right; }
.score-guide[open] > summary b { font-size: 0; }
.score-guide[open] > summary b::after { content: '收起说明'; font-size: 9px; }
.score-guide-content { display: grid; gap: 12px; padding: 15px; border-top: 1px solid #e1e7ef; }
.score-guide-intro { display: flex; align-items: flex-start; gap: 9px; }
.score-guide-intro p { margin: 1px 0 0; color: #475467; font-size: 10px; line-height: 1.6; }
.score-guide-model { flex: 0 0 auto; padding: 5px 7px; border-radius: 6px; color: var(--blue-strong); background: #eef2ff; font-family: var(--mono); font-size: 8px; font-weight: 700; }
.score-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.score-guide-grid article { min-width: 0; display: grid; gap: 7px; padding: 12px; border: 1px solid #e0e6f0; border-radius: 9px; background: #fbfcfe; }
.score-guide-grid h4 { margin: 0; color: var(--ink); font-size: 12px; }
.score-guide-grid p, .score-guide-grid small { margin: 0; color: #53617a; font-size: 9px; line-height: 1.6; }
.score-guide-grid code { padding: 7px 8px; border-radius: 6px; color: #254175; background: #edf3ff; font-family: var(--mono); font-size: 9px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.decision-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.decision-flow article { min-width: 0; display: flex; align-items: flex-start; gap: 8px; padding: 11px; border: 1px solid #dce4f1; border-radius: 9px; background: #fff; }
.decision-flow article > b { width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--blue-strong); font-family: var(--mono); font-size: 9px; }
.decision-flow article div { min-width: 0; display: grid; gap: 4px; }
.decision-flow h4, .decision-flow p { margin: 0; }
.decision-flow h4 { font-size: 10px; }
.decision-flow p { color: #53617a; font-size: 9px; line-height: 1.55; }
.decision-context { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 12px; padding: 13px 15px; border: 1px solid #cbd7ef; border-left: 4px solid var(--blue); border-radius: 10px; background: #f8faff; }
.decision-context > div { min-width: 0; display: grid; gap: 4px; }
.decision-context h3 { margin: 0; font-size: 13px; }
.decision-context small { color: #596579; font-size: 9px; line-height: 1.5; }
.decision-context label { min-width: min(330px, 42%); color: #344054; font-size: 9px; font-weight: 700; }
.decision-context select { width: 100%; min-height: 44px; margin-top: 4px; padding: 8px 34px 8px 10px; border: 1px solid #b9c7db; border-radius: 8px; color: #24324a; background: #fff; }
.decision-context select:focus-visible { outline: 3px solid rgba(37, 88, 230, .28); outline-offset: 2px; }
.score-factor-details { border-top: 1px solid #e2e8f0; padding-top: 8px; }
.score-factor-details summary { min-height: 36px; display: inline-flex; align-items: center; color: var(--blue-strong); font-size: 9px; font-weight: 700; cursor: pointer; }
.score-factor-details summary:focus-visible { outline: 3px solid rgba(37, 88, 230, .28); outline-offset: 2px; }
.score-factor-details > div { display: grid; gap: 5px; padding: 8px 10px; border-left: 3px solid #c6d3f9; color: #53617a; background: #f8faff; }
.score-factor-details p { margin: 0; font-size: 9px; line-height: 1.6; }
.drilldown-context { margin: 0 0 10px; display: grid; gap: 3px; padding: 11px 13px; border: 1px solid #b9c9f5; border-left: 4px solid var(--blue); border-radius: 8px; color: #344054; background: #f4f7ff; }
.drilldown-context[hidden] { display: none; }
.drilldown-context strong { font-size: 11px; }
.drilldown-context span { color: #53617a; font-size: 9px; line-height: 1.5; }
.drilldown-results:focus { outline: 3px solid rgba(37, 88, 230, .24); outline-offset: 3px; }
.raw-asin-links { display: grid; gap: 4px; }
.raw-asin-links a { color: var(--blue-strong); font-family: var(--mono); font-size: 9px; font-weight: 700; white-space: nowrap; }
.raw-asin-links small { color: var(--muted); font-size: 8px; }
.evidence-rail { display: grid; grid-template-columns: minmax(110px, 1fr) 30px minmax(110px, 1fr) 30px minmax(110px, 1fr) 30px minmax(110px, 1fr) 30px minmax(110px, 1fr); align-items: center; margin: 14px 0; padding: 22px; border-radius: 13px; color: white; background: var(--ink); }
.evidence-rail > div { min-width: 0; display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; align-items: center; }
.evidence-rail > div > span { grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #657187; border-radius: 50%; color: #7ee7d3; font-family: var(--mono); font-size: 10px; }
.evidence-rail strong { font-size: 12px; }
.evidence-rail small { min-width: 0; overflow: hidden; color: #8f9caf; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-rail > i { height: 1px; background: #445065; }
.kc-overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin: 14px 0; }
.kc-panel { min-width: 0; margin: 14px 0; padding: 19px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.panel-heading { min-height: 44px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.panel-heading h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.panel-heading > span { color: var(--muted); font-size: 10px; }
.panel-heading > a { min-height: 36px; display: inline-flex; align-items: center; color: var(--blue-strong); font-size: 11px; text-decoration: none; }
.source-status-list, .compact-list { display: grid; gap: 4px; }
.source-status-list > div, .compact-list > a { min-height: 58px; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: inherit; text-decoration: none; }
.source-status-list > div:hover, .compact-list > a:hover { background: #f6f8fb; }
.source-status-list > div > div, .compact-list > a > div { min-width: 0; display: grid; gap: 3px; }
.source-status-list strong, .compact-list strong { font-size: 12px; }
.source-status-list small, .compact-list small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.source-status-list b, .compact-list b { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 10px; font-weight: 500; }
.source-indicator, .status-dot { width: 9px; height: 9px; flex: 0 0 auto; border: 2px solid #c5cfdb; border-radius: 50%; background: white; }
.source-indicator.is-ready, .status-succeeded .status-dot, .status-dot.status-succeeded { border-color: #7fc9b8; background: var(--signal); }
.status-dot.status-failed { border-color: #e9978e; background: var(--danger); }
.status-dot.status-running { border-color: #9cb1ff; background: var(--blue); }
.empty-compact { padding: 20px 10px; color: var(--muted); font-size: 11px; line-height: 1.6; }

.category-card { overflow: hidden; margin-top: 10px; border: 1px solid #e1e7ef; border-radius: 10px; }
.category-card > header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 15px; background: #f8fafc; }
.category-card > header div { display: grid; gap: 4px; }
.category-card > header strong { font-size: 13px; }
.category-card > header small { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.category-card > header > span { padding: 5px 8px; border: 1px solid #cde6df; border-radius: 7px; color: #31524b; background: #f0faf7; font-size: 9px; }
.category-source-grid { display: grid; grid-template-columns: 1fr 1fr; }
.category-source-grid fieldset { min-width: 0; display: grid; gap: 10px; margin: 0; padding: 16px; border: 0; }
.category-source-grid fieldset + fieldset { border-left: 1px solid #e4e9f0; }
.category-source-grid legend { padding: 0; color: var(--blue-strong); font-family: var(--mono); font-size: 10px; font-weight: 700; }
.source-contract { min-height: 58px; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px; align-items: start; padding: 9px 10px; border: 1px solid #dfe6ee; border-radius: 8px; background: #f8fafc; }
.source-contract span { display: inline-flex; min-height: 26px; align-items: center; padding: 4px 7px; border: 1px solid #d7dfe8; border-radius: 7px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.source-contract .contract-exact { color: #1746a2; border-color: #b8c8ff; background: #f1f4ff; }
.source-contract .contract-category_pool { color: #7d4e00; border-color: #efd5a7; background: #fff8eb; }
.source-contract p { margin: 2px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.category-source-grid label, .kc-command-bar label, .kc-filter-bar label, .kc-dialog label, .bulk-review-bar label { min-width: 0; display: grid; gap: 5px; color: #475467; font-size: 10px; font-weight: 650; }
.category-source-grid label small { color: var(--muted); font-size: 9px; font-weight: 400; line-height: 1.5; }
.category-source-grid fieldset[data-provider="seller_sprite"] [data-provider-field="crawler"],
.category-source-grid fieldset[data-provider="searchapi"] [data-provider-field="crawler"],
.category-source-grid fieldset[data-provider="searchapi"] [data-provider-field="new-months"],
.category-source-grid fieldset[data-provider="crawler"] [data-provider-field="new-months"],
.category-source-grid fieldset[data-list-type="best_sellers"] [data-provider-field="new-months"] { display: none; }
.kc-command-bar label small { color: var(--muted); font-size: 9px; font-weight: 400; line-height: 1.5; }
.kc-command-bar .field-error { color: #9f2d20; font-size: 10px; font-weight: 600; line-height: 1.5; }
.kc-command-bar [aria-invalid="true"] { border-color: #c43d2f; box-shadow: 0 0 0 3px rgba(196, 61, 47, .12); }
.category-source-grid input, .category-source-grid select, .kc-command-bar input, .kc-command-bar select, .kc-command-bar textarea, .kc-filter-bar input, .kc-filter-bar select, .kc-dialog input, .kc-dialog select, .bulk-review-bar select, .line-category, .member-open-id, .member-role-select { width: 100%; min-height: 44px; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 8px; color: var(--ink); background: white; font-size: 12px; line-height: 1.4; }
.category-source-grid input:focus, .category-source-grid select:focus, .kc-command-bar input:focus, .kc-command-bar select:focus, .kc-command-bar textarea:focus, .kc-filter-bar input:focus, .kc-filter-bar select:focus, .kc-dialog input:focus, .kc-dialog select:focus, .bulk-review-bar select:focus, .line-category:focus, .member-open-id:focus, .member-role-select:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(41, 91, 255, .13); }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.source-switches { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.source-switches label { min-height: 44px; display: flex; flex-direction: row; align-items: center; gap: 7px; }
.source-switches input { width: 17px; min-height: 17px; accent-color: var(--blue); }
.source-switches small { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.source-switches button { margin-left: auto; }
.source-switches button + button { margin-left: 0; }
.source-manual-mode { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #cfe0ff; border-radius: 9px; background: #f5f8ff; }
.source-manual-mode strong { color: var(--blue-strong); font-size: 11px; }
.source-manual-mode span { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.source-boundary-note { margin: 0; padding: 9px 11px; border-left: 3px solid var(--blue); color: #43516a; background: #f8fafc; font-size: 10px; line-height: 1.55; }
.source-verification { margin: 0; padding: 9px 11px; border-radius: 8px; font-size: 10px; font-weight: 700; }
.source-verification.is-pending { color: #8a4b08; background: #fff7e6; border: 1px solid #f1d19a; }
.source-verification.is-verified { color: #167259; background: #ecf9f3; border: 1px solid #a9dfcc; }

.table-wrap { max-width: 100%; overflow-x: auto; }
.kc-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.kc-table th { padding: 9px 10px; border-bottom: 1px solid #cfd8e3; color: var(--muted); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-align: left; white-space: nowrap; }
.kc-table td { max-width: 310px; padding: 11px 10px; border-bottom: 1px solid #edf0f4; color: #344054; vertical-align: top; line-height: 1.5; }
.kc-table tbody tr:hover { background: #f9fbfd; }
.kc-table select { min-height: 38px; }
.kc-table details summary { min-height: 32px; display: inline-flex; align-items: center; color: var(--blue-strong); cursor: pointer; }
.kc-table pre { max-width: 520px; max-height: 260px; overflow: auto; padding: 12px; border-radius: 8px; color: #d9e2ec; background: var(--ink); font-family: var(--mono); font-size: 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
.table-note { display: block; max-width: 280px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.truncate-id { max-width: 150px; display: inline-block; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }
.source-chip, .risk-chip, .status-chip, .tier-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 7px; border: 1px solid #d7dfe8; border-radius: 7px; color: #475467; background: #f8fafc; font-size: 9px; white-space: nowrap; }
.risk-high { color: #8b241a; border-color: #efc4bf; background: var(--kc-risk-bg); }
.risk-medium, .status-observe { color: #7d4e00; border-color: #efd5a7; background: var(--kc-amber-bg); }
.risk-none, .status-succeeded { color: #226153; border-color: #cbe7df; background: #f0faf7; }
.status-conflict { color: #8b241a; border-color: #efc4bf; background: var(--kc-risk-bg); }
.status-retired { color: #596579; border-color: #cbd3df; background: #f0f3f7; }
.toggle-button { min-width: 84px; min-height: 38px; padding: 7px 10px; border: 1px solid #d2dae5; border-radius: 8px; color: #5e6a7e; background: #f8fafc; cursor: pointer; }
.toggle-button.is-on { color: white; border-color: var(--signal); background: var(--signal); }

.product-line-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 12px 0; padding: 11px; border: 1px solid #e1e7ef; border-radius: 9px; background: #f8fafc; }
.product-line-scope-note { min-height: 48px; display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 11px 13px; border: 1px solid #cfdcf4; border-radius: 9px; color: #354663; background: #f5f8ff; font-size: 10px; line-height: 1.55; }
.product-line-scope-note strong { flex: 0 0 auto; color: var(--blue-strong); }
.product-line-title { max-width: 320px; display: block; margin-top: 4px; color: #344054; font-size: 10px; font-weight: 550; line-height: 1.45; }
.product-line-table .asin-link { display: block; width: fit-content; color: var(--blue-strong); font-family: var(--mono); font-size: 10px; text-decoration: none; }
.product-line-table .asin-link:hover { text-decoration: underline; }
.product-line-table .asin-link:focus-visible { outline: 3px solid rgba(41, 91, 255, .18); outline-offset: 2px; }
.asin-kind { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.product-line-toolbar label { min-width: 180px; display: grid; flex: 1 1 220px; gap: 5px; color: #475467; font-size: 10px; font-weight: 650; }
.product-line-toolbar input, .product-line-toolbar select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; color: var(--ink); background: white; font-size: 12px; }
.product-line-toolbar input:focus, .product-line-toolbar select:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(41, 91, 255, .13); }
.product-line-pager { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.product-line-pager span { min-width: 82px; color: var(--muted); font-family: var(--mono); font-size: 10px; text-align: right; }
.product-line-pager button { min-height: 40px; padding: 7px 10px; border: 1px solid #c8d2df; border-radius: 8px; color: #344054; background: white; cursor: pointer; }
.product-line-pager button:disabled { cursor: not-allowed; opacity: .45; }

.kc-command-bar, .kc-filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.kc-command-bar label, .kc-filter-bar label { flex: 1 1 165px; }
.kc-filter-help { flex: 1 0 100%; color: var(--muted); font-size: 9px; font-weight: 400; line-height: 1.5; }
.kc-command-bar label:has(textarea) { flex-basis: 280px; }
.kc-command-bar #job-geo-states-label { flex-basis: 520px; }
.kc-command-bar button, .kc-filter-bar button { flex: 0 0 auto; }
.kc-command-bar .automation-consent { min-height: 44px; display: flex; flex: 1 1 280px; flex-direction: row; align-items: center; gap: 8px; }
.kc-command-bar .geo-large-consent { padding: 9px 11px; border: 1px solid #ead7a5; border-radius: 8px; color: #6b4f13; background: #fffaf0; }
.automation-consent input { width: 18px; height: 18px; accent-color: var(--blue); }
.job-readiness { min-height: 44px; display: flex; flex: 1 0 100%; align-items: center; padding: 10px 12px; border: 1px solid #d9e2ec; border-radius: 8px; color: #475467; background: #f8fafc; font-size: 11px; line-height: 1.5; }
.job-readiness.is-ready { border-color: #a9d8cd; color: #07604f; background: #eef9f5; }
.job-readiness.is-blocked { border-color: #ecd5ad; color: #805000; background: #fff8eb; }
.job-list { display: grid; gap: 7px; }
.job-row { min-height: 92px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid #e2e8f0; border-radius: 9px; }
.job-status-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #eef2f6; }
.job-status-icon span { width: 9px; height: 9px; border-radius: 50%; background: #8b96a8; }
.job-status-icon.status-running span { background: var(--blue); box-shadow: 0 0 0 5px rgba(41, 91, 255, .11); }
.job-status-icon.status-succeeded span { background: var(--signal); }
.job-status-icon.status-failed span { background: var(--danger); }
.job-copy { min-width: 0; display: grid; gap: 6px; }
.job-copy > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.job-copy strong { font-size: 12px; }
.job-copy span { padding: 3px 6px; border-radius: 5px; color: #53617a; background: #eef2f6; font-size: 8px; }
.job-copy p, .job-copy small { margin: 0; color: var(--muted); font-size: 9px; }
.job-copy .job-error-summary { color: #8a2922; line-height: 1.55; }
.job-copy .job-error-summary b { color: #74231d; }
.job-copy .job-recovery-note { color: #5d4930; line-height: 1.55; }
.job-progress { height: 4px; overflow: hidden; border-radius: 2px; background: #e6ebf1; }
.job-progress i { height: 100%; display: block; background: var(--blue); transition: width .24s ease; }
.job-row > b { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.job-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.job-row-actions > b { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.job-row-actions button { min-height: 44px; }
.job-blocked { max-width: 120px; color: #805000; font-size: 10px; line-height: 1.4; text-align: right; }
.job-auto-resume { padding: 6px 9px; border: 1px solid #9fc9bd; border-radius: 7px; color: #075f4e; background: #edf9f5; font-size: 10px; font-weight: 700; }
.job-review-badge { padding: 6px 9px; border: 1px solid #d9b86c; border-radius: 7px; color: #76520b; background: #fff8e8; font-size: 10px; font-weight: 700; }
.geo-review-panel { min-width: 0; grid-column: 1 / -1; margin-top: 2px; padding: 14px; border: 1px solid #bfd0ff; border-radius: 10px; background: #f7f9ff; }
.geo-review-loading { color: var(--muted); font-size: 11px; }
.geo-review-form { display: grid; gap: 13px; }
.geo-review-form > header, .geo-review-form > footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.geo-review-form h4 { margin: 2px 0 3px; font-size: 15px; }
.geo-review-form header small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.geo-plan-tools { display: flex; flex-wrap: wrap; gap: 7px; }
.geo-plan-tools button, .geo-review-form details summary { min-height: 40px; padding: 8px 10px; border: 1px solid #c9d3e1; border-radius: 7px; color: #344054; background: white; font-size: 10px; cursor: pointer; }
.geo-postal-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 10px; }
.geo-postal-plans fieldset { min-width: 0; display: grid; gap: 5px; padding: 10px; border: 1px solid #d7e0ec; border-radius: 9px; background: white; }
.geo-postal-plans legend { padding: 0 5px; color: var(--ink); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.geo-postal-plans legend small { color: var(--muted); font-family: var(--sans); font-weight: 500; }
.geo-plan-keyword { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr) 104px; gap: 8px; align-items: center; padding: 7px; border-radius: 7px; background: #f8fafc; }
.geo-plan-keyword > input { width: 18px; height: 18px; accent-color: var(--blue); }
.geo-plan-keyword > span { min-width: 0; display: grid; gap: 2px; }
.geo-plan-keyword strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.geo-plan-keyword small { color: var(--muted); font-size: 8px; }
.geo-plan-keyword select, .geo-candidate-controls input, .geo-candidate-controls select { width: 100%; min-height: 40px; padding: 7px 9px; border: 1px solid #c8d2df; border-radius: 7px; color: var(--ink); background: white; font-size: 11px; }
.geo-plan-summary { color: #294264; font-size: 11px; font-weight: 650; }
.geo-candidate-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.geo-candidate-controls label { min-width: 0; display: grid; gap: 5px; color: #475467; font-size: 10px; font-weight: 650; }
.geo-candidate-controls label small { color: var(--muted); font-size: 8px; font-weight: 400; }
.geo-candidate-filter-set { min-width: 0; display: grid; gap: 8px; margin: 0; padding: 12px; border: 1px solid #cbd8eb; border-radius: 10px; background: #f8faff; }
.geo-candidate-filter-set > legend { padding: 0 6px; color: #344054; font-size: 11px; font-weight: 750; }
.geo-candidate-filter-set > p { margin: 0; color: #53617a; font-size: 10px; line-height: 1.5; }
.geo-candidate-filter-set > p strong { color: var(--blue-strong); }
.geo-candidate-filter { min-width: 0; display: grid; gap: 6px; padding: 10px; border: 1px solid #d9e1ec; border-radius: 8px; background: #f1f4f8; opacity: .72; }
.geo-candidate-filter.is-enabled { border-color: #aebfff; background: white; opacity: 1; box-shadow: 0 1px 3px rgba(23, 32, 51, .05); }
.geo-candidate-filter > small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.geo-candidate-controls .geo-filter-toggle { min-height: 44px; display: flex; grid-template-columns: none; align-items: center; gap: 8px; cursor: pointer; }
.geo-candidate-controls .geo-filter-toggle input { flex: 0 0 auto; width: 20px; min-height: 20px; height: 20px; margin: 0; padding: 0; accent-color: var(--blue); }
.geo-filter-value { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.geo-filter-value > span { color: #53617a; font-family: var(--mono); font-size: 11px; }
.geo-candidate-filter [data-filter-value]:disabled { color: #8a94a6; background: #e8edf3; cursor: not-allowed; }
.geo-candidate-data { display: flex; flex-wrap: wrap; gap: 7px; }
.geo-candidate-data span { padding: 7px 9px; border: 1px solid #d7e0ec; border-radius: 7px; color: #53617a; background: white; font-size: 10px; }
.geo-candidate-step { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 8px; color: #344054; background: #edf3ff; font-size: 11px; }
.geo-candidate-step > b { color: var(--blue-strong); }
.geo-candidate-step > button { min-height: 38px; margin-left: auto; padding: 7px 10px; border: 1px solid #c9d3e1; border-radius: 7px; color: #344054; background: white; cursor: pointer; }
.geo-candidate-results { display: grid; gap: 9px; }
.geo-candidate-results[hidden], .geo-candidate-confirm[hidden] { display: none; }
.geo-candidate-result-summary { padding: 9px 11px; border: 1px solid #b9dbc9; border-radius: 8px; color: #17603d; background: #effaf4; font-size: 10px; font-weight: 650; line-height: 1.5; }
.geo-candidate-empty { min-height: 96px; display: grid; place-content: center; gap: 5px; padding: 16px; border: 1px dashed #c8d2df; border-radius: 9px; color: #53617a; background: white; text-align: center; }
.geo-candidate-empty[hidden], .geo-candidate-list[hidden], .geo-candidate-excluded[hidden] { display: none; }
.geo-candidate-empty strong { color: #344054; font-size: 12px; }
.geo-candidate-empty span { font-size: 10px; line-height: 1.5; }
.geo-candidate-list { display: grid; gap: 7px; }
.geo-candidate-item { min-width: 0; min-height: 74px; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; padding: 11px; border: 1px solid #d7e0ec; border-radius: 9px; background: white; cursor: pointer; }
.geo-candidate-item:hover { border-color: #aabdfb; }
.geo-candidate-item:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.geo-candidate-item.is-risk { border-left: 4px solid #d59b22; background: #fffdf8; }
.geo-candidate-item.is-excluded { border-color: #e8c5c0; border-left: 4px solid var(--danger); background: #fff8f7; cursor: not-allowed; }
.geo-candidate-toggle { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); }
.geo-candidate-main { min-width: 0; display: grid; gap: 7px; }
.geo-candidate-heading { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.geo-candidate-heading > strong { min-width: 0; color: var(--ink); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.geo-candidate-badges { flex: 0 0 auto; }
.geo-candidate-badges b { display: inline-flex; padding: 4px 6px; border-radius: 999px; color: #78540a; background: #fff0c7; font-size: 8px; white-space: nowrap; }
.geo-candidate-item:not(.is-risk) .geo-candidate-badges b { color: #17603d; background: #e7f7ef; }
.geo-candidate-item.is-excluded .geo-candidate-badges b { color: #8e2d23; background: #fee9e7; }
.geo-candidate-id { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.geo-candidate-id code { color: #344054; font-family: var(--mono); font-size: 10px; }
.geo-candidate-id a { min-height: 32px; display: inline-flex; align-items: center; color: var(--blue-strong); font-size: 10px; font-weight: 650; }
.geo-candidate-metrics { display: flex; flex-wrap: wrap; gap: 5px; }
.geo-candidate-metrics > span { padding: 5px 7px; border-radius: 5px; color: #5a6880; background: #f3f6fa; font-size: 9px; }
.geo-candidate-metrics b { color: #344054; }
.geo-candidate-reason { color: #53617a; font-size: 10px; line-height: 1.5; }
.geo-candidate-item.is-excluded .geo-candidate-reason { color: #8e2d23; font-weight: 650; }
.geo-candidate-excluded { border-top: 1px solid #e2e8f0; padding-top: 8px; }
.geo-candidate-excluded > summary { min-height: 44px; display: flex; align-items: center; color: #8e2d23; cursor: pointer; }
.geo-candidate-confirm > div { display: grid; gap: 4px; }
.geo-plan-warning { min-height: 16px; color: var(--danger); font-size: 10px; font-weight: 650; }
.geo-generate-candidates { min-height: 44px !important; color: var(--blue-strong) !important; border-color: #9db2ff !important; font-weight: 700; }
.job-asins-panel { min-width: 0; grid-column: 1 / -1; display: grid; gap: 10px; margin-top: 3px; padding: 13px; border: 1px solid #d2dceb; border-radius: 9px; background: #f8fafc; }
.job-asins-panel[hidden] { display: none; }
.job-asins-panel h4 { margin: 2px 0; font-size: 14px; }
.job-asins-panel header small { color: var(--muted); font-size: 10px; }
.job-asin-history { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 7px; }
.job-asin-history article { min-width: 0; display: grid; gap: 6px; padding: 10px; border: 1px solid #dce3eb; border-radius: 8px; background: white; }
.job-asin-history article > div, .job-asin-history article > p { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; margin: 0; }
.job-asin-history strong { min-width: 0; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.job-asin-history article > div > b { padding: 4px 6px; border-radius: 999px; color: #17603d; background: #e7f7ef; font-size: 8px; }
.job-asin-history article > div > b.is-excluded { color: #8e2d23; background: #fee9e7; }
.job-asin-history code { font-family: var(--mono); font-size: 10px; }
.job-asin-history a { min-height: 32px; display: inline-flex; align-items: center; color: var(--blue-strong); font-size: 10px; font-weight: 650; }
.job-asin-history span, .job-asin-history small { color: #5a6880; font-size: 9px; line-height: 1.5; }

.bulk-review-bar { position: sticky; top: 8px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 10px; padding: 9px 10px; border: 1px solid #b9c7ff; border-radius: 10px; background: rgba(244, 247, 255, .97); box-shadow: 0 8px 24px rgba(23, 32, 51, .08); backdrop-filter: blur(8px); }
.bulk-review-bar strong { margin-right: auto; font-size: 11px; }
.bulk-review-bar label { min-width: 150px; }
.bulk-review-bar select { min-height: 44px; }
.bulk-review-bar button { position: relative; min-height: 52px; padding: 18px 10px 7px; border: 1px solid #c8d2df; border-radius: 7px; color: #344054; background: white; font-size: 10px; font-weight: 650; cursor: pointer; }
.bulk-review-bar button:hover { border-color: var(--blue); color: var(--blue-strong); }
.bulk-review-bar .danger-text, .danger-text { color: var(--danger); }
.bulk-review-bar .action-purpose { position: absolute; top: 4px; right: 5px; max-width: calc(100% - 10px); overflow: hidden; color: #667085; font-size: 8px; font-weight: 750; line-height: 1.1; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.bulk-review-bar .danger-text .action-purpose { color: #b42318; }
.review-action-help { display: flex; align-items: flex-start; gap: 10px; margin: -2px 0 10px; padding: 10px; border: 1px solid #d9e2f5; border-radius: 8px; color: #475467; background: #fbfcff; font-size: 10px; line-height: 1.55; }
.review-action-help > strong { flex: 0 0 auto; padding-top: 6px; color: var(--ink); }
.review-action-definitions { min-width: 0; display: grid; flex: 1 1 auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.review-action-definitions span { min-width: 0; display: grid; gap: 2px; padding: 6px 8px; border-left: 2px solid #c8d6f5; background: white; }
.review-action-definitions b { color: var(--ink); font-size: 10px; }
.review-action-help a { flex: 0 0 auto; margin-left: auto; color: var(--blue-strong); font-weight: 700; text-decoration: none; }
.review-action-help a:hover { text-decoration: underline; }
.review-action-help a:focus-visible { outline: 3px solid rgba(41, 91, 255, .18); outline-offset: 2px; }
.manual-decision.is-pending { color: var(--muted); }
.source-dimension { min-width: 135px; display: grid; gap: 6px; }
.source-dimension-list, .source-product-list { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.source-shop-chip { display: inline-flex; min-height: 24px; align-items: center; padding: 3px 6px; border: 1px solid #b9d9d0; border-radius: 6px; color: #176452; background: #f0faf7; font-size: 9px; font-weight: 700; white-space: nowrap; }
.source-product-list code { max-width: 150px; overflow: hidden; padding: 3px 5px; border: 1px solid #d6deeb; border-radius: 5px; color: #344054; background: #f7f9fc; font-family: var(--mono); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.source-dimension-list small, .source-product-list small { color: var(--muted); font-size: 8px; }
.source-dimension-missing { color: #7a5b15; font-size: 9px; line-height: 1.45; }
.negative-root-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 10px; padding: 13px 15px; border: 1px solid #ead7a5; border-radius: 10px; background: #fffaf0; }
.negative-root-panel h3 { margin: 2px 0 3px; font-size: 13px; }
.negative-root-panel > div:first-child > small { display: block; max-width: 660px; color: #71591e; font-size: 9px; line-height: 1.55; }
.negative-root-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.negative-root-chip { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 7px 6px 10px; border: 1px solid #e0c275; border-radius: 8px; color: #624a12; background: white; }
.negative-root-chip b { font-family: var(--mono); font-size: 10px; }
.negative-root-chip small { color: #7f6a37; font-size: 8px; }
.negative-root-chip button { min-height: 32px; padding: 4px 7px; border: 0; border-radius: 6px; color: #9f2d20; background: #fff0ed; font-size: 8px; font-weight: 700; cursor: pointer; }
.negative-root-empty { color: #7f6a37; font-size: 9px; }
.negative-root-dialog #negative-root-form { display: grid; gap: 14px; margin-top: 18px; }
.negative-root-context { display: grid; gap: 5px; padding: 11px 12px; border-radius: 8px; background: #f3f6fa; }
.negative-root-context strong { font-size: 11px; }
.negative-root-context span, .negative-root-context small { color: #667085; font-size: 9px; line-height: 1.5; }
.negative-root-context small { overflow-wrap: anywhere; }
.negative-root-dialog fieldset { min-width: 0; margin: 0; padding: 12px; border: 1px solid #d5dde8; border-radius: 9px; }
.negative-root-dialog legend { padding: 0 5px; color: #475467; font-size: 10px; font-weight: 700; }
.negative-root-candidates { display: grid; gap: 7px; }
.negative-root-option { min-height: 56px; display: flex !important; grid-template-columns: none !important; grid-auto-flow: column; align-items: flex-start; justify-content: start; gap: 10px !important; padding: 10px; border: 1px solid #d5dde8; border-radius: 8px; background: white; cursor: pointer; }
.negative-root-option:has(input:checked) { border-color: #6f8cff; background: #f3f6ff; box-shadow: 0 0 0 2px rgba(41, 91, 255, .1); }
.negative-root-option:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.negative-root-option input { width: 18px !important; min-height: 18px !important; margin: 2px 0 0; accent-color: var(--blue); }
.negative-root-option > span { display: grid; gap: 3px; }
.negative-root-option b { font-family: var(--mono); font-size: 13px; }
.negative-root-option small { color: #475467 !important; font-size: 9px !important; font-weight: 650 !important; }
.negative-root-option em { color: #7a8597; font-size: 8px; font-style: normal; line-height: 1.45; }
.kc-review-panel { padding: 0; overflow: hidden; }
.kc-review-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); }
.keyword-quality-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 6px; }
.quality-chip, .lifecycle-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 6px; border: 1px solid #ccd6e3; border-radius: 6px; color: #475467; background: #f8fafc; font-size: 8px; font-weight: 700; }
.quality-ready, .lifecycle-current { border-color: #a9d8cd; color: #07604f; background: #eef9f5; }
.quality-needs_sample, .lifecycle-aging { border-color: #ead7a5; color: #805000; background: #fff8eb; }
.quality-risk_review, .quality-quarantined, .lifecycle-stale { border-color: #efc4bf; color: #7a271a; background: #fff2f0; }
.group-select { min-height: 44px; padding: 7px 9px; border: 1px solid #b9c7ff; border-radius: 6px; color: var(--blue-strong); background: #f4f7ff; font-size: 9px; font-weight: 650; cursor: pointer; }
.group-select:hover { border-color: var(--blue); }
.group-select:focus-visible { outline: 3px solid rgba(41, 91, 255, .2); outline-offset: 2px; }
.review-pager { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin: 12px 0 24px; }
.review-pager button { min-height: 44px; padding: 8px 14px; border: 1px solid #c8d2df; border-radius: 8px; color: #344054; background: white; font-size: 11px; font-weight: 650; cursor: pointer; }
.review-pager button:disabled { cursor: not-allowed; opacity: .45; }
.review-pager span { min-width: 150px; color: var(--muted); font-family: var(--mono); font-size: 10px; text-align: center; }
.keyword-link { min-height: 44px; padding: 0; border: 0; color: var(--blue-strong); background: transparent; font-weight: 650; text-align: left; cursor: pointer; }
.cpc-control { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin-top: 6px; }
.cpc-control span { color: #667085; font-family: var(--mono); font-size: 10px; font-variant-numeric: tabular-nums; }
.cpc-control button { min-height: 44px; padding: 7px 9px; border: 1px solid #b9c7d8; border-radius: 7px; color: var(--blue-strong); background: #f8fafc; cursor: pointer; font-size: 10px; font-weight: 650; }
.cpc-control button:hover { border-color: #92a8c3; background: #eef2ff; }
.cpc-control button:focus-visible { outline: 3px solid rgba(41, 91, 255, .2); outline-offset: 2px; }
.cpc-control button:disabled { cursor: wait; opacity: .55; }
.metric-column-heading { display: inline-flex; align-items: center; gap: 6px; }
.metric-column-heading button { min-width: 34px; min-height: 28px; padding: 3px 6px; border: 1px solid #cbd6e8; border-radius: 6px; color: var(--blue-strong); background: #f4f7ff; font-size: 8px; font-weight: 700; cursor: pointer; }
.metric-column-heading button:focus-visible { outline: 3px solid rgba(37, 88, 230, .28); outline-offset: 2px; }
.gate-chip, .confidence-chip { display: inline-flex; align-items: center; width: max-content; min-height: 24px; padding: 3px 7px; border: 1px solid #ccd6e3; border-radius: 999px; font-size: 8px; font-weight: 750; white-space: nowrap; }
.gate-passed, .confidence-high { color: #07604f; border-color: #a9d8cd; background: #eef9f5; }
.gate-review, .confidence-medium { color: #805000; border-color: #ead7a5; background: #fff8eb; }
.gate-blocked, .confidence-low { color: #7a271a; border-color: #efc4bf; background: #fff2f0; }
.decision-stack { min-width: 128px; display: grid; gap: 5px; }
.decision-stack > small { max-width: 230px; color: #596579; font-size: 8px; line-height: 1.5; }
.decision-chip { min-height: 27px; display: flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; padding: 4px 7px; border: 1px solid #d3dbe7; border-radius: 6px; color: #344054; background: #f8fafc; font-size: 8px; font-weight: 750; }
.decision-chip b { min-width: 40px; font-family: var(--mono); font-size: 7px; letter-spacing: .04em; }
.decision-strong { color: #07604f; border-color: #a9d8cd; background: #eef9f5; }
.decision-good { color: #1746a2; border-color: #b9c9ef; background: #f1f5ff; }
.decision-test { color: #805000; border-color: #ead7a5; background: #fff8eb; }
.decision-blocked { color: #7a271a; border-color: #efc4bf; background: #fff2f0; }
.evidence-decision { display: grid; gap: 6px; }
.evidence-decision > small { color: #596579; font-size: 8px; line-height: 1.45; }
.profile-block { min-width: 148px; display: grid; gap: 6px; margin-bottom: 8px; }
.profile-block small { max-width: 230px; color: #596579; font-size: 8px; line-height: 1.5; }
.profile-chip { display: inline-flex; align-items: center; width: max-content; max-width: 100%; min-height: 30px; padding: 5px 9px; border: 1px solid #d3dbe7; border-radius: 7px; font-size: 9px; font-weight: 800; }
.profile-strong { color: #07604f; border-color: #8fcebd; background: #e9f8f2; }
.profile-good { color: #1746a2; border-color: #aec0ee; background: #edf3ff; }
.profile-test { color: #805000; border-color: #e2c879; background: #fff6df; }
.profile-observe { color: #475467; border-color: #cfd6e0; background: #f4f6f8; }
.profile-blocked { color: #7a271a; border-color: #e9aaa3; background: #ffebe8; }
.signal-chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.signal-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 7px; border-radius: 999px; color: #475467; background: #eef1f5; font-size: 8px; font-weight: 750; }
.signal-high { color: #07604f; background: #e7f7ef; }
.signal-medium { color: #1746a2; background: #edf3ff; }
.signal-low { color: #596579; background: #eef1f5; }
.signal-missing { color: #805000; background: #fff3d6; }
.detail-decision-card { display: grid; gap: 7px; margin: 12px 0; padding: 11px; border: 1px solid #d5dfef; border-radius: 9px; background: #f8faff; }
.detail-decision-card .decision-stack { min-width: 0; }
.detail-decision-card p { margin: 0; color: #596579; font-size: 9px; line-height: 1.5; }
.signal-note, .attention-note, .danger-note { display: inline-block; margin: 3px 4px 0 0; color: #176051; font-size: 8px; font-weight: 700; }
.attention-note { color: var(--kc-amber); }
.danger-note { color: var(--danger); }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-list > span { padding: 3px 6px; border: 1px solid #d9e0ea; border-radius: 6px; color: #526077; background: #f7f9fb; font-size: 8px; white-space: nowrap; }

.empty-state { min-height: 150px; display: grid; place-items: center; padding: 28px; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; }
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { color: var(--ink); }
.pack-summary { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.pack-summary span { padding: 6px 8px; border-radius: 7px; color: #53617a; background: #eef2f6; font-family: var(--mono); font-size: 9px; }
#pack-actions { display: flex; flex-wrap: wrap; gap: 7px; }
#pack-actions a { text-decoration: none; }
.publish-category-rule { margin: -3px 0 14px; padding: 11px 13px; border: 1px solid #b9c9f5; border-radius: 9px; color: #3f4f69; background: #f4f7ff; font-size: 10px; line-height: 1.65; }
.publish-category-rule strong { color: #1d3f96; }
.danger-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border: 1px solid #e5aaa3; border-radius: 8px; color: #a1271c; background: #fff5f3; font-size: 10px; font-weight: 700; cursor: pointer; }
.danger-button:hover { border-color: #c94b3c; background: #ffebe7; }
.danger-button:focus-visible { outline: 3px solid rgba(196, 61, 47, .2); outline-offset: 2px; }
.danger-button:disabled { cursor: wait; opacity: .55; }
.pack-provenance { min-width: 150px; display: grid; gap: 5px; }
.pack-provenance strong { color: #344054; font-size: 9px; }
.pack-provenance a, .pack-provenance span { width: max-content; color: var(--blue-strong); font-family: var(--mono); font-size: 8px; text-decoration: none; }
.pack-provenance a:hover { text-decoration: underline; }
.row-actions .danger-text { color: #a1271c; background: #fff1ef; }
.keyword-detail-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 14px; align-items: start; }
.keyword-fact-card, .evidence-timeline { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.keyword-fact-card { position: sticky; top: 14px; }
.keyword-fact-card h3 { margin: 5px 0 18px; font-size: 24px; overflow-wrap: anywhere; }
.keyword-fact-card dl { display: grid; gap: 0; margin: 16px 0; }
.keyword-fact-card dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf0f4; font-size: 10px; }
.keyword-fact-card dt { color: var(--muted); }
.keyword-fact-card dd { margin: 0; font-family: var(--mono); }
.keyword-fact-card > p:last-child { color: var(--muted); font-size: 10px; line-height: 1.7; }
.related-keywords { display: grid; gap: 4px; margin: 15px 0; }
.related-keywords > strong { color: var(--muted); font-size: 9px; }
.related-keywords button { min-height: 34px; padding: 6px 8px; border: 0; border-radius: 6px; color: var(--blue-strong); background: #eef2ff; font-size: 9px; text-align: left; cursor: pointer; }
.evidence-timeline article { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; min-height: 84px; }
.evidence-timeline article::before { content: ""; position: absolute; left: 5px; top: 15px; bottom: -2px; width: 1px; background: #d7dee8; }
.evidence-timeline article:last-child::before { display: none; }
.evidence-timeline article > i { width: 11px; height: 11px; margin-top: 4px; border: 3px solid white; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px #94a8ee; z-index: 1; }
.evidence-timeline article > div { display: grid; align-content: start; gap: 4px; padding-bottom: 18px; }
.evidence-timeline span { color: var(--muted); font-family: var(--mono); font-size: 8px; }
.evidence-timeline strong { font-size: 11px; }
.evidence-timeline p { margin: 0; color: #5f6b7e; font-size: 9px; line-height: 1.6; overflow-wrap: anywhere; }
.opportunity-list, .competitor-list { display: grid; gap: 5px; }
.opportunity-list button { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 10px; border: 0; border-radius: 8px; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.opportunity-list button:hover { background: #f4f7fb; }
.opportunity-list button > span { min-width: 0; display: grid; gap: 4px; }
.opportunity-list strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.opportunity-list small { color: var(--signal); font-size: 8px; }
.opportunity-list b { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; color: var(--blue-strong); background: #edf2ff; font-family: var(--mono); font-size: 10px; }
.competitor-list article { min-height: 70px; display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; }
.competitor-list article:hover { background: #f6f8fb; }
.competitor-list img, .image-placeholder { width: 54px; height: 54px; flex: 0 0 auto; border: 1px solid #e1e6ed; border-radius: 7px; object-fit: contain; background: #f3f5f8; }
.competitor-list article > div { min-width: 0; display: grid; gap: 3px; }
.competitor-list strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.competitor-list small, .competitor-list span { color: var(--muted); font-size: 8px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.row-actions a, .row-actions button { min-height: 32px; display: inline-flex; align-items: center; padding: 4px 7px; border: 0; border-radius: 6px; color: var(--blue-strong); background: #eef2ff; font-size: 9px; text-decoration: none; cursor: pointer; }

.kc-dialog { width: min(650px, calc(100% - 28px)); max-height: min(840px, calc(100dvh - 28px)); overflow: auto; padding: 26px; border: 1px solid #cbd5e1; border-radius: 15px; color: var(--ink); background: white; box-shadow: var(--shadow-panel); }
.kc-dialog::backdrop { background: rgba(23, 32, 51, .48); backdrop-filter: blur(3px); }
.kc-dialog h2 { margin: 0; font-size: 26px; letter-spacing: -.04em; }
.kc-dialog > div > p:last-child { color: var(--muted); font-size: 11px; line-height: 1.6; }
.dialog-close-form { position: absolute; top: 13px; right: 13px; }
.dialog-close-form button { width: 44px; height: 44px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 25px; cursor: pointer; }
.kc-dialog #import-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 20px; }
.kc-dialog label:has(input[type="file"]), .import-preview, .dialog-actions { grid-column: 1 / -1; }
.kc-dialog label small { color: var(--muted); font-size: 9px; font-weight: 400; line-height: 1.5; }
.kc-dialog input[type="file"] { padding: 8px; }
.import-preview { max-height: 250px; overflow: auto; display: grid; gap: 5px; }
.import-preview strong { font-size: 11px; }
.import-preview small { color: var(--muted); font-size: 9px; }
.import-preview pre { margin: 0; padding: 11px; border-radius: 8px; color: #dce4f0; background: var(--ink); font-family: var(--mono); font-size: 8px; white-space: pre-wrap; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.kc-toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: min(380px, calc(100% - 32px)); padding: 13px 16px; border: 1px solid #a9d9cc; border-radius: 10px; color: white; background: #195e50; box-shadow: 0 12px 30px rgba(23, 32, 51, .18); font-size: 11px; }

/* Product keyword libraries V4 */
.library-view { min-width: 0; }
.library-heading { align-items: end; }
.library-heading p:last-child { max-width: 760px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.library-search { max-width: 920px; display: grid; gap: 7px; margin: 8px 0 18px; }
.library-search label { color: #475467; font-size: 11px; font-weight: 650; }
.library-search > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.library-search input { min-width: 0; min-height: 48px; padding: 10px 13px; border: 1px solid #bdc9d8; border-radius: 10px; color: var(--ink); background: #fff; font-size: 14px; }
.library-search input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(41, 91, 255, .13); }
.library-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.library-card { min-width: 0; display: flex; flex-direction: column; padding: 22px; border: 1px solid #ccd6e2; border-radius: 14px; background: #fff; }
.library-card-child { margin-left: 28px; border-left: 4px solid #a9bbff; }
.library-card-top, .library-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.library-kind-chip, .freshness, .membership, .publish-chip, .profile-chip { width: fit-content; display: inline-flex; align-items: center; border-radius: 999px; font-size: 10px; font-weight: 700; }
.library-kind-chip { padding: 5px 8px; color: #284f9e; background: #edf2ff; font-family: var(--mono); letter-spacing: .04em; }
.freshness { padding: 5px 8px; color: #475467; background: #f2f4f7; }
.freshness-fresh { color: #05634f; background: #eaf8f4; }
.freshness-aging { color: #7a4d08; background: #fff4d9; }
.freshness-stale, .freshness-missing { color: #8f2d25; background: #fff0ee; }
.library-card > p { margin: 18px 0 5px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .04em; }
.library-card h3 { margin: 0; font-size: clamp(20px, 2vw, 27px); letter-spacing: -.035em; }
.library-card dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 20px 0 14px; }
.library-card dl div { min-width: 0; display: grid; gap: 5px; padding: 10px; border: 1px solid #e3e8ef; border-radius: 8px; background: #f9fbfd; }
.library-card dt { color: var(--muted); font-size: 9px; }
.library-card dd { overflow: hidden; margin: 0; font-family: var(--mono); font-size: 17px; font-weight: 700; text-overflow: ellipsis; }
.library-card-signals { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.library-card-signals span { padding: 6px 8px; border-radius: 7px; color: #475467; background: #f2f4f7; font-size: 9px; }
.library-card-signals b { color: var(--ink); font-family: var(--mono); }
.library-theme-preview { display: grid; gap: 4px; margin: 0 0 16px; padding: 10px 12px; border-left: 3px solid #a9bbff; background: #f7f9ff; }
.library-theme-preview strong { color: var(--ink); font-size: 10px; }
.library-theme-preview span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.library-card-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid #e6ebf1; }
.library-card-foot > span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.library-card-foot a { min-height: 44px; display: inline-flex; align-items: center; flex: 0 0 auto; color: var(--blue-strong); font-size: 11px; font-weight: 700; text-decoration: none; }
.library-method-note { display: grid; gap: 5px; margin-top: 16px; padding: 15px 17px; border-left: 4px solid var(--signal); border-radius: 0 10px 10px 0; color: #31524b; background: #eef8f5; }
.library-method-note strong { font-size: 12px; }
.library-method-note p { margin: 0; font-size: 11px; line-height: 1.65; }
.library-breadcrumb { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.library-breadcrumb a { min-height: 44px; display: inline-flex; align-items: center; color: var(--blue-strong); text-decoration: none; }
.library-detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 22px 0 18px; border-bottom: 1px solid var(--line); }
.library-detail-header h2 { margin: 6px 0; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.05em; }
.library-detail-header p:last-child { max-width: 760px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.library-detail-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.library-theme-switcher { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 14px 0 0; padding: 14px 16px; border: 1px solid #ccd8ff; border-radius: 12px; background: #f7f9ff; }
.library-theme-switcher label { min-width: 0; display: grid; gap: 3px; }
.library-theme-switcher label span { color: var(--ink); font-size: 12px; font-weight: 700; }
.library-theme-switcher label small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.library-theme-switcher select { width: min(360px, 42vw); min-height: 44px; border: 1px solid #aebed1; border-radius: 9px; padding: 0 38px 0 12px; color: var(--ink); background: #fff; font: 600 12px/1.4 var(--font); }
.library-health-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 16px 0; }
.library-health-grid article { min-width: 0; display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.library-health-grid span { color: var(--muted); font-size: 10px; }
.library-health-grid strong { font-family: var(--mono); font-size: clamp(22px, 2.5vw, 31px); }
.library-health-grid small { color: #667085; font-size: 9px; line-height: 1.5; }
.library-health-grid.is-structure-only article:nth-child(2) { border-color: #ead7a5; background: #fffaf0; }
.library-tabs { display: flex; gap: 4px; margin: 18px 0; padding: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: #e9eef4; scrollbar-width: thin; }
.library-tabs a { min-width: 118px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: 1 0 auto; border-radius: 7px; color: #556176; font-size: 11px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.library-tabs a[aria-current="page"] { color: var(--blue-strong); background: #fff; box-shadow: 0 1px 3px rgba(23, 32, 51, .08); }
.library-overview-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 13px; margin-bottom: 13px; }
.library-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.library-profile-grid article { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; padding: 12px; border: 1px solid #e1e7ef; border-radius: 9px; background: #fafcff; }
.library-profile-grid strong { grid-row: 1 / 3; align-self: center; color: var(--blue-strong); font-family: var(--mono); font-size: 24px; }
.library-profile-grid span { font-size: 11px; font-weight: 700; }
.library-profile-grid p { grid-column: 1 / -1; margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.library-policy dl { display: grid; gap: 6px; margin: 0; }
.library-policy dl div { padding: 9px 10px; border-radius: 8px; background: #f5f7fa; }
.library-policy dt { color: var(--ink); font-size: 10px; font-weight: 700; }
.library-policy dd { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.library-review-list { display: grid; gap: 7px; }
.library-review-list article { min-width: 0; display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #e1e7ef; border-radius: 8px; }
.library-review-list article > div { min-width: 0; display: grid; gap: 3px; }
.library-review-list strong, .library-review-list span, .library-review-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-review-list strong { font-family: var(--mono); font-size: 10px; }
.library-review-list span, .library-review-list p { font-size: 10px; }
.library-review-list small, .library-review-list p { color: var(--muted); }
.library-review-list p { margin: 0; line-height: 1.5; }
.library-review-list a { min-height: 44px; display: inline-flex; align-items: center; color: var(--blue-strong); font-size: 10px; font-weight: 700; }
.library-table-status { margin: 0 0 9px; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.library-keyword-list { display: grid; gap: 8px; }
.library-keyword-row { min-width: 0; display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(180px, .9fr) minmax(260px, 1.1fr) minmax(180px, .8fr) minmax(190px, .9fr); gap: 12px; padding: 14px; border: 1px solid #dce3eb; border-radius: 10px; background: #fff; }
.library-keyword-row > div { min-width: 0; display: grid; align-content: start; gap: 7px; }
.library-keyword-name .keyword-link { width: fit-content; min-height: 44px; padding: 0; font-size: 13px; text-align: left; }
.library-keyword-row small, .library-keyword-row p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }
.profile-chip { padding: 6px 8px; }
.profile-positive { color: #05634f; background: #e8f7f2; }
.profile-pending { color: #76520b; background: #fff5d9; }
.profile-negative { color: #8f2d25; background: #fff0ee; }
.library-keyword-profile em { color: #475467; font-size: 9px; font-style: normal; }
.library-keyword-metrics dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0; }
.library-keyword-metrics dl div { min-width: 0; display: grid; gap: 3px; padding: 7px; border-radius: 7px; background: #f6f8fb; }
.library-keyword-metrics dt { color: var(--muted); font-size: 8px; }
.library-keyword-metrics dd { overflow: hidden; margin: 0; font-family: var(--mono); font-size: 11px; font-weight: 700; text-overflow: ellipsis; }
.library-keyword-use span { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 7px; color: #475467; font-size: 9px; }
.library-keyword-use b { color: var(--blue-strong); font-family: var(--mono); }
.library-inline-review { display: grid; gap: 7px; margin-top: 4px; padding-top: 9px; border-top: 1px solid #e5eaf0; }
.library-inline-review label { min-width: 0; display: grid; gap: 4px; color: #667085; font-size: 8px; font-weight: 650; }
.library-inline-review select, .library-inline-review input[type="text"], .library-inline-review input:not([type]) { width: 100%; min-height: 40px; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 7px; color: var(--ink); background: #fff; font-size: 10px; }
.library-inline-review .inline-override { display: flex; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.library-inline-review .inline-override input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.library-inline-review .library-review-hint { color: #667085; }
.library-inline-review button { width: 100%; min-height: 40px; }
.publish-chip { padding: 6px 8px; }
.publish-ready { color: #05634f; background: #e8f7f2; }
.publish-blocked { color: #76520b; background: #fff5d9; }
.library-member-table td strong, .library-member-table td small, .library-member-table td em { display: block; }
.library-member-table td small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.library-member-table td em { margin-top: 5px; color: #76520b; font-size: 8px; font-style: normal; font-weight: 700; }
.library-member-table .row-actions button { min-height: 44px; }
.membership { padding: 5px 7px; }
.membership-included, .evidence-yes { color: #05634f; background: #e8f7f2; }
.membership-review { color: #76520b; background: #fff5d9; }
.membership-excluded, .evidence-no { color: #8f2d25; background: #fff0ee; }
.evidence-yes, .evidence-no { display: inline-flex; padding: 5px 7px; border-radius: 999px; font-size: 9px; font-weight: 700; }
.library-evidence-intro { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; padding: 13px 15px; border-left: 4px solid var(--signal); border-radius: 0 9px 9px 0; background: #eef8f5; }
.library-evidence-intro strong { font-size: 11px; }
.library-evidence-intro span { color: #45655e; font-size: 9px; }
.library-pack-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; margin-bottom: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.library-pack-controls label { min-width: 180px; display: grid; gap: 5px; color: #475467; font-size: 10px; font-weight: 650; }
.library-pack-controls select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.library-pack-layers { display: grid; gap: 9px; margin-bottom: 13px; }
.library-pack-layers article { display: grid; grid-template-columns: minmax(190px, .28fr) minmax(0, 1fr); border: 1px solid #dce3eb; border-radius: 10px; background: #fff; overflow: hidden; }
.library-pack-layers header { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 4px 9px; align-content: center; padding: 14px; color: #fff; background: var(--ink); }
.library-pack-layers header > span { width: 30px; height: 30px; grid-row: 1 / 3; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; font-family: var(--mono); font-size: 10px; }
.library-pack-layers header div { min-width: 0; display: grid; gap: 3px; }
.library-pack-layers header strong, .library-pack-layers header small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-pack-layers header strong { font-size: 11px; }
.library-pack-layers header small { color: #aab5c4; font-size: 8px; }
.library-pack-layers header b { grid-column: 2; color: #7ee7d3; font-family: var(--mono); font-size: 9px; }
.library-pack-layers article > div { display: flex; flex-wrap: wrap; align-content: center; gap: 6px; padding: 14px; }
.library-pack-layers article > div span { padding: 6px 8px; border: 1px solid #dbe3ec; border-radius: 7px; color: #344054; background: #f8fafc; font-size: 9px; }
.library-pack-layers article > div p, .library-pack-layers article > div em { width: 100%; margin: 0; color: var(--muted); font-size: 9px; font-style: normal; }
.library-pack-controls-preview { display: grid; grid-template-columns: minmax(240px, .35fr) minmax(0, 1fr); border: 1px solid #ead7a5; border-radius: 10px; background: #fffdf7; overflow: hidden; }
.library-pack-controls-preview > header { display: grid; gap: 5px; align-content: center; padding: 14px; color: #62440b; background: #fff4d7; }
.library-pack-controls-preview > header div { display: grid; gap: 4px; }
.library-pack-controls-preview > header strong { font-size: 11px; }
.library-pack-controls-preview > header small { color: #765c28; font-size: 8px; line-height: 1.5; }
.library-pack-controls-preview > header b { font-family: var(--mono); font-size: 9px; }
.library-pack-controls-preview > div { display: flex; flex-wrap: wrap; align-content: center; gap: 7px; padding: 14px; }
.library-pack-controls-preview > div > span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #e2cfa5; border-radius: 7px; color: #62440b; background: #fff; font-size: 9px; }
.library-pack-controls-preview > div > span b { font-size: 8px; }
.library-pack-controls-preview > div > p { margin: 0; color: var(--muted); font-size: 9px; }
.library-pack-controls-preview .control-exclude { opacity: .75; text-decoration: line-through; }

@media (max-width: 1240px) {
  .kc-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipeline-health-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .evidence-rail { grid-template-columns: repeat(5, minmax(100px, 1fr)); gap: 5px; }
  .evidence-rail > i { display: none; }
  .library-keyword-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-keyword-publish { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .kc-hero { align-items: flex-start; flex-direction: column; }
  .kc-overview-grid, .category-source-grid, .keyword-detail-layout { grid-template-columns: 1fr; }
  .category-source-grid fieldset + fieldset { border-top: 1px solid #e4e9f0; border-left: 0; }
  .evidence-rail { grid-template-columns: 1fr; gap: 10px; }
  .evidence-rail > div { grid-template-columns: 30px 1fr; }
  .evidence-rail small { white-space: normal; }
  .keyword-fact-card { position: static; }
  .score-guide-grid { grid-template-columns: 1fr; }
  .decision-flow { grid-template-columns: 1fr 1fr; }
  .library-card-grid, .library-overview-grid { grid-template-columns: 1fr; }
  .library-card-child { margin-left: 18px; }
  .library-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-detail-header { align-items: flex-start; flex-direction: column; }
  .library-detail-actions { width: 100%; justify-content: space-between; }
  .library-keyword-row { grid-template-columns: 1fr; }
  .library-keyword-publish { grid-column: auto; }
  .library-pack-layers article { grid-template-columns: 1fr; }
  .library-pack-controls-preview { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kc-workspace { padding: 24px 14px 80px; }
  .kc-hero h1 { font-size: 34px; }
  .kc-hero-actions, .kc-hero-actions button { width: 100%; }
  .kc-view-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kc-view-nav a { flex: none; }
  .kc-kpi-grid { grid-template-columns: 1fr 1fr; }
  .pipeline-health-grid { grid-template-columns: 1fr 1fr; }
  .kc-kpi { min-height: 118px; padding: 14px; }
  .kc-section-heading { min-height: 0; flex-direction: column; }
  .product-line-scope-note { flex-direction: column; }
  .product-line-toolbar { align-items: stretch; flex-direction: column; }
  .product-line-toolbar label { min-width: 0; width: 100%; flex-basis: auto; }
  .product-line-toolbar input, .product-line-toolbar select { font-size: 16px; }
  .product-line-pager { width: 100%; justify-content: stretch; }
  .product-line-pager span { flex: 1; text-align: left; }
  .product-line-pager button { min-height: 44px; }
  .mini-grid, .kc-dialog #import-form { grid-template-columns: 1fr; }
  .kc-command-bar, .kc-filter-bar { align-items: stretch; flex-direction: column; }
  .kc-command-bar label, .kc-filter-bar label { flex-basis: auto; }
  .kc-command-bar #job-geo-states-label { flex-basis: auto; }
  .kc-command-bar input, .kc-command-bar select, .kc-command-bar textarea, .kc-filter-bar input, .kc-filter-bar select, .kc-dialog input, .kc-dialog select { font-size: 16px; }
  .kc-command-bar button, .kc-filter-bar button { width: 100%; }
  .bulk-review-bar { top: 4px; }
  .bulk-review-bar strong, .bulk-review-bar label { width: 100%; }
  .bulk-review-bar button { flex: 1 1 70px; }
  .review-action-help { align-items: flex-start; flex-wrap: wrap; }
  .review-action-help > strong, .review-action-definitions { width: 100%; }
  .review-action-definitions { grid-template-columns: 1fr; }
  .review-action-help a { margin-left: 0; }
  .negative-root-panel { align-items: stretch; flex-direction: column; }
  .negative-root-list { justify-content: flex-start; }
  .review-heading-actions { width: 100%; justify-content: space-between; }
  .review-heading-actions button { flex: 1 1 auto; }
  .pipeline-health .panel-heading { flex-direction: column; }
  .pipeline-health .panel-heading > span { max-width: none; text-align: left; }
  .score-guide > summary { align-items: flex-start; flex-direction: column; gap: 7px; }
  .score-guide > summary b { min-width: 0; text-align: left; }
  .score-guide-intro { flex-direction: column; }
  .decision-flow { grid-template-columns: 1fr; }
  .decision-context { align-items: stretch; flex-direction: column; }
  .decision-context label { min-width: 0; width: 100%; }
  .review-pager { justify-content: stretch; }
  .review-pager button { flex: 1; }
  .review-pager span { min-width: 0; }
  .library-search > div { grid-template-columns: 1fr; }
  .library-search input { font-size: 16px; }
  .library-search button { width: 100%; }
  .library-card { padding: 17px; }
  .library-card-child { margin-left: 0; }
  .library-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-card-foot, .library-evidence-intro { align-items: flex-start; flex-direction: column; }
  .library-card-foot a { width: 100%; justify-content: flex-end; }
  .library-theme-switcher { align-items: stretch; flex-direction: column; }
  .library-theme-switcher select { width: 100%; font-size: 16px; }
  .library-health-grid, .library-profile-grid { grid-template-columns: 1fr; }
  .library-detail-actions { align-items: stretch; flex-direction: column; }
  .library-detail-actions button { width: 100%; }
  .library-review-list article { grid-template-columns: 1fr; }
  .library-review-list strong, .library-review-list span, .library-review-list small { white-space: normal; }
  .library-keyword-metrics dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-pack-controls { align-items: stretch; flex-direction: column; }
  .library-pack-controls label, .library-pack-controls button { width: 100%; }
  .table-wrap { overflow: visible; }
  .kc-table, .kc-table tbody { display: block; }
  .kc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .kc-table tr { display: block; margin-bottom: 9px; padding: 8px 11px; border: 1px solid #dce3eb; border-radius: 9px; background: white; }
  .kc-table td { max-width: none; display: grid; grid-template-columns: minmax(85px, .38fr) minmax(0, 1fr); gap: 9px; align-items: start; padding: 8px 0; border-bottom: 1px solid #edf0f4; overflow-wrap: anywhere; }
  .kc-table td:last-child { border-bottom: 0; }
  .kc-table td::before { content: attr(data-label); color: var(--muted); font-family: var(--mono); font-size: 8px; }
  .kc-table td[colspan] { display: block; }
  .kc-table td[colspan]::before { display: none; }
  .truncate-id { max-width: 100%; }
  .job-row { grid-template-columns: 32px minmax(0, 1fr); }
  .job-row > b, .job-row > button, .job-row > .job-review-badge { grid-column: 2; justify-self: start; }
  .job-row-actions { grid-column: 2; justify-content: flex-start; }
  .job-row-actions button, .job-asin-history a { min-height: 44px; }
  .geo-review-panel { padding: 11px; }
  .geo-review-form > header, .geo-review-form > footer { align-items: stretch; flex-direction: column; }
  .geo-plan-tools, .geo-plan-tools button, .geo-review-form footer .primary-action { width: 100%; }
  .geo-plan-tools button { flex: 1; }
  .geo-plan-keyword { grid-template-columns: 20px minmax(0, 1fr); }
  .geo-plan-keyword select { grid-column: 2; min-height: 44px; font-size: 16px; }
  .geo-candidate-controls { grid-template-columns: 1fr; }
  .geo-candidate-controls input, .geo-candidate-controls select { min-height: 44px; font-size: 16px; }
  .geo-candidate-step { align-items: stretch; flex-direction: column; }
  .geo-candidate-step > button { width: 100%; min-height: 44px; margin-left: 0; }
  .geo-candidate-item { grid-template-columns: 24px minmax(0, 1fr); padding: 10px 8px; }
  .geo-candidate-heading { flex-direction: column; }
  .geo-candidate-metrics { display: grid; grid-template-columns: 1fr 1fr; }
  .geo-candidate-id a { min-height: 44px; }
  .kc-dialog { padding: 24px 18px; }
  .kc-dialog label:has(input[type="file"]), .import-preview, .dialog-actions { grid-column: auto; }
  .dialog-actions { flex-direction: column; }
  .dialog-actions button { width: 100%; }
  .row-actions a, .row-actions button, .toggle-button, .keyword-link, .related-keywords button, .cpc-control button { min-height: 44px; }
}

/* Listing workflow */
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.topbar-context { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.topbar-context strong { color: var(--ink); font-weight: 650; }
.context-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(8, 122, 101, 0.1); }
.listing-workspace { width: min(1520px, 100%); margin: 0 auto; padding: clamp(28px, 4vw, 56px) clamp(20px, 3.5vw, 52px) 80px; }
.listing-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 30px; }
.listing-hero .eyebrow { margin-bottom: 11px; color: var(--blue-strong); }
.listing-hero h1 { max-width: 790px; margin: 0; font-size: clamp(34px, 4vw, 56px); line-height: 1.08; letter-spacing: -0.055em; text-wrap: balance; }
.listing-hero > div:first-child > p:last-child { max-width: 680px; margin: 15px 0 0; color: var(--muted); line-height: 1.75; }
.inventory-library { margin: -10px 0 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.inventory-library > summary { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 18px; cursor: pointer; list-style: none; }
.inventory-library > summary::-webkit-details-marker { display: none; }
.inventory-library > summary span { display: grid; gap: 3px; }
.inventory-library > summary strong { font-size: 14px; }
.inventory-library > summary small, .inventory-library > summary b { color: var(--muted); font-size: 11px; font-weight: 500; }
.inventory-library[open] > summary { border-bottom: 1px solid var(--line); background: #f8fafc; }
.inventory-library-body { display: grid; gap: 18px; padding: 20px; }
.inventory-library-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.inventory-library-intro p { max-width: 880px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.inventory-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.inventory-admin-grid:has(#inventory-shop-form[hidden]) { grid-template-columns: minmax(0, 1fr); }
.inventory-admin-card { display: grid; align-content: start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.inventory-admin-card > div:first-child p, .inventory-scope-heading p, .inventory-result > div:first-child p { margin: 0 0 4px; color: var(--blue-strong); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .09em; }
.inventory-admin-card h3, .inventory-scope-heading h3, .inventory-result h3 { margin: 0; font-size: 14px; }
.inventory-admin-card > label, .inventory-admin-card > fieldset > legend { display: grid; gap: 6px; color: #344054; font-size: 11px; font-weight: 650; }
.inventory-admin-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.inventory-admin-card fieldset { margin: 0; padding: 0; border: 0; }
.inventory-upload-card { gap: 16px; padding: 18px; border-color: #cfd9e6; background: #f8fafc; box-shadow: inset 3px 0 0 #295bff; }
.inventory-upload-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 2px 2px 0 3px; }
.inventory-upload-header > div { min-width: 0; }
.inventory-upload-header h3 { font-size: 18px; letter-spacing: -.015em; }
.inventory-upload-header h3 + span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.55; }
.inventory-upload-header > b { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #b9c9ff; border-radius: 6px; color: #244aad; background: #eef2ff; font-family: var(--mono); font-size: 9px; letter-spacing: .04em; white-space: nowrap; }
.inventory-upload-flow { display: grid; gap: 10px; }
.inventory-upload-step { min-width: 0; display: grid; gap: 13px; padding: 15px; border: 1px solid #d9e2ec; border-radius: 11px; background: #fff; }
.inventory-upload-step-heading { display: flex; align-items: center; gap: 10px; }
.inventory-upload-step-heading > span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 7px; color: #2148bd; background: #edf2ff; font-family: var(--mono); font-size: 9px; font-weight: 750; }
.inventory-upload-step-heading > div { min-width: 0; display: grid; gap: 2px; }
.inventory-upload-step-heading strong { color: var(--ink); font-size: 12px; }
.inventory-upload-step-heading small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.45; }
.shop-check-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 8px; }
.shop-check-list label { min-width: 0; min-height: 52px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.shop-check-list label:has(input:checked) { border-color: #9fb3ff; background: #f4f6ff; }
.shop-check-list label:has(input:focus-visible), .template-choice-grid label:has(input:focus-visible), .sample-status-options label:has(input:focus-visible), .sample-acceptance-confirmation:has(input:focus-visible) { outline: 3px solid rgba(41, 91, 255, .22); outline-offset: 2px; }
.shop-check-list input, .template-choice-grid input, .sample-status-options input, .sample-acceptance-confirmation input { width: 18px !important; height: 18px !important; min-height: 18px !important; padding: 0 !important; flex: 0 0 auto; margin: 0; accent-color: var(--blue); }
.shop-check-list label span { min-width: 0; display: grid; gap: 2px; }
.shop-check-list small, .selected-file-name { color: var(--muted); font-size: 10px; font-weight: 500; }
.template-choice-grid, .sample-status-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.template-choice-grid label, .sample-status-options label { min-width: 0; min-height: 72px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.template-choice-grid label { grid-template-columns: 18px minmax(0, 1fr) auto; }
.template-choice-grid label:hover, .sample-status-options label:hover, .shop-check-list label:hover { border-color: #aebbd0; }
.template-choice-grid label:has(input:checked), .sample-status-options label:has(input:checked) { border-color: #8ea8ff; background: #f2f5ff; box-shadow: inset 0 0 0 1px rgba(41, 91, 255, .08); }
.template-choice-grid input, .sample-status-options input { margin-top: 1px; }
.template-choice-grid label > span, .sample-status-options label > span { min-width: 0; display: grid; gap: 4px; }
.template-choice-grid strong, .sample-status-options strong { color: #263248; font-size: 11px; line-height: 1.4; }
.template-choice-grid small, .sample-status-options small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.template-choice-grid label > b { align-self: start; padding: 3px 5px; border-radius: 5px; color: #53627a; background: #eef1f5; font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.template-choice-grid label:has(input:checked) > b { color: #244aad; background: #dfe7ff; }
.inventory-sample-options { display: grid; gap: 10px; padding: 12px; border: 1px solid #d8e2f7; border-radius: 10px; background: #f8faff; }
.sample-status-fieldset > legend { width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: #344054; }
.sample-status-fieldset > legend strong { font-size: 11px; }
.sample-status-fieldset > legend small { color: var(--muted); font-size: 9px; font-weight: 500; }
.sample-acceptance-confirmation { min-width: 0; min-height: 56px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 10px; padding: 11px 12px; border: 1px solid #e4cb8f; border-radius: 9px; color: #6b4f13; background: #fffaf0; cursor: pointer; }
.sample-acceptance-confirmation > span { min-width: 0; display: grid; gap: 3px; }
.sample-acceptance-confirmation strong { font-size: 10px; }
.sample-acceptance-confirmation small { color: #785f26; font-size: 9px; font-weight: 500; line-height: 1.5; }
.template-guidance { margin: 0; padding: 10px 12px; border: 1px solid #dbe4f2; border-radius: 8px; color: #41516d; background: #f7f9fc; font-size: 10px; line-height: 1.6; }
.inventory-file-picker { min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px dashed #b8c5d8; border-radius: 10px; background: #f9fbfd; }
.inventory-file-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; color: #295bff; background: #eaf0ff; }
.inventory-file-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.inventory-file-details { min-width: 0; display: grid; gap: 3px; }
.inventory-file-details strong { overflow: hidden; color: #263248; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.inventory-file-details small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.inventory-upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.inventory-upload-actions p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.inventory-upload-actions .primary-action { min-width: 190px; }
.template-upload-error { padding: 10px 11px; border: 1px solid #efc4bf; border-radius: 9px; color: #8b241a; background: #fff5f3; font-size: 11px; line-height: 1.55; }
.template-upload-error:focus { outline: 3px solid rgba(208, 61, 44, .16); outline-offset: 2px; }
.inventory-template-list { display: grid; gap: 7px; }
.inventory-template-list > p { margin: 0; padding: 18px; border: 1px dashed #cbd5e1; border-radius: 9px; color: var(--muted); font-size: 11px; text-align: center; }
.inventory-template-row { min-height: 64px; display: grid; grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.1fr) auto auto; gap: 16px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.inventory-template-row > div { min-width: 0; display: grid; gap: 3px; }
.inventory-template-row strong, .inventory-template-row b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.inventory-template-row small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.template-library-kind { width: fit-content; padding: 3px 5px; border-radius: 5px; color: #284f9e; background: #edf3ff; font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: .04em; }
.template-library-kind.is-sample { color: #6b4f13; background: #fff4d8; }
.template-status-stack { justify-items: end; }
.template-ok, .template-pending, .template-error { justify-self: end; padding: 5px 7px; border: 1px solid #cbe7df; border-radius: 7px; color: #226153; background: #f0faf7; font-size: 9px; }
.template-pending { color: #785813; border-color: #ead7a5; background: #fffaf0; }
.template-error { color: #8b241a; border-color: #efc4bf; background: #fff5f3; }
.inventory-template-actions { display: flex !important; grid-auto-flow: column; grid-template-columns: repeat(3, auto); gap: 6px !important; }
.inventory-template-actions button { min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid #d5dde8; border-radius: 8px; color: #344054; background: #fff; font-size: 10px; font-weight: 700; cursor: pointer; }
.inventory-template-actions button:hover { border-color: #98a7ba; background: #f7f9fc; }
.inventory-template-actions button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.inventory-template-actions button[data-template-action="delete"] { color: #9b2c22; }
.inventory-template-actions button:disabled { color: #98a2b3; border-color: #e5e9ef; background: #f8fafc; cursor: not-allowed; }
.inventory-template-dialog { width: min(580px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 32px)); padding: 0; overflow: auto; border: 1px solid #b9c8de; border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 28px 80px rgba(23, 32, 51, .24); }
.inventory-template-dialog::backdrop { background: rgba(23, 32, 51, .52); backdrop-filter: blur(3px); }
.inventory-template-dialog[open] { animation: inventory-dialog-in .2s cubic-bezier(.2, .8, .2, 1) both; }
.inventory-template-dialog form { display: grid; gap: 16px; padding: 22px; }
.inventory-template-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.inventory-template-dialog-head p { margin: 0 0 4px; color: var(--blue); font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.inventory-template-dialog-head h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.inventory-template-dialog-close { width: 44px; height: 44px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 26px; cursor: pointer; }
.inventory-template-dialog-close:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.inventory-template-dialog-file { min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.inventory-template-dialog-file > span:last-child { min-width: 0; display: grid; gap: 4px; }
.inventory-template-dialog-file strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.inventory-template-dialog-file small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.inventory-template-dialog-note { margin: 0; color: #475467; font-size: 11px; line-height: 1.65; }
.inventory-template-rename-field, .inventory-template-replace-field { display: grid; gap: 7px; color: #344054; font-size: 11px; font-weight: 700; }
.inventory-template-rename-field input { min-height: 44px; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; color: var(--ink); background: #fff; font-size: 14px; }
.inventory-template-rename-field input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(41, 91, 255, .13); }
.inventory-template-rename-field small { color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.5; }
.inventory-template-dialog-warning { padding: 11px 12px; border: 1px solid #ead7a5; border-radius: 9px; color: #6f5418; background: #fffaf0; font-size: 10px; line-height: 1.6; }
.inventory-template-dialog-warning[data-kind="danger"] { color: #8b241a; border-color: #efc4bf; background: #fff5f3; }
.inventory-template-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 2px; }
.inventory-template-dialog-actions button { min-width: 104px; min-height: 44px; }
.inventory-template-dialog-actions .is-danger { background: #b42318; box-shadow: 0 8px 18px rgba(180, 35, 24, .18); }

.listing-mode-tabs { display: grid; grid-template-columns: 1fr 1fr; max-width: 780px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 14px 14px 0 0; background: #e8edf3; overflow: hidden; }
.listing-mode-tabs button { min-height: 82px; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px 20px; border: 0; color: #667085; background: transparent; text-align: left; cursor: pointer; transition: color 0.18s ease, background 0.18s ease; }
.listing-mode-tabs button + button { border-left: 1px solid var(--line); }
.listing-mode-tabs button[aria-selected="true"] { color: var(--blue-strong); background: white; }
.listing-mode-tabs button:disabled { cursor: not-allowed; opacity: .62; }
.listing-mode-tabs button > span { grid-row: 1 / 3; font-family: var(--mono); font-size: 12px; }
.listing-mode-tabs strong { color: currentColor; font-size: 15px; }
.listing-mode-tabs small { color: var(--muted); font-size: 11px; }
.listing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; align-items: start; }
.listing-builder { min-width: 0; border: 1px solid var(--line); border-radius: 0 15px 15px 15px; background: white; }
.task-revision-banner { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 13px; align-items: center; margin: 16px 16px 0; padding: 14px 16px; border: 1px solid #b7c7ff; border-radius: 11px; background: linear-gradient(100deg, #edf2ff, #f8faff); }
.task-revision-banner[hidden] { display: none; }
.task-revision-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; color: #2148bd; background: #fff; box-shadow: inset 0 0 0 1px #c9d5ff; }
.task-revision-icon svg { width: 24px; fill: currentColor; }
.task-revision-banner div { min-width: 0; display: grid; gap: 3px; }
.task-revision-banner p { margin: 0; color: #2148bd; font-family: var(--mono); font-size: 8px; font-weight: 750; letter-spacing: .1em; }
.task-revision-banner h2 { overflow: hidden; margin: 0; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.task-revision-banner div > span { color: #536179; font-size: 10px; line-height: 1.5; }
.listing-builder form { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 650px; }
.inventory-scope { margin-top: 18px; padding: 17px; border: 1px solid #cbd8ff; border-radius: 11px; background: #f8faff; }
.inventory-scope-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.switch-control { min-height: 44px; display: flex; align-items: center; gap: 8px; color: #344054; font-size: 11px; font-weight: 650; }
.switch-control input { width: 18px; height: 18px; }
.inventory-preflight-row { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.inventory-preflight-row p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.inventory-preflight-row p[data-state="success"] { color: var(--signal); }
.inventory-preflight-row p[data-state="error"] { color: var(--danger); }
.inventory-confirmation { min-height: 58px; display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 11px; border: 1px solid #ead7a5; border-radius: 9px; background: #fffaf0; }
.inventory-confirmation input { width: 18px; height: 18px; margin-top: 2px; }
.inventory-confirmation span { display: grid; gap: 3px; }
.inventory-confirmation strong { font-size: 11px; }
.inventory-confirmation small { color: #6b4f13; font-size: 10px; line-height: 1.5; }
.inventory-variant-settings { display: grid; grid-template-columns: 1.1fr .8fr .7fr; gap: 12px; margin: 16px 0; }
.inventory-image-urls { grid-column: 1 / -1; }
.inventory-gtin { margin: 0 0 14px; }
.step-rail { display: grid; align-content: start; gap: 2px; margin: 0; padding: 26px 16px; list-style: none; border-right: 1px solid var(--line); background: #f9fbfd; border-radius: 0 0 0 15px; }
.step-rail button { width: 100%; min-height: 70px; display: grid; grid-template-columns: 32px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 10px; align-items: center; padding: 11px 10px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; text-align: left; cursor: pointer; }
.step-rail button > span { grid-row: 1 / 3; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #c9d3df; border-radius: 50%; font-family: var(--mono); font-size: 10px; }
.step-rail button strong { color: #4f5b6e; font-size: 13px; }
.step-rail button small { font-size: 10px; }
.step-rail button[aria-current="step"] { color: var(--blue-strong); background: #edf2ff; }
.step-rail button[aria-current="step"] > span { color: white; border-color: var(--blue); background: var(--blue); }
.step-rail button[aria-current="step"] strong { color: var(--blue-strong); }
.step-content { min-width: 0; padding: clamp(24px, 3.5vw, 46px); }
.form-step > h2:focus { outline: none; }
.step-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding-bottom: 25px; margin-bottom: 28px; border-bottom: 1px solid #e8edf3; }
.step-heading p { margin: 0 0 7px; color: var(--blue-strong); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.11em; }
.step-heading h2 { margin: 0; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.035em; }
.step-heading > span { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-family: var(--mono); font-size: 10px; white-space: nowrap; }
.field-grid { display: grid; gap: 20px; }
.field-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-span { grid-column: 1 / -1; }
.form-field { min-width: 0; display: grid; align-content: start; gap: 8px; }
.form-field > label, .editor-field > label, .bullet-editor > legend { color: #344054; font-size: 13px; font-weight: 650; }
.form-field > label span, .new-required { color: var(--danger); }
.form-field input, .form-field select, .form-field textarea, .variant-table input, .variant-table select, .listing-editor textarea { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #cbd5e1; border-radius: 9px; color: var(--ink); background: #fff; font-size: 14px; line-height: 1.55; transition: border-color 0.16s ease, box-shadow 0.16s ease; }
.form-field textarea, .listing-editor textarea { min-height: auto; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .variant-table input:focus, .variant-table select:focus, .listing-editor textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(41, 91, 255, 0.13); }
.form-field > small { color: var(--muted); font-size: 11px; line-height: 1.6; }
.form-field > small.field-inline-error { color: var(--danger); }
.form-field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(208, 61, 44, 0.1); }
.choice-fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 26px; padding: 0; border: 0; }
.choice-fieldset legend { grid-column: 1 / -1; margin-bottom: 9px; color: #344054; font-size: 13px; font-weight: 650; }
.choice-card { position: relative; min-height: 94px; display: flex; gap: 12px; align-items: flex-start; padding: 17px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; transition: border-color 0.16s ease, background 0.16s ease; }
.choice-card:has(input:checked) { border-color: #a9bbff; background: #f3f5ff; }
.choice-card input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); }
.choice-card span { display: grid; gap: 6px; }
.choice-card strong { font-size: 14px; }
.choice-card small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.compact-choice { margin: 0; }
.compact-choice .choice-card { min-height: 74px; }
.inline-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.secondary-button, .primary-action, .text-button, .icon-button, .file-button, .paste-image-button { min-height: 44px; border-radius: 9px; font-weight: 650; cursor: pointer; transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, opacity 0.16s ease; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid #cbd5e1; color: #344054; background: white; font-size: 12px; }
.secondary-button:hover { border-color: #9eacc0; background: #f8fafc; }
.primary-action { display: inline-flex; align-items: center; justify-content: center; padding: 0 22px; border: 1px solid var(--blue); color: white; background: var(--blue); font-size: 13px; box-shadow: 0 8px 18px rgba(41, 91, 255, 0.17); }
.primary-action:hover { border-color: var(--blue-strong); background: var(--blue-strong); }
.text-button { padding: 0 10px; border: 0; color: var(--blue-strong); background: transparent; font-size: 12px; }
.text-button:hover { background: #eef2ff; }
.secondary-button:disabled, .primary-action:disabled, .text-button:disabled, .paste-image-button:disabled { cursor: not-allowed; opacity: 0.45; }
.secondary-button:focus-visible, .primary-action:focus-visible, .text-button:focus-visible, .paste-image-button:focus-visible { outline: 3px solid rgba(41, 91, 255, 0.28); outline-offset: 2px; }
.upload-zone { min-height: 150px; display: flex; justify-content: center; align-items: center; gap: 18px; padding: 24px; border: 1px dashed #9eacc0; border-radius: 12px; background: #f8fafc; text-align: left; }
.upload-zone svg { width: 32px; flex: 0 0 auto; fill: var(--blue-strong); }
.upload-zone-copy { display: grid; gap: 6px; }
.upload-zone strong { font-size: 14px; }
.upload-zone small { max-width: 440px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.upload-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 7px; }
.paste-image-button { display: inline-flex; align-items: center; justify-content: center; padding: 0 15px; border: 1px solid #8ecfbe; color: #246454; background: #eefaf6; font-size: 12px; }
.paste-image-button:hover { border-color: #5db39e; color: #184c40; background: #e3f7f1; }
.image-paste-status { margin: 9px 0 0; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.retained-image-note { min-height: 72px; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid #b8ddd4; border-radius: 11px; background: #f0faf7; }
.retained-image-note[hidden] { display: none; }
.retained-image-note > span { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #2c7b68; font-size: 15px; font-weight: 750; }
.retained-image-note > div { display: grid; gap: 4px; }
.retained-image-note strong { color: #27584d; font-size: 12px; }
.retained-image-note small { color: #52736b; font-size: 10px; line-height: 1.5; }
.image-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 9px; margin-top: 9px; }
.image-preview { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #eef1f5; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview span { position: absolute; left: 6px; top: 6px; min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; color: white; background: rgba(23, 32, 51, 0.82); font-family: var(--mono); font-size: 9px; }
.image-preview-remove { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; color: white; background: rgba(23, 32, 51, 0.82); }
.image-preview-remove:hover { background: var(--danger); }
.image-preview-remove svg { width: 16px; fill: currentColor; }
.variant-generator { display: grid; grid-template-columns: 1fr 1fr 0.75fr; gap: 14px; align-items: end; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.variant-generator .matrix-button { grid-column: 3; }
.variant-toolbar { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; }
.file-button { width: auto; }
.file-button svg { width: 18px; fill: currentColor; }
.table-wrap, .result-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
.variant-table, .result-variant-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.variant-table { min-width: 650px; }
.variant-table th, .variant-table td, .result-variant-table th, .result-variant-table td { padding: 10px; border-bottom: 1px solid #e8edf3; text-align: left; vertical-align: top; }
.variant-table th, .result-variant-table th { color: var(--muted); background: #f8fafc; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; }
.variant-table tr:last-child td, .result-variant-table tr:last-child td { border-bottom: 0; }
.variant-table input, .variant-table select { min-height: 44px; padding: 8px 9px; font-size: 12px; }
.icon-button { width: 42px; display: grid; place-items: center; border: 0; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--danger); background: #fff1f0; }
.icon-button svg { width: 18px; fill: currentColor; }
.empty-table, .old-variant-note { padding: 34px 20px; color: var(--muted); background: #fbfcfe; font-size: 12px; line-height: 1.7; text-align: center; }
.manual-source { margin-top: 20px; border: 1px solid var(--line); border-radius: 10px; }
.manual-source summary, .result-details summary { min-height: 46px; display: flex; align-items: center; padding: 0 14px; color: #344054; cursor: pointer; font-size: 12px; font-weight: 650; }
.manual-source[open] summary { border-bottom: 1px solid var(--line); }
.manual-source .field-grid { padding: 18px; }
.source-preview { display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: center; margin-top: 18px; padding: 14px; border: 1px solid #cde6df; border-radius: 10px; background: #f5fbf9; }
.source-preview > div { display: grid; gap: 3px; padding-right: 12px; border-right: 1px solid #cde6df; }
.source-preview span { color: var(--muted); font-size: 9px; }
.source-preview strong { color: #31524b; font-family: var(--mono); font-size: 11px; }
.source-preview p { margin: 0; color: #31524b; font-size: 11px; line-height: 1.55; }
.source-preview .source-error { grid-column: 1 / -1; display: flex; border: 0; color: var(--danger); }
.source-preview .source-error strong { color: var(--danger); font-family: var(--font); }
.source-preview__action { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 14px; align-items: center; padding-top: 12px; border-top: 1px solid #cde6df; }
.source-preview__action > span { color: #52736b; font-size: 10px; line-height: 1.55; }
.parent-source-preview { margin-top: 18px; }
.source-ready-state { padding: 6px 9px; border-radius: 7px; color: #246454 !important; background: #dff5ee; font-family: var(--font) !important; font-size: 10px !important; }
.source-extract-button { flex: 0 0 auto; color: #31524b; border-color: #a9d3c8; background: #fff; }
.source-extract-button:hover { color: #23483f; border-color: #75bbaa; background: #edfaf6; }
.extracted-source-note { margin: -8px 0 22px; padding: 12px 14px; border: 1px solid #b8ddd4; border-radius: 9px; color: #31524b; background: #f0faf7; font-size: 11px; line-height: 1.6; }
.submit-checklist { display: grid; gap: 1px; margin-top: 24px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--line); }
.submit-checklist > div { min-height: 82px; display: flex; align-items: center; gap: 15px; padding: 15px 18px; background: white; }
.submit-checklist > div > span { color: var(--blue-strong); font-family: var(--mono); font-size: 11px; }
.submit-checklist p { display: grid; gap: 5px; margin: 0; }
.submit-checklist strong { font-size: 13px; }
.submit-checklist small { color: var(--muted); font-size: 11px; }
.form-actions { grid-column: 2; display: flex; justify-content: flex-end; gap: 10px; align-self: end; padding: 18px clamp(24px, 3.5vw, 46px); border-top: 1px solid var(--line); }
.form-error-summary { grid-column: 1 / -1; margin: 16px 16px 0; padding: 14px 16px; border: 1px solid #efc8c3; border-radius: 10px; color: #7a271a; background: #fff6f4; font-size: 12px; line-height: 1.6; }
.form-error-summary ul { margin: 6px 0 0; padding-left: 18px; }
.task-summary { position: sticky; top: 102px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--ink); color: white; }
.summary-heading p { margin: 0 0 7px; color: #7ee7d3; font-family: var(--mono); font-size: 10px; letter-spacing: 0.11em; }
.summary-heading h2 { margin: 0; font-size: 20px; }
.task-summary dl { margin: 22px 0 0; }
.task-summary dl > div { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.task-summary dt { color: #95a2b5; font-size: 11px; }
.task-summary dd { margin: 0; max-width: 145px; font-family: var(--mono); font-size: 11px; text-align: right; overflow-wrap: anywhere; }
.summary-line { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 24px; }
.summary-line i { height: 3px; background: #49d6bb; }
.summary-line i:nth-child(n+3) { background: rgba(255, 255, 255, 0.16); }
.summary-note { margin: 17px 0 0; color: #9eabbc; font-size: 10px; line-height: 1.65; }

.task-desk { margin-top: 56px; scroll-margin-top: 20px; }
.task-desk-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: 560px; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: white; }
.task-list-panel { min-width: 0; border-right: 1px solid var(--line); background: #f9fbfd; }
.task-list { display: grid; align-content: start; }
.task-row { width: 100%; min-height: 76px; display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 14px 15px; border: 0; border-bottom: 1px solid #e5eaf0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.task-row:hover, .task-row.is-active { background: white; }
.task-row.is-active { box-shadow: inset 3px 0 var(--blue); }
.task-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #98a2b3; }
.task-status-dot.working, .status-badge.working span { background: var(--blue); }
.task-status-dot.success, .status-badge.success span, .status-badge.review span { background: var(--signal); }
.task-status-dot.danger, .status-badge.danger span { background: var(--danger); }
.task-row-copy { min-width: 0; display: grid; gap: 5px; }
.task-row-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.task-row-copy small { color: var(--muted); font-size: 10px; }
.task-row-time { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.task-empty { padding: 38px 24px; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; }
.task-empty--error { color: var(--danger); }
.result-panel { min-width: 0; padding: clamp(22px, 3vw, 38px); }
.result-empty { min-height: 480px; display: grid; place-content: center; justify-items: center; max-width: 470px; margin: auto; text-align: center; }
.result-empty svg { width: 44px; fill: #9aa5b5; }
.result-empty h3 { margin: 18px 0 8px; font-size: 17px; }
.result-empty p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.result-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.status-badge { width: fit-content; display: inline-flex; align-items: center; gap: 7px; min-height: 29px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; color: #4f5b6e; background: #f8fafc; font-size: 10px; }
.status-badge span { width: 7px; height: 7px; border-radius: 50%; background: #98a2b3; }
.result-header h2 { margin: 12px 0 5px; font-size: 22px; }
.result-header p { margin: 0; color: var(--muted); font-size: 11px; }
.result-progress { width: 190px; display: grid; justify-items: end; gap: 6px; }
.result-progress > span { font-family: var(--mono); font-size: 18px; font-weight: 700; }
.result-progress > div { width: 100%; height: 4px; overflow: hidden; border-radius: 4px; background: #e4e9ef; }
.result-progress i { display: block; width: 0; height: 100%; background: var(--blue); transition: width 0.3s ease; }
.result-progress small { color: var(--muted); font-size: 10px; }
.result-error { margin-top: 18px; padding: 13px 14px; border: 1px solid #efc8c3; border-radius: 9px; color: #7a271a; background: #fff6f4; font-size: 12px; line-height: 1.6; }
.result-warning { margin-top: 18px; padding: 13px 14px; border: 1px solid #ead7a5; border-radius: 9px; color: #6b4f13; background: #fffaf0; font-size: 12px; line-height: 1.6; }
.validation-strip { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0; }
.validation-strip span { padding: 6px 8px; border-radius: 7px; font-size: 10px; }
.validation-ok { color: #31524b; background: #edf8f4; }
.validation-issue { color: #7a271a; background: #fff0ee; }
.validation-pending { color: #4f5b6e; background: #f0f3f7; }
.listing-editor { display: grid; gap: 20px; }
.editor-field { position: relative; display: grid; gap: 8px; }
.editor-field > span, .bullet-editor > span { justify-self: end; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.bullet-editor { display: grid; gap: 13px; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 11px; }
.bullet-editor legend { padding: 0 7px; }
.result-details { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.result-details[open] summary { border-bottom: 1px solid var(--line); }
.result-table-wrap { border: 0; border-radius: 0; }
.result-variant-table { min-width: 900px; }
.result-variant-table textarea { min-width: 220px; min-height: 82px; font-size: 11px; }
#change-summary { display: grid; gap: 1px; background: var(--line); }
#change-summary article { display: grid; gap: 10px; padding: 16px; background: white; }
#change-summary article > strong { color: var(--blue-strong); font-size: 12px; }
#change-summary article > div { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 7px; }
#change-summary article span { color: var(--muted); font-family: var(--mono); font-size: 9px; }
#change-summary article p { margin: 0; color: #4f5b6e; font-size: 11px; line-height: 1.6; }
#change-summary article small { color: var(--signal); font-size: 10px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 2px; }
.result-actions .edit-task-input { color: #2148bd; border-color: #9fb3fb; background: #f5f7ff; }
.result-actions .edit-task-input:hover { border-color: #6f8df4; background: #edf2ff; }
.inventory-result { display: grid; gap: 13px; padding: 16px; border: 1px solid #cbd8ff; border-radius: 11px; background: #f8faff; }
.inventory-result[data-state="awaiting_input"] { border-color: #e1bd5e; background: #fffaf0; box-shadow: inset 4px 0 0 #d99b15; }
.inventory-result > div:first-child { display: flex; align-items: center; gap: 12px; }
.inventory-result > div:first-child p { margin-right: auto; }
.inventory-result > p { margin: 0; color: #475467; font-size: 11px; line-height: 1.65; }
.inventory-result-status { padding: 5px 8px; border: 1px solid #d7dfe8; border-radius: 7px; color: #475467; background: #fff; font-size: 9px; font-weight: 700; }
.inventory-result-status[data-state="ready"] { color: #226153; border-color: #cbe7df; background: #f0faf7; }
.inventory-result-status[data-state="awaiting_input"] { color: #7a4c00; border-color: #ead08b; background: #fff9e8; }
.inventory-result-status[data-state="draft"], .inventory-result-status[data-state="failed"] { color: #8b241a; border-color: #efc4bf; background: #fff5f3; }
.inventory-result dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 16px; margin: 0; }
.inventory-result dl > div { min-width: 0; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; }
.inventory-result dt { color: var(--muted); font-size: 9px; }
.inventory-result dd { overflow: hidden; margin: 0; color: #344054; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.inventory-result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inventory-result-actions a { text-decoration: none; }
.inventory-supplement-trigger { min-height: 44px; padding: 10px 15px; border: 1px solid #2148bd; border-radius: 8px; color: #fff; background: #2148bd; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; box-shadow: 0 8px 20px rgba(33, 72, 189, .18); }
.inventory-result[data-state="awaiting_input"] .inventory-supplement-trigger { border-color: #9a6200; background: #9a6200; box-shadow: 0 8px 20px rgba(154, 98, 0, .2); }
.inventory-result[data-state="awaiting_input"] .inventory-supplement-trigger:hover { background: #794c00; }
.inventory-supplement-trigger:hover { background: #173a9c; }
.inventory-supplement-trigger:focus-visible { outline: 2px solid #2148bd; outline-offset: 3px; }
.inventory-supplement-dialog { width: min(660px, calc(100vw - 32px)); max-height: min(820px, calc(100dvh - 32px)); padding: 0; overflow: auto; border: 1px solid #b9c8de; border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 28px 80px rgba(23, 32, 51, .24); }
.inventory-supplement-dialog::backdrop { background: rgba(23, 32, 51, .52); backdrop-filter: blur(3px); }
.inventory-supplement-dialog[open] { animation: inventory-dialog-in .2s cubic-bezier(.2, .8, .2, 1) both; }
.inventory-supplement-dialog form { display: grid; }
.inventory-supplement-head { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 13px; padding: 22px 24px 18px; border-bottom: 1px solid #e0e7f0; }
.inventory-supplement-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; color: #2148bd; background: #edf2ff; }
.inventory-supplement-mark svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.inventory-supplement-head p { margin: 0 0 4px; color: #2148bd; font-family: var(--mono); font-size: 9px; font-weight: 750; letter-spacing: .1em; }
.inventory-supplement-head h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.inventory-supplement-close { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 9px; color: #667085; background: transparent; font-size: 25px; cursor: pointer; }
.inventory-supplement-close:hover { color: #172033; background: #f1f4f8; }
.inventory-supplement-close:focus-visible { outline: 2px solid #2148bd; outline-offset: 2px; }
.inventory-supplement-ledger { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 24px 0; padding: 11px 14px 11px 17px; border: 1px solid #cdd9ee; border-left: 4px solid #295bff; border-radius: 9px; background: #f7f9ff; }
.inventory-supplement-ledger strong { font-size: 12px; }
.inventory-supplement-ledger span { color: #526079; font-size: 10px; text-align: right; }
.inventory-supplement-note { margin: 12px 24px 0; color: #526079; font-size: 11px; line-height: 1.65; }
.inventory-supplement-errors { margin: 14px 24px 0; padding: 12px 14px; border: 1px solid #efc4bf; border-radius: 9px; color: #8b241a; background: #fff5f3; font-size: 11px; line-height: 1.55; }
.inventory-supplement-errors strong { display: block; margin-bottom: 5px; }
.inventory-supplement-errors a { display: block; color: inherit; }
.inventory-supplement-errors:focus { outline: 2px solid #b42318; outline-offset: 2px; }
.inventory-supplement-fields { display: grid; gap: 0; margin: 18px 24px 0; border: 1px solid #d9e2ec; border-radius: 11px; overflow: hidden; }
.inventory-supplement-field { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 17px; background: #fff; }
.inventory-supplement-field + .inventory-supplement-field { border-top: 1px solid #e3e9f1; }
.inventory-supplement-index { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: #2148bd; background: #edf2ff; font-family: var(--mono); font-size: 9px; font-weight: 750; }
.inventory-supplement-control { min-width: 0; display: grid; gap: 7px; }
.inventory-supplement-group { width: fit-content; padding: 3px 7px; border: 1px solid #ead08b; border-radius: 999px; color: #7a4c00; background: #fff9e8; font-family: var(--mono); font-size: 9px; font-weight: 700; }
.inventory-supplement-control label { color: #263248; font-size: 12px; font-weight: 750; }
.inventory-supplement-control label span { color: #b42318; }
.inventory-supplement-control input, .inventory-supplement-control select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #bfcbd9; border-radius: 8px; color: #172033; background: #fff; font: inherit; font-size: 13px; }
.inventory-supplement-control input:focus, .inventory-supplement-control select:focus { outline: 2px solid #295bff; outline-offset: 1px; border-color: #295bff; }
.inventory-supplement-control input[aria-invalid="true"], .inventory-supplement-control select[aria-invalid="true"] { border-color: #b42318; background: #fff9f8; }
.inventory-supplement-control small { color: #667085; font-size: 10px; line-height: 1.55; }
.inventory-supplement-control small b { color: #344054; font-weight: 650; }
.inventory-supplement-field-error { margin: 0; color: #b42318; font-size: 10px; line-height: 1.45; }
.inventory-supplement-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; padding: 16px 24px 20px; border-top: 1px solid #e0e7f0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); }
@keyframes inventory-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.export-actions { display: flex; align-items: center; gap: 8px; padding-top: 17px; border-top: 1px solid var(--line); }
.export-actions span { margin-right: 5px; color: var(--muted); font-size: 10px; }
.export-actions a { min-width: 44px; min-height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--blue-strong); font-family: var(--mono); font-size: 10px; font-weight: 700; text-decoration: none; }
.export-actions a:hover { border-color: #a9bbff; background: #f3f5ff; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: min(420px, calc(100vw - 32px)); padding: 13px 16px; border: 1px solid #b8ddd4; border-radius: 10px; color: #31524b; background: #f0faf7; box-shadow: 0 16px 42px rgba(23, 32, 51, 0.16); font-size: 12px; }
.toast[data-kind="error"] { color: #7a271a; border-color: #efc8c3; background: #fff6f4; }

@media (max-width: 1260px) {
  .listing-layout { grid-template-columns: 1fr; }
  .inventory-admin-grid { grid-template-columns: 1fr; }
  .task-summary { position: static; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 0 28px; }
  .task-summary dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; margin-top: 0; }
  .summary-line, .summary-note { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .topbar-context { display: none; }
  .listing-workspace { padding-inline: 24px; }
  .listing-hero { align-items: flex-start; }
  .listing-builder form { grid-template-columns: 158px minmax(0, 1fr); }
  .step-content { padding: 28px; }
  .form-actions { padding-inline: 28px; }
  .task-desk-grid { grid-template-columns: 250px minmax(0, 1fr); }
  .variant-generator { grid-template-columns: 1fr 1fr; }
  .variant-generator .matrix-button { grid-column: auto; }
}
@media (max-width: 760px) {
  .listing-workspace { padding: 24px 16px 64px; }
  .listing-hero { display: grid; }
  .inventory-library-body { padding: 16px; }
  .inventory-upload-card { padding: 14px; }
  .inventory-upload-actions { align-items: stretch; flex-direction: column; }
  .inventory-upload-actions .primary-action { width: 100%; }
  .listing-mode-tabs { max-width: none; }
  .listing-mode-tabs button { min-height: 76px; padding: 13px; grid-template-columns: 25px 1fr; column-gap: 7px; }
  .listing-builder { border-radius: 13px; }
  .task-revision-banner { grid-template-columns: 38px minmax(0, 1fr); margin: 12px; }
  .task-revision-banner > button { grid-column: 2; justify-self: start; padding-left: 0; }
  .listing-builder form { display: block; min-height: 0; }
  .inventory-library-intro, .inventory-preflight-row { align-items: flex-start; flex-direction: column; }
  .inventory-template-row { grid-template-columns: 1fr; gap: 7px; }
  .inventory-template-row .template-status-stack { justify-items: start; }
  .inventory-template-row .template-ok, .inventory-template-row .template-pending, .inventory-template-row .template-error { justify-self: start; }
  .inventory-template-actions { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .inventory-variant-settings { grid-template-columns: 1fr; }
  .inventory-result dl { grid-template-columns: 1fr; }
  .inventory-supplement-head { padding: 18px; }
  .inventory-supplement-ledger { align-items: flex-start; flex-direction: column; gap: 4px; margin: 14px 18px 0; }
  .inventory-supplement-ledger span { text-align: left; }
  .inventory-supplement-note, .inventory-supplement-errors { margin-right: 18px; margin-left: 18px; }
  .inventory-supplement-fields { margin-right: 18px; margin-left: 18px; }
  .inventory-supplement-field { grid-template-columns: 1fr; padding: 15px; }
  .inventory-supplement-actions { flex-direction: column-reverse; padding: 14px 18px 18px; }
  .inventory-supplement-actions button { width: 100%; }
  .step-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 11px; border-right: 0; border-bottom: 1px solid var(--line); border-radius: 13px 13px 0 0; }
  .step-rail button { min-height: 58px; display: flex; justify-content: center; padding: 7px; }
  .step-rail button > span { grid-row: auto; flex: 0 0 auto; }
  .step-rail button strong, .step-rail button small { display: none; }
  .step-content { padding: 24px 18px; }
  .form-actions { padding: 16px 18px; }
  .field-grid--2, .choice-fieldset, .variant-generator { grid-template-columns: 1fr; }
  .field-span { grid-column: auto; }
  .variant-generator .matrix-button { grid-column: auto; }
  .source-preview { grid-template-columns: 1fr 1fr; }
  .source-preview p { grid-column: 1 / -1; }
  .source-preview__action { align-items: stretch; flex-direction: column; }
  .source-extract-button { width: 100%; }
  .upload-zone { align-items: flex-start; justify-content: flex-start; }
  .task-summary { display: block; }
  .task-summary dl { grid-template-columns: 1fr 1fr; margin-top: 18px; }
  .task-desk-grid { grid-template-columns: 1fr; }
  .task-list-panel { max-height: 310px; overflow-y: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .result-header { display: grid; }
  .result-progress { width: 100%; justify-items: start; }
  .result-actions > button { flex: 1 1 150px; }
}
@media (max-width: 480px) {
  .template-choice-grid, .sample-status-options { grid-template-columns: 1fr; }
  .inventory-upload-header { display: grid; gap: 10px; }
  .inventory-upload-header > b { justify-self: start; }
  .inventory-upload-step { padding: 12px; }
  .template-choice-grid label { grid-template-columns: 18px minmax(0, 1fr); }
  .template-choice-grid label > b { grid-column: 2; justify-self: start; }
  .sample-status-fieldset > legend { display: grid; gap: 3px; }
  .inventory-file-picker { grid-template-columns: 40px minmax(0, 1fr); }
  .inventory-file-picker .file-button { grid-column: 1 / -1; width: 100%; }
  .listing-hero h1 { font-size: 36px; }
  .listing-mode-tabs { grid-template-columns: 1fr; border-radius: 12px; }
  .listing-mode-tabs button + button { border-left: 0; border-top: 1px solid var(--line); }
  .step-heading { display: grid; }
  .step-heading > span { justify-self: start; }
  .inline-control { grid-template-columns: 1fr; }
  .upload-actions { display: grid; grid-template-columns: 1fr; }
  .variant-toolbar { flex-wrap: wrap; }
  .task-summary dl { grid-template-columns: 1fr; }
  .submit-checklist > div { align-items: flex-start; }
  .form-actions { justify-content: stretch; }
  .form-actions button { flex: 1; }
  .result-panel { padding: 20px 15px; }
  .toast { right: 16px; bottom: 16px; }
}

@media (min-width: 981px) and (max-width: 1280px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Lingxing data assistant */
.chat-dialog { width: min(940px, calc(100vw - 32px)); max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0 0 0 auto; padding: 0; overflow: hidden; border: 0; color: var(--ink); background: #fff; box-shadow: -28px 0 70px rgba(23, 32, 51, 0.18); }
.chat-dialog[open] { animation: chat-sheet-in 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.chat-dialog::backdrop { background: rgba(23, 32, 51, 0.44); backdrop-filter: blur(2px); }
.chat-shell { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: 238px minmax(0, 1fr); overflow: hidden; }
.chat-history { min-width: 0; display: flex; flex-direction: column; padding: 20px 14px 16px; overflow: hidden; color: #dbe3ef; background: var(--ink); }
.chat-history-head { display: grid; gap: 16px; padding: 0 2px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.11); }
.chat-history-head > div { min-height: 32px; display: flex; align-items: center; gap: 9px; }
.chat-history-head strong { font-size: 14px; }
.chat-history-mark { width: 10px; height: 10px; border-radius: 50%; background: #49d6bb; box-shadow: 0 0 0 5px rgba(73, 214, 187, 0.12); }
.chat-history-head button { min-height: 44px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 9px; color: #fff; background: rgba(255, 255, 255, 0.07); cursor: pointer; font-size: 13px; font-weight: 650; }
.chat-history-head button:hover { background: rgba(255, 255, 255, 0.12); }
.chat-history-list { min-height: 0; display: grid; align-content: start; gap: 5px; padding: 14px 0; overflow-y: auto; }
.chat-history-empty { margin: 8px 6px; color: #9eabba; font-size: 12px; line-height: 1.65; }
.chat-history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-radius: 9px; }
.chat-history-row.is-active { background: rgba(255, 255, 255, 0.1); }
.chat-history-select { min-width: 0; min-height: 52px; display: grid; grid-template-columns: 7px minmax(0, 1fr); gap: 9px; align-items: center; padding: 7px 8px; border: 0; color: #dbe3ef; background: transparent; text-align: left; cursor: pointer; }
.chat-history-select > span:first-child { width: 6px; height: 6px; border-radius: 50%; background: #6f7d91; }
.chat-history-row.is-active .chat-history-select > span:first-child { background: #49d6bb; }
.chat-history-select > span:last-child { min-width: 0; display: grid; gap: 3px; }
.chat-history-select strong, .chat-history-select small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-history-select strong { font-size: 12px; font-weight: 600; }
.chat-history-select small { color: #9eabba; font-size: 10px; }
.chat-history-actions { display: none; padding-right: 5px; }
.chat-history-row:hover .chat-history-actions, .chat-history-row:focus-within .chat-history-actions { display: flex; }
.chat-history-actions button { min-width: 38px; min-height: 38px; padding: 0 5px; border: 0; color: #b8c3d2; background: transparent; cursor: pointer; font-size: 10px; }
.chat-history-actions button:hover { color: #fff; }
.chat-history-actions button.is-danger:hover { color: #ffb4aa; }
.chat-permission-note { display: grid; gap: 5px; margin: auto 2px 0; padding: 14px 12px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 9px; color: #aab5c4; font-size: 11px; line-height: 1.55; }
.chat-permission-note strong { color: #dbe3ef; }
.chat-history-scrim { display: none; }
.chat-panel { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto auto auto; background: #fff; }
.chat-header { min-height: 80px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.chat-title-block { min-width: 0; display: grid; gap: 2px; }
.chat-title-block > p { margin: 0; color: var(--blue-strong); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.12em; }
.chat-title-block h2 { margin: 0; font-size: 18px; letter-spacing: -0.025em; }
.chat-title-block > span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.chat-title-block i { width: 7px; height: 7px; border-radius: 50%; background: #98a2b3; }
.chat-title-block i.is-ready { background: var(--signal); box-shadow: 0 0 0 4px rgba(8, 122, 101, 0.1); }
.chat-icon-button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: #4f5b6e; background: #fff; cursor: pointer; }
.chat-icon-button:hover { color: var(--blue-strong); border-color: #b9c7d8; background: #f8fafc; }
.chat-icon-button svg { width: 21px; fill: currentColor; }
.chat-history-toggle { display: none; }
.chat-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 18px 0; padding: 11px 13px; border: 1px solid #efc8c3; border-radius: 9px; color: #7a271a; background: #fff6f4; }
.chat-banner > div { min-width: 0; display: grid; gap: 3px; }
.chat-banner strong { font-size: 12px; }
.chat-banner span { font-size: 11px; line-height: 1.55; }
.chat-banner a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; color: #fff; background: var(--blue); font-size: 11px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.chat-messages { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px clamp(18px, 3vw, 32px) 18px; scroll-behavior: smooth; }
.chat-empty { max-width: 680px; margin: 32px auto; text-align: center; }
.chat-empty-mark { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 15px; color: var(--blue-strong); background: #eef2ff; }
.chat-empty-mark svg { width: 35px; fill: currentColor; }
.chat-eyebrow { margin: 0 0 8px; color: var(--blue-strong); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; }
.chat-empty h3 { margin: 0; font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.035em; }
.chat-empty > p:not(.chat-eyebrow) { max-width: 590px; margin: 12px auto 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.chat-prompts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 28px; text-align: left; }
.chat-prompts button { min-height: 78px; display: grid; gap: 6px; align-content: center; padding: 14px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; cursor: pointer; text-align: left; transition: border-color 0.18s ease, background 0.18s ease; }
.chat-prompts button:hover { border-color: #a9bbff; background: #f5f7ff; }
.chat-prompts strong { font-size: 13px; }
.chat-prompts span { color: var(--muted); font-size: 11px; }
.chat-message { max-width: 100%; margin-bottom: 24px; overflow-wrap: anywhere; }
.chat-message--user { width: fit-content; max-width: 88%; margin-left: auto; padding: 12px 14px; border-radius: 13px 13px 3px 13px; background: #eef2ff; }
.chat-message--assistant { padding-right: 8px; }
.chat-message.has-error { padding: 12px 14px; border: 1px solid #efc8c3; border-radius: 10px; background: #fff7f5; }
.chat-message-label { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.chat-message-label strong { font-size: 11px; }
.chat-message-label time { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.chat-user-text, .chat-markdown { font-size: 14px; line-height: 1.75; }
.chat-markdown > :first-child { margin-top: 0; }
.chat-markdown > :last-child { margin-bottom: 0; }
.chat-markdown h1, .chat-markdown h2, .chat-markdown h3 { margin: 1.2em 0 0.45em; line-height: 1.35; }
.chat-markdown h1 { font-size: 21px; }
.chat-markdown h2 { font-size: 18px; }
.chat-markdown h3 { font-size: 16px; }
.chat-markdown p, .chat-markdown ul, .chat-markdown ol { margin: 0.65em 0; }
.chat-markdown pre { max-width: 100%; overflow-x: auto; padding: 13px; border-radius: 9px; color: #e8edf5; background: var(--ink); }
.chat-markdown code { font-family: var(--mono); font-size: 0.9em; }
.chat-markdown table { width: 100%; display: block; overflow-x: auto; border-collapse: collapse; font-size: 12px; }
.chat-markdown th, .chat-markdown td { min-width: 110px; padding: 8px 10px; border: 1px solid var(--line); text-align: left; }
.chat-markdown th { background: #f8fafc; }
.chat-streaming-text::after { content: ""; display: inline-block; width: 7px; height: 15px; margin-left: 3px; vertical-align: -2px; background: var(--blue); animation: chat-caret 0.9s steps(1) infinite; }
.chat-message-files, .chat-attachment-tray { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-message-files { margin-top: 10px; }
.chat-message-files span, .chat-attachment-tray > span { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #fff; font-size: 11px; }
.chat-attachment-tray { padding: 8px 18px 0; }
.chat-attachment-tray > span { display: inline-flex; align-items: center; gap: 6px; background: #f8fafc; }
.chat-attachment-tray button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; }
.chat-message-actions { display: flex; gap: 5px; margin-top: 8px; }
.chat-message-actions button { min-width: 44px; min-height: 44px; padding: 0 9px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; }
.chat-message-actions button:hover { color: var(--blue-strong); background: #eef2ff; }
.chat-source-grid, .chat-artifact-grid { display: grid; gap: 8px; margin-top: 12px; }
.chat-source-grid a, .chat-source-grid > div, .chat-artifact-grid article { min-height: 60px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-content: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: inherit; background: #f9fbfd; text-decoration: none; }
.chat-source-grid span, .chat-artifact-grid span { grid-row: 1 / 3; align-self: center; color: var(--signal); font-family: var(--mono); font-size: 10px; }
.chat-source-grid strong, .chat-artifact-grid strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.chat-source-grid small, .chat-artifact-grid small { color: var(--muted); font-size: 10px; }
.chat-artifact-grid article { grid-template-columns: auto minmax(0, 1fr); }
.chat-artifact-grid img { width: 58px; height: 58px; grid-row: 1 / 4; border-radius: 7px; object-fit: cover; }
.chat-artifact-grid article > div { min-width: 0; display: grid; gap: 3px; }
.chat-artifact-grid p { display: flex; gap: 12px; margin: 3px 0 0; font-size: 11px; }
.chat-artifact-grid a { color: var(--blue-strong); }
.chat-tool-status { min-height: 36px; display: flex; align-items: center; gap: 9px; padding: 3px 22px; color: var(--muted); font-size: 11px; }
.chat-tool-status span { width: 8px; height: 8px; border: 2px solid #b7c2d0; border-top-color: var(--blue); border-radius: 50%; animation: chat-spin 0.8s linear infinite; }
.chat-tool-status p { margin: 0; }
.chat-link-form { margin: 8px 18px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.chat-link-form label { display: block; margin-bottom: 8px; color: #344054; font-size: 12px; font-weight: 650; }
.chat-link-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.chat-link-form input { min-width: 0; min-height: 44px; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; }
.chat-link-form button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 8px; color: #fff; background: var(--blue); cursor: pointer; font-size: 12px; font-weight: 650; }
.chat-link-form p { margin: 8px 0 0; color: var(--danger); font-size: 11px; }
.chat-composer { margin: 10px 18px 0; padding: 11px; border: 1px solid #bdc9d8; border-radius: 12px; background: #fff; box-shadow: 0 10px 28px rgba(23, 32, 51, 0.08); }
.chat-composer:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(41, 91, 255, 0.12), 0 10px 28px rgba(23, 32, 51, 0.08); }
.chat-composer textarea { width: 100%; min-height: 48px; max-height: 150px; padding: 4px 5px 8px; resize: none; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; line-height: 1.6; }
.chat-composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-composer-actions > div { display: flex; align-items: center; gap: 5px; }
.chat-action-button { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border: 0; border-radius: 8px; color: #4f5b6e; background: transparent; cursor: pointer; font-size: 11px; }
.chat-action-button:hover { color: var(--blue-strong); background: #eef2ff; }
.chat-action-button svg { width: 18px; fill: currentColor; }
.chat-send-button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; color: #fff; background: var(--blue); cursor: pointer; }
.chat-send-button:hover { background: var(--blue-strong); }
.chat-send-button:disabled { cursor: not-allowed; opacity: 0.42; }
.chat-send-button svg { grid-area: 1 / 1; width: 20px; fill: currentColor; }
.chat-send-button .chat-stop-icon { display: none; }
.chat-send-button.is-running .chat-send-icon { display: none; }
.chat-send-button.is-running .chat-stop-icon { display: block; }
.chat-composer-note { margin: 7px 22px 13px; color: var(--muted); font-size: 10px; text-align: center; }
.chat-confirm { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; background: rgba(23, 32, 51, 0.55); }
.chat-confirm > div { width: min(100%, 390px); padding: 24px; border-radius: 13px; background: #fff; box-shadow: var(--shadow-panel); }
.chat-confirm h3 { margin: 0; font-size: 20px; }
.chat-confirm p { margin: 10px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.chat-confirm > div > div { display: flex; justify-content: flex-end; gap: 9px; }
.chat-confirm button { min-width: 78px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
#chat-delete-apply { color: #fff; border-color: var(--danger); background: var(--danger); }

@keyframes chat-sheet-in { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: translateX(0); } }
@keyframes chat-spin { to { transform: rotate(360deg); } }
@keyframes chat-caret { 50% { opacity: 0; } }

@media (max-width: 760px) {
  .chat-dialog { width: 100vw; height: 100dvh; margin: 0; }
  .chat-shell { display: block; }
  .chat-panel { width: 100%; height: 100%; }
  .chat-history { width: min(86vw, 310px); position: absolute; inset: 0 auto 0 0; z-index: 3; transform: translateX(-105%); transition: transform 0.2s ease; box-shadow: 18px 0 44px rgba(23, 32, 51, 0.22); }
  .chat-dialog.is-history-open .chat-history { transform: translateX(0); }
  .chat-history-scrim { position: absolute; inset: 0; z-index: 2; border: 0; background: rgba(23, 32, 51, 0.35); }
  .chat-dialog.is-history-open .chat-history-scrim { display: block; }
  .chat-history-toggle { display: grid; }
  .chat-header { min-height: 72px; padding: 10px 12px; }
  .chat-title-block h2 { font-size: 16px; }
  .chat-messages { padding: 18px 14px 12px; }
  .chat-empty { margin: 18px auto; }
  .chat-prompts { grid-template-columns: 1fr; }
  .chat-message--user { max-width: 92%; }
  .chat-link-form, .chat-composer { margin-inline: 12px; }
  .chat-link-form > div { grid-template-columns: 1fr; }
  .chat-link-form input, .chat-composer textarea { font-size: 16px; }
  .chat-composer-note { margin-bottom: max(10px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .chat-dialog[open], .chat-streaming-text::after, .chat-tool-status span, .inventory-supplement-dialog[open], .inventory-template-dialog[open] { animation: none; }
  .chat-history { transition: none; }
}
