@font-face {
  font-family: "Butler";
  src: url("./assets/fonts/butler-regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Butler";
  src: url("./assets/fonts/butler-bold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "Raleway";
  src: url("./assets/fonts/raleway-regular.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Raleway";
  src: url("./assets/fonts/raleway-semibold.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

@font-face {
  font-family: "Raleway";
  src: url("./assets/fonts/raleway-bold.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

:root {
  --ink: #ffffff;
  --muted: #c4cfda;
  --line: rgba(228, 191, 128, 0.42);
  --paper: #1b2732;
  --surface: #171b20;
  --brand: #e4bf80;
  --brand-dark: #171b20;
  --accent: #e4bf80;
  --mint: #243746;
  --warning: #ff9aa2;
  --soft-warning: #3a2429;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.22);
  --brand-gradient: linear-gradient(135deg, rgb(23, 27, 32) 0%, rgb(27, 51, 68) 100%);
  --font-serif: "Butler", Georgia, "Times New Roman", serif;
  --font-sans: "Raleway", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--font-sans);
  line-height: 1.5;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px clamp(16px, 4vw, 48px);
  background: var(--paper);
  border-bottom: 3px solid var(--brand);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  min-width: 0;
}

.brand-logo {
  width: clamp(92px, 10vw, 132px);
  height: clamp(42px, 4.5vw, 58px);
  object-fit: cover;
  object-position: center;
  display: block;
}

.brand-copy {
  padding-left: clamp(14px, 2vw, 24px);
  border-left: 1px solid var(--line);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(22px, 3.3vw, 32px);
  font-weight: 500;
}

h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 500;
}

h3 {
  font-size: 18px;
}

p {
  margin: 0;
}

main {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 34px clamp(14px, 4vw, 36px) 64px;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.auth-panel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #aab6c1;
}

.auth-panel.ready .status-dot {
  background: var(--ink);
}

.auth-panel.blocked .status-dot {
  background: var(--warning);
}

.app-tabs {
  width: min(1220px, calc(100% - 28px));
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  background: #e5e6e5;
  border: 1px solid var(--line);
}

.app-tab {
  min-height: 48px;
  background: transparent;
  color: var(--muted);
}

.app-tab.active {
  color: white;
  background: var(--ink);
}

.tab-panel[hidden] {
  display: none !important;
}

.submission-panel,
.report-toolbar,
.tool-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow);
  padding: clamp(18px, 4vw, 28px);
}

.submission-panel {
  border-top: 5px solid var(--ink);
}

.tool-panel {
  border-top: 5px solid var(--ink);
  display: grid;
  gap: 22px;
}

.tool-heading {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.tool-heading > p:not(.eyebrow) {
  max-width: 780px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 17px;
}

.chat-conversation {
  display: grid;
  gap: 10px;
}

#guruConversation {
  max-height: min(52vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 4px 12px 4px 4px;
  border-right: 1px solid var(--line);
}

.chat-message {
  width: min(88%, 820px);
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #f3f4f3;
}

.chat-message.user {
  justify-self: end;
  background: #e8e9e9;
}

.chat-message strong {
  display: block;
  margin-bottom: 3px;
}

.chat-form {
  padding: 18px;
  border: 2px solid var(--ink);
  background: #fafafa;
}

.tool-language {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.tool-language label {
  font-size: 13px;
}

.tool-language select {
  width: auto;
  min-width: 150px;
}

.tool-language-note {
  color: var(--muted);
  font-size: 12px;
}

.recommendation-results,
.diagnosis-result {
  display: grid;
  gap: 16px;
}

.loading-card,
.preference-summary,
.recommendation-heading,
.recommendation-card,
.diagnosis-card {
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--line);
  background: var(--paper);
}

.preference-summary > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.preference-summary span {
  color: var(--muted);
}

.recommendation-heading p:last-child,
.recommendation-reason,
.diagnosis-caution {
  color: var(--muted);
}

.recommendation-card {
  display: grid;
  gap: 16px;
  border-top: 4px solid var(--ink);
}

.badge.highlight {
  color: #144f30;
  background: #dff2e6;
}

.recommendation-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.recommendation-images.single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 620px;
}

.recommendation-image {
  margin: 0;
  border: 1px solid var(--line);
  background: #f4f4f3;
}

.recommendation-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.recommendation-image figcaption {
  padding: 7px 9px;
  color: var(--muted);
  font-size: 12px;
}

.field-wide {
  grid-column: 1 / -1;
}

.diagnosis-card {
  display: grid;
  gap: 18px;
  border-top: 4px solid var(--ink);
}

.diagnosis-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.confidence {
  min-width: 106px;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--ink);
}

.confidence strong,
.confidence span {
  display: block;
}

.confidence strong {
  font-size: 26px;
}

.confidence-track {
  height: 8px;
  overflow: hidden;
  background: #e4e5e5;
}

.confidence-track span {
  display: block;
  height: 100%;
  background: var(--ink);
}

.diagnosis-image-groups {
  display: grid;
  gap: 18px;
}

.diagnosis-image-group {
  display: grid;
  gap: 8px;
}

.diagnosis-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.diagnosis-images figure {
  margin: 0;
  border: 1px solid var(--line);
  background: #f4f4f3;
}

.diagnosis-images img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.diagnosis-images figcaption {
  padding: 7px 9px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.comparison-note {
  color: var(--muted);
  font-size: 13px;
}

.diagnosis-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.diagnosis-card ul {
  margin: 0;
  padding-left: 20px;
}

.submission-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 220px);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding-bottom: clamp(24px, 4vw, 42px);
  margin-bottom: clamp(22px, 4vw, 34px);
  border-bottom: 1px solid var(--line);
}

.submission-intro .section-heading {
  margin-bottom: 0;
  max-width: 760px;
}

.submission-intro .section-heading > p:not(.eyebrow) {
  max-width: 680px;
  margin-top: 13px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
}

.service-icon {
  width: min(100%, 190px);
  justify-self: end;
  filter: grayscale(1) brightness(0);
  opacity: 0.88;
}

.workflow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 24px;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.workflow-steps span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.workflow-steps strong {
  color: var(--brand);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading p,
.file-meta,
.plant-meta,
.secondary-note {
  color: var(--muted);
}

form {
  display: grid;
  gap: 12px;
}

label {
  font-weight: 700;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 12px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
}

textarea:focus,
input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(23, 25, 27, 0.2);
  outline-offset: 2px;
  border-color: var(--brand);
}

input[type="file"] {
  padding: 10px;
}

.file-meta,
.actions,
.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 2px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.primary-button {
  background: var(--ink);
  color: white;
}

.primary-button:hover {
  background: #34373a;
}

.secondary-button {
  background: #e9eaeb;
  color: var(--ink);
}

.secondary-button:hover {
  background: #d9dbdc;
}

.report-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 20px;
}

