/* LabWorker landing page. Palette follows the LabWork interface
   (SpatialFM views/labwork.html: --m-accent #274690, --m-strip #3560b3/#1c3670). */

:root {
  --accent: #274690;
  --accent-2: #3560b3;
  --deep: #1c3670;
  --ink: #1f2937;
  --muted: #4b5568;
  --label: #14264d;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --line: #dfe6f2;
  --chip: #e8eef9;
  --ok: #0a6b1d;
  --shadow: 20, 38, 77;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #8fb0ff;
    --accent-2: #6d8fe6;
    --deep: #0b1430;
    --ink: #e6ebf5;
    --muted: #a9b4c8;
    --label: #f2f5fb;
    --bg: #0e1424;
    --surface: #151d31;
    --surface-2: #1b2540;
    --line: #2a3656;
    --chip: #1f2b4a;
    --ok: #4ade80;
    --shadow: 0, 0, 0;
  }
}
:root[data-theme="dark"] {
  --accent: #8fb0ff; --accent-2: #6d8fe6; --deep: #0b1430; --ink: #e6ebf5;
  --muted: #a9b4c8; --label: #f2f5fb; --bg: #0e1424; --surface: #151d31;
  --surface-2: #1b2540; --line: #2a3656; --chip: #1f2b4a; --ok: #4ade80; --shadow: 0, 0, 0;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { color: var(--label); line-height: 1.15; margin: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.2rem; color: var(--label); text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent-2), var(--deep));
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.18);
}

/* Hero */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; margin: 0 0 16px; padding: 4px 10px; border-radius: 999px;
  background: var(--chip); color: var(--accent);
  font-size: .8rem; font-weight: 600; letter-spacing: .04em;
}
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.02em; }
.lede { margin: 20px 0 28px; font-size: 1.1rem; color: var(--muted); max-width: 36rem; }
.cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.cta-note { color: var(--muted); font-size: .95rem; }

/* Desktop illustration */
.desk {
  border-radius: 14px; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -24px rgba(var(--shadow), .35), 0 2px 6px rgba(var(--shadow), .08);
}
.desk-bar { display: flex; gap: 6px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.desk-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.desk-body {
  position: relative; height: 340px;
  background:
    radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 55%),
    linear-gradient(160deg, var(--surface-2), var(--bg));
}
.win {
  position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; box-shadow: 0 10px 24px -12px rgba(var(--shadow), .35);
}
.win-title { font-size: .72rem; font-weight: 600; color: var(--accent); margin-bottom: 10px; letter-spacing: .02em; }
.win-a { left: 6%; top: 10%; width: 46%; }
.win-b { right: 6%; top: 18%; width: 44%; }
.win-c { left: 18%; bottom: 22%; width: 42%; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.win-c .win-title { grid-column: 1 / -1; margin-bottom: 0; }
.line { height: 8px; border-radius: 4px; background: var(--surface-2); margin: 6px 0; }
.w90 { width: 90%; } .w80 { width: 80%; } .w70 { width: 70%; } .w60 { width: 60%; }
.prompt-caret { width: 2px; height: 14px; background: var(--accent); margin-top: 8px; animation: blink 1.1s steps(1) infinite; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tiles i { display: block; height: 40px; border-radius: 6px; background: linear-gradient(135deg, var(--chip), var(--surface-2)); border: 1px solid var(--line); }
.tiles i:first-child { background: linear-gradient(135deg, var(--accent-2), var(--deep)); border-color: transparent; }
.check {
  width: 18px; height: 18px; border-radius: 50%; background: var(--ok); position: relative;
}
.check::after {
  content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.dock {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; gap: 8px; padding: 8px 10px; border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line);
}
.dock i { display: block; width: 22px; height: 22px; border-radius: 6px; background: var(--chip); }
.dock i:nth-child(2) { background: var(--accent-2); }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .prompt-caret { animation: none; } }

/* Steps */
.steps { padding: 64px 0; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); letter-spacing: -0.015em; }
.steps h2 span { color: var(--accent); }
.step-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step-list li { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.step-num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--chip); color: var(--accent); font-weight: 700; font-size: .9rem;
}
.step-list h3 { margin: 14px 0 6px; font-size: 1.1rem; }
.step-list p { margin: 0; color: var(--muted); font-size: .97rem; }

/* Models */
.models { padding: 56px 0; }
.models-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.models h2 { font-size: 1.5rem; }
.models p { margin: 6px 0 0; color: var(--muted); }
.model-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.model-chips li {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--label); font-weight: 600; font-size: .95rem;
}

