/* lif-viz shared visual theme -- "Minimal" direction (2026-09-14, Josh's
   pick from a 3-option mockup review). One file, linked from every
   template's <head>, so picking a direction is a token change here, not a
   per-page rebuild. Component classes below (`.section-panel`,
   `.action-btn`, `.badge-*`, form controls, etc.) are shared verbatim
   across templates; each template's own <style> block only adds what's
   genuinely page-specific (layout grids, one-off structural rules) and
   should reference these custom properties rather than hardcoding colors.

   Replaces the earlier decorative photographic "color wash" background
   (web/static/upload/color_wash.png) with a flat neutral -- that photo
   treatment doesn't fit a "clean, minimal" identity, and the approved
   mockup didn't use it. The image file itself is left in place (still
   used by each generate_assets.py under web/static/ for its own preview
   renders) in case a future direction wants it back.
*/

:root {
  /* Surfaces */
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --border: #dfe2ea;
  --border-strong: #c7cbd6;

  /* Text */
  --text: #14171f;
  --text-muted: #5c6472;
  --text-faint: #8a90a0;

  /* Brand accent */
  --accent: #5b5fef;
  --accent-hover: #4649c9;
  --accent-contrast: #ffffff;
  --accent-tint: #eceeff;

  /* Semantic status -- shared across audit badges, trial/expiry notices,
     danger actions. Amber/red/green roles are unchanged from before this
     theme (customers already associate them with warn/fail/pass); only
     the neutral/accent colors around them moved to the new palette. */
  --pass: #1e8e5a;
  --pass-bg: #e3f5ea;
  --pass-border: #bfe6cf;
  --warn: #9a6700;
  --warn-bg: #fbedd1;
  --warn-border: #f2d98d;
  --fail: #b23a2e;
  --fail-bg: #f8e2df;
  --fail-border: #eec3bd;
  --info: #3452c9;
  --info-bg: #eef0fd;
  --info-border: #ccd2f7;
  --danger: #c33d3d;
  --danger-hover: #a53232;
  --danger-bg: #fbeceb;

  /* Type */
  --font-display: "Sora", -apple-system, "Segoe UI", sans-serif;
  --font-body: "Manrope", -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Shape */
  --radius: 10px;
  --radius-sm: 6px;
}

/* ---- Base ---- */
html {
  background: var(--bg);
}
body {
  font-family: var(--font-body);
  color: var(--text);
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-hover);
}
.error {
  color: var(--danger);
}

/* ---- Panels ---- */
.section-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1.25rem;
  margin-top: 1.25rem;
}

/* ---- Form controls ---- */
label {
  display: block;
  margin-top: 1.25rem;
  font-weight: 700;
  font-size: 0.88rem;
}
label .optional {
  font-weight: 400;
  font-size: 0.85em;
  color: var(--text-muted);
}
input[type="text"],
.input,
select,
.select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  margin-top: 0.35rem;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
input[type="text"]:focus,
.input:focus,
select:focus,
.select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Plain buttons default to the quiet/secondary look; `.btn-primary` or a
   bare `button[type=submit]` picks up the accent fill. Kept as element +
   class selectors (not one !important-laden rule) so a page's own
   higher-specificity selector can still override a specific button
   without a specificity fight -- same convention this file's callers
   already used before this theme existed. */
button {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
button:hover {
  background: var(--surface-2);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ---- Help icon (the small round "?" badge linking to a help page) ---- */
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 11px;
  font-weight: 700;
  font-family: georgia, serif;
  text-decoration: none;
  line-height: 1;
}

/* ---- Action buttons (results.html's download/share/delete row) ---- */
.action-btn {
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.action-btn:hover {
  background: var(--surface-2);
}
.action-btn-danger {
  color: var(--danger);
  border-color: var(--danger);
}
.action-btn-danger:hover {
  background: var(--danger-bg);
}

/* ---- Status badges (audit PASS/WARN/FAIL, trial expiry) ---- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.badge-pass {
  color: var(--pass);
  background: var(--pass-bg);
}
.badge-warn {
  color: var(--warn);
  background: var(--warn-bg);
}
.badge-fail {
  color: var(--fail);
  background: var(--fail-bg);
}

/* ---- Notices (time-limited/informational banners) ---- */
.notice-warn {
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
}
.notice-info {
  color: var(--info);
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
}
.notice-info a {
  color: var(--info);
}

/* ---- Back-link (help pages, disclaimer) ---- */
.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.back-link:hover {
  color: var(--accent-hover);
}

/* ---- Help-page tables (input/viz/excavation/kriging help) ---- */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.82rem;
  background: var(--surface);
}
th, td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.6rem;
  text-align: left;
  white-space: nowrap;
}
th {
  background: var(--surface-2);
  font-weight: 700;
}
.table-caption {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0.4rem 0 0;
}
code {
  background: var(--surface);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: var(--font-mono);
}
