:root {
  --green: #00a88a;
  --green-dark: #007f70;
  --ink: #0f172a;
  --muted: #536a73;
  --line: #d2e3df;
  --soft: #e8faf6;
  --bg: #f4f7f6;
  --card: #ffffff;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 36px; background: #ffffff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 10px; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); margin-top: 2px; }
.website-account-badge { display: flex; align-items: center; gap: 10px; margin-left: auto; white-space: nowrap; }
.account-summary { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 900; }
.account-summary small { color: var(--muted); font-weight: 700; }
.account-signin-link,
.account-profile-link,
.account-signout-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  padding: 9px 13px;
  text-decoration: none;
}
.account-signout-button { background: var(--green); color: #fff; }
.shell { max-width: 1440px; margin: 0 auto; padding: 28px 28px 56px; }
.workflow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 18px; }
.workflow-step { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); font-weight: 800; padding: 11px 14px; text-decoration: none; }
.workflow-step span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #eaf3f1; color: var(--green-dark); }
.workflow-step.is-active { border-color: #8bd8cb; background: var(--soft); color: var(--ink); }
.hero { background: linear-gradient(90deg, #e6faf6, #ffffff); border: 1px solid var(--line); border-radius: 12px; padding: 28px; margin-bottom: 18px; }
.eyebrow { margin: 0 0 8px; color: var(--green-dark); font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
h1, h2 { margin: 0; }
h1 { max-width: 850px; font-size: 36px; line-height: 1.12; }
.hero p:not(.eyebrow) { max-width: 960px; color: #38545a; line-height: 1.55; }
.boundary { border-left: 4px solid var(--green); background: rgba(255,255,255,.7); padding: 12px 14px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04); padding: 22px; margin-top: 18px; }
.panel-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; align-items: flex-start; }
.report-management { display: grid; grid-template-columns: minmax(170px, 1fr) auto; gap: 14px; align-items: center; min-width: 460px; border: 1px solid #a9ddd5; border-radius: 10px; background: #f2fbf9; padding: 11px 12px; }
.report-management-copy strong, .report-management-copy small { display: block; }
.report-management-copy strong { color: var(--ink); font-size: 13px; }
.report-management-copy small { color: var(--muted); font-size: 11px; line-height: 1.35; margin-top: 2px; }
.report-management-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.save-report-button { border-radius: 8px; padding: 10px 14px; }
.save-report-button:disabled { background: #d8e5e2; color: #6d7e7b; }
.save-report-button.is-saved:disabled { background: #e1f7f2; color: var(--green-dark); opacity: 1; }
.report-library-link { background: #fff; border-color: #a9cfc8; }
.status-pill { display: inline-flex; align-items: center; border: 1px solid #b9e7df; border-radius: 999px; background: var(--soft); color: var(--green-dark); font-weight: 800; padding: 9px 13px; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 7px; color: var(--ink); font-weight: 800; }
label span { color: var(--muted); font-size: 12px; font-weight: 600; }
input, select { width: 100%; border: 1px solid #bdd2cd; border-radius: 8px; color: var(--ink); font: inherit; padding: 12px; background: #fff; }
input:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,168,138,.12); }
.money-input { display: grid; grid-template-columns: auto 1fr; align-items: center; border: 1px solid #bdd2cd; border-radius: 8px; overflow: hidden; }
.money-input b { min-width: 58px; padding: 12px; background: #f5faf9; color: var(--muted); text-align: center; }
.money-input input { border: 0; border-radius: 0; }
.fee-note { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdfc; padding: 13px 15px; color: #38545a; }
.fee-note strong { display: block; color: var(--ink); margin-bottom: 4px; }
.actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 18px; }
.actions p { color: var(--muted); margin: 0; }
button { border: 0; border-radius: 999px; background: var(--green); color: #fff; cursor: pointer; font-weight: 900; padding: 12px 18px; }
button:disabled { cursor: not-allowed; opacity: .45; }
button.quiet { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.quiet-link { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 800; padding: 10px 14px; text-decoration: none; }
.toolbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1320px; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: top; }
th { background: #f4f8f7; color: #38545a; font-size: 12px; font-weight: 900; }
td { font-size: 13px; }
.opportunity-title { color: var(--ink); font-weight: 900; }
.row-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.metric { font-weight: 900; }
.metric.high, .action-test { color: #047857; }
.metric.medium, .action-dive { color: #a16207; }
.metric.low, .action-hold { color: #b91c1c; }
.open-detail { background: transparent; border: 0; border-radius: 0; color: var(--green-dark); cursor: pointer; font-weight: 900; padding: 0; text-decoration: underline; }
.opportunity-link { color: var(--green-dark); font-weight: 900; text-decoration: underline; }
.review-opportunity { margin-top: 7px; border-radius: 6px; padding: 7px 10px; font-size: 12px; }
.selected-row { background: #f1fbf9; }
.empty-state { border-left: 4px solid #b6c7c4; background: #f6f8f8; color: var(--muted); padding: 14px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.detail-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fbfdfc; }
.detail-card span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.cost-calculator { border: 1px solid var(--line); border-radius: 10px; background: #f9fdfc; padding: 16px; margin: 16px 0; }
.cost-heading { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.cost-heading h3 { margin: 0; font-size: 18px; }
.cost-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-items: center; }
.cost-source-link { display: inline-flex; align-items: center; min-height: 34px; border-radius: 999px; padding: 7px 12px; background: var(--green); color: #fff; font-weight: 900; text-decoration: none; white-space: nowrap; }
.cost-source-link:hover { background: #07806d; }
.product-cost-cell { display: grid; gap: 8px; }
.cost-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 14px; }
.calc-table { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.calc-table th, .calc-table td { padding: 10px; }
.calc-table th { width: 44%; background: #f4f8f7; color: #38545a; }
.money-input.compact b { min-width: 48px; padding: 10px; }
.money-input.compact input { padding: 10px; }
.calc-message { color: var(--muted); margin: 12px 0 0; }
.listing-list { display: grid; gap: 8px; }
.listing-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.listing-item.has-image { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 12px; align-items: start; }
.listing-item img, .listing-thumb-placeholder { width: 82px; height: 82px; border: 1px solid var(--line); border-radius: 8px; background: #f4f8f7; object-fit: contain; }
.listing-thumb-placeholder { display: grid; place-items: center; color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; }
.listing-item a { color: var(--green-dark); font-weight: 900; text-decoration: none; }
.listing-item small { color: var(--muted); display: block; margin-top: 6px; }
.detail-section { border: 1px solid var(--line); border-radius: 10px; background: #fbfdfc; padding: 14px; margin: 14px 0; }
.keyword-line { color: #38545a; font-size: 12px; margin-top: 6px; }
.signal-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.signal-chips span { border: 1px solid var(--line); border-radius: 999px; background: #f7fbfa; color: #38545a; font-size: 11px; font-weight: 800; padding: 5px 8px; }
.keyword-chips span { background: var(--soft); color: var(--green-dark); }
.is-hidden { display: none !important; }
@media (max-width: 900px) {
  .form-grid, .toolbar, .detail-grid, .cost-grid { grid-template-columns: 1fr; }
  .topbar, .panel-heading, .actions { flex-direction: column; align-items: stretch; }
  .workflow-steps { grid-template-columns: 1fr; }
  .website-account-badge { flex-wrap: wrap; white-space: normal; }
  .result-actions { justify-content: flex-start; width: 100%; }
  .report-management { grid-template-columns: 1fr; min-width: 0; width: 100%; }
  .report-management-actions { justify-content: flex-start; }
}