/* Closing */
.closing { padding: 0 0 72px; }
.closing-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 36px 32px; border-radius: 16px;
  background: linear-gradient(135deg, #3560b3 0%, #1c3670 100%);
}
.closing h2 { color: #fff; font-size: clamp(1.3rem, 2.6vw, 1.8rem); max-width: 34rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .9rem; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
@media (max-width: 700px) { .footer-row { flex-direction: column; } }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 900px) {
  .hero { padding: 48px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .step-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .header-row .gsi-material-button-contents { font-size: 13px; }
  .desk-body { height: 280px; }
  .step-list { grid-template-columns: 1fr; }
  .closing-inner { padding: 28px 20px; }
}

/* Google sign-in button — same markup and styling as the archived Fathom page
   (public/marketing-site/styles/index.css). Kept light in both themes, per
   Google's branding guidance. */
.gsi-link { text-decoration: none; display: inline-block; border-radius: 8px; }
.gsi-link:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.gsi-material-button {
  -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  background-image: none;
  border: 1px solid #747775;
  border-radius: 8px;
  box-sizing: border-box;
  color: #1f1f1f;
  cursor: pointer;
  font-family: 'Roboto', arial, sans-serif;
  font-size: 14px;
  height: 40px;
  letter-spacing: 0.25px;
  outline: none;
  overflow: hidden;
  padding: 4px 12px;
  position: relative;
  text-align: center;
  transition: background-color .218s, border-color .218s, box-shadow .218s;
  vertical-align: middle;
  white-space: nowrap;
  width: auto;
  max-width: 400px;
  min-width: min-content;
}
.gsi-material-button .gsi-material-button-icon { height: 20px; margin-right: 12px; min-width: 20px; width: 20px; }
.gsi-material-button .gsi-material-button-content-wrapper {
  align-items: center; display: flex; flex-direction: row; flex-wrap: nowrap;
  height: 100%; justify-content: space-between; position: relative; width: 100%;
}
.gsi-material-button .gsi-material-button-contents {
  flex-grow: 1; font-family: 'Roboto', arial, sans-serif; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; vertical-align: top;
}
.gsi-material-button .gsi-material-button-state {
  transition: opacity .218s; bottom: 0; left: 0; opacity: 0; position: absolute; right: 0; top: 0;
}
.gsi-link:focus-visible .gsi-material-button-state,
.gsi-material-button:not(:disabled):active .gsi-material-button-state {
  background-color: #303030; opacity: 12%;
}
.gsi-material-button:not(:disabled):hover {
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
}
.gsi-material-button:not(:disabled):hover .gsi-material-button-state { background-color: #303030; opacity: 8%; }

/* Legal pages (privacy.html, terms.html) */
.header-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.header-link:hover { text-decoration: underline; }
.legal { max-width: 820px; padding-top: 48px; padding-bottom: 72px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
.legal-dates { color: var(--muted); margin: 12px 0 32px; }
.legal section { padding: 24px 0; border-top: 1px solid var(--line); }
.legal h2 { font-size: 1.2rem; margin-bottom: 10px; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 1.25rem; }
.legal li { margin: 4px 0; }
.legal a { color: var(--accent); }
.legal code { font-size: .9em; background: var(--chip); padding: 1px 5px; border-radius: 4px; }
.legal .caps { text-transform: uppercase; font-size: .9rem; font-weight: 600; }
.table-scroll { overflow-x: auto; margin: 12px 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--surface); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid var(--line); }
.legal th { background: var(--surface-2); color: var(--label); font-weight: 600; }
.footer-links a[aria-current="page"] { color: var(--accent); }

/* Signed-in dashboard (views/labworker-dashboard.ejs) */
.dash-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dash-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.dash-avatar-letter {
  display: inline-grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--deep));
}
.dash-name { font-weight: 600; color: var(--label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16rem; }
.dash { padding-top: 40px; padding-bottom: 72px; }
.dash-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 28px 32px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 12px 32px -20px rgba(var(--shadow), .35);
}
.dash-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); letter-spacing: -0.02em; }
.dash-hero .lede { margin: 10px 0 0; font-size: 1.02rem; }
.dash-open { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px;
  background: linear-gradient(135deg, #3560b3 0%, #1c3670 100%); color: #fff; font-weight: 700;
  text-decoration: none; box-shadow: 0 6px 16px -8px rgba(28, 54, 112, .6);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.dash-open-note { color: var(--muted); font-size: .9rem; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.panel { padding: 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.panel-wide { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel h2 { font-size: 1.25rem; }
.panel p { margin: 0 0 10px; }
.panel .mut { color: var(--muted); font-size: .95rem; }
.panel-tag { padding: 3px 10px; border-radius: 999px; background: var(--chip); color: var(--accent); font-size: .78rem; font-weight: 600; }
.panel-tag-soon { background: var(--surface-2); color: var(--muted); }
.gs-steps { list-style: none; counter-reset: gs; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.gs-steps li { counter-increment: gs; padding: 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.gs-steps li::before {
  content: counter(gs); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--chip); color: var(--accent); font-weight: 700; font-size: .9rem;
}
.gs-steps h3 { font-size: 1rem; margin: 10px 0 6px; }
.gs-steps p { margin: 0; color: var(--muted); font-size: .93rem; }
.panel-foot { margin: 16px 0 0; color: var(--muted); font-size: .95rem; }
.panel-foot a { color: var(--accent); font-weight: 600; }
.guide-list { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.guide-list li { margin: 6px 0; }
@media (max-width: 800px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-hero { padding: 22px 20px; }
}
@media (max-width: 560px) {
  .dash-name { display: none; }
}

/* Dashboard live panels (public/labworker/dashboard.js) */
.lw-msg { color: var(--muted); margin: 0; }
.lw-msg a, .panel-link { color: var(--accent); font-weight: 600; }
.panel-link { display: inline-block; margin-top: 14px; font-size: .93rem; }
.sub-head { font-size: .95rem; margin: 18px 0 8px; color: var(--label); }
.sub-head:first-child { margin-top: 0; }
.proj-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.proj-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); min-width: 0; }
.proj-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.proj-card h3 { font-size: 1rem; margin: 0; overflow-wrap: anywhere; }
.proj-vis { flex: none; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.proj-meta { margin: 0; color: var(--muted); font-size: .88rem; }
.proj-open { margin-top: auto; color: var(--accent); font-weight: 600; font-size: .9rem; text-decoration: none; }
.proj-open:hover { text-decoration: underline; }
.link-btn { margin-top: 12px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.job-list { list-style: none; margin: 0; padding: 0; }
.job-row { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line); }
.job-row:last-child { border-bottom: 0; }
.job-proj { font-weight: 600; color: var(--label); overflow-wrap: anywhere; }
.job-meta { color: var(--muted); font-size: .86rem; }
.usage-window { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.usage { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; }
.usage dt { color: var(--muted); }
.usage dd { margin: 0; font-weight: 700; color: var(--label); text-align: right; }

/* Expandable project panels */
.proj-toggle {
  display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 0; margin: 0;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; position: relative;
}
.proj-toggle:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 4px; border-radius: 6px; }
.proj-title { font-weight: 700; font-size: 1rem; color: var(--label); overflow-wrap: anywhere; padding-right: 4px; }
.proj-chevron { position: absolute; right: 0; bottom: 0; color: var(--muted); font-size: .8rem; transition: transform .15s; }
.proj-toggle[aria-expanded="true"] .proj-chevron { transform: rotate(180deg); }
.proj-card.open { grid-column: 1 / -1; border-color: var(--accent-2); box-shadow: 0 10px 28px -18px rgba(var(--shadow), .45); }
.proj-card.open > .proj-open { display: none; }
.proj-detail { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.proj-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 20px; margin: 0; }
.proj-facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.proj-facts dd { margin: 2px 0 0; color: var(--label); font-weight: 600; overflow-wrap: anywhere; }
.proj-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.proj-action {
  display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--accent); font-weight: 600; font-size: .92rem; text-decoration: none;
}
.proj-action:hover { border-color: var(--accent-2); }
.proj-action.primary { background: linear-gradient(135deg, #3560b3 0%, #1c3670 100%); border-color: transparent; color: #fff; }
.proj-note { margin: 12px 0 0; color: var(--muted); font-size: .88rem; }
.proj-fact { min-width: 0; }
button.proj-action { font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; }
button.proj-action:disabled { color: var(--muted); background: var(--surface-2); cursor: not-allowed; opacity: .8; }

/* Project icons */
.proj-toggle { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 4px; align-items: start; }
.proj-toggle .proj-icon { grid-row: span 2; }
.proj-toggle .proj-top, .proj-toggle .proj-meta { grid-column: 2; }
.proj-icon { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); border: 1px solid var(--line); transition: width .15s, height .15s; }
.proj-icon-letter {
  display: grid; place-items: center; font-weight: 700; color: #fff; border: 0;
  background: linear-gradient(135deg, var(--accent-2), var(--deep));
}
.proj-card.open .proj-icon { width: 88px; height: 88px; border-radius: 16px; font-size: 1.8rem; }