.report {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.report-bottom-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.report-summary,
.plant-card,
.assistant-panel,
.report-state {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(16px, 4vw, 22px);
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.report-state {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.report-state.draft {
  border-color: #e8c96a;
  background: #fff8e5;
}

.report-state.finalised {
  border-color: #aeb1b4;
  background: #f1f2f2;
}

.summary-item strong {
  display: block;
  font-size: 22px;
  color: var(--brand-dark);
}

.plant-card {
  display: grid;
  gap: 16px;
}

.plant-card.plant-removed {
  opacity: 0.58;
  border-style: dashed;
}

.plant-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.latin-name {
  font-style: italic;
}

.badge-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  background: #eceeef;
  color: var(--brand-dark);
}

.badge.warning {
  background: var(--soft-warning);
  color: var(--warning);
}

.badge.review-confirmed,
.badge.review-amended_confirmed {
  background: #e2e4e5;
  color: var(--brand-dark);
}

.badge.review-not_reviewed,
.badge.review-amended_pending_confirmation,
.badge.review-unable_to_confirm,
.badge.review-removed {
  background: #fff3d4;
  color: #7a5200;
}

.plant-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}

.text-button {
  background: transparent;
  text-decoration: underline;
}

.text-button.danger {
  color: var(--warning);
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.inline-form input {
  flex: 1;
}

.assistant-panel {
  display: grid;
  gap: 16px;
  border: 2px solid var(--ink);
}

.assistant-conversation {
  display: grid;
  gap: 10px;
}

.assistant-message,
.proposal {
  padding: 12px 14px;
  border-radius: 8px;
  background: #f3f6f4;
  border: 1px solid var(--line);
}

.assistant-message.user {
  margin-left: min(12%, 80px);
  background: #eceeef;
}

.proposal {
  border-color: #e0b84f;
  background: #fff8e5;
}

.plant-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.plant-image {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8faf8;
}

.plant-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.plant-image-button img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e7ece8;
}

.plant-image figcaption {
  padding: 6px 8px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.plant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.slug-warning {
  color: var(--warning);
  font-weight: 900;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  padding: 14px;
  background: rgba(10, 18, 24, 0.92);
}

.image-modal.hidden {
  display: none;
}

.image-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: white;
}

.image-modal img {
  align-self: center;
  justify-self: center;
  max-width: 100%;
  max-height: calc(100vh - 86px);
  object-fit: contain;
  background: #111;
}

.message {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #fff8e5;
  border: 1px solid #e8c96a;
}

.hidden {
  display: none;
}

.print-report-header,
.print-image-note {
  display: none;
}

.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;
}

