: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; }
.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; }
  .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; }
}

/* 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; }
.pipeline-state { min-width: 270px; display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 3px 10px; align-items: center; padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.pipeline-state > span { grid-row: 1 / 3; width: 9px; height: 9px; border-radius: 50%; background: #9aa5b5; box-shadow: 0 0 0 4px #eef1f5; }
.pipeline-state strong { font-size: 13px; }
.pipeline-state small { min-width: 0; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.pipeline-state.is-ready > span { background: var(--signal); box-shadow: 0 0 0 4px rgba(8, 122, 101, 0.1); }
.pipeline-state.has-error { border-color: #efc8c3; background: #fff8f7; }
.pipeline-state.has-error > span { background: var(--danger); box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1); }

.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 > 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; }
.listing-builder form { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 650px; }
.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; }
.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 { 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 { cursor: not-allowed; opacity: 0.45; }
.upload-zone { min-height: 130px; display: flex; justify-content: center; align-items: center; gap: 15px; padding: 24px; border: 1px dashed #9eacc0; border-radius: 12px; background: #f8fafc; cursor: pointer; text-align: left; }
.upload-zone:hover { border-color: var(--blue); background: #f4f6ff; }
.upload-zone svg { width: 30px; fill: var(--blue-strong); }
.upload-zone span { display: grid; gap: 5px; }
.upload-zone strong { font-size: 14px; }
.upload-zone small { color: var(--muted); font-size: 11px; }
.image-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 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; }
.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); }
.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; }
.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; }
.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; }
  .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; }
  .pipeline-state { width: 100%; min-width: 0; }
  .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; }
  .listing-builder form { display: block; min-height: 0; }
  .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; }
  .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) {
  .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; }
  .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; }
}
