/* Shared visual foundation */
:root {
  color-scheme: light;
  --navy: #182d48;
  --text: #26364b;
  --muted: #657389;
  --line: #e0e6ee;
  --blue: #315e99;
  --green: #187454;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --subtle: #f8fafc;
  --radius: 12px;
  --shadow: 0 2px 3px rgb(23 43 69 / 2%);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.65 "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary, [tabindex] { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--blue); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); font-weight: 650; }
h1 { margin-bottom: 0; font-size: 27px; line-height: 1.3; letter-spacing: -.8px; }
h2 { margin-bottom: 16px; font-size: 17px; line-height: 1.45; letter-spacing: -.25px; }
h3 { margin-bottom: 10px; font-size: 14px; line-height: 1.5; }
p { margin-bottom: 14px; }
small, .muted { color: var(--muted); }
small { font-size: 12px; }
.muted { font-size: 12px; line-height: 1.7; }
strong { font-weight: 650; }

/* Navigation and page frame */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: 244px;
  padding: 30px 18px 22px;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px;
  color: var(--navy);
  font-size: 20px;
  letter-spacing: -.7px;
}
.brand:hover { text-decoration: none; }
.brand-icon {
  display: grid;
  flex: 0 0 37px;
  place-items: center;
  width: 37px;
  height: 40px;
  border-radius: 11px;
  background: var(--navy);
  color: white;
  font-size: 22px;
  letter-spacing: normal;
}
.nav-label {
  margin: 36px 14px 12px;
  color: #748297;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
}
.sidebar nav > a {
  display: block;
  margin-bottom: 5px;
  padding: 11px 15px;
  border-radius: 7px;
  color: #58677c;
  font-size: 13px;
  font-weight: 500;
}
.sidebar nav > a:hover { background: #f3f6fa; color: var(--navy); text-decoration: none; }
.sidebar nav > a.active { background: #eaf0f7; color: var(--navy); font-weight: 650; box-shadow: inset 3px 0 var(--navy); }
.sidebar-account { margin-top: auto; padding: 22px 14px 0; border-top: 1px solid var(--line); }
.sidebar-account > a { display: block; margin: 8px 0; }
.sidebar-account strong, .sidebar-account small { display: block; }
.sidebar-account strong { color: var(--navy); font-size: 13px; overflow-wrap: anywhere; }
.sidebar-account small { font-size: 11px; margin-top: 2px; }
.text-button { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; }
.text-button:hover { color: var(--navy); text-decoration: underline; }
main { max-width: 1850px; min-width: 0; margin-left: 244px; padding: 34px clamp(24px, 3vw, 52px) 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.topbar p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.mobile-menu { display: none; border: 0; padding: 4px; background: none; color: var(--navy); font-size: 24px; }
footer { margin-left: 244px; padding: 0 clamp(24px, 3vw, 52px) 26px; color: var(--muted); font-size: 11px; }

/* Buttons and form controls */
.button, button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}
.button:hover, button.primary:hover { background: #254261; text-decoration: none; }
.button.secondary { background: #fff; border-color: var(--line); color: var(--navy); }
.button.secondary:hover { background: #f1f5f9; border-color: #bcc9d8; }
label { display: block; margin-bottom: 18px; color: #40516a; font-size: 12px; font-weight: 600; }
input, select, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid #cdd7e3;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}
input:hover, select:hover, textarea:hover { border-color: #a9bacd; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
input::placeholder, textarea::placeholder { color: #7d899a; opacity: 1; }
input[type="hidden"] { display: none; }
input[type="checkbox"], input[type="radio"] { display: inline; width: auto; margin: 0 8px 0 0; accent-color: var(--navy); vertical-align: middle; }
textarea { resize: vertical; }
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.toolbar label { min-width: 120px; margin: 0; }
.toolbar input, .toolbar select { margin: 6px 0 0; }
.inline-form { display: flex; align-items: flex-end; gap: 8px; }
.inline-form input { margin: 0; }
.inline-form button { white-space: nowrap; }
.inline-form label { margin-bottom: 0; }
.radio-option { margin: 10px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }

/* Cards, statistics and tables */
.panel, .metric, .patent-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { margin-bottom: 24px; padding: 28px; }
.panel > :last-child { margin-bottom: 0; }
.panel ul { padding-left: 22px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.metric { min-width: 0; padding: 23px 24px; }
.metric > span { display: block; color: #596b80; font-size: 12px; font-weight: 500; }
.metric > strong { display: block; margin-top: 13px; color: var(--navy); font-size: 32px; font-weight: 650; line-height: 1.4; letter-spacing: -1px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric small { display: block; margin-top: 6px; font-size: 11px; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }
.split.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.table-wrap { max-width: 100%; overflow: auto; scrollbar-width: thin; scrollbar-color: #b7c4d4 transparent; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left; font-size: 12px; font-variant-numeric: tabular-nums; }
th { background: var(--subtle); color: #5c6d82; font-size: 10px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; }
th, td { padding: 15px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfd; }
td.wrap { min-width: 170px; max-width: 350px; white-space: normal; overflow-wrap: anywhere; }
td small { font-size: 11px; }
.status { display: inline-block; padding: 4px 9px; border-radius: 5px; background: #edf1f6; color: #526176; font-size: 11px; font-weight: 600; line-height: 1.5; }
.status.complete { background: #e8f4ed; color: #176044; }
.status.error { background: #fbecee; color: #963a4c; }
.status.running, .status.queued { background: #eaf1fb; color: #315d96; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 26px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 14px; border-radius: 6px; color: #607187; font-size: 12px; font-weight: 500; }
.tabs a:hover { background: #eaf0f6; text-decoration: none; }
.tabs a.selected { background: #e5edf6; color: var(--navy); font-weight: 650; }
.list-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.list-row:last-child { border-bottom: 0; }
.list-row strong { color: var(--navy); font-variant-numeric: tabular-nums; }
.pagination { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.pagination a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 12px; }
.empty { padding: 32px 20px; color: var(--muted); text-align: center; }

/* Feedback and progress */
.alert { margin-bottom: 24px; padding: 14px 18px; border: 1px solid #dbe6f4; border-radius: 8px; background: #edf3fa; color: #395879; font-size: 13px; }
.alert.error { background: #fff2f3; border-color: #efd4da; color: #923b4a; }
.alert.success { background: #edf7f1; border-color: #cee6d8; color: #206746; }
.progress-track { height: 7px; margin: 16px 0; overflow: hidden; border-radius: 5px; background: #eaf0f6; }
.progress-track > span { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.domain-breakdown .progress-track { margin: 6px 0 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 14px 26px; color: var(--muted); font-size: 12px; }
.facts strong { color: var(--navy); }
.model-name, .mobile-note { color: var(--muted); font-size: 11px; }

/* Charts retain their data-driven heights and percentages. */
.chart { display: flex; align-items: stretch; justify-content: space-around; height: 240px; gap: 12px; padding-top: 15px; }
.month { display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: center; justify-content: flex-end; }
.bars { display: flex; align-items: flex-end; justify-content: center; gap: 5px; width: 100%; height: 190px; border-bottom: 1px solid var(--line); }
.bar { width: 22px; min-height: 2px; background: var(--blue); border-radius: 3px 3px 0 0; }
.bar.visits { background: #bd945e; }
.month small { margin-top: 9px; font-size: 10px; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 11px; }
.legend span::before { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: var(--blue); content: ""; }
.legend span:first-child::before { background: #bd945e; }
.donut { display: grid; place-items: center; width: 160px; height: 160px; margin: 25px auto; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--percent) * 1%), #eaf0f5 0); }
.donut > div { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 128px; height: 128px; border-radius: 50%; background: #fff; }
.donut strong { color: var(--navy); font-size: 30px; font-variant-numeric: tabular-nums; }
.donut small { font-size: 10px; }

/* Landing and account pages */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 64px); padding: clamp(30px, 5vw, 72px) 0; }
.hero h2 { max-width: 650px; margin-bottom: 22px; color: var(--navy); font-size: clamp(36px, 3.8vw, 58px); font-weight: 650; line-height: 1.12; letter-spacing: -1.8px; }
.hero h2 span { display: block; margin-top: 14px; font-size: .77em; line-height: 1.2; letter-spacing: -1.2px; }
.hero p { max-width: 520px; margin-bottom: 26px; color: #627187; font-size: 15px; line-height: 1.85; }
.hero .button { min-height: 46px; padding: 12px 22px; }
.home-hero .home-tagline { margin: 22px 0 0; color: #586c84; font-size: 12px; font-weight: 600; letter-spacing: .45px; }
.home-art { overflow: hidden; border: 1px solid #dce4ee; border-radius: 16px; background: #e9eff7; }
.home-art img { display: block; width: 100%; height: auto; }
.hero-graphic { width: 100%; padding: clamp(16px, 3vw, 35px); border: 1px solid var(--line); border-radius: 16px; background: #eaf0f7; }
.mini-paper { padding: 26px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.mini-paper strong { display: block; margin: 12px 0; font-size: 20px; }
.mini-paper .scores { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; border: 0; margin-bottom: 0; }
.mini-paper .scores strong { font-size: 16px; margin-bottom: 2px; }
.mini-paper .line { height: 6px; margin: 13px 0; border-radius: 4px; background: #eaf0f6; }
.auth { max-width: 470px; margin: 40px auto; padding: 34px; }
.auth h2 { font-size: 23px; letter-spacing: -.6px; }
.auth .primary { width: 100%; margin-top: 4px; }
.auth form + p { margin-top: 20px; text-align: center; font-size: 12px; }

/* Upload and analysis workspace */
.analysis-form { max-width: 1100px; padding: 32px; }
.analysis-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.analysis-fields h2 label { margin: 0; color: var(--navy); font-size: inherit; }
.analysis-fields h2 .muted { font-weight: 400; }
.upload { padding: 32px 22px; border: 1px dashed #acbed4; border-radius: 9px; background: #f7fafe; text-align: center; }
.upload label { margin-bottom: 8px; color: var(--navy); font-size: 14px; }
.upload p { margin-bottom: 18px; }
.upload input { padding: 5px; background: #fff; font-size: 12px; }
input::file-selector-button { margin-right: 10px; padding: 9px 12px; border: 0; border-radius: 5px; background: #eaf0f8; color: var(--navy); font: inherit; font-weight: 600; cursor: pointer; }
.analysis-fields textarea { min-height: 210px; margin-top: 0; }
.analysis-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.analysis-actions strong { color: var(--navy); font-size: 13px; }
.analysis-actions p { margin: 5px 0 0; }
.preview-grid, .result-grid { display: grid; gap: 24px; }
.preview-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); margin: 16px 0; }
.preview-grid:empty { margin: 0; }
.preview-grid img { width: 100%; height: 104px; padding: 6px; border: 1px solid var(--line); border-radius: 7px; background: #fff; object-fit: contain; }

/* Patent results and evidence */
.result-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.patent-card { min-width: 0; overflow: hidden; }
.drawing { display: flex; align-items: center; justify-content: center; height: 280px; padding: 25px; border-bottom: 1px solid var(--line); background: #fff; }
.drawing a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.drawing img { max-width: 100%; max-height: 100%; object-fit: contain; }
.patent-content { padding: 24px; }
.patent-content h2 { font-size: 17px; line-height: 1.5; }
.patent-content > p { font-size: 13px; line-height: 1.75; }
.patent-content > .muted { margin-bottom: 10px; font-size: 11px; letter-spacing: .2px; }
.scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 22px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.scores strong { display: block; color: var(--navy); font-size: 22px; font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: -.6px; }
.scores small { display: block; margin-top: 3px; font-size: 10px; }
details { margin: 16px 0; }
summary { padding: 4px 0; color: var(--blue); font-size: 12px; font-weight: 600; cursor: pointer; }
summary:hover { color: var(--navy); }
details[open] > summary { margin-bottom: 12px; }
details p { margin-top: 10px; }
details ul { padding-left: 18px; font-size: 12px; }
details li { margin-bottom: 6px; }
details h3 { margin-top: 16px; }
.part-comparison { container-type: inline-size; padding-top: 10px; border-top: 1px solid var(--line); }
.part-comparison summary { font-size: 12px; }
.part-comparison table { table-layout: fixed; white-space: normal; }
.part-comparison th, .part-comparison td { padding: 12px 8px; overflow-wrap: anywhere; }
.part-comparison th:first-child { width: 26%; }
.part-comparison th:nth-child(2) { width: 25%; }
.part-comparison small, .part-comparison q { display: block; margin-top: 5px; }
.part-comparison small { font-size: 11px; }
.part-comparison q { color: #5c6c80; font-style: italic; }
.part-verdict { display: inline-block; padding: 3px 8px; border-radius: 5px; background: #edf1f6; color: #40546d; font-size: 11px; font-weight: 650; line-height: 1.5; }
.part-verdict.part-present { background: #e6f4ec; color: #166240; }

@container (max-width: 469px) {
  .part-comparison table { min-width: 0; table-layout: fixed; }
  .part-comparison th, .part-comparison td { padding: 10px 5px; font-size: 11px; }
  .part-comparison th { font-size: 11px; letter-spacing: 0; text-transform: none; }
  .part-comparison small { font-size: 10px; }
  .part-comparison .part-verdict { padding: 3px 5px; font-size: 10px; }
}

/* Responsive layouts */
@media (min-width: 1700px) {
  .result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1150px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .split.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; max-width: 780px; gap: 30px; }
  .hero h2 { font-size: 44px; }
  .home-art { max-width: 560px; }
  .analysis-fields { grid-template-columns: 1fr; gap: 26px; }
  .analysis-fields textarea { min-height: 160px; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 0 100vmax rgb(17 36 58 / 32%); }
  main { margin: 0; padding: 24px 18px 32px; }
  footer { margin: 0; padding: 0 18px 22px; }
  .mobile-menu { display: block; }
  .topbar { flex-wrap: wrap; gap: 12px; margin-bottom: 24px; padding-bottom: 20px; }
  .topbar > div { flex: 1; min-width: 0; }
  .topbar > .button { padding: 9px 12px; font-size: 11px; }
  h1 { font-size: 23px; }
  .topbar p { font-size: 10px; }
  .panel { padding: 20px; }
  .split.equal { grid-template-columns: 1fr; }
  .metrics { gap: 12px; }
  .metric { padding: 18px 16px; }
  .metric > strong { font-size: 27px; }
  .metric > span { font-size: 11px; }
  .hero { padding: 20px 0 32px; }
  .hero h2 { font-size: 37px; letter-spacing: -1.1px; }
  .hero h2 span { letter-spacing: -.7px; }
  .hero p { font-size: 14px; }
  .home-art { border-radius: 12px; }
  .auth { margin: 20px auto; padding: 25px 22px; }
  .analysis-actions { flex-wrap: wrap; }
  .analysis-actions .primary { width: 100%; }
  .analysis-fields { gap: 24px; }
  .upload { padding: 24px 14px; }
  .toolbar { align-items: stretch; }
  .toolbar label { flex: 1; min-width: 130px; }
  .toolbar > .primary { align-self: flex-end; }
  .tabs { gap: 2px; }
  .tabs a { padding: 8px 10px; font-size: 11px; }
  .result-grid { gap: 20px; }
  .patent-content { padding: 20px; }
  .chart { gap: 4px; }
  .bar { width: 15px; }
  .month small { font-size: 9px; }
  .facts { gap: 10px 18px; }
}
@media (max-width: 380px) {
  .topbar > .button { margin-left: 39px; }
  .metrics { grid-template-columns: 1fr; }
  .chart { min-width: 270px; }
  .hero h2 { font-size: 33px; }
}
@media (forced-colors: active) {
  .button, button.primary, .status, .brand-icon, .part-verdict { border: 1px solid ButtonText; }
}

/* Home card and Novel Image mark */
.brand-icon {
  position: relative;
  isolation: isolate;
  background: #11243b;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.brand-ridges {
  width: 29px;
  height: 29px;
  color: #e1ebf6;
}
.hero-graphic {
  transform: rotate(2.5deg);
  box-shadow: 0 12px 24px rgb(23 43 69 / 7%);
}
.mini-paper {
  box-shadow: 0 5px 12px rgb(23 43 69 / 6%);
}

/* Administration dashboard */
.admin-layout { background: #edf1f5; }
.admin-layout .sidebar nav > a.active {
  background: var(--navy);
  color: #fff;
  box-shadow: none;
}
.overview-metrics .metric {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  padding: 18px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
  text-align: center;
}
.overview-metrics .metric:nth-child(1) { --metric-accent: #41869a; }
.overview-metrics .metric:nth-child(2) { --metric-accent: #218463; }
.overview-metrics .metric:nth-child(3) { --metric-accent: #315e99; }
.overview-metrics .metric:nth-child(4) { --metric-accent: #a87537; }
.overview-metrics .metric strong,
.overview-metrics .metric small { margin: 0; }
.overview-metrics .metric .stat-symbol { color: var(--metric-accent); line-height: 1; }
.overview-metrics .stat-symbol svg { width: 24px; height: 24px; }
.overview-charts {
  grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr);
  grid-template-areas: "activity allowance";
}
.overview-activity { grid-area: activity; }
.overview-allowance { grid-area: allowance; }
.overview-activity .legend span:first-child::before,
.overview-activity .bar.visits { background: #b78443; }
.overview-activity .legend span:last-child::before,
.overview-activity .bar:not(.visits) { background: #235a95; }
.overview-plot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  grid-template-areas: "plot axis";
  align-items: end;
  gap: 8px;
  margin: 16px 0 12px;
}
.overview-axis {
  grid-area: axis;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 192px;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.overview-activity .chart {
  grid-area: plot;
  height: auto;
  min-width: 0;
  padding-top: 0;
  background: repeating-linear-gradient(to bottom, #e6edf3 0 1px, transparent 1px 45px) 0 15px / 100% 181px no-repeat;
}
.overview-activity .month small { margin-top: 8px; }
.overview-activity .bar[style="height:0px"] { min-height: 0; }
.overview-allowance .donut {
  background: conic-gradient(#ae5063 calc(var(--percent) * 1%), #1c805f 0);
}
.overview-allowance .donut.is-empty { background: #eaf0f5; }
.overview-allowance .list-row > span::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #1c805f;
  content: "";
}
.overview-allowance .list-row + .list-row > span::before { background: #ae5063; }
@media (min-width: 1151px) {
  .overview-charts {
    grid-template-columns: minmax(230px, 1fr) minmax(0, 2fr);
    grid-template-areas: "allowance activity";
  }
}
@media (max-width: 1020px) {
  .overview-charts { grid-template-columns: minmax(0, 1fr); grid-template-areas: "activity" "allowance"; }
}
@media (max-width: 760px) {
  .hero-graphic { transform: rotate(1.5deg); }
  .overview-plot { gap: 4px; grid-template-columns: minmax(0, 1fr) 22px; }
  .overview-activity .month small { font-size: 8px; }
}

.idea-composer { max-width: 780px; margin-inline: auto; padding: 4px 0; border: 0; background: transparent; box-shadow: none; }
.idea-composer > label { margin-bottom: 10px; color: var(--navy); font-size: 15px; }
.required-label { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.composer-box { padding: 14px; border: 1px solid #d4dde8; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.composer-box:focus-within { border-color: #7c99b8; }
.composer-box textarea { min-height: 100px; margin: 0; padding: 4px 6px; border: 0; background: #fff; outline: none; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.composer-upload { position: relative; max-width: 100%; }
.composer-upload label { display: flex; align-items: center; gap: 6px; min-height: 42px; margin: 0; padding: 0 10px; border-radius: 9px; background: var(--subtle); color: var(--navy); }
.composer-upload label span:first-child { font-size: 18px; line-height: 1; }
.composer-upload input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.composer-upload:hover label { background: #eaf0f7; }
.composer-upload:focus-within label { outline: 2px solid var(--blue); outline-offset: 2px; }
.composer-actions button.primary { width: 42px; min-height: 42px; padding: 0; border-radius: 50%; font-size: 23px; }
.composer-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.composer-limits { margin: 9px 4px 0; }
.idea-composer > .alert { margin-top: 16px; }
.composer-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 175px), 1fr)); gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.composer-previews:empty { display: none; }
.composer-previews li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; }
.composer-previews img { width: 34px; height: 34px; border-radius: 4px; object-fit: contain; background: var(--subtle); }
.composer-previews span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-previews button { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: var(--subtle); color: var(--navy); font-size: 18px; }
.profile-layout { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 1.8fr); align-items: start; gap: 24px; }
.profile-summary { text-align: center; }
.profile-summary h2 { margin: 0 0 4px; font-size: 21px; overflow-wrap: anywhere; }
.profile-summary p { overflow-wrap: anywhere; }
.profile-avatar { display: grid; place-items: center; width: 64px; height: 64px; margin: 3px auto 15px; border-radius: 50%; background: #e5eef8; color: var(--navy); font-size: 26px; font-weight: 650; }
.profile-summary dl { margin: 18px 0; text-align: left; }
.profile-summary dd { margin: 0; text-align: right; font-weight: 600; }
.profile-summary .button { width: 100%; }
.profile-form { min-width: 0; }
.profile-form input[readonly] { background: var(--subtle); }
@media (max-width: 1050px) {
  .profile-layout { grid-template-columns: 1fr; gap: 0; }
}

.personal-metrics .metric {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 18px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
  text-align: center;
}
.personal-metrics .metric-completed { --card-accent: #218463; }
.personal-metrics .metric-failed { --card-accent: #a85465; }
.personal-metrics .metric-duration { --card-accent: #9c6b31; }
.personal-metrics .metric strong { margin: 0; }
.stat-section-title { display: flex; align-items: center; gap: 10px; }
.personal-metrics .stat-symbol, .stat-section-title .stat-symbol {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 9px;
  background: transparent;
  color: var(--card-accent, #315e99);
}
.stat-symbol svg { width: 20px; height: 20px; }
.stat-section-title .stat-symbol { width: 30px; height: 30px; }
/* Workspace navigation and dashboard accents */
.sidebar {
  background: #172d44;
  border-right-color: #263f59;
}
.sidebar .brand,
.sidebar .sidebar-account strong { color: #f3f7fc; }
.sidebar .brand-icon { background: #102439; border: 1px solid #3b5770; }
.sidebar .nav-label,
.sidebar .sidebar-account small { color: #a7bbcf; }
.sidebar nav > a,
.sidebar .sidebar-account > a,
.sidebar .text-button { color: #d2dfed; }
.sidebar nav > a:hover,
.sidebar .text-button:hover { background: #243f59; color: #fff; }
.sidebar nav > a.active,
.admin-layout .sidebar nav > a.active { background: #2b4c6b; color: #fff; box-shadow: inset 3px 0 #87b5df; }
.sidebar .sidebar-account { border-top-color: #38516a; }
.sidebar :focus-visible { outline-color: #9fc8ec; }
.admin-layout .table-wrap th { background: #243f59; color: #f1f6fb; }
.composer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; }
.composer-models { color: #617286; font-size: 11px; font-weight: 400; white-space: nowrap; }
.composer-actions button.primary { flex: 0 0 42px; }

.report-link { display: inline-block; margin-left: 12px; }
.report-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 18px; }
@media print {
  body:has(.report-actions) { background: white; }
  body:has(.report-actions) :is(.sidebar, .report-actions, .topbar button, .topbar .button, footer) { display: none; }
  body:has(.report-actions) main { margin: 0; padding: 0; }
  body:has(.report-actions) .result-grid { display: block; }
  body:has(.report-actions) .patent-card { margin-bottom: 16px; }
  body:has(.report-actions) :is(.drawing, tr) { break-inside: avoid; }
  body:has(.report-actions) .table-wrap { overflow: visible; }
}

.prompt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.prompt-chips button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 20px; background: var(--subtle); color: var(--navy); font-size: 11px; font-weight: 600; }
.prompt-chips button:hover { background: #eaf0f7; }
.prompt-chips button span { color: var(--blue); }

.idea-composer { width: 100%; max-width: 1100px; padding: 24px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.analyze-heading { margin: 0 0 4px; }
.analyze-heading label { margin: 0; color: var(--navy); font-size: 21px; }
.idea-composer .composer-box { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.idea-composer textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.idea-composer textarea:focus { border-color: var(--blue); }
.analyze-options { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); }
.analyze-options .composer-models { padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; }
.analyze-options .composer-limits { margin: 0; font-size: 11px; }
.analyze-submit { display: flex; justify-content: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.analyze-submit button span { margin-left: 6px; }