.site-footer {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: grayscale(1) brightness(0);
}

.footer-separator {
  width: 1px;
  height: 16px;
  background: var(--brand);
}

@media (max-width: 760px) {
  .app-tabs {
    width: calc(100% - 20px);
    margin-top: 10px;
    grid-template-columns: 1fr;
  }

  .app-tab {
    min-height: 42px;
    padding: 8px 10px;
  }

  .report-toolbar,
  .plant-header,
  .report-state,
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 8px 12px 9px;
    border-bottom-width: 2px;
  }

  .auth-panel {
    gap: 6px;
    font-size: 12px;
    line-height: 1.2;
    white-space: normal;
  }

  .site-brand {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
  }

  .brand-logo {
    width: 64px;
    height: 29px;
  }

  .brand-copy {
    padding-left: 10px;
  }

  .brand-copy .eyebrow {
    margin-bottom: 1px;
    font-size: 9px;
    line-height: 1.1;
    letter-spacing: 0.14em;
  }

  .brand-copy h1 {
    font-size: 17px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
  }

  main {
    padding: 16px 12px 48px;
  }

  .tool-panel {
    padding: 18px 14px;
  }

  .chat-message {
    width: 96%;
  }

  #guruConversation {
    max-height: 380px;
  }

  .chat-form textarea {
    min-height: 140px;
    font-size: 16px;
  }

  .tool-language {
    align-items: stretch;
    flex-direction: column;
  }

  .tool-language select {
    width: 100%;
  }

  .tool-language-note {
    line-height: 1.4;
  }

  .recommendation-images,
  .diagnosis-images,
  .diagnosis-header {
    grid-template-columns: 1fr;
  }

  .diagnosis-header {
    display: grid;
  }

  .confidence {
    width: 100%;
  }

  .assistant-panel {
    scroll-margin-top: 12px;
  }

  #assistantQuestion {
    font-size: 16px;
    min-height: 180px;
    line-height: 1.45;
    padding: 14px;
    resize: vertical;
    scroll-margin-block: max(16px, env(safe-area-inset-top));
  }

  .submission-intro {
    grid-template-columns: 1fr;
  }

  .service-icon {
    width: 112px;
    justify-self: start;
  }

  .report-summary,
  .plant-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    align-items: stretch;
  }

  .toolbar-actions select,
  .toolbar-actions button {
    flex: 1 1 100%;
  }

  .badge-list {
    justify-content: flex-start;
  }

  .site-footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .report-bottom-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .report-bottom-toolbar button {
    width: 100%;
  }
}

/* People portal design alignment */
body {
  min-height: 100vh;
  background: var(--surface);
}

.topbar {
  position: static;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 18px;
  border: 0;
  background: transparent;
}

.site-brand {
  gap: 12px;
}

.brand-logo {
  width: 69px;
  height: 32px;
}

.product-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.access-strip {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 13px 18px;
  background: var(--mint);
  border: 2px solid var(--brand);
  border-radius: 13px;
}

.auth-panel {
  width: 100%;
  min-height: 42px;
  justify-content: flex-end;
  color: var(--ink);
}

.status-dot {
  background: #83938c;
}

.auth-panel.ready .status-dot {
  background: var(--brand);
}

.app-tabs {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  gap: 0;
  padding: 0;
  background: transparent;
  border: 1px solid var(--brand);
}

.app-tab {
  min-height: 52px;
  padding: 12px 18px;
  border-right: 1px solid var(--brand);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
}

.app-tab:last-child {
  border-right: 0;
}

.app-tab:hover {
  background: var(--mint);
}

.app-tab.active,
.app-tab.active:hover {
  color: white;
  background: var(--brand-dark);
}

main {
  width: min(1180px, 100%);
  padding: 48px 16px 72px;
}

.submission-panel,
.report-toolbar,
.tool-panel {
  border-radius: 0;
  box-shadow: none;
}

.submission-panel {
  width: min(970px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 44px);
  color: white;
  background: var(--brand-dark);
  border: 0;
}

.submission-intro {
  grid-template-columns: minmax(0, 1fr) minmax(84px, 150px);
  gap: clamp(24px, 5vw, 56px);
  padding-bottom: 30px;
  margin-bottom: 28px;
  border-color: rgba(255, 255, 255, 0.2);
}

.submission-intro .section-heading > p:not(.eyebrow),
.submission-panel .file-meta {
  color: rgba(255, 255, 255, 0.88);
}

.submission-panel h2,
.tool-heading h2,
.report-toolbar h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.submission-panel h2 {
  max-width: 760px;
  font-size: clamp(38px, 6vw, 58px);
  line-height: 1.02;
}

