:root {
  --ink: #18221d;
  --muted: #66716b;
  --line: #dfe5e1;
  --soft: #f3f6f4;
  --paper: #fbfcfb;
  --white: #ffffff;
  --forest: #173f35;
  --forest-2: #235c4d;
  --lime: #d9f36c;
  --lime-ink: #253400;
  --blue: #315bff;
  --blue-soft: #e9edff;
  --amber: #9b6500;
  --amber-soft: #fff4d4;
  --red: #a43232;
  --red-soft: #ffebeb;
  --shadow: 0 18px 50px rgba(25, 45, 36, 0.09);
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--soft); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 88% 2%, rgba(217,243,108,.18), transparent 27rem), var(--soft); }
button, input, textarea { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-header { position: sticky; top: 0; z-index: 20; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px clamp(20px, 4vw, 64px); background: rgba(251,252,251,.9); border-bottom: 1px solid rgba(223,229,225,.9); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: var(--forest); color: var(--lime); font-family: Georgia, serif; font-size: 22px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.brand-mark.large { width: 48px; height: 48px; margin-bottom: 22px; font-size: 27px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; letter-spacing: .01em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.header-nav { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 13px; }
.header-nav a, .text-button { color: var(--muted); font-weight: 650; text-decoration: none; }
.header-nav a:hover, .text-button:hover { color: var(--ink); }
.header-nav form { margin: 0; }
.text-button { padding: 0; border: 0; background: none; cursor: pointer; }
.user-chip { padding-left: 18px; border-left: 1px solid var(--line); color: var(--ink); font-weight: 650; }
.connection-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; background: #ecefed; }
.connection-pill > span { width: 7px; height: 7px; border-radius: 50%; background: #a1aaa5; }
.connection-pill.is-ready > span { background: #39a66b; box-shadow: 0 0 0 3px #d9f2e4; }
.store-chip { display: flex; flex-direction: column; padding: 5px 14px 5px 0; border-right: 1px solid var(--line); color: var(--ink) !important; font-size: 12px; }
.store-chip small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 600; }

.page-shell { width: min(1460px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 80px; }
.message-stack { position: fixed; z-index: 50; top: 84px; right: 24px; display: grid; gap: 8px; width: min(420px, calc(100% - 48px)); }
.message { padding: 14px 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--shadow); font-size: 14px; }
.message-success { border-color: #b9dfc8; background: #f1fbf5; }
.message-error { border-color: #efbcbc; background: #fff5f5; }

.eyebrow, .section-label { color: var(--forest-2); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.catalog-hero { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; min-height: 260px; padding: clamp(30px, 5vw, 60px); border-radius: 26px; background: var(--forest); color: var(--white); box-shadow: var(--shadow); }
.catalog-hero::after { content: ""; position: absolute; right: -70px; top: -130px; width: 390px; height: 390px; border: 1px solid rgba(217,243,108,.26); border-radius: 50%; box-shadow: 0 0 0 60px rgba(217,243,108,.04), 0 0 0 120px rgba(217,243,108,.025); }
.catalog-hero > * { position: relative; z-index: 1; }
.catalog-hero .eyebrow { color: var(--lime); }
.catalog-hero h1 { max-width: 700px; margin: 12px 0 13px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 5vw, 67px); font-weight: 500; letter-spacing: -.045em; line-height: .98; }
.catalog-hero p { max-width: 680px; margin: 0; color: #c9d7d1; font-size: 16px; line-height: 1.6; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; padding: 10px 17px; border: 1px solid transparent; border-radius: 11px; font-size: 13px; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, .thumbnail:focus-visible { outline: 3px solid rgba(49,91,255,.25); outline-offset: 2px; }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button-primary { background: var(--forest); color: var(--white); }
.button-primary:hover:not(:disabled) { background: var(--forest-2); }
.button-secondary { border-color: var(--line); background: var(--white); color: var(--ink); }
.button-secondary:hover:not(:disabled) { border-color: #b8c3bd; background: var(--soft); }
.button-light { min-width: 160px; background: var(--lime); color: var(--lime-ink); }
.button-ai { min-width: 190px; background: var(--blue); color: var(--white); box-shadow: 0 8px 20px rgba(49,91,255,.2); }
.button-danger { border-color: #efbcbc; background: var(--white); color: var(--red); }
.button-danger:hover:not(:disabled) { background: var(--red-soft); }
.button-wide { width: 100%; }

.setup-notice { display: flex; align-items: center; gap: 14px; margin: 18px 0 0; padding: 15px 18px; border: 1px solid #e8d390; border-radius: 14px; background: var(--amber-soft); color: #5e460e; }
.setup-notice p { margin: 3px 0 0; font-size: 13px; }
.setup-notice code { padding: 2px 5px; border-radius: 5px; background: rgba(255,255,255,.6); }
.notice-icon { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 50%; background: #f3ca4e; font-weight: 900; }

.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.metric-row article { display: flex; align-items: center; justify-content: space-between; min-height: 82px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.8); }
.metric-row span { color: var(--muted); font-size: 12px; font-weight: 650; }
.metric-row strong { font-family: Georgia, serif; font-size: 29px; font-weight: 500; }
.metric-row .metric-alert { border-color: #ecc2b6; background: #fff8f6; }
.metric-row .metric-focus { border-color: #cbd6ff; background: #f6f8ff; }

.catalog-panel, .surface { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 9px 30px rgba(25,45,36,.045); }
.panel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.search-form { display: flex; align-items: center; flex: 1; max-width: 600px; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.search-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-form a { color: var(--blue); font-size: 12px; font-weight: 700; text-decoration: none; }
.sync-summary { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.sync-summary time { padding-left: 8px; border-left: 1px solid var(--line); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #a4ada8; }
.status-completed { background: #36a067; }
.status-running, .status-pending { background: #3767ff; animation: pulse 1.4s infinite; }
.status-failed, .status-partial { background: #d4684c; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(55,103,255,0); } 0%,100% { box-shadow: 0 0 0 2px rgba(55,103,255,.15); } }

.product-table { width: 100%; }
.product-row { display: grid; grid-template-columns: minmax(300px, 2fr) minmax(130px,.7fr) minmax(150px,.8fr) minmax(120px,.65fr) 24px; align-items: center; gap: 16px; min-height: 88px; padding: 13px 20px; border-bottom: 1px solid var(--line); text-decoration: none; }
.product-row:last-child { border-bottom: 0; }
a.product-row { transition: background .15s ease; }
a.product-row:hover { background: #f9fbfa; }
.product-head { min-height: 42px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.product-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.product-identity img, .image-fallback { flex: 0 0 60px; width: 60px; height: 60px; border-radius: 11px; object-fit: cover; background: var(--soft); }
.image-fallback { display: grid; place-items: center; color: #929c97; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.product-identity > span:last-child { min-width: 0; }
.product-identity strong, .product-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-identity strong { margin-bottom: 5px; font-size: 14px; }
.product-identity small, .product-row time { color: var(--muted); font-size: 11px; }
.row-arrow { color: #7a867f; font-size: 19px; }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 15px; padding: 16px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pagination a { color: var(--forest-2); font-weight: 750; text-decoration: none; }
.pagination a:last-child { justify-self: end; }
.badge { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 999px; background: #edf0ee; color: #58625d; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.badge-draft { background: var(--blue-soft); color: #3550ba; }
.badge-approved { background: #e6f6eb; color: #247344; }
.badge-published, .badge-synced { background: #edf5f1; color: #356450; }
.badge-conflict, .badge-error, .badge-missing { background: var(--red-soft); color: var(--red); }
.badge-superseded { background: #f0f0f0; color: #707070; }
.badge-updated, .badge-generated, .badge-completed { background: #e6f6eb; color: #247344; }
.badge-needs-update, .badge-failed, .badge-partial { background: var(--red-soft); color: var(--red); }
.badge-running, .badge-pending { background: var(--blue-soft); color: #3550ba; }
.badge-skipped { background: var(--amber-soft); color: var(--amber); }
.badge-connected { background: #e6f6eb; color: #247344; }
.badge-unverified { background: var(--amber-soft); color: var(--amber); }
.badge-disabled { background: #edf0ee; color: #66716b; }
.empty-state { display: grid; place-items: center; min-height: 310px; padding: 48px 20px; text-align: center; }
.empty-state h2 { margin: 22px 0 8px; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.empty-state p { max-width: 470px; margin: 0; color: var(--muted); }
.empty-illustration { position: relative; width: 100px; height: 76px; }
.empty-illustration span { position: absolute; width: 54px; height: 66px; border: 1px solid #cad3ce; border-radius: 9px; background: var(--white); box-shadow: 0 8px 18px rgba(25,45,36,.08); }
.empty-illustration span:nth-child(1) { left: 0; top: 10px; transform: rotate(-9deg); }
.empty-illustration span:nth-child(2) { left: 23px; top: 0; z-index: 2; }
.empty-illustration span:nth-child(3) { right: 0; top: 10px; transform: rotate(9deg); }

.back-link { display: inline-block; margin: 0 0 22px; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--ink); }
.product-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 0 4px 28px; }
.heading-meta { display: flex; gap: 7px; margin-bottom: 11px; }
.product-heading h1 { max-width: 900px; margin: 0 0 8px; font-family: Georgia, serif; font-size: clamp(36px, 5vw, 58px); font-weight: 500; letter-spacing: -.035em; line-height: 1; }
.product-heading p { margin: 0; color: var(--muted); }
.product-sync-meta { text-align: right; }
.product-sync-meta span, .product-sync-meta strong { display: block; }
.product-sync-meta span { margin-bottom: 5px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.product-sync-meta strong { font-size: 13px; }

.detail-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); align-items: start; gap: 18px; }
.product-aside { position: sticky; top: 92px; display: grid; gap: 18px; }
.image-stage { padding: 14px; }
.image-stage > img { width: 100%; aspect-ratio: 1; border-radius: 13px; object-fit: contain; background: var(--soft); }
.large-image-fallback { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 13px; background: var(--soft); color: var(--muted); font-size: 13px; }
.image-error-fallback { padding: 24px; text-align: center; }
.image-error-fallback small { margin-top: 7px; font-size: 10px; line-height: 1.5; }
.thumbnail-strip { display: flex; gap: 8px; overflow-x: auto; padding-top: 11px; }
.thumbnail { flex: 0 0 52px; width: 52px; height: 52px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); cursor: pointer; }
.thumbnail.is-selected { border-color: var(--forest); box-shadow: 0 0 0 2px rgba(23,63,53,.12); }
.thumbnail img { width: 100%; height: 100%; border-radius: 6px; object-fit: cover; }
.thumbnail.is-unavailable { display: grid; place-items: center; color: var(--muted); cursor: not-allowed; font-size: 7px; line-height: 1.15; text-align: center; }
.thumbnail.is-unavailable::after { content: "Image unavailable"; }
.thumbnail.is-unavailable img { display: none; }
.facts-card { padding: 20px; }
.facts-card dl, .draft-provenance dl { margin: 12px 0 0; }
.facts-card dl div, .draft-provenance dl div { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts-card dl div:last-child, .draft-provenance dl div:last-child { border-bottom: 0; }
.facts-card dt, .draft-provenance dt { color: var(--muted); font-size: 11px; }
.facts-card dd, .draft-provenance dd { overflow-wrap: anywhere; margin: 0; font-size: 12px; font-weight: 650; }
.content-workspace { display: grid; gap: 18px; }
.surface { overflow: hidden; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.section-heading > div:first-child { display: flex; align-items: center; gap: 13px; }
.section-heading h2 { margin: 0 0 4px; font-size: 17px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.step-number { display: grid; place-items: center; flex: 0 0 31px; height: 31px; border-radius: 9px; background: var(--forest); color: var(--lime); font-size: 12px; font-weight: 800; }
.source-grid { display: grid; grid-template-columns: 1fr 1fr; }
.source-grid article { min-width: 0; padding: 21px 24px 24px; }
.source-grid article + article { border-left: 1px solid var(--line); }
.source-grid header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.source-grid header strong { font-size: 13px; }
.source-grid header span { color: var(--muted); font-size: 10px; }
.description-preview { overflow: auto; min-height: 130px; max-height: 260px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); color: #344038; font-family: Georgia, serif; font-size: 14px; line-height: 1.65; }
.description-preview p:first-child { margin-top: 0; }
.description-preview p:last-child { margin-bottom: 0; }
.source-grid form { margin-top: 13px; }
.muted { color: var(--muted); }
.integration-badge { padding: 6px 9px; border-radius: 999px; background: #f0f1f0; color: var(--muted); font-size: 10px; font-weight: 750; }
.integration-badge.ready { background: #e8f6ed; color: #247344; }
.generate-controls { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 22px 24px 24px; }
.generate-controls fieldset { display: flex; flex: 1; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.generate-controls legend { width: 100%; margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 750; }
.choice-card { position: relative; display: flex; align-items: center; flex: 1; max-width: 280px; min-height: 61px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.choice-card:has(input:checked) { border-color: var(--blue); background: #f7f8ff; box-shadow: 0 0 0 2px rgba(49,91,255,.09); }
.choice-card input { margin: 0 10px 0 0; accent-color: var(--blue); }
.choice-card strong, .choice-card small { display: block; }
.choice-card strong { margin-bottom: 3px; font-size: 12px; }
.choice-card small { color: var(--muted); font-size: 10px; }
.field-note { margin: -10px 24px 20px; color: var(--amber); font-size: 11px; }
.editor-card form { padding: 0 24px 24px; }
.title-editor-field { display: grid; gap: 7px; padding: 18px 0 2px; }
.title-editor-field label { color: var(--ink); font-size: 12px; font-weight: 750; }
.title-editor-field input { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fcfdfc; color: var(--ink); }
.title-editor-field .field-note { margin: 0; color: var(--muted); }
.editor-toolbar { display: flex; align-items: center; gap: 6px; padding: 13px 0 9px; }
.editor-toolbar button { min-width: 34px; height: 31px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--ink); font-size: 11px; cursor: pointer; }
.editor-toolbar button:hover { background: var(--soft); }
.editor-toolbar span { margin-left: auto; color: var(--muted); font-size: 10px; }
#description-editor { width: 100%; resize: vertical; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fcfdfc; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; line-height: 1.6; }
.editor-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(200px,.7fr); gap: 14px; margin-top: 16px; }
.editor-split .section-label { display: block; margin-bottom: 8px; }
.editor-preview { min-height: 170px; }
.draft-provenance { padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.action-bar { display: flex; gap: 9px; margin-top: 16px; }
.action-bar.right { justify-content: flex-end; padding: 0 24px 24px; }
.action-bar form { margin: 0; }
.publish-flow { display: grid; grid-template-columns: 1fr 70px 1fr; align-items: center; padding: 24px; }
.publish-stage { display: flex; align-items: center; gap: 12px; }
.publish-stage > span { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 50%; background: #edf0ee; color: #6b756f; font-size: 12px; font-weight: 800; }
.publish-stage.is-complete > span { background: #dff2e6; color: #247344; }
.publish-stage strong, .publish-stage small { display: block; }
.publish-stage strong { margin-bottom: 4px; font-size: 13px; }
.publish-stage small { color: var(--muted); font-size: 10px; }
.flow-line { height: 1px; background: var(--line); }
.empty-inline { padding: 30px 24px; color: var(--muted); font-size: 13px; text-align: center; }
.history-card summary { padding: 18px 22px; cursor: pointer; font-size: 13px; font-weight: 750; }
.history-card summary span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 7px; border-radius: 999px; background: var(--soft); font-size: 10px; }
.history-list { padding: 0 22px 18px; }
.history-list > div { display: grid; grid-template-columns: 100px 130px 1fr; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.history-list strong { font-size: 12px; }
.history-list small { color: var(--muted); font-size: 11px; }

.login-shell { width: 100%; min-height: 100vh; margin: 0; padding: 0; }
.login-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(380px,.65fr); min-height: 100vh; }
.login-story { display: flex; flex-direction: column; justify-content: center; padding: clamp(50px, 9vw, 140px); background: radial-gradient(circle at 20% 80%, rgba(217,243,108,.12), transparent 24rem), var(--forest); color: var(--white); }
.login-story .eyebrow { color: var(--lime); }
.login-story h1 { max-width: 780px; margin: 17px 0 22px; font-family: Georgia, serif; font-size: clamp(50px, 7vw, 98px); font-weight: 500; letter-spacing: -.055em; line-height: .93; }
.login-story p { max-width: 600px; margin: 0; color: #c4d2cc; font-size: 17px; line-height: 1.7; }
.story-flow { display: flex; align-items: center; gap: 13px; margin-top: 54px; color: #adbbb5; font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.story-flow i { color: var(--lime); font-style: normal; }
.login-card { align-self: center; width: min(410px, calc(100% - 60px)); margin: 30px auto; padding: 36px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); box-shadow: var(--shadow); }
.login-card h2 { margin: 0 0 7px; font-family: Georgia, serif; font-size: 33px; font-weight: 500; }
.login-card > p { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.login-card > small { display: block; margin-top: 18px; color: var(--muted); text-align: center; }
.stack-form { display: grid; gap: 9px; }
.stack-form label { margin-top: 5px; font-size: 11px; font-weight: 750; }
.stack-form input { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.stack-form .button { margin-top: 10px; }
.field-error { margin-bottom: 13px; padding: 10px 12px; border-radius: 9px; background: var(--red-soft); color: var(--red); font-size: 12px; }

.store-hero { max-width: 900px; padding: 36px 4px 28px; }
.store-hero.store-hero-actions { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.store-hero h1 { margin: 13px 0 14px; font-family: Georgia, serif; font-size: clamp(42px, 6vw, 72px); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.store-hero p { max-width: 700px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; }
.store-card { position: relative; overflow: hidden; padding: 25px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: 0 10px 35px rgba(25,45,36,.06); }
.store-card-mark { position: absolute; right: -18px; top: -35px; display: grid; place-items: center; width: 145px; height: 145px; border-radius: 50%; background: var(--soft); color: #d3dbd6; font-family: Georgia, serif; font-size: 70px; }
.store-card-heading { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.store-card h2 { margin: 9px 0 5px; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.store-card p { margin: 0; color: var(--muted); font-size: 12px; }
.store-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 26px 0 22px; }
.store-metrics div { padding: 13px; border-radius: 11px; background: var(--paper); }
.store-metrics dt, .store-metrics dd { margin: 0; }
.store-metrics dt { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.store-metrics dd { margin-top: 7px; font-family: Georgia, serif; font-size: 25px; }
.store-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.store-card-footer > span { color: var(--muted); font-size: 11px; }
.store-card-actions, .hero-actions { display: flex; align-items: center; gap: 9px; }
.store-card-actions form, .hero-actions form { margin: 0; }
.store-card-mark.small { position: static; flex: 0 0 48px; width: 48px; height: 48px; font-size: 23px; }

.shop-connection-note { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; padding: 15px 18px; border: 1px solid #cbd6ff; border-radius: 14px; background: #f6f8ff; color: #3f518f; font-size: 12px; }
.shop-connection-note code { padding: 2px 5px; border-radius: 5px; background: var(--white); color: #344a9f; }
.store-management-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; align-items: start; gap: 18px; margin-bottom: 18px; }
.store-connection-form { display: grid; gap: 13px; padding: 24px; }
.store-connection-form > div { display: grid; gap: 7px; }
.store-connection-form label { font-size: 11px; font-weight: 800; }
.store-connection-form input, .inline-rename-form input { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; }
.store-connection-form small { color: var(--muted); font-size: 10px; }
.store-connection-form .errorlist { margin: 0; padding: 0; color: var(--red); font-size: 11px; list-style: none; }
.store-connection-form .button { justify-self: start; margin-top: 4px; }
.store-security-card { padding: 24px; }
.store-security-card h2 { margin: 9px 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.store-security-card ul { display: grid; gap: 11px; margin: 18px 0 0; padding-left: 18px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.managed-store-list { display: grid; }
.managed-store-row { display: grid; grid-template-columns: minmax(260px,1fr) 150px minmax(390px,auto); align-items: center; gap: 18px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.managed-store-row:last-child { border-bottom: 0; }
.managed-store-main { display: flex; align-items: center; gap: 13px; min-width: 0; }
.managed-store-main > div { min-width: 0; }
.managed-store-main strong, .managed-store-main small, .managed-store-error { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.managed-store-main strong { margin-bottom: 5px; font-size: 13px; }
.managed-store-main small, .managed-store-status small { color: var(--muted); font-size: 10px; }
.managed-store-error { margin-top: 5px; color: var(--red); font-size: 10px; }
.managed-store-status { display: grid; justify-items: start; gap: 6px; }
.managed-store-actions { display: flex; justify-content: flex-end; gap: 7px; }
.managed-store-actions form { margin: 0; }
.managed-store-actions .button { min-height: 37px; padding: 8px 11px; font-size: 10px; white-space: nowrap; }
.inline-rename-form { display: flex; gap: 6px; }
.inline-rename-form input { width: 145px; min-height: 37px; padding: 7px 9px; font-size: 10px; }

.profile-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 10px 4px 28px; }
.profile-hero h1 { margin: 11px 0 9px; font-family: Georgia, serif; font-size: clamp(42px, 6vw, 70px); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.profile-hero p { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.6; }
.profile-scope { padding: 8px 11px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 18px; }
.profile-form { overflow: visible; }
.profile-lock-notice { display: grid; gap: 4px; padding: 14px 28px; border-bottom: 1px solid #f2d5a3; background: var(--amber-soft); color: var(--amber); font-size: 11px; }
.profile-lock-notice strong { font-size: 12px; }
.profile-section { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); gap: 36px; padding: 28px; border-bottom: 1px solid var(--line); }
.profile-section-copy h2, .profile-guardrails h2 { margin: 8px 0; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.profile-section-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.profile-fields { display: grid; gap: 8px; }
.profile-fields label { margin-top: 7px; font-size: 11px; font-weight: 800; }
.profile-fields input:not([type="checkbox"]), .profile-fields textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; line-height: 1.5; }
.profile-fields textarea { resize: vertical; }
.profile-fields small { color: var(--muted); font-size: 10px; }
.profile-fields .errorlist { margin: 0; padding: 0; color: var(--red); font-size: 11px; list-style: none; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-pair > div { display: grid; gap: 8px; }
.checkbox-field { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); cursor: pointer; }
.checkbox-field input { margin-top: 2px; accent-color: var(--forest); }
.profile-save-bar { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 28px; border-radius: 0 0 16px 16px; background: var(--forest); color: var(--white); }
.profile-save-bar span { color: #c4d2cc; font-size: 11px; }
.profile-guardrails { position: sticky; top: 92px; padding: 24px; }
.profile-guardrails ul { display: grid; gap: 12px; margin: 18px 0; padding-left: 19px; color: #344038; font-size: 12px; line-height: 1.55; }
.profile-guardrails p { margin: 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.6; }

.bulk-panel { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.5fr); align-items: center; gap: 30px; margin: 18px 0; padding: 24px; }
.bulk-copy h2 { margin: 8px 0; font-size: 19px; }
.bulk-copy p { max-width: 850px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.bulk-copy code { padding: 2px 5px; border-radius: 5px; background: var(--soft); color: var(--forest-2); }
.bulk-actions { display: grid; justify-items: stretch; gap: 9px; }
.bulk-actions form, .bulk-actions button { width: 100%; }
.bulk-actions small { color: var(--muted); text-align: center; }
.bulk-status-link { display: flex; align-items: center; gap: 8px; width: fit-content; margin-top: 12px; color: var(--forest-2); font-size: 11px; font-weight: 700; text-decoration: none; }
.catalog-filters { align-items: stretch; }
.filter-pills { display: flex; align-items: center; gap: 5px; padding: 4px; border-radius: 11px; background: var(--soft); }
.filter-pills a { padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 10px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.filter-pills a.is-active { background: var(--white); color: var(--ink); box-shadow: 0 1px 5px rgba(25,45,36,.08); }
.sync-strip { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 11px; }
.sync-strip time { padding-left: 8px; border-left: 1px solid var(--line); }
.sync-error { overflow: hidden; margin-left: auto; color: var(--red); text-overflow: ellipsis; white-space: nowrap; }

.bulk-run-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 32px 4px 12px; }
.bulk-run-hero h1 { margin: 10px 0 9px; font-family: Georgia, serif; font-size: clamp(42px, 6vw, 68px); font-weight: 500; letter-spacing: -.04em; }
.bulk-run-hero p { margin: 0; color: var(--muted); }
.bulk-items .panel-toolbar h2 { margin: 6px 0 0; font-size: 18px; }
.bulk-items .panel-toolbar > span { font-size: 11px; }
.bulk-item { display: grid; grid-template-columns: minmax(280px,1fr) 150px 24px; align-items: center; gap: 18px; min-height: 86px; padding: 12px 20px; border-bottom: 1px solid var(--line); text-decoration: none; }
.bulk-item:last-child { border-bottom: 0; }
.bulk-item:hover { background: var(--paper); }
.bulk-item .badge { justify-self: start; }

.prompt-lab-hero { padding-top: 22px; }
.prompt-lab-boundary { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; margin-bottom: 18px; padding: 15px 18px; border: 1px solid #b9dfc8; border-radius: 14px; background: #f1fbf5; color: #315c43; font-size: 12px; }
.prompt-lab-boundary strong { color: #247344; }
.prompt-lookup { margin-bottom: 18px; }
.prompt-lookup-form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 15px; padding: 22px 24px 24px; }
.prompt-lookup-form > div { display: grid; gap: 7px; }
.prompt-lookup-form label, .prompt-profile-fields > label:not(.checkbox-field) { font-size: 11px; font-weight: 800; }
.prompt-lookup-form input, .prompt-run-form textarea, .prompt-run-form input:not([type="radio"]):not([type="checkbox"]) { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; }
.prompt-lookup-form small, .prompt-field-help { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.prompt-lookup-form .errorlist, .prompt-run-form .errorlist { margin: 0; padding: 0; color: var(--red); font-size: 11px; list-style: none; }
.prompt-product { margin-bottom: 18px; }
.prompt-context-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(280px,.6fr); gap: 28px; padding: 24px; border-bottom: 1px solid var(--line); }
.prompt-images, .prompt-product-facts { min-width: 0; }
.prompt-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 11px; }
.prompt-image-choice { position: relative; overflow: hidden; display: grid; gap: 7px; padding: 7px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); cursor: pointer; }
.prompt-image-choice:has(input:checked) { border-color: var(--blue); background: #f7f8ff; box-shadow: 0 0 0 2px rgba(49,91,255,.09); }
.prompt-image-choice input { position: absolute; left: 11px; top: 11px; accent-color: var(--blue); }
.prompt-image-choice img { width: 100%; aspect-ratio: 1; border-radius: 7px; object-fit: contain; background: var(--white); }
.prompt-image-choice span { overflow: hidden; padding: 0 3px 3px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.prompt-product-facts dl { margin: 11px 0 0; }
.prompt-product-facts dl div { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.prompt-product-facts dt { color: var(--muted); font-size: 10px; }
.prompt-product-facts dd { overflow-wrap: anywhere; margin: 0; font-size: 11px; font-weight: 650; }
.prompt-editor-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,.8fr); gap: 28px; padding: 24px; }
.prompt-editor-grid section { min-width: 0; }
.prompt-editor-grid textarea { resize: vertical; margin-top: 9px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.55; }
.prompt-profile-fields { display: grid; gap: 7px; }
.prompt-profile-fields textarea { margin-top: 0; font-family: inherit; }
.prompt-profile-fields .prompt-field-help { margin-bottom: 5px; }
.prompt-profile-fields .field-pair { margin: 4px 0; }
.prompt-profile-fields .field-pair > div { gap: 7px; }
.prompt-run-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 24px; border-radius: 0 0 16px 16px; background: var(--forest); color: var(--white); }
.prompt-run-bar span { color: #c4d2cc; font-size: 11px; }
.prompt-result { margin-bottom: 18px; }
.prompt-result-grid { display: grid; grid-template-columns: minmax(220px,.35fr) minmax(0,1fr); gap: 24px; padding: 24px; }
.prompt-result-grid .section-label { display: block; margin-bottom: 9px; }
.prompt-result-image { width: 100%; max-height: 430px; border-radius: 12px; object-fit: contain; background: var(--soft); }
.prompt-result-preview { min-height: 300px; max-height: 540px; }
.prompt-run-details { border-top: 1px solid var(--line); }
.prompt-run-details summary { padding: 18px 24px; cursor: pointer; font-size: 12px; font-weight: 800; }
.prompt-run-details h3 { margin: 5px 24px 8px; font-size: 12px; }
.prompt-run-details pre { overflow: auto; max-height: 320px; margin: 0 24px 20px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: 10px; line-height: 1.55; white-space: pre-wrap; }
.prompt-history { margin-top: 18px; }
.prompt-run-list { display: grid; }
.prompt-run-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 15px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.prompt-run-row:last-child { border-bottom: 0; }
.prompt-run-row > a { min-width: 0; text-decoration: none; }
.prompt-run-row strong, .prompt-run-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prompt-run-row strong { margin-bottom: 5px; font-size: 13px; }
.prompt-run-row small { color: var(--muted); font-size: 10px; }
.prompt-run-row form { margin: 0; }
.prompt-run-row .button { min-height: 35px; padding: 7px 11px; font-size: 10px; }

@media (max-width: 1000px) {
  .metric-row { grid-template-columns: repeat(2, 1fr); }
  .product-row { grid-template-columns: minmax(260px, 2fr) 120px 140px 22px; }
  .product-row > :nth-child(4) { display: none; }
  .detail-layout { grid-template-columns: 1fr; }
  .product-aside { position: static; grid-template-columns: minmax(260px, .8fr) 1fr; }
  .login-layout { grid-template-columns: 1fr; }
  .login-story { min-height: 48vh; padding: 55px clamp(28px, 8vw, 90px); }
  .login-story h1 { max-width: 740px; font-size: clamp(46px, 9vw, 75px); }
  .login-card { margin: 60px auto; }
  .bulk-panel { grid-template-columns: 1fr; }
  .catalog-filters { flex-direction: column; }
  .filter-pills { align-self: flex-start; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-guardrails { position: static; }
  .prompt-context-grid, .prompt-editor-grid, .prompt-result-grid { grid-template-columns: 1fr; }
  .store-management-layout { grid-template-columns: 1fr; }
  .managed-store-row { grid-template-columns: minmax(250px,1fr) auto; }
  .managed-store-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 720px) {
  .app-header { align-items: flex-start; padding: 12px 18px; }
  .header-nav { gap: 10px; }
  .connection-pill, .user-chip, .store-chip { display: none; }
  .page-shell { width: min(100% - 24px, 1460px); padding-top: 20px; }
  .catalog-hero { min-height: 330px; align-items: flex-start; flex-direction: column; padding: 30px 24px; }
  .catalog-hero h1 { font-size: 43px; }
  .metric-row { grid-template-columns: 1fr 1fr; }
  .metric-row article { min-height: 72px; padding: 15px; }
  .metric-row span { max-width: 90px; }
  .panel-toolbar { align-items: stretch; flex-direction: column; gap: 12px; }
  .sync-summary { flex-wrap: wrap; }
  .product-head { display: none; }
  .product-row { grid-template-columns: 1fr auto; min-height: 86px; }
  .product-row > :nth-child(2), .product-row > :nth-child(3), .product-row > :nth-child(4) { display: none; }
  .product-heading { align-items: flex-start; flex-direction: column; }
  .product-sync-meta { text-align: left; }
  .product-aside { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; padding: 18px; }
  .source-grid { grid-template-columns: 1fr; }
  .source-grid article { padding: 18px; }
  .source-grid article + article { border-top: 1px solid var(--line); border-left: 0; }
  .generate-controls { align-items: stretch; flex-direction: column; padding: 18px; }
  .generate-controls fieldset { flex-direction: column; }
  .choice-card { max-width: none; }
  .editor-card form { padding: 0 18px 18px; }
  .editor-split { grid-template-columns: 1fr; }
  .publish-flow { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .flow-line { width: 1px; height: 20px; margin-left: 17px; }
  .action-bar.right { justify-content: stretch; padding: 0 18px 18px; }
  .action-bar.right form, .action-bar.right button { width: 100%; }
  .history-list > div { grid-template-columns: 90px 1fr; }
  .history-list small { grid-column: 1 / -1; }
  .login-story { min-height: 55vh; }
  .story-flow { flex-wrap: wrap; margin-top: 35px; }
  .login-card { width: calc(100% - 32px); margin: 30px auto; padding: 27px; }
  .store-grid { grid-template-columns: 1fr; }
  .store-hero.store-hero-actions { align-items: flex-start; flex-direction: column; }
  .store-card { padding: 20px; }
  .store-card-heading { flex-direction: column; }
  .store-metrics { grid-template-columns: 1fr 1fr 1fr; }
  .store-card-footer { align-items: stretch; flex-direction: column; }
  .store-card-actions { align-items: stretch; flex-direction: column; }
  .store-card-footer form, .store-card-footer button, .store-card-actions .button { width: 100%; }
  .hero-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .hero-actions .button, .hero-actions form, .hero-actions button { width: 100%; }
  .profile-hero { align-items: flex-start; flex-direction: column; }
  .profile-section { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
  .field-pair { grid-template-columns: 1fr; }
  .profile-save-bar { align-items: stretch; flex-direction: column; padding: 16px 20px; }
  .profile-save-bar .button { width: 100%; }
  .filter-pills { width: 100%; overflow-x: auto; }
  .bulk-item { grid-template-columns: 1fr auto; }
  .bulk-item .row-arrow { display: none; }
  .prompt-lab-boundary { grid-template-columns: 1fr; }
  .prompt-lookup-form { grid-template-columns: 1fr; padding: 18px; }
  .prompt-lookup-form .button { width: 100%; }
  .prompt-context-grid, .prompt-editor-grid, .prompt-result-grid { padding: 18px; }
  .prompt-run-bar { align-items: stretch; flex-direction: column; padding: 16px 18px; }
  .prompt-run-bar .button { width: 100%; }
  .prompt-run-row { grid-template-columns: 1fr auto; }
  .prompt-run-row form { grid-column: 1 / -1; }
  .prompt-run-row form, .prompt-run-row .button { width: 100%; }
  .shop-connection-note { align-items: flex-start; flex-direction: column; }
  .store-connection-form .button { width: 100%; }
  .managed-store-row { grid-template-columns: 1fr; }
  .managed-store-actions { display: grid; grid-column: auto; }
  .managed-store-actions form, .managed-store-actions .button { width: 100%; }
  .inline-rename-form { display: grid; grid-template-columns: minmax(0,1fr) auto; }
  .inline-rename-form input { width: 100%; }
}
