@import url("./design-tokens.css");

:root {
  font-family: var(--font-ui);
  color-scheme: light;
  --filter-fill: var(--surface-subtle); --filter-hover: var(--soft); --filter-active: var(--button-primary);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas-background); color: var(--ink); min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .49; cursor: not-allowed; }
a { text-decoration: none; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
p, h1, h2, h3 { margin: 0; }
p { line-height: 1.65; }
h2 { font-size: var(--size-section); line-height: 1.4; }
h3 { font-size: 1rem; line-height: 1.45; }
small, .muted { color: var(--muted); }
.desk { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; align-self: start; height: 100dvh; overflow-y: auto; background: var(--nav-background); color: var(--nav-ink); display: flex; flex-direction: column; padding: 19px 14px 14px; border-right: 1px solid var(--nav-line); }
.brand { display: grid; justify-items: start; gap: 6px; min-width: 0; padding: 5px 8px 20px; color: var(--ink); }
.brand-logo { position: relative; display: block; width: min(156px, 100%); aspect-ratio: 4.7; overflow: hidden; }
.brand-logo img { position: absolute; width: 115%; height: auto; inset: 50% auto auto -8%; transform: translateY(-50%); }
.brand small { color: var(--nav-ink); font-size: .77rem; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav + nav { padding-top: 12px; }
.nav-group { color: var(--nav-ink); font-size: .72rem; font-weight: 740; padding: 0 11px 2px; }
.sidebar nav a { display: flex; align-items: center; padding: 9px 11px; gap: 10px; border: 1px solid transparent; border-radius: 11px; font-size: var(--size-body); font-weight: 550; min-height: 43px; transition: background .18s, color .18s; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { color: var(--accent-hover); background: var(--nav-active); }
.sidebar nav a[aria-current] { border-color: #ffffffba; box-shadow: var(--shadow-card); font-weight: 730; }
.ui-icon { flex: 0 0 auto; width: 19px; height: 19px; vertical-align: middle; }
.skip-link { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 8px 12px; border-radius: 8px; background: var(--accent); color: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.sidebar nav .ui-icon { width: 18px; height: 18px; color: #675793; }
.sidebar nav [aria-current] .ui-icon { color: var(--accent); }
.sidebar .manage { margin-top: auto; padding-top: 16px; }
.sidebar-bottom { margin-top: 12px; border-top: 1px solid #d7d0eb; padding: 9px 8px 0; }
.sidebar-bottom p { font-size: .8rem; color: var(--nav-ink); margin: 5px 0 2px; overflow-wrap: anywhere; }
.sidebar .quiet { color: var(--nav-ink); padding: 4px 7px; min-height: 31px; }
.sidebar .quiet:hover, .sidebar .quiet[aria-pressed=true] { background: var(--nav-active); color: var(--accent-hover); }
.lang { display: flex; gap: 5px; }
.desk-main { min-width: 0; }
.top { height: 64px; position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding-inline: clamp(14px,3.1vw,40px); background: #fbfbffdf; backdrop-filter: blur(14px); }
.top-title { display: flex; gap: 4px; align-items: center; font-weight: 730; }
.top-title button { display: none; }
.top-actions { display: flex; align-items: center; gap: 5px; }
.top-actions .quiet, .help-link { min-height: 34px; font-size: .83rem; padding: 5px 9px; color: var(--muted); }
.help-link { display: inline-flex; align-items: center; }
.help-link:hover { color: var(--ink); }
.usage { display: flex; align-items: center; gap: 8px; border: 1px solid #e2d9f7; border-radius: 999px; background: var(--soft); color: #4d3a96; font-size: .79rem; padding: 6px 11px; white-space: nowrap; }
.usage span { border-left: 1px solid #cfc4ea; padding-left: 8px; }
#main { width: min(100%, 1250px); margin-inline: auto; padding: clamp(22px, 4vw, 46px) clamp(13px,3.5vw,42px) 52px; }
#main:focus { outline: none; }
.page-intro { margin-bottom: 21px; }
.page-intro h1 { font-size: var(--size-page); letter-spacing: -.055em; font-weight: 780; line-height: 1.22; }
.page-intro p { color: var(--muted); margin-top: 6px; }
.panel { padding: clamp(15px,2.4vw,23px); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--card); margin-bottom: 15px; }
.setup-controls { padding-top: 13px; }
.setup-controls p { margin-top: 9px; font-size: .85rem; }
.action-row, .actions { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 27px 0 10px; }
.section-title p { color: var(--muted); font-size: .89rem; margin-top: 4px; }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; gap: 11px; }
.card { padding: clamp(12px,2vw,17px); border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--card); display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.card h3 { font-size: 1rem; }
.card > p:not(.eyebrow) { color: var(--muted); font-size: .85rem; }
.card .action-row { padding-top: 6px; margin-top: auto; }
.eyebrow { font-size: .76rem; font-weight: 690; color: var(--accent); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 37px; gap: 6px; padding: 6px 10px; border-radius: var(--radius-control); border: 1px solid transparent; font-size: .86rem; line-height: 1.4; font-weight: 690; transition: background .15s,color .15s,border-color .15s; }
.primary { background: var(--button-primary); color: white; }
.primary:hover { background: var(--button-primary-hover); }
.secondary { background: var(--card); color: var(--accent); border-color: var(--field-line); }
.secondary:hover { background: var(--soft); color: var(--accent-hover); border-color: var(--accent); }
.quiet, .ghost { background: none; color: var(--accent); }
.quiet:hover, .ghost:hover { background: var(--soft); color: var(--accent-hover); }
label { display: grid; align-content: start; gap: 4px; font-size: .87rem; font-weight: 640; }
input:not([type=hidden]), select, textarea { min-width: 0; width: 100%; min-height: 37px; padding: 5px 8px; background: var(--card); color: var(--ink); border: 1px solid var(--field-line); border-radius: var(--radius-control); font-size: .93rem; }
input:not([type=hidden]):focus, select:focus, textarea:focus { border-color: var(--focus); }
input[type=file] { max-width: 100%; }
textarea { resize: vertical; min-height: 72px; }
.form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end; gap: 9px; margin-top: 13px; }
.form > .button { justify-self: start; }
.form label:has(textarea) { grid-column: 1/-1; }
.panel > .muted, .panel > .actions { margin-top: 6px; }
.panel .muted { font-size: .86rem; }
.panel h3 { margin-top: 11px; }
.filter { padding-block: 2px 14px; }
.search { max-width: 440px; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 7px 0 10px; }
.chips .quiet { background: var(--filter-fill); color: var(--filter-active); min-height: 32px; padding: 4px 8px; }
.chips .quiet:hover { background: var(--filter-hover); }
.chips .quiet[aria-pressed=true], .connection-method .quiet[aria-pressed=true] {
  background: var(--filter-active);
  color: white;
}
.empty { color: var(--muted); padding: 11px 0; font-size: .91rem; }
.empty[role="alert"] { color: var(--status-bad); }
.record { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); word-break: break-word; }
.record p { color: var(--muted); font-size: .82rem; }
.record:last-child { border-bottom: 0; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(125px,1fr)); gap: 8px; margin-bottom: 15px; }
.metrics > div { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 11px; }
.metrics span { color: var(--muted); display: block; font-size: .82rem; }
.metrics strong { display: block; font-size: 1.12rem; margin-top: 4px; overflow-wrap: anywhere; }
.plans { grid-template-columns: repeat(2,minmax(0,1fr)); }
.table-wrap { overflow: auto; max-width: 100%; border-top: 1px solid var(--line); margin-top: 9px; }
table { width: 100%; border-collapse: collapse; min-width: 485px; font-size: .86rem; }
table th { background: #f5f5fc; color: var(--muted); }
table th, table td { padding: 8px 9px; border-bottom: 1px solid var(--line); text-align: left; }
table td:first-child { overflow-wrap: anywhere; }
.two-col { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 12px; }
.calendar { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; text-align: center; margin-top: 9px; }
.calendar > span, .calendar button { display: grid; place-items: center; min-height: 32px; position: relative; }
.calendar > span { color: var(--muted); font-size: .8rem; }
.calendar button { background: #f5f5fc; color: var(--ink); border: 1px solid transparent; border-radius: 5px; }
.calendar button[data-has-booking="history"] b { background: var(--muted); }
.calendar button:hover { background: var(--filter-hover); }
.calendar button[aria-pressed=true] { background: var(--filter-active); color: white; }
.calendar b { position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.calendar [aria-pressed=true] b { background: currentColor; }
details { border-bottom: 1px solid var(--line); margin-top: 6px; }
details summary { cursor: pointer; font-weight: 690; padding: 9px 0; }
details summary .eyebrow { margin-left: 7px; }
details > div { padding-block: 0 10px; }
.help-list { max-width: 790px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: .94rem; line-height: 1.65; background: #f5f5fc; padding: 9px; border-radius: 5px; }
.facts { display: grid; gap: 4px; margin-top: 11px; }
.facts div { display: flex; justify-content: space-between; gap: 5px; padding-block: 5px; border-bottom: 1px solid var(--line); }
.facts dd { margin: 0; font-weight: 720; }
.result-number { font-size: 1.85rem; font-weight: 800; color: var(--accent); }
.data-source, .short { margin-top: 9px; color: var(--muted); max-width: 260px; font-size: .85rem; }
.loading, .signin { width: min(540px,calc(100% - 30px)); margin: 10vh auto; }
dialog { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; width: min(510px,calc(100% - 24px)); padding: 15px; }
dialog::backdrop { background: #20184175; backdrop-filter: blur(3px); }
.dialog-title { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 7px; }
.dialog-title button { border: 0; background: var(--soft); color: var(--ink); width: 32px; height: 32px; border-radius: 6px; }
dialog textarea { margin: 8px 0; }
dialog > p { margin-block: 8px; }
#notice { position: fixed; bottom: 13px; right: 13px; padding: 8px 12px; max-width: calc(100% - 26px); background: var(--button-primary); color: white; box-shadow: var(--shadow-float); border-radius: var(--radius-control); z-index: 9; opacity: 0; pointer-events: none; transition: opacity .15s; }
#notice.visible { opacity: 1; }
#notice.failure { background: var(--status-bad); }
@media (max-width: 1040px) {
  .desk { grid-template-columns: 189px minmax(0,1fr); }
  .cards:not(.plans) { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 730px) {
  .desk { display: block; }
  .sidebar { display: none; }
  .sidebar.mobile-open { display: flex; position: fixed; z-index: 6; width: min(230px,78vw); height: calc(100dvh - 55px); top: 55px; box-shadow: 10px 0 30px #19364740; }
  .top { height: 55px; padding-inline: 8px; }
  .top-title button { display: inline-flex; }
  .top-actions { gap: 1px; }
  .top-actions .quiet, .help-link { padding-inline: 4px; }
  .usage { font-size: .71rem; padding-inline: 4px; }
  .usage span { display: none; }
}
@media (max-width: 475px) {
  .two-col, .form, .cards, .cards:not(.plans) { grid-template-columns: 1fr; }
  .section-title { align-items: flex-start; flex-direction: column; gap: 4px; }
  .setup-controls .action-row > label { width: 100%; }
  .top-title span { font-size: .83rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

#main:has(.dashboard) { width: min(100%, 1450px); padding-top: clamp(18px, 2.5vw, 32px); }
.dashboard-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(230px, 20vw, 296px);
  padding: clamp(26px, 4vw, 56px);
  overflow: hidden;
  border: 1px solid #dedcf7;
  border-radius: 24px;
  background: var(--hero-background);
}
.dashboard-hero-copy { max-width: 65%; animation: hero-copy-in .5s ease-out both; }
.dashboard-hero h1 { font-size: clamp(1.86rem, 3.55vw, 3.15rem); line-height: 1.16; font-weight: 790; letter-spacing: -.06em; text-wrap: balance; }
.dashboard-hero h1 span { color: var(--accent); }
.dashboard-hero p { color: var(--muted); font-size: clamp(.85rem, 1.4vw, .99rem); margin-top: 13px; }
.dashboard-cta { gap: 10px; margin-top: 23px; padding-inline: 14px; min-height: 42px; border-radius: 10px; box-shadow: 0 4px 11px #40316430; }
.dashboard-cta .ui-icon { width: 16px; height: 16px; transition: transform .18s; }
.dashboard-cta:hover .ui-icon { transform: translateX(3px); }
@keyframes hero-art-in { from { opacity: .25; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
@keyframes hero-copy-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.dashboard .dashboard-section-title { align-items: center; flex-direction: row; margin: clamp(22px, 2.35vw, 34px) 0 11px; }
.dashboard-section-title h2 { font-size: 1.21rem; font-weight: 760; }
.common-tools-header { align-items: center; flex-direction: row; margin: 0 0 21px; }
#dashboard-tools { scroll-margin-top: 80px; }
.dashboard-section-link { color: var(--accent); font-size: .85rem; font-weight: 690; white-space: nowrap; }
.dashboard-section-link:hover { color: var(--accent-hover); text-decoration: underline; }
.dashboard-section-link .ui-icon { width: 15px; height: 15px; margin-left: 2px; }
.dashboard-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dashboard-tool {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: start;
  min-width: 0;
  min-height: 128px;
  padding: 14px 16px;
  text-align: left;
  color: var(--ink);
  background: linear-gradient(145deg, #fff, #ffffff91);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 2px 8px #49487b07;
  transition: transform .18s, border-color .18s, box-shadow .18s, background .18s;
}
.dashboard-tool:hover, .dashboard-tool[aria-expanded=true] { background: #fff; border-color: #c6b9ef; box-shadow: 0 7px 17px #49487b13; }
.dashboard-tool:hover { transform: translateY(-2px); }
.tool-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #6347be; background: linear-gradient(145deg, #eee8ff, #e6ddfa); }
.tool-icon[data-icon=analytics], .tool-icon[data-icon=ads], .tool-icon[data-icon=compass] { color: #365bb1; background: linear-gradient(145deg, #e8f1ff, #e0eaff); }
.tool-icon[data-icon=robot], .tool-icon[data-icon=file] { color: #6652ab; background: linear-gradient(145deg, #f0ebff, #e5e5ff); }
.tool-affordance { position: absolute; inset: 17px 16px auto auto; color: #796ca3; }
.tool-affordance .ui-icon { width: 17px; height: 17px; transition: transform .18s; }
.dashboard-tool[aria-expanded=true] .tool-affordance .ui-icon { transform: rotate(180deg); }
.dashboard-tool strong { margin-top: 8px; font-size: .94rem; line-height: 1.42; }
.dashboard-tool small { margin-top: 3px; font-size: .8rem; line-height: 1.45; }
.dashboard .setup-controls { padding-top: 12px; scroll-margin-top: 77px; }
.dashboard-cases.cards { gap: 12px; }
.dashboard-cases .card { gap: 7px; border-radius: 16px; background: #ffffffb8; }
.dashboard-cases .card h3 { font-weight: 730; }
.dashboard-cases .card .button { min-height: 33px; font-size: .79rem; }

@media (max-width: 930px) {
  .dashboard-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 535px) {
  .dashboard-hero { align-items: end; min-height: 290px; padding: 19px; border-radius: 19px; }
  .dashboard-hero-copy { max-width: 100%; }
  .dashboard-hero h1 { text-wrap: initial; }
  .dashboard-hero p { max-width: 255px; margin-top: 6px; }
  .dashboard-cta { margin-top: 12px; min-height: 37px; }
  .dashboard-tools { gap: 8px; }
  .dashboard-tool { min-height: 125px; padding: 11px; border-radius: 13px; }
  .tool-affordance { inset: 12px 10px auto auto; }
  .dashboard-tool strong { font-size: .85rem; }
  .dashboard-tool small { font-size: .75rem; }
}

.skills-intro {
  margin-bottom: 17px;
  padding: clamp(17px, 3.4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(110deg, var(--card), var(--soft));
}
.skills-intro h1 {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: var(--size-body);
  font-weight: 730;
}
.skills-intro-title {
  font-size: clamp(1.4rem, 4vw, 3.05rem);
  font-weight: 790;
  line-height: 1.24;
  letter-spacing: -.04em;
}
.skills-intro-title strong { color: var(--accent); font-weight: inherit; }
.skills-intro-description {
  margin-top: 11px;
  color: var(--muted);
  font-size: clamp(.87rem, 1.4vw, 1rem);
}
.skills-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(125px, .34fr);
  align-items: end;
  gap: 11px;
  padding: 15px;
  margin-bottom: 13px;
  background: #ffffffc7;
}
.skills-filter #skills-groups {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.skills-filter .chips .quiet { font-size: .82rem; border-radius: 999px; padding-inline: 10px; }
.skill-result-count { color: var(--muted); font-size: .83rem; margin: 8px 0 11px; }
.skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; align-items: start; }
.skill-card { padding: 15px; gap: 10px; min-height: 178px; border-radius: 16px; background: #ffffffcf; }
.skill-card-head { display: flex; align-items: flex-start; gap: 9px; width: 100%; }
.skill-card-head .tool-icon { flex: 0 0 38px; }
.skill-card-title { flex: 1; min-width: 0; }
.skill-card-title h2 { font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; text-wrap: pretty; }
.skill-featured, .skill-format, .skill-tags span { border-radius: 99px; font-size: .72rem; padding: 2px 7px; line-height: 1.5; }
.skill-format { display: inline-block; margin-top: 3px; color: var(--accent-hover); background: var(--soft); }
.skill-featured { color: #fff; background: var(--accent); font-weight: 730; white-space: nowrap; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.skill-tags span { color: var(--muted); background: #eeedf8; }
.skill-card .skill-description { line-height: 1.55; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.skill-card:has(.skill-expand[aria-expanded=true]) .skill-description { display: block; }
.skill-caption { flex: 1 1 60px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .75rem; }
.skill-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  margin-top: auto;
}
.skill-actions .button { min-height: 33px; padding-inline: 7px; border-radius: 999px; font-size: .76rem; white-space: nowrap; gap: 4px; }
.skill-actions .ui-icon { width: 14px; height: 14px; }
.skill-actions .skill-expand { color: var(--muted); }
.skill-expand[aria-expanded=true] .ui-icon { transform: rotate(180deg); }
.skill-copy { color: var(--accent); }
.skill-details { width: 100%; padding-top: 8px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.skill-detail-label { margin: 5px 0; color: var(--muted); font-size: .79rem; font-weight: 690; }
.skill-question { padding: 10px 12px; margin-bottom: 9px; background: #f6f4fd; color: var(--ink); border-radius: 10px; font-size: .86rem; line-height: 1.6; overflow-wrap: anywhere; }
.skill-preparation { margin-top: 7px; color: var(--muted); font-size: .79rem; }
.skill-resources { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.skill-resources .button { min-height: 31px; }
.skill-preview { font-size: .88rem; }
.skill-preview h3 { margin-top: 13px; }
.skill-preview .muted { margin-top: 7px; font-size: .8rem; }
dialog:has(.skill-preview) { width: min(685px, calc(100% - 24px)); padding: clamp(14px,2.5vw,24px); overscroll-behavior: contain; }
.skill-preview table { min-width: 390px; font-variant-numeric: tabular-nums; }
.skill-more { display: flex; justify-content: center; margin-top: 14px; }
@media (max-width: 1200px) {
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
  .skill-grid { grid-template-columns: 1fr; }
  .skills-filter { grid-template-columns: minmax(0,1fr); }
}

.capability-directory .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.capability-directory #capability-search {
  min-height: 43px;
  background: var(--card);
  padding: 8px 11px;
}
#capability-groups { margin-block: 13px 18px; }
#capability-groups .quiet { border-radius: 999px; padding-inline: 10px; }
.capability-count { font-size: .83rem; color: var(--muted); margin-bottom: 12px; }
.capability-section { margin-bottom: 22px; }
.capability-section h2 { font-weight: 750; margin-bottom: 8px; }
.capability-table { border: 1px solid var(--line); border-radius: 9px; margin-top: 0; background: var(--card); }
.capability-table table { min-width: 510px; table-layout: fixed; }
.capability-table thead th { background: #f0effa; color: var(--ink); }
.capability-table th:nth-child(1) { width: 30%; }
.capability-table th:nth-child(2) { width: 29%; }
.capability-table :is(th,td) { padding: 10px 12px; vertical-align: middle; overflow-wrap: anywhere; }
.capability-table tbody tr:last-child > * { border-bottom: none; }
.capability-table code {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--accent-hover);
  font-size: .83rem;
  overflow-wrap: anywhere;
}
.capability-table tbody th { background: transparent; }
.capability-table tbody th :is(button,a) {
  display: inline;
  padding: 0;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  border: 0;
  background: none;
  overflow-wrap: anywhere;
}
.capability-table tbody th :is(button,a):hover { color: var(--accent); text-decoration: underline; }
.capability-table td p { color: var(--muted); }
.capability-table td small { display: block; margin-top: 2px; font-size: .74rem; }
.capability-more { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 5px; color: var(--muted); font-size: .81rem; }
@media (max-width: 550px) {
  .capability-table :is(th,td) { padding: 8px; }
  .capability-table th:nth-child(1) { width: 28%; }
  .capability-table th:nth-child(2) { width: 26%; }
}

.connection-panel { min-width: 0; }
.setup-controls .connection-panel { margin-top: 6px; }
.connection-client-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-block: 18px;
}
.connection-client {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  gap: 5px;
  padding: 13px 7px 10px;
  min-height: 119px;
  text-align: center;
  color: var(--ink);
  background: #fbfbff;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow-wrap: break-word;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.connection-client:hover { border-color: #b4a3e8; background: #f7f4ff; }
.connection-client[aria-pressed=true] { border-color: var(--accent); background: var(--soft); box-shadow: inset 0 0 0 1px var(--accent); }
.connection-client strong { max-width: 100%; font-size: .88rem; line-height: 1.24; }
.connection-client[aria-pressed=true] strong { color: var(--accent-hover); }
.connection-client small { max-width: 100%; font-size: .74rem; line-height: 1.4; }
.client-logo {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border-radius: 12px;
  background: #fff;
  color: var(--accent);
  font-size: .77rem;
  font-weight: 800;
}
.client-logo img { display: block; width: 35px; height: 35px; object-fit: contain; }
.connection-client .client-logo { margin-bottom: 3px; }
.connection-record .client-logo { width: 39px; height: 39px; background: #f7f5fe; }
.connection-record .client-logo img { width: 27px; height: 27px; }
.connection-method {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--filter-fill);
  border-radius: 10px;
  padding: 4px;
}
.connection-method .button { min-height: 33px; }
.connection-guide { margin-top: 8px; color: var(--muted); font-size: var(--size-body); }
.connection-local-note {
  display: block;
  margin-top: 9px;
  padding: 7px 10px;
  color: #22515d;
  font-size: .85rem;
  background: #eaf3f6;
  border-left: 3px solid #6095a4;
  border-radius: 4px;
}
.connection-steps {
  list-style: none;
  counter-reset: connection-step;
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 13px 0 0;
}
.connection-steps > li {
  counter-increment: connection-step;
  position: relative;
  padding-left: 34px;
  min-width: 0;
}
.connection-steps > li::before {
  content: counter(connection-step);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent-hover);
  font-weight: 700;
  font-size: .8rem;
}
.connection-steps > li > p { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.connection-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 7px;
  margin-top: 6px;
}
.connection-form label { flex: 1 1 175px; max-width: 310px; }
.connection-generated {
  margin-block: 8px 3px;
  padding: 8px;
  background: #f7f5fd;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.connection-generated textarea { font: .82rem/1.45 ui-monospace, SFMono-Regular, monospace; }
.connection-generated > .muted { margin-top: 5px; }
.connection-status-actions { display: flex; justify-content: flex-end; }
.connection-record {
  display: grid;
  grid-template-columns: auto minmax(125px, 1fr) auto auto;
  align-items: center;
  gap: 8px 10px;
  padding-block: 9px;
  border-top: 1px solid var(--line);
}
.connection-record-name { min-width: 0; overflow-wrap: anywhere; }
.connection-record-name p { color: var(--muted); font-size: .77rem; }
.connection-record-controls, .connection-record-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.connection-record-actions .button { min-height: 30px; padding: 3px 4px; }
.connection-permission { display: inline-flex; align-items: center; width: max-content; font-size: .78rem; font-weight: 500; gap: 4px; }
.connection-permission input[type=checkbox] { width: 14px; min-height: 14px; padding: 0; margin: 0; accent-color: var(--accent); }
.connection-request { padding: 11px 0; border-top: 1px solid var(--line); }
.connection-request:first-of-type { margin-top: 8px; }
.connection-request h3 { margin-top: 0; }
.connection-links { margin-block: -5px 4px; }
@media (max-width: 940px) {
  .connection-record { grid-template-columns: auto minmax(0, 1fr) auto; }
  .connection-record-controls { grid-column: 2 / -1; grid-row: 2; }
  .connection-record-actions { grid-column: 3; grid-row: 1; }
}
@media (max-width: 950px) {
  .connection-client-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
  .connection-client-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .connection-client-grid { gap: 7px; }
  .connection-client { padding: 9px 5px; min-height: 109px; border-radius: 12px; }
  .connection-client strong { font-size: .79rem; }
  .connection-client small { font-size: .7rem; }
  .client-logo { width: 40px; height: 40px; }
  .client-logo img { width: 30px; height: 30px; }
  .connection-record { grid-template-columns: auto minmax(0, 1fr); }
  .connection-record-actions { grid-column: 2; grid-row: 3; }
}
@media (max-width: 360px) {
  .connection-client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.training-overview { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.training-overview .muted { margin-top: 5px; }
.training-related { margin-top: 24px; }
.training-card { border-radius: 14px; gap: 8px; }
.training-reader-nav { display: flex; align-items: center; margin-bottom: 8px; }
.training-frame { display: block; border: 1px solid var(--line); border-radius: 16px; width: 100%; height: max(440px, calc(100dvh - 190px)); background: var(--card); }

.training-home > .page-intro {
  padding: clamp(19px, 3.6vw, 38px);
  border: 1px solid #ded9f0;
  border-radius: 19px;
  background: radial-gradient(ellipse at 95% 15%, #e1e9fb, transparent 72%), #f2edfb;
}
.training-home .section-title { margin-block: 25px 10px; }
.training-related { background: #f8f7fd; }

/* 运营路线 */
.stage-steps { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stage-steps a { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; border: 1px solid var(--nav-line); background: #fff; font-weight: 600; font-size: var(--size-body); }
.stage-steps span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #efeafd; color: var(--accent); font-size: .8rem; font-weight: 760; }
.stage-steps [aria-current] a { border-color: var(--accent); color: var(--accent-hover); }
.stage-steps [aria-current] span { background: var(--accent); color: #fff; }
.home-route { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.home-route a { flex-direction: column; align-items: flex-start; border-radius: 14px; padding: 14px; height: 100%; gap: 6px; }
.home-route small { color: #5f5a73; font-weight: 450; line-height: 1.45; }
.stage-section { margin-bottom: 26px; }
.stage-section .section-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.stage-section .section-title p { margin: 0; }
@media (max-width: 980px) { .home-route { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .home-route { grid-template-columns: 1fr; } }
.mode-switch { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 22px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
.mode-switch a { display: flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 10px; font-weight: 680; color: var(--muted); }
.mode-switch a small { font-weight: 450; font-size: .78rem; color: inherit; opacity: .8; }
.mode-switch a .ui-icon { width: 16px; height: 16px; }
.mode-switch a[aria-selected=true] { background: #fff; color: var(--accent-hover); box-shadow: 0 2px 8px #4a367218; }
.ai-mode { padding: 18px; border-radius: 16px; background: linear-gradient(135deg, #f1ecff, #eef2ff); border: 1px solid #ddd3fb; margin-bottom: 26px; }
.ai-hint { margin: 0 0 14px; color: var(--ink); }
@media (max-width: 560px) { .mode-switch { display: flex; } .mode-switch a { flex: 1; flex-direction: column; gap: 0; padding: 8px; } }
.progress-frame { display: block; width: 100%; height: 72px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); margin-bottom: 14px; transition: height .2s; }
.progress-frame:not([data-progress-visible]) { height: 0; border: 0; margin: 0; visibility: hidden; }
.stage-steps li.is-done span, .home-route li.is-done span { background: #2f9e5b; color: #fff; }
.stage-steps li.is-current a { border-color: var(--accent); box-shadow: 0 0 0 3px #5944bc1f; }
.stage-steps li.is-returned a { border-color: #e0a23a; }
.stage-steps li.is-returned span { background: #e0a23a; color: #fff; }
.dashboard-welcome { margin: 0 0 6px; font-size: 1.05rem; font-weight: 650; color: var(--accent-hover); }
.dashboard-encourage { position: relative; padding-left: 14px; }
.dashboard-encourage::before { content: ""; position: absolute; left: 0; top: .25em; bottom: .25em; width: 3px; border-radius: 3px; background: var(--accent); opacity: .55; }

.case-prompt { width: 100%; }
.case-prompt summary { color: var(--accent); font-size: .85rem; }
.case-prompt pre { margin: 0 0 9px; background: var(--soft); }
.tool-stage-back { margin-bottom: 7px; }

/* 一键开品 */
.launch-home {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px;
  margin-top: 16px; padding: 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--soft); color: var(--accent-hover);
}
.launch-home:hover { border-color: var(--accent); }
.launch-home-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--card); }
.launch-home strong, .launch-home small { display: block; }
.launch-home small { line-height: 1.55; margin-top: 2px; }
.launch-page { min-width: 0; max-width: 1220px; margin-inline: auto; overflow-wrap: anywhere; }
.launch-inline-link, .launch-benchmark a { color: var(--accent-hover); text-decoration: underline; }
.launch-main { background: linear-gradient(155deg, var(--surface-subtle), var(--card) 70%); }
.launch-basics { display: grid; grid-template-columns: minmax(0,2fr) repeat(2,minmax(0,1fr)); gap: 12px; }
.launch-basics > *, .launch-fields > label, .launch-key-form > label { min-width: 0; }
.launch-page label input:not([type=checkbox]), .launch-page label textarea { width: 100%; min-width: 0; }
.launch-benchmark { display: block; margin-top: 4px; color: var(--muted); font-size: var(--size-caption); }
.launch-benchmark span { display: inline-block; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.launch-fields { display: grid; gap: 10px; margin-top: 12px; }
.launch-facts, .launch-global { grid-template-columns: repeat(3,minmax(0,1fr)); }
.launch-facts label:has(textarea) { grid-column: span 2; }
.launch-facts { padding-top: 12px; border-top: 1px solid var(--line); }
.launch-inline-error { font-size: .85rem; color: var(--status-bad); }
.launch-inline-error:empty:not([hidden]) { display: none; }
.launch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.launch-sites { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 16px 0 0; }
.launch-sites legend { padding: 0 0 5px; font-size: .87rem; font-weight: 690; }
.launch-sites label {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--field-line);
  border-radius: var(--radius-badge); background: var(--card); cursor: pointer;
}
.launch-sites label:has(:checked) { color: var(--accent-hover); border-color: var(--accent); background: var(--soft); }
.launch-sites input[type=checkbox] { width: 15px; min-height: 15px; padding: 0; margin: 0; accent-color: var(--accent); }
.launch-run { margin-top: 18px; }
.launch-run .button { min-height: 46px; min-width: min(100%, 220px); font-size: 1rem; }
[data-launch-validation] { margin-top: 7px; }
.launch-page .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.launch-results:not([hidden]) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.launch-results > .panel { min-width: 0; margin: 0; }
.launch-results > .panel:last-child { grid-column: 1 / -1; }
.launch-profit-list, .launch-price-grid, .launch-drafts { display: grid; gap: 10px; margin-top: 10px; }
.launch-drafts { grid-template-columns: repeat(2,minmax(0,1fr)); }
.launch-price, .launch-draft, .launch-profit-row {
  min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 10px 12px;
}
.launch-profit-row { background: var(--surface-subtle); font-size: .87rem; }
.launch-profit-row p { margin: 4px 0 0; }
.launch-price h3, .launch-draft h3 { margin: 0; }
.launch-price h3 span, .launch-draft header span { color: var(--muted); font-size: .8rem; font-weight: 560; }
.launch-price-inputs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 8px; }
.launch-price-inputs label { min-width: 0; font-size: .8rem; }
.launch-math-top, .launch-draft header { display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: center; }
.launch-shipping-note { color: var(--status-warn); font-size: .78rem; }
.launch-badge { padding: 2px 7px; border-radius: 999px; background: var(--soft); font-size: .8rem; font-weight: 700; }
.launch-badge.good { color: var(--status-good); background: var(--status-good-bg); }
.launch-badge.thin { color: var(--status-warn); background: var(--status-warn-bg); }
.launch-badge.loss { color: var(--status-bad); background: var(--status-bad-bg); }
.launch-risk-list { display: grid; gap: 7px; margin: 6px 0 0; padding-inline-start: 20px; font-size: .88rem; }
.launch-risk-list small { display: block; color: var(--muted); }
.launch-risk-origin { font-size: .75rem; color: var(--accent-hover); }
.launch-draft header { justify-content: space-between; }
.launch-draft > p, .launch-footnote { margin-top: 8px; }
.launch-connect { margin-top: 4px; }
.launch-fold { margin-top: 9px; font-size: .87rem; }
.launch-fold summary, .launch-advanced > summary { cursor: pointer; color: var(--accent-hover); font-weight: 650; }
.launch-advanced { margin-top: 12px; }
.launch-malay { display: block; margin-top: 12px; max-width: 280px; }
.launch-output-actions { margin-top: 12px; }
.launch-more { position: relative; }
.launch-more > summary { list-style: none; cursor: pointer; }
.launch-more > summary::-webkit-details-marker { display: none; }
.launch-menu {
  position: absolute; z-index: 2; inset: auto 0 calc(100% + 4px) auto; display: grid; min-width: max-content;
  padding: 5px; border: 1px solid var(--line); border-radius: var(--radius-card);
  background: var(--card); box-shadow: var(--shadow-float);
}
.launch-menu .button { justify-content: flex-start; }
.launch-key-status { display: inline-block; margin-top: 8px; padding: 3px 8px; background: var(--soft); border-radius: 6px; font-size: .85rem; }
.launch-key-form { grid-template-columns: minmax(0,320px) auto auto; justify-content: start; }
.launch-key-form .launch-inline-error { grid-column: 1/-1; }
@media (max-width: 820px) {
  .launch-drafts, .launch-results:not([hidden]) { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 550px) {
  .launch-basics, .launch-facts, .launch-global, .launch-price-inputs { grid-template-columns: minmax(0,1fr); }
  .launch-facts label:has(textarea) { grid-column: auto; }
  .launch-run .button { width: 100%; }
  .launch-more[open] { flex-basis: 100%; }
  .launch-menu { position: static; width: max-content; max-width: 100%; }
  .launch-key-form > label { grid-column: 1/-1; }
  .launch-key-form { grid-template-columns: auto 1fr; }
}

/* 商品库与跨站翻译：复用工作台色系，表格内容在窄屏自动折行。 */
.products-page, .product-job { min-width: 0; overflow-wrap: anywhere; }
.product-key-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.product-heading { display:flex; justify-content:space-between; align-items:flex-start; gap: 10px; flex-wrap:wrap; }
.product-heading :is(h2,h3,p) { margin: 0; }
.product-heading p { margin-top: 4px; }
.product-filters { margin-block: 16px 10px; max-width: 480px; display:flex; gap:10px; flex-wrap:wrap; }
.product-filters > label:first-child { flex: 1 1 180px; }
.product-filters > label:last-child { flex: 0 1 126px; }
.collector-state[data-collection-status=pending] { background:#fff8e7; border-color:#eed9a8; color:#795212; }
.collector-state[data-collection-status=complete] { background:#edf8f0; border-color:#cce7d3; color:#215e37; }
.collector-reference { display:block; margin-block:3px; }
.product-filters label, .product-estimate-options > label:not(.product-tick), .product-malay-select { display: grid; gap: 5px; }
.product-malay-select { max-width: 300px; margin: 10px 0 14px; }
.product-tick { display:flex; gap:8px; align-items:center; }
.product-tick input[type=checkbox] { width:17px; min-height:17px; height:17px; padding:0; margin:0; flex:none; accent-color:var(--accent); }
.product-list { margin-top: 8px; }
.product-row { display:grid; grid-template-columns: 56px minmax(0,1fr) minmax(108px,135px); align-items:center; gap:12px; border-bottom:1px solid var(--line); padding:10px 8px; }
.product-thumbnail { display:grid; place-items:center; aspect-ratio:1; background:var(--soft); color:var(--muted); border-radius: 8px; overflow:hidden; font-size:.72rem; }
.product-thumbnail img { width:100%; height:100%; object-fit:cover; }
.product-summary { min-width:0; }
.product-name { color:var(--ink); font-weight:740; }
.product-name:hover { color:var(--accent); text-decoration:underline; }
.product-summary > small { display:block; }
.product-profit { margin: 3px 0 0; font-size:.82rem; }
.product-pills { margin-top:4px; display:flex; gap:5px; flex-wrap:wrap; }
.product-badge { background:var(--soft); color:var(--accent-hover); display:inline-flex; align-items:center; padding:3px 8px; border:1px solid var(--line); border-radius:99px; font-size:.75rem; line-height:1.35; }
.product-badge[data-status=done] { color:var(--status-good); background:var(--status-good-bg); }
.product-badge[data-status=running] { background:var(--soft); color:var(--accent-hover); }
.product-badge[data-status=failed] { color:var(--status-bad); background:var(--status-bad-bg); }
.product-pages { margin-top:8px; }
.product-facts { margin-top:14px; }
.product-facts dl { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:8px; }
.product-facts dt { font-size:.8rem; color:var(--muted); }
.product-facts dd { margin:0; white-space:pre-wrap; }
.product-compare { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.product-copy { margin-block:12px 16px; }
.product-copy > div, .product-image-list article { min-width:0; padding:10px; border:1px solid var(--line); border-radius:9px; background:var(--paper); }
.product-copy h3 { margin:0 0 8px; }
.product-copy div div { white-space:pre-wrap; }
.product-copy details { margin-top:10px; }
.product-image-heading { margin-block: 12px; }
.product-image-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.product-image-list h4 { margin:0 0 7px; }
.product-image-list figure, .product-edit-images figure { margin:0; min-width:0; }
.product-image-list figure img, .product-image-empty { display:block; width:100%; aspect-ratio:1; object-fit:contain; background:var(--soft); border-radius:7px; }
.product-image-empty { display:grid; place-content:center; color:var(--muted); font-size:.8rem; }
.product-image-list figcaption, .product-edit-images figcaption { color:var(--muted); font-size:.78rem; }
.product-job progress { width:100%; accent-color:var(--accent); margin:9px 0 3px; }
.product-lanes { max-height:240px; overflow:auto; margin:0; padding:0; list-style:none; }
.product-lanes li { padding:5px 0; border-bottom:1px solid var(--line); }
.product-job-error { display:block; }
.product-estimate-options { display:grid; gap:10px; margin-block:12px; }
.product-modal-actions { margin-top:14px; }
.launch-images { margin-top:16px; border-top:1px solid var(--line); padding-top:12px; overflow-wrap:anywhere; }
.product-upload-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:10px 0; }
.product-drop { min-width:0; display:grid; gap:5px; padding:10px; border:1px dashed var(--accent); border-radius:8px; background:var(--soft); }
.product-drop span { font-size:.82rem; color:var(--muted); }
.product-drop input { max-width:100%; min-width:0; font-size:.77rem; }
.product-edit-images { display:grid; grid-template-columns:repeat(auto-fill,minmax(100px,1fr)); gap:8px; }
.product-edit-images img { display:block; width:100%; height:90px; object-fit:contain; border-radius:8px; background:var(--paper); }
.product-edit-images .button { padding:2px 4px; min-height:28px; font-size:.78rem; }
@media (max-width:650px) {
  .product-key-grid, .product-copy, .product-image-list { grid-template-columns:minmax(0,1fr); gap:8px; }
}
@media (max-width:420px) {
  .product-upload-grid { grid-template-columns:minmax(0,1fr); }
}

/* 商品库内的成本测算 */
[data-cost-status]:empty { display:none; }
.selection-benchmark { margin-top:6px; padding:6px; border-radius:7px; background:var(--soft); }
.selection-benchmark small { display:block; }

.product-row-added { background:color-mix(in srgb,var(--soft) 65%,var(--card)); box-shadow:inset 3px 0 var(--accent); border-radius:8px; margin-bottom:4px; }
.product-added-message { margin-top:10px; border-radius:8px; background:var(--soft); padding:8px 10px; color:var(--accent-hover); font-weight:650; }
.product-new { margin-left:5px; }
.product-row .product-profit { display:flex; flex-wrap:wrap; gap:5px; align-items:center; margin:0; }
.launch-badge.pending { background:var(--soft); color:var(--accent-hover); }
.product-cost-cell label, .product-shipping-form label { display:grid; gap:4px; }
.product-cost-cell label { font-size:.78rem; color:var(--muted); }
.product-cost-cell input { width:100%; min-width:0; margin:0; }
.product-row-actions, .sourcing-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.product-row-actions .button { min-height:32px; padding:4px 7px; font-size:.79rem; }
.product-shipping-form { display:grid; gap:10px; }
.product-shipping-form input { width:100%; }
.sourcing-image-link { color:var(--accent-hover); font-size:.79rem; text-decoration:underline; }
.benchmark-info small { display:block; }
.benchmark-detail { display:flex; align-items:flex-start; gap:9px; margin-block:8px; padding:8px; border-radius:8px; background:var(--soft); overflow-wrap:anywhere; }
.benchmark-detail img { width:54px; aspect-ratio:1; object-fit:cover; border-radius:6px; }
.benchmark-detail a { color:var(--accent-hover); text-decoration:underline; }
.product-row .product-profit { grid-column:3; grid-row:2; }
.product-row-actions { grid-column:2; grid-row:2; }
@media (max-width:550px) {
  .product-row { grid-template-columns:44px minmax(0,1fr); gap:8px; }
  .product-cost-cell, .product-row .product-profit, .product-row-actions { grid-row:auto; grid-column:2; }
}

/* 选品中心 */

.research-budget { border:1px solid var(--line); border-radius:10px; background:var(--card); padding:9px 12px; margin:0 0 10px; font-size:.84rem; }
.research-budget label { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; }
.research-budget progress { width:min(21vw,260px); height:9px; accent-color:var(--accent); }
.research-budget p { margin-top:4px; }
.research-budget.quota-warning,.research-cache { color:var(--status-warn); border:1px solid var(--line); background:var(--status-warn-bg); }
.research-fx-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }

.desk-selection #main { width:100%; padding:0; }
.research-content,.research-page,.research-results { min-width:0; }
.research-page { padding-bottom:76px; overflow-wrap:anywhere; }
.research-main-head { min-height:45px; display:flex; gap:10px; align-items:center; padding-inline:20px; background:var(--card); }
.research-main-head h1 { font-size:18px; font-weight:750; white-space:nowrap; }
.research-back { color:var(--accent-hover); background:var(--soft); border-radius:7px; padding:5px 9px;
  font-weight:680; font-size:13px; white-space:nowrap; }
.research-back:is(:hover,:focus-visible) { text-decoration:underline; }
.research-main-head .button,.research-main-head .research-mobile-site { display:none; }
.desk-selection :is(input:not([type=hidden],[type=checkbox]),select) { background:var(--card); border-color:var(--line); font-size:13px; }
.research-content { padding:0 20px; }
.research-controls { position:sticky; top:0; z-index:5; background:var(--card); box-shadow:0 2px 7px #18182608; }
.research-filter-top,.research-filter-sub,.research-advanced-top,.research-advanced-sub,.research-search-box,
.research-price-filters,.research-view-opts,.research-categories,.research-sort { display:flex; align-items:center; gap:8px; min-width:0; }
.research-filter-top { min-height:52px; padding:6px 20px; }
.research-filter-sub { min-height:40px; padding:3px 20px; border-top:1px solid var(--surface-subtle); border-bottom:1px solid var(--line); }
.research-filter-sub > [data-action="select-export"] { margin-left:auto; }
.research-advanced-top { flex:1 1 365px; }
.research-advanced-sub { gap:15px; }
.research-sort,.research-price-filters { font-size:12px; color:var(--muted); white-space:nowrap; }
.research-sort select { width:auto; }
.research-categories { flex:1; gap:5px; }
.research-categories select { width:0; flex:1; text-overflow:ellipsis; }
.research-price-filters input[type="number"] { width:76px; }
.research-filter-sub :is(input,select) { min-height:30px; }
.research-site { flex:0 0 96px; width:96px; }
.research-search-box { flex:1 1 284px; justify-content:flex-end; }
.research-search-box input { flex:1; }
.research-query { flex:none; white-space:nowrap; }
.research-switch { display:inline-flex; align-items:center; position:relative; gap:5px; font-size:12px; white-space:nowrap; color:var(--muted); cursor:pointer; }
.research-switch input { position:absolute; left:0; width:29px; height:17px; min-height:0; margin:0; opacity:0; }
.research-switch-track { width:29px; height:17px; border-radius:10px; background:#c9ccda; position:relative; flex:none; }
.research-switch-track::after { content:""; position:absolute; left:2px; top:2px; width:13px; height:13px; border-radius:50%; background:#fff; transition:transform .15s; }
.research-switch input:checked + .research-switch-track { background:var(--accent); }
.research-switch input:checked + .research-switch-track::after { transform:translateX(12px); }
.research-switch input:focus-visible + .research-switch-track { outline:2px solid var(--accent); outline-offset:3px; }
.research-switch:has(input:disabled) { cursor:not-allowed; color:var(--ink-subtle); }
.research-switch small { color:inherit; }
.research-min-chip { color:var(--accent-hover); background:var(--soft); border-radius:16px; padding-left:8px; font-size:12px; white-space:nowrap; }
.research-min-chip .button { padding:0 5px; min-height:24px; }
.research-segment { display:inline-flex; gap:1px; padding:2px; background:var(--surface-subtle); border-radius:8px; min-width:0; }
.research-segment .button { min-height:27px; padding:3px 8px; white-space:nowrap; font-size:12px; color:var(--muted); }
.research-segment .button[aria-pressed="true"] { background:var(--card); color:var(--accent-hover); box-shadow:0 1px 4px #18182615; font-weight:750; }
.research-filter-sub > [data-action="select-sheet"],.research-view-opts > [data-action="select-mobile-table"] { display:none; }
.research-presets { display:flex; align-items:center; flex-wrap:wrap; gap:5px 7px; margin:9px 0 5px; }
.research-presets small { margin-right:2px; font-size:12px; }
.research-presets .button { min-height:26px; padding:3px 8px; color:var(--muted); background:var(--card); border:1px solid var(--line); border-radius:18px; font-size:12px; }
.research-presets .button:hover { color:var(--accent); }
.research-fetch-progress { position:absolute; bottom:0; height:2px; width:100%; overflow:hidden; background:var(--soft); }
.research-fetch-progress::after { content:""; display:block; width:46%; height:100%; background:var(--accent); animation:research-progress 1.3s linear infinite; }
@keyframes research-progress { from { transform:translateX(-100%); } to { transform:translateX(225%); } }
.research-cache,.research-hint,.research-message { font-size:12px; margin:6px 0; }
.research-cache { padding:5px 8px; border-radius:7px; }
.research-message:empty { display:none; }
.research-query-message { padding:4px 20px 7px; font-size:13px; }
.research-query-message:empty { display:none; }
.research-starter,.research-recent { margin:10px 0; padding:16px; }
.research-starter h2,.research-recent h2 { margin:0; font-size:16px; }
.research-starter p { margin:4px 0 12px; color:var(--muted); font-size:13px; }
.research-starter h3 { margin:13px 0 6px; color:var(--muted); font-size:13px; }
.research-chips { display:flex; flex-wrap:wrap; gap:6px; }
.research-chips .button { min-height:33px; padding:4px 11px; border:1px solid var(--line); border-radius:18px; font-size:13px; }
.research-starter .research-chips:first-of-type .button { background:var(--soft); border-color:transparent; font-weight:650; }
.research-starter .research-chips:first-of-type .button:hover { border-color:var(--accent); }
.research-recent small { color:var(--muted); font-size:12px; }
.research-recent ul { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:6px; list-style:none; margin:10px 0 0; padding:0; }
.research-recent li { min-width:0; }
.research-recent li .button { display:flex; justify-content:space-between; gap:10px; width:100%; height:100%; text-align:left;
  background:var(--surface-subtle); border:1px solid var(--line); }
.research-recent li .button:hover { background:var(--soft); }
.research-recent li span small { display:block; }
.research-result-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:3px 8px; margin:9px 0; font-size:13px; font-weight:660; }
.research-result-header > div { display:flex; align-items:center; gap:7px; font-weight:500; }
.research-result-header small { color:var(--muted); font-size:12px; }
.research-match { max-width:300px; margin-bottom:7px; }
.research-overview { display:flex; align-items:center; gap:16px; min-height:70px; max-height:88px; margin-bottom:10px; padding:6px 12px;
  border:1px solid var(--line); border-radius:10px; background:var(--card); font-size:13px; }
.research-overview.is-collapsed { height:auto; min-height:38px; }
.research-overview-heading { flex:0 0 auto; margin-right:2px; }
.research-overview-heading .button { min-height:24px; padding:1px 5px; }
.research-overview-heading small { display:block; font-size:11px; }
.research-overview-heading .research-mobile-average { display:none; }
.research-overview-stats { display:grid; flex:1; grid-template-columns:1fr 1fr 1.35fr; align-items:center; gap:10px; min-width:0; margin:0; }
.research-overview dt,.research-overview small { color:var(--muted); }
.research-overview dd { margin:4px 0 0; font-size:16px; font-weight:750; white-space:nowrap; }
.research-overview dd small { font-size:12px; font-weight:500; }
.research-help { display:inline-flex; position:relative; vertical-align:middle; font-weight:500; }
.research-help button { border:1px solid #a9adbf; border-radius:50%; color:var(--muted); background:var(--card);
  padding:0; width:14px; height:14px; display:grid; place-items:center; font-size:10px; line-height:1; }
.research-help [role="tooltip"] { display:none; position:absolute; z-index:4; top:calc(100% + 4px); left:50%; transform:translateX(-65%); white-space:normal; width:max-content;
  max-width:165px; padding:5px 8px; background:var(--button-primary); color:#fff; font-size:11px; border-radius:5px; }
.research-help:is(:hover,:focus-within) [role="tooltip"],.research-help:has([aria-expanded="true"]) [role="tooltip"] { display:block; }
.research-result-header .research-help [role="tooltip"] { left:auto; right:0; transform:none; }
.research-pill { border-radius:20px; padding:2px 6px; font-size:11px; font-weight:670; background:var(--surface-subtle); color:var(--muted); white-space:nowrap; }
.research-pill.good { background:var(--status-good-bg); color:var(--status-good); }
.research-pill.warn { background:var(--status-warn-bg); color:var(--status-warn); }
.research-pill.caution { background:#ffeddc; color:#a6460e; }
.research-pill.bad { background:var(--status-bad-bg); color:var(--status-bad); }
.research-distribution { flex:0 1 35%; min-width:0; border-left:1px solid var(--line); padding-left:10px; }
.research-distribution h3 { font-size:12px; color:var(--muted); line-height:1.2; font-weight:550; }
.research-distribution h3 strong { color:var(--accent-hover); margin-left:3px; }
.research-distribution > small { display:flex; align-items:baseline; flex-wrap:wrap; gap:0 6px; font-size:11px; line-height:1.18; }
.research-distribution > small span { white-space:nowrap; }
.research-distribution > small span+span::before { content:"·"; margin-right:4px; }
.research-band-bars { display:flex; gap:3px; margin-top:3px; }
.research-band-bars.is-compact { gap:1px; }
.research-band-bars.is-compact button > span { display:none; }
.research-band-bars button { display:grid; gap:0; flex:1 1 0; min-width:0; align-items:end; padding:0 2px; border:0; border-radius:3px; background:transparent; color:var(--muted); white-space:nowrap; font-size:9px; }
.research-band-bars.is-compact button { padding-inline:1px; }
.research-band-bars button:focus-visible { outline-offset:-2px; }
.research-band-bars button:hover { background:var(--surface-subtle); }
.research-band-bars svg { display:block; width:min(22px,100%); height:32px; justify-self:center; fill:#a9adbf; }
.research-band-bars .is-peak svg { fill:var(--accent); }

.research-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
@media (min-width:1440px) { .research-grid { grid-template-columns:repeat(5,minmax(0,1fr)); } }
.research-card { min-width:0; background:var(--card); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.research-card:hover { border-color:#c6bbed; }
.research-card:has(input:checked) { border-color:var(--accent); outline:1px solid var(--accent); background:var(--soft); }
.research-card-media,.research-table-thumb { position:relative; min-width:0; }
.research-image-button { display:block; width:100%; padding:0; border:0; background:transparent; }
.research-image-button:focus-visible { outline-offset:-4px; }
.research-image { width:100%; aspect-ratio:1; display:grid; place-items:center; position:relative; overflow:hidden;
  background:var(--surface-subtle); color:var(--muted); font-size:12px; }
.research-image img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; background:var(--surface-subtle); opacity:0; transition:opacity 200ms; }
.research-image img.is-loaded { opacity:1; }
.research-image img[hidden] { display:none; }
.research-check { position:absolute; top:7px; right:7px; display:grid; place-items:center; border-radius:6px; background:rgba(255,255,255,.92);
  width:28px; height:28px; box-shadow:0 2px 7px #18182625; cursor:pointer; }
.research-page input[data-research-item] { padding:0; width:24px; height:24px; min-height:0; margin:0; accent-color:var(--accent); cursor:pointer; }
.research-shop-tag,.research-feature { display:inline-block; padding:2px 6px; font-size:11px; font-weight:700; border-radius:16px; white-space:nowrap; }
.research-card-media .research-shop-tag,.research-feature { position:absolute; left:7px; pointer-events:none; box-shadow:0 1px 4px #18182618; }
.research-card-media .research-shop-tag { top:7px; }
.research-shop-tag.cross { color:var(--accent-hover); background:#eee8ff; }
.research-shop-tag.domestic { color:var(--muted); background:var(--surface-subtle); }
.research-feature { bottom:7px; }
.research-feature.hot { color:var(--status-warn); background:var(--status-warn-bg); }
.research-feature.fast { color:var(--status-good); background:var(--status-good-bg); }
.research-card-info { display:grid; gap:5px; padding:8px 10px 10px; min-width:0; }
.research-title { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere;
  border:0; background:none; text-align:left; padding:0; font-size:13px; font-weight:500; line-height:1.38; color:var(--ink); }
.research-title:hover { color:var(--accent-hover); text-decoration:underline; }
.research-card .research-title { min-height:2.76em; }
.research-sales { color:var(--accent-hover); font-variant-numeric:tabular-nums; }
.research-card-metric { display:grid; gap:4px; }
.research-card-metric > div { display:flex; flex-wrap:wrap; gap:2px 6px; align-items:baseline; }
.research-card-metric strong { font-size:22px; font-weight:700; line-height:1.17; letter-spacing:-.02em; }
.research-card-metric strong span { font-size:14px; }
.research-card-metric small { font-size:11px; }
.research-position { display:block; width:100%; height:4px; appearance:none; border:0; overflow:hidden; border-radius:9px; background:var(--surface-subtle); }
.research-position::-webkit-progress-bar { background:var(--surface-subtle); }
.research-position::-webkit-progress-value { background:var(--accent); border-radius:9px; }
.research-position::-moz-progress-bar { background:var(--accent); border-radius:9px; }
.research-card-price { display:flex; gap:2px 6px; align-items:baseline; flex-wrap:wrap; }
.research-price { font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; }
.research-cny { display:block; color:var(--muted); font-size:12px; }
.research-rating { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.research-up { color:var(--status-good); }
.research-down { color:var(--status-bad); }

.research-table-wrap { width:100%; overflow:auto; border:1px solid var(--line); border-radius:10px; background:var(--card); }
.research-table { width:100%; min-width:1050px; border-collapse:separate; border-spacing:0; font-size:13px; font-variant-numeric:tabular-nums; }
.research-table th { background:var(--surface-subtle); color:var(--muted); font-size:12px; font-weight:600; padding:4px 8px; }
.research-table td { background:var(--card); padding:7px 8px; height:76px; }
.research-table :is(th,td) { border-bottom:1px solid var(--line); }
.research-table tr:last-child td { border-bottom:0; }
.research-table tr:hover td { background:#f8f8fc; }
.research-table tr:has(input:checked) td { background:var(--soft); }
.research-table :is(th,td):first-child { position:sticky; z-index:2; left:0; width:54px; min-width:54px; text-align:center; }
.research-table :is(th,td):nth-child(2) { position:sticky; z-index:1; left:54px; width:25%; min-width:230px; box-shadow:1px 0 var(--line); }
.research-table :is(th,td):last-child { position:sticky; z-index:1; right:0; width:156px; min-width:156px; box-shadow:-1px 0 var(--line); }
.research-table :is(th,td):nth-child(n+4):nth-child(-n+7) { text-align:right; }
.research-table th .button,.research-row-actions .button { min-height:24px; padding:2px 4px; font-size:12px; font-weight:600; }
.research-table-product { display:grid; grid-template-columns:58px minmax(0,1fr); gap:8px; align-items:center; }
.research-table-product small { display:block; font-size:11px; }
.research-table-thumb .research-image { border-radius:6px; }
.research-measures > span { display:block; white-space:nowrap; font-size:12px; line-height:1.42; color:var(--muted); }
.research-measures > span.research-active-measure { font-size:13px; color:var(--accent-hover); font-weight:750; }
.research-measures small { margin-right:4px; font-size:10px; }
.research-measures abbr { font-size:10px; color:var(--muted); }
.research-row-actions { display:flex; gap:0; flex-wrap:wrap; }
.research-words { overflow:hidden; background:var(--card); border:1px solid var(--line); border-radius:10px; }
.research-words table { min-width:0; table-layout:auto; font-variant-numeric:tabular-nums; }
.research-words th { font-size:12px; font-weight:600; background:var(--surface-subtle); color:var(--muted); }
.research-words :is(td,th):nth-child(n+2) { text-align:right; }
.research-words tbody tr:last-child td { border-bottom:0; }
.research-words tbody tr:hover { background:#f8f8fc; }
.research-words td { border-color:var(--line); }
.research-search-index { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:5px 8px; }
.research-search-index progress { width:80px; }
.research-more { display:flex; justify-content:center; gap:8px; align-items:center; flex-wrap:wrap; margin-top:12px; }
.research-source { margin-top:14px; color:var(--muted); font-size:12px; }
.research-source span { margin-left:5px; }
.research-toolbar { position:fixed; z-index:4; left:56px; right:0; bottom:0; padding:8px 20px max(8px,env(safe-area-inset-bottom));
  background:var(--card); border-top:1px solid var(--line); box-shadow:0 -7px 20px #18182612; animation:research-slide .2s ease-out; }
@keyframes research-slide { from { transform:translateY(100%); } to { transform:translateY(0); } }
.research-toolbar-inner { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; }
.research-toolbar strong { color:var(--accent-hover); font-size:13px; }
.research-basket-list { display:flex; align-items:center; gap:7px; min-width:0; list-style:none; overflow:auto; margin:0; padding:2px; }
.research-basket-list li { flex:0 0 36px; width:36px; height:36px; position:relative; }
.research-basket-list .research-image { border-radius:6px; font-size:0; }
.research-basket-list .button { position:absolute; top:0; right:0; border-radius:0 6px; background:rgba(255,255,255,.95); padding:0 4px; min-height:20px; opacity:0; }
.research-basket-list li:is(:hover,:focus-within) .button { opacity:1; }

.research-skeleton-card,.research-skeleton-table { padding:9px; border-radius:10px; border:1px solid var(--line); background:var(--card); }
.research-skeleton-card i,.research-skeleton-table i { display:block; border-radius:5px; background:linear-gradient(100deg,var(--surface-subtle) 28%,#fafafe 46%,var(--surface-subtle) 62%);
  background-size:220% 100%; animation:research-shimmer 1.6s ease-in-out infinite; }
.research-skeleton-card i:first-child { aspect-ratio:1; }
.research-skeleton-card i:nth-child(2) { width:40%; height:22px; margin-top:9px; }
.research-skeleton-card i:nth-child(3) { height:4px; margin-top:7px; }
.research-skeleton-card i:nth-child(n+4) { width:92%; height:11px; margin-top:9px; }
.research-skeleton-card i:last-child { width:70%; }
.research-skeleton-table i { height:23px; margin:6px 0; }
@keyframes research-shimmer { from { background-position:90% 0; } to { background-position:-90% 0; } }
.research-reveal { animation:research-reveal 200ms ease-out; }
@keyframes research-reveal { from { opacity:0; } to { opacity:1; } }
.research-drawer,.research-sheet { position:fixed; margin:0; border:1px solid var(--line); padding:0; max-width:100%; max-height:none; color:var(--ink); background:var(--card); }
.research-drawer { inset:0 0 0 auto; border-width:0 0 0 1px; border-radius:0; width:min(100%,504px); height:100dvh; }
.research-drawer[open] { display:grid; grid-template-rows:auto minmax(0,1fr) auto; }
.research-drawer::backdrop,.research-sheet::backdrop { background:#15152855; }
.research-drawer-head,.research-drawer-actions,.research-carousel,.research-sheet-head { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.research-drawer-head,.research-drawer-body,.research-drawer-actions { padding:12px 17px; }
.research-drawer-head { border-bottom:1px solid var(--line); }
.research-drawer-body { overflow:auto; }
.research-drawer-actions { border-top:1px solid var(--line); justify-content:flex-end; }
.research-detail-hero { display:grid; grid-template-columns:112px minmax(0,1fr); gap:12px; }
.research-detail-hero .research-image { border-radius:8px; }
.research-detail-hero h3 { margin-bottom:6px; }
.research-detail-links { display:flex; align-items:center; flex-wrap:wrap; gap:4px 7px; }
.research-detail-links .button,.research-carousel .button { min-height:27px; padding:2px 4px; font-size:12px; }
.research-detail-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; margin:12px 0; }
.research-detail-stats div { background:var(--surface-subtle); border-radius:7px; padding:6px; }
.research-detail-stats dt { color:var(--muted); font-size:11px; }
.research-detail-stats dd { margin:3px 0 0; font-weight:750; font-size:13px; }
.research-comparison { padding:8px 10px; border:1px solid var(--line); border-radius:9px; background:var(--paper); }
.research-comparison h3,.research-traffic h3 { font-size:14px; }
.research-trend { display:block; width:100%; }
.research-trend text { fill:var(--muted); font-size:9px; }
.research-trend stop { stop-color:var(--accent); stop-opacity:.2; }
.research-trend stop + stop { stop-opacity:0; }
.research-trend polyline { fill:none; stroke:var(--accent); stroke-width:2; }
.research-trend circle { fill:var(--accent); }
.research-trend-average,.research-trend-target path { stroke:var(--ink-subtle); stroke-dasharray:4 3; }
.research-trend-target path { opacity:0; pointer-events:none; }
.research-trend-target:hover path { opacity:1; }
.research-comparison > small { display:block; margin-top:6px; font-size:11px; }
.research-compare-line { display:grid; grid-template-columns:1fr auto; gap:3px 7px; margin-top:5px; font-size:12px; }
.research-compare-line .research-position { grid-column:1/-1; }
.research-traffic { margin-top:13px; }
.research-traffic ol { margin:6px 0; padding:0 0 0 23px; font-size:13px; }
.research-traffic li { padding:5px 2px; border-bottom:1px solid var(--line); }
.research-traffic li small { display:block; font-size:11px; }
.research-traffic p { font-size:12px; }

@media (max-width:1170px) {
  .research-filter-top,.research-filter-sub { flex-wrap:wrap; }
  .research-overview { gap:8px; }
  .research-overview-stats { gap:6px; }
  .research-overview dd { white-space:normal; }
  .research-overview-heading small { max-width:80px; }
}
@media (max-width:830px) {
  .research-overview { display:grid; grid-template-columns:1fr 1fr; height:88px; gap:2px 6px; align-content:center; }
  .research-overview-heading { grid-column:1/-1; line-height:1; }
  .research-overview-heading small { display:inline; max-width:none; }
  .research-overview-stats { font-size:11px; }
  .research-overview dd { font-size:13px; }
  .research-overview dd small,.research-overview dd .research-pill { display:block; font-size:10px; }
  .research-band-bars svg { height:27px; }
  .research-band-bars button > span { display:none; }
  .research-distribution > small { font-size:10px; }
}
@media (max-width:730px) {
  .research-main-head { min-height:55px; }
  .research-main-head > [data-action="mobile"] { display:inline-flex; min-height:44px; }
}
@media (max-width:560px) {
  .desk-selection > .sidebar.mobile-open { top:55px; }

  .research-main-head { position:sticky; z-index:9; top:0; min-height:55px; padding-inline:10px; border-bottom:1px solid var(--line); }
  .research-main-head .button,.research-main-head .research-mobile-site { display:inline-flex; }
  .research-main-head h1 { font-size:16px; }
  .research-back { padding:4px 6px; font-size:12px; }
  .research-query-message { padding-inline:10px; }
  .research-main-head .research-mobile-site { margin-left:auto; width:auto; min-height:32px; }
  .research-content { padding-inline:10px; }
  .research-controls { top:55px; }
  .research-controls .research-desktop,.research-view-opts .research-view-toggle { display:none; }
  .research-filter-top { padding:5px 10px; gap:5px; }
  .research-tabs { width:100%; }
  .research-tabs .button { flex:1; }
  .research-search-box { flex:1 1 100%; gap:5px; }
  .research-search-box :is(.button,input) { min-height:31px; }
  .research-filter-sub { padding-inline:10px; gap:4px; }
  .research-filter-sub > [data-action="select-sheet"],.research-view-opts > [data-action="select-mobile-table"] { display:inline-flex; min-height:27px; padding:1px 5px; font-size:12px; }
  .research-view-opts { gap:3px; }
  .research-periods .button { padding-inline:4px; }
  .research-filter-sub > [data-action="select-export"] { display:none; }
  .research-sheet { inset:auto 0 0; width:100%; border-radius:15px 15px 0 0; padding:12px 14px max(14px,env(safe-area-inset-bottom)); max-height:85dvh; overflow:auto; }
  .research-sheet-fields { display:grid; gap:12px; margin:8px 0 15px; color:var(--muted); font-size:13px; }
  .research-sheet > .button { width:100%; }
  .research-overview { grid-template-columns:1fr 1fr; padding:5px 6px; }
  .research-overview-stats { grid-template-columns:1fr 1.23fr; gap:3px; }
  .research-overview-stats div:first-child,.research-overview-heading > small:last-child { display:none; }
  .research-overview-heading .research-mobile-average { display:inline; margin-left:4px; }
  .research-overview-stats dt { line-height:1.05; }
  .research-distribution { padding-left:4px; }
  .research-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .research-card-info { padding:7px; }
  .research-page input[data-research-item] { width:22px; height:22px; }
  .research-check { width:25px; height:25px; }
  .research-words :is(td,th) { padding:5px 3px; font-size:11px; }
  .research-words .button { padding:1px 3px; font-size:11px; }
  .research-search-index progress { width:min(80px,100%); }
  .research-toolbar { left:0; padding-inline:9px; }
  .research-toolbar-inner { gap:5px; }
  .research-basket-list .button { opacity:1; }
  .research-drawer { inset:auto 0 0; width:100%; height:90vh; height:90dvh; border-radius:15px 15px 0 0; }
  .research-drawer-body { padding-inline:12px; }
}
@media (prefers-reduced-motion:reduce) {
  .research-skeleton-card i,.research-skeleton-table i,.research-toolbar,.research-reveal,.research-fetch-progress::after { animation:none; }
  .research-image img { transition:none; }
}

.product-sourcing-status { display:flex; flex-wrap:wrap; align-items:center; gap:5px 8px; margin-block:5px; line-height:1.45; }
.product-sourcing-status .sourcing-state[data-status="approved"] { background:#e8f7ed; color:#185433; }
.product-sourcing-status .sourcing-state[data-status="returned"], .product-sourcing-status .sourcing-stale { background:#fff4dd; color:#79460b; }
.product-sourcing-status .sourcing-state[data-status="pending"] { background:#eee9fb; color:#4b3389; }
.product-sourcing-status .sourcing-stale { border-radius:5px; padding:2px 5px; }
.product-sourcing-card .sourcing-note { white-space:pre-wrap; overflow-wrap:anywhere; }
.product-row-actions [data-sourcing-action]:empty { display:none; }

.product-stages { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.product-stage-card { min-width:0; border:1px solid #dfdbec; border-radius:13px; padding:14px; scroll-margin:70px; }
.product-stage-card h3 { margin:0; }
.product-stage-card.feedback-target { background:#faf6ff; border-color:#8c72c7; }
.desk-bell { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.desk-unread { border-radius:99px; padding:1px 6px; background:#eadcf9; color:#483178; font-size:.8em; }
.desk-inbox-list { list-style:none; margin:12px 0; padding:0; max-height:55vh; overflow:auto; }
.desk-inbox-item { display:flex; align-items:center; border-bottom:1px solid #e7e2f0; padding:4px 0; }
.desk-inbox-item.is-unread { background:#f9f5ff; }
.desk-inbox-open { flex:1; min-width:0; text-align:left; align-items:flex-start; flex-direction:column; }
.desk-inbox-open small { display:block; margin-top:3px; white-space:normal; }

@media (max-width: 900px) { .product-stages { grid-template-columns:1fr; } }

/* Booking is a separate, top-level tab; these cards do not replace training progress. */
.booking-lesson { margin-block: 12px; }
.booking-lesson-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.booking-lesson-body p { margin: 0; }
.booking-stage-action { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.booking-binding input { max-width: 25rem; }
.booking-bind-error { color: var(--status-bad); }
.booking-notifications { text-decoration: underline; }

.collector-help-link{font-size:.8rem;color:#5944a5}
.collector-steps{padding-inline-start:1.5rem;line-height:1.8}
.collector-flow{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}
.collector-flow span:not([aria-hidden]){border-radius:8px;background:#f2eef9;color:#49377c;padding:6px 10px;font-size:.9rem}
.collector-faq dt{font-weight:700;margin-top:12px}.collector-faq dd{margin:4px 0 0;color:#5c5873}
#extension-code{display:block;width:100%;box-sizing:border-box;overflow-wrap:anywhere;margin:8px 0}

/* UX review: scoped layout changes; reuse existing workbench colors. */
.dashboard-actions { margin-top: 18px; align-items:center; }
.dashboard-actions .dashboard-cta { margin:0; }
.dashboard-actions .quiet { text-decoration:underline; text-underline-offset:.18em; }
.progress-frame { transition:none; }
.product-row-actions { justify-content:flex-start; }
.product-image-missing { display:grid; place-items:center; min-width:0; min-height:32px; color:var(--muted); font-size:.75rem; overflow:hidden; }
.product-thumbnail img { min-width:0; min-height:0; display:block; }
.product-summary, .product-profit, .product-stages dl { min-width:0; overflow-wrap:anywhere; }
.product-source-menu { position:relative; }
.product-source-menu > summary { list-style:none; border-radius:8px; padding:6px 8px; font-size:.79rem; }
.product-source-menu > summary::-webkit-details-marker { display:none; }
.product-source-menu[open] > summary,.product-source-menu > summary:hover { background:var(--soft); }
.product-source-menu > .sourcing-actions { position:absolute; inset:100% 0 auto auto; z-index:3; min-width:140px; display:grid; padding:7px; background:var(--card); border:1px solid var(--line); border-radius:9px; box-shadow:0 6px 18px var(--soft); }
.product-collector-tip { display:flex; align-items:center; flex-wrap:wrap; gap:4px 9px; padding:8px 11px; border-radius:9px; background:var(--soft); margin-top:10px; font-size:.86rem; }
.product-collector-tip .button { min-height:30px; }
.product-crumb { margin-bottom:8px; color:var(--muted); overflow-wrap:anywhere; }
.product-crumb a { color:var(--accent); }
.product-crumb a:hover { text-decoration:underline; }
.products-page .page-intro h1 { overflow-wrap:anywhere; }
.product-resubmit { background:var(--soft); border-radius:8px; padding:9px; margin:9px 0; font-size:.9rem; }
.desk-return-badge { display:inline-block; border-radius:6px; padding:0 6px; background:var(--status-bad-bg); color:var(--status-bad); }
.desk-booking-inbox { margin-block:4px; text-decoration:underline; }
.form[data-form="bailian-key-set"] { grid-template-columns:minmax(0,1fr); }
.form[data-form="bailian-key-set"] > :is(button,label) { justify-self:start; }
.form[data-form="bailian-key-set"] > label { width:100%; }
.report-file { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; position:relative; border:1px dashed var(--line); border-radius:9px; padding:8px; background:var(--surface-subtle); cursor:pointer; min-width:0; }
.report-file input { position:absolute; inline-size:1px; block-size:1px; min-height:0; padding:0; opacity:0; }
.report-file:focus-within { outline:2px solid var(--focus); }
.report-file [data-report-file-name] { overflow-wrap:anywhere; color:var(--muted); font-size:.8rem; }
.research-main-head [data-notifications-top] .desk-bell { display:inline-flex; }
.research-main-head [data-action="mobile"] { white-space:nowrap; flex:none; }
@media (max-width: 560px) {
  .research-main-head { gap:6px; }
  .research-main-head .research-back { display:none; }
  .research-main-head .research-mobile-site { flex: 0 0 auto; width: min(36vw,160px); white-space:nowrap; min-width:0; padding-inline-start:8px; }
  .research-main-head .desk-bell { padding-inline:6px; }
  .research-main-head .desk-bell > span { display:none; }
  .product-source-menu > .sourcing-actions { inset:100% auto auto 0; }
}

.booking-product-context { display:flex; flex-wrap:wrap; gap:4px 6px; align-items:center; max-width:100%; overflow-wrap:anywhere; }
.booking-product-context small { min-width:0; }

.launch-market-panel { margin-top: 12px; }
.launch-market-panel header, .launch-market-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.launch-market-controls { justify-content: flex-start; align-items: end; margin-block: 14px 12px; }
.launch-market-controls select { min-width: min(100%, 135px); }
.launch-market-meta { margin-block: 4px; }
.launch-market-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px),1fr));
  gap: 8px;
  margin-block: 10px;
}
.launch-market-metrics div, .launch-market-analysis { background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.launch-market-metrics dt, .launch-market-samples small { color: var(--muted); font-size: .82rem; }
.launch-market-metrics dd { margin: 4px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.launch-market-samples { list-style: none; margin: 0; padding: 0; }
.launch-market-samples li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 12px; padding-block: 7px; border-bottom: 1px solid var(--line); }
.launch-market-samples a { color: var(--accent-hover); }
.launch-market-samples a:hover { text-decoration: underline; }
.launch-market-analysis { margin-top: 12px; }
.launch-market-analysis p, .launch-market-analysis .action-row { margin-top: 5px; }