.submission-panel .eyebrow {
  color: #79a198;
}

.submission-panel .service-icon {
  width: min(100%, 132px);
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.68;
}

.submission-panel .workflow-steps {
  color: white;
}

.submission-panel .workflow-steps strong {
  color: #8fb5ac;
}

.submission-panel form {
  color: white;
}

.submission-panel textarea,
.submission-panel input {
  color: var(--ink);
  background: white;
  border-color: white;
}

.submission-panel .primary-button {
  min-width: min(100%, 280px);
  justify-content: space-between;
  color: var(--ink);
  background: white;
  border-color: white;
}

.submission-panel .primary-button:hover {
  background: var(--mint);
}

.submission-panel .secondary-button {
  color: white;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.75);
}

.tool-panel,
.report-toolbar {
  background: white;
  border: 1px solid var(--brand);
}

.tool-panel {
  --tool-panel-padding: clamp(22px, 4vw, 32px);
  gap: 26px;
  padding: var(--tool-panel-padding);
}

.report-toolbar {
  padding: clamp(22px, 4vw, 32px);
}

.tool-heading {
  margin: calc(0px - var(--tool-panel-padding));
  margin-bottom: 0;
  padding: clamp(28px, 5vw, 44px);
  color: white;
  background: var(--brand-dark);
  border: 0;
}

.tool-heading > p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.88);
}

.tool-heading .eyebrow {
  color: #79a198;
}

.tool-heading h2 {
  font-size: clamp(38px, 5vw, 54px);
}

.chat-form {
  padding: 20px;
  background: var(--mint);
  border: 1px solid var(--brand);
}

.chat-message,
.assistant-message,
.proposal {
  border-radius: 0;
  background: #f4f6f4;
}

.chat-message.user,
.assistant-message.user {
  background: var(--mint);
}

.tool-language {
  background: var(--mint);
  border-color: var(--brand);
}

.loading-card,
.preference-summary,
.recommendation-heading,
.recommendation-card,
.diagnosis-card,
.report-summary,
.plant-card,
.assistant-panel,
.report-state,
.report-bottom-toolbar {
  border-radius: 0;
  border-color: var(--line);
  box-shadow: none;
}

.recommendation-card,
.diagnosis-card,
.report-bottom-toolbar {
  border-top-color: var(--brand);
}

.plant-review-actions {
  border-radius: 0;
  background: var(--mint);
}

.plant-image,
.recommendation-image,
.diagnosis-images figure {
  border-radius: 0;
  background: #f4f6f4;
}

.badge {
  border-radius: 0;
  background: var(--mint);
}

textarea,
input,
select {
  border-color: var(--brand);
  border-radius: 7px;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--mint);
  border: 1px solid var(--brand);
  border-radius: 4px;
  font: inherit;
  font-weight: 700;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid transparent;
  border-radius: 0;
}

.primary-button {
  background: var(--brand-dark);
}

.primary-button:hover {
  background: var(--brand);
}

.primary-button::after {
  content: "→";
  margin-left: auto;
  font-weight: 400;
}

.secondary-button {
  color: var(--ink);
  background: white;
  border-color: var(--brand);
}

.secondary-button:hover {
  background: var(--mint);
}

.text-button {
  border: 0;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  padding: 44px 0 54px;
  justify-content: space-between;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}

.site-footer nav {
  display: flex;
  gap: 30px;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .topbar {
    width: calc(100% - 32px);
    padding: 20px 0 12px;
  }

  .site-brand {
    display: flex;
    gap: 10px;
  }

  .brand-logo {
    width: 64px;
    height: 30px;
  }

  .product-name {
    font-size: 16px;
    white-space: normal;
  }

  .access-strip {
    width: calc(100% - 32px);
    margin-top: 10px;
    padding: 11px 13px;
  }

  .auth-panel {
    min-height: 36px;
    justify-content: flex-start;
  }

  .app-tabs {
    width: calc(100% - 32px);
    margin-top: 18px;
  }

  .app-tab {
    border-right: 0;
    border-bottom: 1px solid var(--brand);
  }

  .app-tab:last-child {
    border-bottom: 0;
  }

  main {
    padding: 24px 16px 52px;
  }

  .submission-panel {
    padding: 28px 22px;
  }

  .submission-intro {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .submission-panel h2,
  .tool-heading h2 {
    font-size: clamp(36px, 11vw, 46px);
  }

  .submission-panel .service-icon {
    width: 78px;
  }

  .submission-panel .actions,
  .submission-panel .actions button {
    width: 100%;
  }

  .tool-panel {
    padding: 20px 16px;
  }

  .tool-heading {
    margin: -20px -16px 0;
    padding: 28px 22px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
  }

  .site-footer nav {
    flex-direction: column;
    gap: 12px;
  }
}

/* CIAR 2026 brand system */
html {
  color-scheme: dark;
  background: #171b20;
}

body {
  color: var(--ink);
  background: var(--brand-gradient);
  background-attachment: fixed;
}

h1,
h2,
h3,
.latin-name,
.recommendation-heading h3,
.diagnosis-card h3 {
  font-family: var(--font-serif);
}

a {
  color: var(--brand);
}

.topbar {
  width: min(1180px, calc(100% - 32px));
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--line);
}

