:root {
  color-scheme: light;
  --ink: #18211e;
  --muted: #66716d;
  --paper: #f4f1eb;
  --surface: #fffdf9;
  --line: #ded9cf;
  --forest: #18342c;
  --forest-soft: #e2ece7;
  --sand: #b98a55;
  --danger: #9d3f37;
  --shadow: 0 12px 35px rgba(26, 40, 34, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.55; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 200; padding: 12px; background: var(--surface); }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
a:focus-visible, summary:focus-visible { outline: 3px solid #53866e; outline-offset: 4px; }
main:focus { outline: none; }
h1, h2, h3 { text-wrap: balance; overflow-wrap: anywhere; scroll-margin-top: 90px; }
td, .metric-card strong { font-variant-numeric: tabular-nums; }
.quick-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 28px; }
.quick-actions a { min-width: 0; display: grid; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-decoration: none; }
.quick-actions a:hover { border-color: var(--forest); background: var(--forest-soft); }
.quick-actions span { font-size: 13px; color: var(--muted); }
.research-create { align-items: start; }
.research-card { min-width: 0; overflow-wrap: anywhere; }
.research-card p { min-height: 0; }
.research-source-links { margin-bottom: 24px; }
.research-secondary-form { margin-top: 18px; }
.evidence-text { max-height: 600px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; background: var(--paper); border-radius: 12px; font: inherit; font-size: 14px; }
.filter-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter-links a { padding: 10px 14px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.filter-links a[aria-current], .filter-links a:hover { background: var(--forest-soft); color: var(--forest); }
@media (max-width: 800px) { .quick-actions { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; }
.topbar { min-height: 68px; padding: 12px max(18px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; }
.brand span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.brand small, .share-header small { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--forest); color: white; font-family: Georgia, serif; font-size: 22px; }
.primary-nav { position: sticky; top: 0; z-index: 10; display: flex; gap: 4px; padding: 8px max(14px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--surface) 94%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); overflow-x: auto; }
.primary-nav a { min-height: 42px; padding: 10px 14px; display: inline-flex; align-items: center; border-radius: 12px; text-decoration: none; color: var(--muted); white-space: nowrap; }
.primary-nav a[aria-current="page"] { color: var(--forest); background: var(--forest-soft); font-weight: 650; }
.page-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 72px; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 6vw, 62px); font-weight: 500; line-height: 1.04; letter-spacing: -.035em; }
h2 { margin-bottom: 14px; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; }
h3 { margin-bottom: 8px; font-size: 19px; }
.eyebrow { margin-bottom: 8px; color: var(--sand); font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.lede { max-width: 720px; color: var(--muted); font-size: 17px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.button { min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 650; text-decoration: none; }
.button:hover { border-color: var(--forest); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(24, 52, 44, .24); outline-offset: 2px; }
.button-primary { border-color: var(--forest); background: var(--forest); color: white; }
.button-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.button-danger { margin-top: 12px; border-color: #d9aaa5; color: var(--danger); }
.button-block { width: 100%; }
.panel { margin: 0 0 28px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.focus-panel { border-color: #b7c9c0; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.section-heading h1, .section-heading h2 { margin-bottom: 0; }
.count-pill, .status { display: inline-flex; align-items: center; width: fit-content; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.count-pill { background: var(--forest-soft); color: var(--forest); }
.status { background: #ece9e2; color: #625f58; }
.status-review, .status-client_review, .status-ready_for_review, .status-running, .status-waiting_callback { background: #fff0cd; color: #795619; }
.status-succeeded, .status-approved, .status-won, .status-active { background: #dff0e4; color: #225b38; }
.status-failed, .status-rejected, .status-lost { background: #f6dedb; color: var(--danger); }
.status-generating, .status-queued, .status-proposed { background: #e1e8f6; color: #38577f; }
.status-engaged, .status-qualified, .status-proposal { background: #dff0e4; color: #225b38; }
.status-contacted, .status-researching, .status-draft_ready, .status-negotiation, .status-discovery { background: #fff0cd; color: #795619; }
.status-suppressed, .status-archived { background: #ece9e2; color: #625f58; }
.status-draft { background: #fff0cd; color: #795619; }
.status-published { background: #dff0e4; color: #225b38; }
.project-grid, .workflow-grid, .version-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project-card, .workflow-card, .version-card { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.project-card { min-height: 190px; padding: 20px; text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
.project-card:hover { transform: translateY(-2px); border-color: #aabeb4; }
.project-card-top, .project-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.project-card h3 { margin-top: 28px; }
.project-card p { min-height: 48px; color: var(--muted); }
.project-meta { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.workflow-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.workflow-card p { flex: 1; color: var(--muted); }
.workflow-card small { min-height: 40px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stack-form { display: grid; gap: 15px; }
.span-full { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: #444d49; font-size: 14px; font-weight: 650; }
input, textarea, select { width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); }
textarea { resize: vertical; }
.upload-zone { min-height: 110px; padding: 20px; place-items: center; border: 1px dashed #98aaa1; border-radius: 14px; background: #f3f8f5; text-align: center; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.empty-state { padding: 42px 24px; border: 1px dashed #b9b5ac; border-radius: 18px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 18px; }
.project-hero { margin-bottom: 28px; }
.back-link { display: inline-block; margin-bottom: 26px; color: var(--muted); text-decoration: none; }
.brief-copy { max-width: 800px; padding-left: 16px; border-left: 3px solid var(--sand); white-space: pre-wrap; }
.compact-list { margin: 18px 0 0; padding: 0; list-style: none; }
.compact-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.compact-list span { color: var(--muted); text-align: right; }
.helper, .muted { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.version-card img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; background: #ddd; }
.version-body { padding: 17px; }
.version-body p { margin: 14px 0; color: var(--muted); font-size: 14px; white-space: pre-wrap; }
.action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.approved-mark { color: #225b38; font-weight: 700; }
.feedback-form { display: grid; gap: 9px; margin-top: 12px; }
.share-result { display: block; margin-top: 12px; color: var(--forest); overflow-wrap: anywhere; }
.share-result a { font-weight: 700; }
.asset-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.asset-strip figure { margin: 0; }
.asset-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: #ddd; }
.asset-strip figcaption { margin-top: 5px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-file-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.project-file-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.project-file-card > img { display: block; width: 100%; height: 160px; object-fit: cover; }
.document-placeholder { display: grid; place-content: center; gap: 8px; text-align: center; height: 160px; background: #eaf1ed; color: var(--forest); }
.document-placeholder strong { font-size: 30px; }
.document-placeholder span { font-size: 13px; }
.project-file-body { padding: 16px; }
.project-file-name { display: block; overflow-wrap: anywhere; }
.project-file-body .button { margin-top: 14px; }
.timeline { padding: 0; list-style: none; }
.priority-list { margin: 0; padding: 0; list-style: none; }
.priority-list li { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.priority-list strong { color: var(--forest); }
.timeline li { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.timeline p { margin: 5px 0 0; color: var(--muted); }
.error-copy { color: var(--danger); }
.recommendation-list { display: grid; gap: 10px; }
.recommendation-list article { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.recommendation-list p { margin: 5px 0 0; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.login-panel { width: min(460px, 100%); margin: 6vh auto 0; padding: 32px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.login-panel h1 { font-size: clamp(34px, 8vw, 50px); }
.notice { padding: 12px 14px; border-radius: 12px; background: #fff0cd; }
.notice-error { background: #f6dedb; color: var(--danger); }
.toast { position: fixed; z-index: 100; right: 18px; bottom: 22px; max-width: min(420px, calc(100% - 36px)); padding: 13px 16px; border-radius: 12px; background: var(--forest); color: white; box-shadow: var(--shadow); }
.share-page { background: var(--surface); }
.share-header { display: flex; align-items: center; gap: 10px; padding: 18px max(20px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); }
.share-header div { display: flex; flex-direction: column; }
.share-shell { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 44px 0 70px; }
.share-gallery { display: grid; gap: 24px; margin: 30px 0; }
.share-gallery figure { margin: 0; }
.share-gallery img { width: 100%; display: block; border-radius: 20px; box-shadow: var(--shadow); }
.share-gallery figcaption { padding: 10px 4px; color: var(--muted); }
.share-footnote { margin-top: 40px; color: var(--muted); font-size: 12px; text-align: center; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 28px; }
.metric-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.metric-card span, .metric-card small { display: block; color: var(--muted); }
.metric-card strong { display: block; margin: 6px 0; color: var(--forest); font-family: Georgia, serif; font-size: 34px; font-weight: 500; line-height: 1; }
.metric-card small { font-size: 12px; }
.compact-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.action-panel { border-color: #b7c9c0; }
.action-list { display: grid; }
.action-list article { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.priority-marker { width: 6px; height: 100%; min-height: 52px; border-radius: 999px; background: #a8aaa5; }
.priority-high { background: var(--danger); }
.priority-medium { background: var(--sand); }
.priority-low { background: #779b89; }
.action-copy p { margin: 4px 0; color: var(--muted); }
.action-copy small { color: var(--muted); }
.operations-detail { margin-top: 30px; }
.operations-detail > summary, .edit-details > summary, .message-list summary, .table-action > summary { cursor: pointer; font-weight: 700; }
.detail-stack { display: grid; gap: 32px; margin-top: 28px; }
.funnel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; margin-bottom: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--line); }
.funnel article { padding: 16px 12px; background: var(--surface); }
.funnel span { display: block; color: var(--muted); font-size: 12px; }
.funnel strong { display: block; margin-top: 6px; color: var(--forest); font-size: 28px; }
.message-list { display: grid; gap: 16px; }
.message-list > article { padding: 18px; border: 1px solid var(--line); border-radius: 15px; }
.message-heading { display: flex; justify-content: space-between; gap: 16px; }
.message-heading p { margin: 4px 0 14px; color: var(--muted); }
.score-badge { min-width: 48px; height: 32px; padding: 5px 8px; border-radius: 10px; background: var(--forest-soft); color: var(--forest); font-weight: 750; text-align: center; }
.message-body { margin: 12px 0 16px; padding: 16px; border-radius: 12px; background: #f6f4ef; white-space: pre-wrap; }
.lead-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lead-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.lead-card > p { color: var(--muted); }
.fact-list { display: grid; gap: 7px; margin: 16px 0; }
.fact-list div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; }
.fact-list dt { color: var(--muted); font-size: 12px; }
.fact-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 13px; }
.edit-details { padding-top: 12px; border-top: 1px solid var(--line); }
.edit-details > form { margin-top: 14px; }
.opportunity-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.table-action { min-width: 210px; }
.table-action form { margin-top: 12px; }
.catalog-create { margin-bottom: 28px; }
.catalog-batch-start { margin-bottom: 28px; }
.catalog-batch-actions { margin-bottom: 28px; }
.batch-transfer-bar { position: sticky; z-index: 10; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 0; padding: 14px; border: 1px solid #b7c9c0; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.batch-transfer-bar > span { color: var(--muted); font-weight: 700; }
.batch-apply-panel { margin-top: 28px; }
.catalog-batch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.catalog-batch-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.catalog-batch-image { display: block; background: #f3f1eb; }
.catalog-batch-image > img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: #f3f1eb; }
.catalog-batch-image:focus-visible { outline: 3px solid rgba(24, 52, 44, .32); outline-offset: -3px; }
.catalog-batch-body { padding: 14px; }
.catalog-batch-body .helper { margin: 10px 0; }
.batch-select { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 8px; min-height: 46px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #f6f4ef; }
.batch-select input { width: 18px; min-height: 18px; margin: 0; }
.batch-item-form { margin-top: 12px; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.catalog-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.catalog-card > img, .material-card > img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: contain; background: #eee; }
.catalog-card-body { padding: 18px; }
.catalog-card-body > p { color: var(--muted); }
.asset-placeholder { aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 20px; background: #e9e6de; color: var(--muted); text-align: center; }
.material-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.material-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.material-card > div:not(.asset-placeholder) { padding: 13px; }
.material-card p { margin: 4px 0; color: var(--muted); }
.material-card small { color: var(--muted); }
.mini-upload { display: grid; gap: 8px; margin: 14px 0; }
.material-card .mini-upload { padding: 0 13px 13px; }
.mini-upload label { font-size: 12px; }
.mini-upload input { min-height: auto; padding: 7px; font-size: 12px; }
.inset-form { margin-bottom: 22px; padding: 18px; border-radius: 14px; background: #f6f4ef; }
.import-list li > span { display: grid; }
.import-list small { color: var(--muted); }
code { padding: 2px 5px; border-radius: 5px; background: #ece9e2; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.capture-type-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 34px; }
.capture-type-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.capture-type-grid p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.capture-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.capture-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; }
.capture-card:hover { border-color: #aabeb4; }
.capture-card:focus-visible { outline: 3px solid rgba(24, 52, 44, .24); outline-offset: 3px; }
.capture-card > img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: contain; background: #eee; }
.capture-card-body { padding: 16px; }
.capture-card-body h3 { margin-top: 18px; }
.capture-card-body > p { min-height: 42px; color: var(--muted); display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.capture-input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.capture-choice { position: relative; min-height: 112px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 18px; overflow: hidden; border: 1px dashed #98aaa1; border-radius: 14px; background: #f3f8f5; color: var(--forest); text-align: center; cursor: pointer; }
.capture-choice-primary { border-style: solid; background: var(--forest-soft); }
.capture-choice span { color: var(--muted); font-size: 12px; font-weight: 500; }
.capture-choice input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.capture-preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.capture-preview:empty { display: none; }
.capture-preview figure { position: relative; margin: 0; }
.capture-preview img { width: 100%; aspect-ratio: 1; display: block; object-fit: contain; border-radius: 10px; background: #eee; }
.capture-preview figcaption { margin-top: 4px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-progress { height: 8px; overflow: hidden; border-radius: 999px; background: #e3e2dd; }
.upload-progress > div { width: 0; height: 100%; background: var(--forest); transition: width .16s ease; }
.capture-asset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.capture-asset-grid figure { min-width: 0; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.capture-asset-grid img { width: 100%; aspect-ratio: 1; display: block; object-fit: contain; border-radius: 10px; background: #eee; }
.capture-asset-grid figcaption { display: flex; justify-content: space-between; gap: 8px; padding: 8px 2px 4px; font-size: 12px; }
.capture-asset-grid figcaption small { color: var(--muted); }
.button-small { width: 100%; min-height: 38px; padding: 7px 10px; font-size: 12px; }
.trend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trend-grid article { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.trend-grid img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; background: #eee; }
.trend-grid article > div { padding: 14px; }
.trend-grid h3 { margin: 10px 0 5px; }
.trend-grid p, .trend-grid small { color: var(--muted); }
@media (max-width: 820px) {
  .page-shell { width: min(100% - 24px, 680px); padding-top: 24px; }
  .hero-row { align-items: flex-start; flex-direction: column; }
  .hero-row .button { width: 100%; }
  .project-grid, .workflow-grid, .version-grid, .two-column { grid-template-columns: 1fr; }
  .metric-grid, .compact-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lead-grid, .catalog-grid, .catalog-batch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-list article { grid-template-columns: 6px minmax(0, 1fr); }
  .action-controls { grid-column: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .span-full { grid-column: auto; }
  .asset-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .capture-type-grid, .capture-grid, .trend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capture-asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.experience-entry { margin-top: 10px; flex-basis: 100%; }
.experience-trigger { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.experience-trigger:hover, .experience-trigger:focus-visible { color: var(--ink); }
.experience-footer { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.experience-dialog { width: min(640px, calc(100vw - 24px)); max-height: 90dvh; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; }
.experience-dialog::backdrop { background: rgb(16 30 24 / 55%); }
.experience-dialog h2 { font-size: 24px; }
.experience-dialog .section-heading { align-items: flex-start; }
.experience-fields { display: grid; gap: 16px; border: 0; padding: 0; margin: 0; min-width: 0; }
.experience-fields input[type=file] { max-width: 100%; width: 100%; }
.experience-label { font-weight: 700; }
.experience-attachment-hint[data-invalid="true"] { color: #9d2d22; font-weight: 700; }
.experience-compose { max-width: 760px; margin: 0 auto; }
.experience-compose h1 { font-size: clamp(26px, 5vw, 38px); }
.experience-result { overflow-wrap: anywhere; }
.experience-result:empty { display: none; }
.experience-result a { text-decoration: underline; }
.experience-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-trace { border-style: dashed; }
.feedback-trace-note { margin: 12px 0 8px; color: var(--muted); overflow-wrap: anywhere; }
.experience-attachments { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 14px; }
.experience-attachments img { width: 100%; max-height: 300px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; }
.experience-attachments span { display: block; overflow-wrap: anywhere; font-size: 12px; }
.experience-timeline { display: grid; gap: 24px; padding-left: 24px; }
@media (max-width: 440px) {
  .experience-dialog { padding: 18px; max-height: 92dvh; }
  .topbar { min-height: 60px; }
  .brand small { display: none; }
  .page-shell { width: calc(100% - 20px); }
  .panel { padding: 17px; border-radius: 16px; }
  .section-heading { align-items: flex-start; }
  .inline-fields { grid-template-columns: 1fr; }
  .asset-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recommendation-list article { align-items: flex-start; flex-direction: column; }
  .metric-grid, .compact-metrics, .lead-grid, .catalog-grid, .catalog-batch-grid { grid-template-columns: 1fr; }
  .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .material-grid { grid-template-columns: 1fr; }
  .action-controls { align-items: stretch; flex-direction: column; }
  .action-controls .button { width: 100%; text-align: center; }
  .page-shell { padding-bottom: 110px; }
  .capture-type-grid, .capture-grid, .trend-grid { grid-template-columns: 1fr; }
  .capture-input-grid { grid-template-columns: 1fr 1fr; }
  .capture-choice { min-height: 104px; padding: 14px 8px; }
  .capture-preview, .capture-asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .batch-transfer-bar { align-items: stretch; flex-direction: column; }
  .batch-transfer-bar .button { width: 100%; }
  .mobile-card-table, .mobile-card-table tbody, .mobile-card-table tr, .mobile-card-table td { display: block; width: 100%; }
  .mobile-card-table thead { display: none; }
  .mobile-card-table tbody { display: grid; gap: 12px; }
  .mobile-card-table tr { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .mobile-card-table td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--line); white-space: normal; }
  .mobile-card-table td:last-child { border-bottom: 0; }
  .mobile-card-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; }
  .mobile-card-table .table-action { min-width: 0; }
}