.site-brand {
  gap: 18px;
}

.brand-logo {
  width: clamp(116px, 12vw, 150px);
  height: auto;
  aspect-ratio: 1916 / 978;
  object-fit: contain;
}

.product-name {
  padding-left: 18px;
  color: var(--ink);
  border-left: 1px solid var(--brand);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--brand);
  border-radius: 999px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.theme-toggle:hover {
  color: #171b20;
  background: var(--brand);
}

.theme-toggle-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle-moon {
  display: none;
}

.access-strip {
  background: rgba(27, 51, 68, 0.78);
  border-color: var(--brand);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-panel {
  color: var(--muted);
}

.status-dot,
.auth-panel.ready .status-dot {
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(228, 191, 128, 0.14);
}

.app-tabs {
  overflow: hidden;
  border-color: var(--brand);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.app-tab {
  color: var(--muted);
  background: rgba(23, 27, 32, 0.9);
  border-color: var(--brand);
}

.app-tab:hover {
  color: var(--ink);
  background: #243746;
}

.app-tab.active,
.app-tab.active:hover {
  color: #171b20;
  background: var(--brand);
}

.submission-panel,
.tool-heading {
  color: var(--ink);
  background: var(--brand-gradient);
  border: 1px solid var(--brand);
  box-shadow: var(--shadow);
}

.submission-panel {
  border-radius: 10px;
}

.submission-panel h2,
.tool-heading h2,
.report-toolbar h2 {
  color: var(--ink);
  font-family: var(--font-serif);
  letter-spacing: -0.015em;
}

.submission-panel .eyebrow,
.tool-heading .eyebrow,
.report-toolbar .eyebrow,
.eyebrow {
  color: var(--brand);
}

.submission-intro .section-heading > p:not(.eyebrow),
.submission-panel .file-meta,
.tool-heading > p:not(.eyebrow) {
  color: var(--muted);
}

.submission-panel .service-icon {
  filter: brightness(0) saturate(100%) invert(81%) sepia(32%) saturate(674%) hue-rotate(359deg) brightness(97%) contrast(90%);
  opacity: 0.92;
}

.submission-panel .workflow-steps strong {
  color: var(--brand);
}

.submission-panel textarea,
.submission-panel input,
textarea,
input,
select {
  color: var(--ink);
  background: #111820;
  border-color: rgba(228, 191, 128, 0.7);
}

textarea::placeholder,
input::placeholder {
  color: #95a4b1;
}

textarea:focus,
input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(228, 191, 128, 0.34);
  outline-offset: 2px;
}

select option {
  color: var(--ink);
  background: #171b20;
}

input[type="file"]::file-selector-button {
  color: #171b20;
  background: var(--brand);
  border-color: var(--brand);
}

.tool-panel,
.report-toolbar,
.report-summary,
.plant-card,
.assistant-panel,
.report-state,
.report-bottom-toolbar,
.loading-card,
.preference-summary,
.recommendation-heading,
.recommendation-card,
.diagnosis-card {
  color: var(--ink);
  background: rgba(27, 39, 50, 0.96);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.tool-panel,
.report-toolbar {
  border-color: var(--brand);
  border-radius: 10px;
}

.tool-heading {
  border-width: 0 0 1px;
  border-radius: 9px 9px 0 0;
  box-shadow: none;
}

.chat-form,
.tool-language,
.plant-review-actions {
  color: var(--ink);
  background: rgba(228, 191, 128, 0.08);
  border-color: var(--line);
}

.chat-message,
.assistant-message,
.proposal {
  color: var(--ink);
  background: #243746;
  border-color: var(--line);
}

.chat-message.user,
.assistant-message.user {
  background: #3a3025;
}

.proposal {
  border-color: var(--brand);
}

.plant-image,
.recommendation-image,
.diagnosis-images figure,
.image-modal img {
  background: #10161c;
  border-color: var(--line);
}

.recommendation-image figcaption,
.diagnosis-images figcaption,
.plant-image figcaption,
.comparison-note,
.tool-language-note,
.plant-meta,
.print-image-note {
  color: var(--muted);
}

.confidence-track {
  background: #10161c;
}

.confidence-track span {
  background: var(--brand);
}

.badge,
.badge.highlight,
.badge.review-confirmed,
.badge.review-amended_confirmed {
  color: var(--brand);
  background: #3a3025;
  border: 1px solid #725f41;
}

.badge.review-not_reviewed,
.badge.review-amended_pending_confirmation,
.badge.review-unable_to_confirm,
.badge.review-removed {
  color: #f6d89e;
  background: #45351f;
}

.report-state.draft {
  color: var(--ink);
  background: #45351f;
  border-color: var(--brand);
}

.report-state.finalised {
  color: var(--ink);
  background: #243746;
  border-color: var(--line);
}

.summary-item strong {
  color: var(--brand);
  font-family: var(--font-serif);
}

.primary-button,
.submission-panel .primary-button {
  color: #171b20;
  background: var(--brand);
  border-color: var(--brand);
  font-weight: 700;
}

.primary-button:hover,
.submission-panel .primary-button:hover {
  color: #171b20;
  background: #f0d3a1;
}

.secondary-button,
.submission-panel .secondary-button {
  color: var(--ink);
  background: transparent;
  border-color: var(--brand);
}

.secondary-button:hover,
.submission-panel .secondary-button:hover {
  color: #171b20;
  background: var(--brand);
}

.text-button {
  color: var(--brand);
}

.image-modal {
  background: rgba(10, 15, 20, 0.96);
}

.image-modal-toolbar {
  background: #171b20;
  border-bottom: 1px solid var(--brand);
}

.site-footer {
  color: var(--muted);
  border-top-color: var(--brand);
}

.site-footer a {
  color: var(--brand);
}

@media screen {
  html[data-theme="light"] {
    color-scheme: light;
    background: #f6f3ec;
  }

  html[data-theme="light"] body {
    --ink: #171b20;
    --muted: #526170;
    --line: rgba(27, 51, 68, 0.24);
    --paper: #fffdf8;
    --surface: #f6f3ec;
    --mint: #e6ecec;
    --soft-warning: #fff1ed;
    --shadow: 0 14px 34px rgba(23, 27, 32, 0.1);
    color: var(--ink);
    background: linear-gradient(145deg, #fffdf8 0%, #f6f3ec 58%, #e8eef0 100%);
    background-attachment: fixed;
  }

  html[data-theme="light"] .topbar {
    background: rgba(255, 253, 248, 0.96);
    border-bottom-color: var(--brand);
  }

  html[data-theme="light"] .theme-toggle {
    color: #1b3344;
    background: #fffdf8;
    border-color: #1b3344;
  }

  html[data-theme="light"] .theme-toggle:hover {
    color: #171b20;
    background: var(--brand);
    border-color: var(--brand);
  }

  html[data-theme="light"] .theme-toggle-sun {
    display: none;
  }

  html[data-theme="light"] .theme-toggle-moon {
    display: block;
  }

  html[data-theme="light"] .access-strip {
    color: #243746;
    background: #e9efec;
    border-color: rgba(27, 51, 68, 0.42);
  }

  html[data-theme="light"] .auth-panel {
    color: #40515f;
  }

  html[data-theme="light"] .app-tabs {
    background: #edf0ee;
    border-color: rgba(27, 51, 68, 0.32);
  }

  html[data-theme="light"] .app-tab {
    color: #40515f;
    background: #fffdf8;
    border-color: rgba(27, 51, 68, 0.24);
  }

  html[data-theme="light"] .app-tab:hover {
    color: #171b20;
    background: #e6ecec;
  }

  html[data-theme="light"] .app-tab.active,
  html[data-theme="light"] .app-tab.active:hover {
    color: #171b20;
    background: var(--brand);
    border-color: var(--brand);
  }

  html[data-theme="light"] .submission-panel,
  html[data-theme="light"] .tool-panel,
  html[data-theme="light"] .report-toolbar,
  html[data-theme="light"] .report-summary,
  html[data-theme="light"] .plant-card,
  html[data-theme="light"] .assistant-panel,
  html[data-theme="light"] .report-state,
  html[data-theme="light"] .report-bottom-toolbar,
  html[data-theme="light"] .loading-card,
  html[data-theme="light"] .preference-summary,
  html[data-theme="light"] .recommendation-heading,
  html[data-theme="light"] .recommendation-card,
  html[data-theme="light"] .diagnosis-card {
    color: #171b20;
    background: rgba(255, 253, 248, 0.98);
    border-color: rgba(27, 51, 68, 0.24);
    box-shadow: var(--shadow);
  }

  html[data-theme="light"] .submission-panel,
  html[data-theme="light"] .tool-panel,
  html[data-theme="light"] .report-toolbar {
    border-color: rgba(228, 191, 128, 0.9);
  }

  html[data-theme="light"] .submission-panel {
    overflow: hidden;
  }

  html[data-theme="light"] .submission-intro,
  html[data-theme="light"] .tool-heading {
    color: #ffffff;
    background: var(--brand-gradient);
  }

  html[data-theme="light"] .submission-intro {
    margin: calc(-1 * clamp(28px, 5vw, 44px));
    margin-bottom: 28px;
    padding: clamp(28px, 5vw, 44px);
    padding-bottom: 30px;
  }

  html[data-theme="light"] .submission-panel form {
    color: #171b20;
  }

  html[data-theme="light"] .submission-panel h2,
  html[data-theme="light"] .tool-heading h2,
  html[data-theme="light"] .submission-intro .section-heading > p:not(.eyebrow),
  html[data-theme="light"] .tool-heading > p:not(.eyebrow) {
    color: #ffffff;
  }

  html[data-theme="light"] .submission-panel .eyebrow,
  html[data-theme="light"] .tool-heading .eyebrow,
  html[data-theme="light"] .submission-panel .workflow-steps strong {
    color: var(--brand);
  }

  html[data-theme="light"] .submission-panel .file-meta,
  html[data-theme="light"] .tool-language-note,
  html[data-theme="light"] .plant-meta,
  html[data-theme="light"] .comparison-note,
  html[data-theme="light"] .recommendation-image figcaption,
  html[data-theme="light"] .diagnosis-images figcaption,
  html[data-theme="light"] .plant-image figcaption {
    color: #526170;
  }

  html[data-theme="light"] .submission-panel textarea,
  html[data-theme="light"] .submission-panel input,
  html[data-theme="light"] textarea,
  html[data-theme="light"] input,
  html[data-theme="light"] select {
    color: #171b20;
    background: #ffffff;
    border-color: rgba(27, 51, 68, 0.42);
  }

  html[data-theme="light"] textarea::placeholder,
  html[data-theme="light"] input::placeholder {
    color: #73808b;
  }

  html[data-theme="light"] select option {
    color: #171b20;
    background: #ffffff;
  }

  html[data-theme="light"] .chat-form,
  html[data-theme="light"] .tool-language,
  html[data-theme="light"] .plant-review-actions {
    color: #171b20;
    background: #f6f1e7;
    border-color: rgba(27, 51, 68, 0.18);
  }

  html[data-theme="light"] .chat-message,
  html[data-theme="light"] .assistant-message,
  html[data-theme="light"] .proposal {
    color: #171b20;
    background: #e8eef0;
    border-color: rgba(27, 51, 68, 0.2);
  }

  html[data-theme="light"] .chat-message.user,
  html[data-theme="light"] .assistant-message.user {
    background: #f7eddc;
  }

  html[data-theme="light"] .proposal {
    border-color: var(--brand);
  }

  html[data-theme="light"] .plant-image,
  html[data-theme="light"] .recommendation-image,
  html[data-theme="light"] .diagnosis-images figure {
    background: #edf0ee;
    border-color: rgba(27, 51, 68, 0.18);
  }

  html[data-theme="light"] .confidence-track {
    background: #dce3e5;
  }

  html[data-theme="light"] .badge,
  html[data-theme="light"] .badge.highlight,
  html[data-theme="light"] .badge.review-confirmed,
  html[data-theme="light"] .badge.review-amended_confirmed {
    color: #654a20;
    background: #fbf3e5;
    border-color: #cfaa6a;
  }

  html[data-theme="light"] .badge.review-not_reviewed,
  html[data-theme="light"] .badge.review-amended_pending_confirmation,
  html[data-theme="light"] .badge.review-unable_to_confirm,
  html[data-theme="light"] .badge.review-removed,
  html[data-theme="light"] .report-state.draft {
    color: #68420c;
    background: #fff4dc;
    border-color: #cfaa6a;
  }

  html[data-theme="light"] .report-state.finalised {
    color: #173d36;
    background: #e5f0eb;
    border-color: #91b5a7;
  }

  html[data-theme="light"] .summary-item strong,
  html[data-theme="light"] .eyebrow,
  html[data-theme="light"] a,
  html[data-theme="light"] .text-button {
    color: #745722;
  }

  html[data-theme="light"] .secondary-button,
  html[data-theme="light"] .submission-panel .secondary-button {
    color: #1b3344;
    background: #fffdf8;
    border-color: #1b3344;
  }

  html[data-theme="light"] .secondary-button:hover,
  html[data-theme="light"] .submission-panel .secondary-button:hover {
    color: #171b20;
    background: var(--brand);
    border-color: var(--brand);
  }

  html[data-theme="light"] .site-footer {
    color: #526170;
  }

  html[data-theme="light"] .site-footer a {
    color: #1b3344;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .brand-logo {
    width: 108px;
    height: auto;
  }

  .product-name {
    padding-left: 12px;
    font-size: 16px;
  }

  .theme-toggle {
    min-height: 42px;
    width: 42px;
    min-width: 42px;
  }

  .submission-panel,
  .tool-panel,
  .report-toolbar {
    border-radius: 8px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm 12mm 12mm;
  }

  body {
    background: white;
    color: #17212b;
    font-family: var(--font-sans);
    font-size: 9.5pt;
    line-height: 1.35;
  }

  .topbar,
  .app-tabs,
  .submission-panel,
  .tool-panel,
  .report-toolbar,
  .site-footer,
  .message,
  .image-modal {
    display: none !important;
  }

  .assistant-panel,
  .plant-review-actions,
  .amend-form,
  .report-bottom-toolbar {
    display: none !important;
  }

  .report-state.draft::after {
    content: "DRAFT – UNCONFIRMED IDENTIFICATIONS";
    position: fixed;
    inset: 42% auto auto 16%;
    transform: rotate(-22deg);
    color: rgba(176, 0, 32, 0.13);
    font-size: 48px;
    font-weight: 900;
    z-index: 999;
  }

  main {
    width: 100%;
    padding: 0;
  }

  .report {
    display: block;
    margin: 0;
  }

  .print-report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12mm;
    padding: 0 0 2.5mm;
    margin-bottom: 3mm;
    border-bottom: 2px solid #e4bf80;
  }

  .print-report-title {
    display: flex;
    align-items: flex-end;
    gap: 5mm;
  }

  .print-logo {
    display: block;
    width: 32mm;
    height: auto;
  }

  .print-report-header h1 {
    color: #171b20;
    font-family: var(--font-serif);
    font-size: 17pt;
    margin: 0 0 0.5mm;
  }

  .print-brand {
    color: #9a7438;
    font-size: 8pt;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1mm;
  }

  .print-report-meta {
    display: grid;
    gap: 1mm;
    text-align: right;
    white-space: nowrap;
    color: var(--muted);
    font-size: 8.5pt;
  }

  .print-report-meta strong {
    color: #171b20;
  }

  .print-report-meta,
  .print-report-header p,
  .plant-meta,
  .plant-image figcaption,
  .print-image-note {
    color: #52606d;
  }

  .report-state {
    display: none !important;
  }

  .report-summary {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0;
    width: fit-content;
    max-width: 100%;
    padding: 2mm 3mm;
    margin: 0 0 3mm auto;
    border-color: #b9c7bf;
    break-inside: avoid;
  }

  .summary-item {
    display: flex;
    align-items: baseline;
    gap: 1.5mm;
    padding: 0 4mm;
    border-right: 1px solid #d7dee5;
    white-space: nowrap;
  }

  .summary-item:first-child {
    padding-left: 1mm;
  }

  .summary-item:last-child {
    padding-right: 1mm;
    border-right: 0;
  }

  .summary-item strong {
    display: inline;
    color: #9a7438;
    font-size: 11.5pt;
  }

  .plant-card,
  .report-summary {
    color: #17212b;
    background: white;
    border-color: #cfaa6a;
    break-inside: avoid;
    box-shadow: none;
  }

  .plant-card {
    gap: 3mm;
    padding: 5mm;
    margin: 0 0 5mm;
    border-color: #b9c7bf;
    page-break-inside: avoid;
  }

  .plant-header {
    align-items: flex-start;
  }

  .latin-name {
    font-size: 16pt;
  }

  .plant-meta {
    font-size: 10pt;
  }

  .badge {
    color: #6f5224;
    background: #fbf3e5;
    border-color: #cfaa6a;
    padding: 1mm 2.5mm;
    font-size: 7.5pt;
  }

  .plant-images {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2.5mm;
  }

  .plant-image:nth-child(n+7) {
    display: none;
  }

  .plant-image-button img {
    height: 27mm;
    aspect-ratio: auto;
  }

  .plant-image figcaption {
    padding: 1.5mm 2mm;
    font-size: 7pt;
    line-height: 1.2;
  }

  .print-image-note {
    display: block;
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 7.5pt;
    font-style: italic;
  }

  .plant-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 5mm;
  }

  .field {
    padding-top: 2.2mm;
    margin-top: 0;
  }

  .field span {
    color: #52606d;
    font-size: 7pt;
  }

  .field p {
    font-size: 9pt;
    line-height: 1.35;
  }

}
