/* Transcript header with copy button */
.transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.transcript-header h3 {
  margin: 0;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted, #666);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
}
.copy-btn:hover {
  background: rgba(0,0,0,0.06);
  color: var(--text, #222);
  border-color: rgba(0,0,0,0.25);
}
.copy-btn svg {
  flex-shrink: 0;
}

/* Wrap transcript text */
.transcript-result pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 1.08em;
  background: var(--surface-2);
  padding: 1em;
  border-radius: 7px;
  margin-top: 0.5em;
}
/* Center url form and input */
.center-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1em;
  margin: 2em auto 1.5em auto;
  width: 100%;
  max-width: 480px;
}
.center-label {
  font-size: 1.08em;
  font-weight: 500;
  margin-bottom: 0.2em;
  align-self: flex-start;
}
.center-input {
  width: 100%;
  max-width: 420px;
  padding: 0.7em 1em;
  border-radius: 7px;
  border: 1.5px solid var(--surface-2);
  font-size: 1.08em;
  background: var(--surface);
  color: var(--text);
  transition: border 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.center-input:focus {
  outline: none;
  border: 1.5px solid var(--accent);
}
.center-btn {
  margin-top: 0.5em;
  padding: 0.7em 2.2em;
  border-radius: 7px;
  border: none;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1.08em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: background 0.2s, box-shadow 0.2s;
}
.center-btn:hover {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
}

/* Modern loading bar styles (improved) */
.modern-loading-bar {
  display: none;
  justify-content: center;
  align-items: center;
  margin: 2em auto 0 auto;
  width: 100%;
  max-width: 420px;
  height: 18px;
  background: var(--surface-2);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  position: relative;
  overflow: hidden;
}
.modern-loading-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 12px 0 0 12px;
  transition: width 0.5s cubic-bezier(.4,1.4,.6,1);
  width: 0;
  min-width: 0;
  z-index: 1;
  box-shadow: 0 1px 8px rgba(255,179,71,0.10);
}
.modern-loading-percent {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.13em;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  z-index: 2;
  text-shadow: 0 1px 8px rgba(0,0,0,0.13);
  pointer-events: none;
  background: rgba(0,0,0,0.04);
  padding: 0.1em 0.7em;
  border-radius: 6px;
}
# Modern loading bar styles
.modern-loading-bar {
  display: none;
  justify-content: center;
  align-items: center;
  margin: 1.5em auto 0 auto;
  width: 100%;
  max-width: 400px;
  height: 18px;
  background: var(--surface-2);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  position: relative;
  overflow: hidden;
}
.modern-loading-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 8px 0 0 8px;
  transition: width 0.5s cubic-bezier(.4,1.4,.6,1);
  width: 0;
  min-width: 0;
  z-index: 1;
}
.modern-loading-percent {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.05em;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.03em;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.10);
  pointer-events: none;
}
.transcript-block pre {
  background: var(--surface-2);
  color: var(--text);
  padding: 1em;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1em;
}

.light-mode .transcript-block pre {
  background: #f8f8f8;
  color: #181b2a;
}

#loading-bar {
  position: relative;
}

#loading-percent {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95em;
  color: var(--muted);
  z-index: 2;
}
@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Space+Grotesk:wght@400;600;700&display=swap");

/* Dark mode (default) */
:root {
  --bg: #0f111a;
  --surface: #181b2a;
  --surface-2: #22263b;
  --text: #f8f5f0;
  --muted: #c8c3b7;
  --accent: #ffb347;
  --accent-2: #ff6b6b;
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

/* Light mode overrides */
.light-mode {
  --bg: #f8f5f0;
  --surface: #fff;
  --surface-2: #f3f3f3;
  --text: #181b2a;
  --muted: #6a6a6a;
  --accent: #ffb347;
  --accent-2: #ff6b6b;
  --shadow: 0 30px 60px rgba(200, 200, 200, 0.15);
}

body, .site-header, .site-footer, .container, .panel-card, .module-card, .module-page, .transcript-block {
  background: var(--bg);
  color: var(--text);
}

.light-mode body, .light-mode .site-header, .light-mode .site-footer, .light-mode .container, .light-mode .panel-card, .light-mode .module-card, .light-mode .module-page, .light-mode .transcript-block {
  background: var(--bg);
  color: var(--text);
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.3em;
  margin-left: 1em;
  cursor: pointer;
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1f2440 0%, #0f111a 55%, #0a0b12 100%);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.bg-orbit {
  position: fixed;
  inset: -40% 10% auto 10%;
  height: 70vh;
  background: radial-gradient(circle at top, rgba(255, 179, 71, 0.22), transparent 60%),
    radial-gradient(circle at 40% 20%, rgba(255, 107, 107, 0.18), transparent 55%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(15, 17, 26, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.logo-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem;
}

.logo-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 18, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.logo-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.logo-lightbox-image {
  width: min(70vw, 420px);
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  background: rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
}

.logo-lightbox-close {
  position: absolute;
  top: 2.5rem;
  right: 2.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 17, 26, 0.8);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

/* Nav actions (theme toggle + hamburger) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Sign in / Sign out button — always visible in the header */
.nav-auth-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.35em 0.9em;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.nav-auth-btn--in {
  border: 1.5px solid rgba(255,179,71,0.5);
  background: transparent;
  color: var(--accent);
}
.nav-auth-btn--in:hover {
  background: rgba(255,179,71,0.1);
}
.nav-auth-btn--out {
  border: 1.5px solid rgba(255,255,255,0.12);
  background: transparent;
  color: var(--muted);
}
.nav-auth-btn--out:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

/* Hamburger button */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 6px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.07); }
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
  transform-origin: center;
}
.nav-hamburger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger--open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav drawer */
.nav-drawer {
  display: none;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  min-width: 200px;
  background: var(--surface, #181b2a);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  padding: 0.5rem 0;
  z-index: 100;
  overflow: hidden;
}
.nav-drawer--open { display: flex; }
.nav-drawer a {
  color: var(--muted);
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-drawer a:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 0.35rem 0;
}

.nav-group-label {
  display: block;
  padding: 0.35rem 1.25rem 0.1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.55;
}

.nav-account {
  font-weight: 600;
  color: var(--accent) !important;
}
.nav-account:hover {
  background: rgba(255,179,71,0.08) !important;
}

.site-main {
  position: relative;
  z-index: 1;
  padding-bottom: 3rem;
}

.hero {
  padding: 5rem 0 3rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 1.2rem;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero-copy h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 32rem;
  line-height: 1.7;
  margin: 0 0 0.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: #1b1c22;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.4);
}

.button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.hero-panel {
  background: linear-gradient(160deg, rgba(34, 38, 59, 0.9), rgba(18, 20, 32, 0.97));
  border-radius: 24px;
  padding: 1.8rem;
  border: 1px solid rgba(255, 179, 71, 0.2);
  box-shadow: var(--shadow), 0 0 40px rgba(255, 179, 71, 0.07);
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: radial-gradient(ellipse at top left, rgba(255, 179, 71, 0.08), transparent 60%);
  pointer-events: none;
}

.panel-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.panel-title::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.panel-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.panel-stack {
  display: grid;
  gap: 1rem;
}

.panel-card h2 {
  margin: 0 0 0.6rem;
}

.panel-card p {
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.text-link {
  color: var(--accent);
  font-weight: 600;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
  margin-bottom: 2rem;
}

.status-card {
  background: var(--surface);
  padding: 1.6rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.status-card h3 {
  margin-top: 0;
}

.status-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.8rem;
  color: var(--muted);
}

.status-metric strong {
  color: var(--text);
  font-size: 1.1rem;
}

.status-countdown {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0.4rem 0 0;
}

.status-note {
  margin: 0.6rem 0 0;
  color: var(--muted);
}

.status-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 2rem 0;
}

.status-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  color: var(--muted);
}

.status-list li {
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.status-list li:last-child {
  border-bottom: none;
}

.modules {
  padding: 2rem 0 3rem;
}

.modules h2 {
  font-family: "DM Serif Display", serif;
  font-size: 2rem;
  margin-bottom: 1.6rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.module-card {
  background: var(--surface);
  padding: 1.6rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.module-card:hover {
  border-color: rgba(255, 179, 71, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow), 0 0 24px rgba(255, 179, 71, 0.08);
}

.module-card p {
  color: var(--muted);
}

.muted-card {
  border-style: dashed;
  color: var(--muted);
}

.badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.job-form {
  display: grid;
  gap: 1rem;
  background: var(--surface);
  padding: 1.6rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  max-width: 760px;
}

.job-field {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.job-field input,
.job-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  border-radius: 10px;
  padding: 0.72rem 0.85rem;
  font: inherit;
}

.job-field textarea {
  resize: vertical;
  min-height: 130px;
}

.form-message {
  max-width: 760px;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin: 0 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.form-message.success {
  background: rgba(95, 211, 141, 0.18);
}

.form-message.error {
  background: rgba(255, 107, 107, 0.18);
}

.job-list {
  display: grid;
  gap: 1rem;
}

.job-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.job-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.job-card h3 {
  margin: 0;
}

.job-card p {
  margin: 0.45rem 0;
  color: var(--muted);
}

.job-card .job-contact {
  color: var(--text);
}

.job-meta {
  font-size: 0.88rem;
  color: var(--muted);
}

.job-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.job-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.65rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.job-status-open {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.job-status-done {
  color: #ddffe8;
  border-color: rgba(95, 211, 141, 0.9);
  background: rgba(95, 211, 141, 0.24);
}

.job-card-done {
  border-color: rgba(95, 211, 141, 0.55);
  box-shadow: 0 30px 60px rgba(39, 117, 68, 0.24);
}

.button.button-small {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    flex-direction: column;
  }
}

/* Groq usage indicator */
.groq-usage {
  margin: 1em auto 0;
  max-width: 480px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted, #888);
}

/* Pipeline progress indicator */
.pipeline-progress {
  margin: 1.8em auto 0;
  max-width: 480px;
  display: none;
}
.pipeline-status {
  font-family: monospace;
  font-size: 1em;
  color: var(--accent);
  margin-bottom: 1.2em;
  display: flex;
  align-items: center;
  gap: 0.45em;
  min-height: 1.4em;
}
.pipeline-cursor {
  animation: pip-blink 0.9s step-end infinite;
}
@keyframes pip-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.pipeline-cursor.done {
  animation: none;
  opacity: 1;
}
.pipeline-dots::after {
  content: '';
  animation: pip-dots 1.4s steps(4, end) infinite;
}
@keyframes pip-dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}
.pipeline-dots.done::after {
  content: '' !important;
  animation: none;
}
/* Tracks row: bars + arrows in perfect alignment */
.pipeline-tracks {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
}
.pipeline-track {
  height: 5px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.pipeline-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
  transition: width 0.35s ease;
}
.pipeline-fill.active {
  box-shadow: 0 0 10px 2px rgba(255, 179, 71, 0.45);
  overflow: visible;
}
.pipeline-fill.done {
  width: 100% !important;
  box-shadow: none;
}
.pipeline-arrow {
  padding: 0 0.55em;
  opacity: 0.2;
  font-size: 0.8em;
  color: var(--text);
  user-select: none;
  line-height: 1;
}
/* Meta row: label, pct, time below each bar */
.pipeline-metas {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  margin-top: 0.55em;
}
.pipeline-meta-spacer {
  /* matches arrow column width, no content needed */
}
.pipeline-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18em;
}
.pipeline-label {
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.3;
  transition: opacity 0.3s, color 0.3s;
}
.pipeline-label.active {
  opacity: 1;
  color: var(--accent);
}
.pipeline-label.done {
  opacity: 0.55;
  color: var(--text);
}
.pipeline-pct {
  font-family: monospace;
  font-size: 1em;
  font-weight: 700;
  color: var(--text);
  opacity: 0.25;
  transition: opacity 0.3s, color 0.3s;
}
.pipeline-pct.active {
  opacity: 1;
  color: var(--accent);
}
.pipeline-pct.done {
  opacity: 0.6;
  color: var(--text);
}
.pipeline-time {
  font-family: monospace;
  font-size: 0.9em;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.4s;
  min-height: 1em;
}
.pipeline-time.visible {
  opacity: 0.6;
}

/* ─── Grocery List ─────────────────────────────────────────────────────────── */
.grocery-wrap {
  max-width: 540px;
  margin: 0 auto;
  padding: 1rem 1rem 4rem;
}

.grocery-header {
  margin-bottom: 1.5rem;
}

.grocery-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.grocery-status-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.gl-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2em 0.65em;
  border-radius: 99px;
}
.gl-status--online  { background: rgba(34,197,94,0.15); color: #16a34a; }
.gl-status--offline { background: rgba(239,68,68,0.12); color: #dc2626; }

.gl-login-hint { font-size: 0.82rem; color: var(--text-muted, #888); }

.gl-auth-banner {
  background: var(--surface-2, rgba(255,255,255,0.06));
  border: 1px solid var(--surface-2, rgba(255,255,255,0.1));
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  color: var(--text-muted, #888);
}
.gl-auth-banner a { color: var(--accent); }

/* Sections */
.gl-section {
  margin-bottom: 1.75rem;
}

.gl-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.gl-section-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* A-Z sort toggle button */
.gl-sort-btn {
  height: 26px;
  padding: 0 0.55rem;
  border-radius: 99px;
  border: 1.5px solid var(--surface-2, rgba(255,255,255,0.12));
  background: transparent;
  color: var(--text-muted, #888);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gl-sort-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.gl-sort-btn--active {
  background: rgba(255,179,71,0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.gl-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.gl-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2, var(--accent)));
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: transform 0.1s, box-shadow 0.1s;
}
.gl-add-btn:active { transform: scale(0.93); }

/* List */
.gl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gl-empty-msg {
  font-size: 0.88rem;
  color: var(--text-muted, #888);
  padding: 0.5rem 0;
  font-style: italic;
}

/* Category header row */
.gl-category-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.2rem;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  transition: background 0.12s;
}
.gl-category-header:hover { background: var(--surface, rgba(255,255,255,0.04)); }

.gl-category-chevron {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: var(--text-muted, #888);
  transition: transform 0.15s;
}
.gl-category-chevron svg { width: 14px; height: 14px; }
.gl-category-header--collapsed .gl-category-chevron { transform: rotate(-90deg); }

.gl-category-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #888);
  flex: 1;
}

.gl-cat-edit {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #888);
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.15s, background 0.1s;
}
.gl-category-header:hover .gl-cat-edit,
.gl-category-header:focus-within .gl-cat-edit { opacity: 1; }
@media (pointer: coarse) {
  .gl-cat-edit { opacity: 0.5; }
}
.gl-cat-edit:active { background: rgba(255,255,255,0.08); }
.gl-cat-edit svg { width: 13px; height: 13px; }

.gl-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.gl-cat-chip {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  background: none;
  color: var(--text-muted, #888);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.gl-cat-chip:hover { background: var(--surface, rgba(255,255,255,0.06)); color: var(--text, #fff); }
.gl-cat-chip--active {
  background: var(--accent, #6c63ff);
  border-color: var(--accent, #6c63ff);
  color: #fff;
}

/* Item row */
.gl-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--surface, rgba(255,255,255,0.04));
  border: 1px solid var(--surface-2, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  transition: opacity 0.2s;
}
.gl-item--checked { opacity: 0.5; }
.gl-item--checked .gl-item-name { text-decoration: line-through; }

.gl-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border-radius: 6px;
  transition: background 0.1s;
}
.gl-check:active { background: rgba(255,255,255,0.08); }
.gl-check svg { width: 22px; height: 22px; }

.gl-item-name {
  flex: 1;
  font-size: 1.05rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gl-delete,
.gl-edit {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #888);
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.15s, background 0.1s;
}
.gl-item:hover .gl-delete,
.gl-item:focus-within .gl-delete,
.gl-item:hover .gl-edit,
.gl-item:focus-within .gl-edit { opacity: 1; }
/* Always show on touch (no hover) */
@media (pointer: coarse) {
  .gl-delete { opacity: 0.45; }
  .gl-edit   { opacity: 0.45; }
}
.gl-delete:active,
.gl-edit:active { background: rgba(255,255,255,0.08); }
.gl-delete svg { width: 18px; height: 18px; }
.gl-edit svg   { width: 16px; height: 16px; }

/* Trip-toggle button (Always Buy section) */
.gl-trip-toggle {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,179,71,0.35);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.gl-trip-toggle svg { width: 16px; height: 16px; }
.gl-trip-toggle:active { transform: scale(0.9); }
.gl-trip-toggle--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1200;
}
.gl-trip-toggle--active:hover { background: var(--accent-2); border-color: var(--accent-2); }
.gl-trip-toggle:not(.gl-trip-toggle--active):hover {
  background: rgba(255,179,71,0.12);
  border-color: var(--accent);
}

/* Always Buy item when it's currently in the trip */
.gl-item--in-trip {
  border-color: rgba(255,179,71,0.3);
  background: rgba(255,179,71,0.05);
}

/* Drag handle */
.gl-drag-handle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #888);
  opacity: 0.3;
  cursor: grab;
  touch-action: none;
  border-radius: 6px;
  transition: opacity 0.15s, background 0.1s;
}
.gl-drag-handle:active { cursor: grabbing; }
.gl-drag-handle svg { width: 18px; height: 18px; }
.gl-item:hover .gl-drag-handle,
.gl-item:focus-within .gl-drag-handle { opacity: 0.6; }
@media (pointer: coarse) {
  .gl-drag-handle { opacity: 0.45; }
}

/* Dragging ghost (the floating clone that follows the finger) */
.gl-item--ghost {
  box-shadow: 0 10px 36px rgba(0,0,0,0.4) !important;
  opacity: 0.92;
  transform: scale(1.02);
  border-color: var(--accent) !important;
  border-radius: 10px;
}

/* Placeholder slot in the list */
.gl-drag-placeholder {
  list-style: none;
  border: 2px dashed rgba(255,179,71,0.35);
  border-radius: 10px;
  background: rgba(255,179,71,0.04);
  margin: 0;
}

/* Reset button */
.gl-reset-row {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.gl-reset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  border: 1.5px solid rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.07);
  color: #dc2626;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
  max-width: 320px;
}
.gl-reset-btn:hover { background: rgba(239,68,68,0.13); border-color: rgba(239,68,68,0.55); }
.gl-reset-sub {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.7;
}

/* Modal */
.gl-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
.gl-modal-backdrop.gl-modal-open {
  opacity: 1;
  pointer-events: auto;
}

.gl-modal {
  background: var(--surface, #1a1a2e);
  border-radius: 16px 16px 0 0;
  padding: 1.5rem 1.25rem 2rem;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
  transform: translateY(100%);
  transition: transform 0.22s cubic-bezier(.4,0,.2,1);
}
.gl-modal-open .gl-modal {
  transform: translateY(0);
}

@media (min-width: 540px) {
  .gl-modal-backdrop { align-items: center; }
  .gl-modal { border-radius: 16px; max-width: 400px; }
  .gl-modal-open .gl-modal { transform: translateY(0); }
}

.gl-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.gl-modal-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--surface-2, rgba(255,255,255,0.12));
  background: var(--surface-2, rgba(255,255,255,0.06));
  color: var(--text);
  font-size: 1.05rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.18s;
}
.gl-modal-input:focus { border-color: var(--accent); }
.gl-modal-input--secondary { margin-top: 0.6rem; font-size: 0.95rem; }

.gl-confirm-msg {
  font-size: 0.92rem;
  color: var(--text-muted, #888);
  margin: 0 0 1.25rem;
}

.gl-modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.gl-modal-cancel {
  flex: 1;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1.5px solid var(--surface-2, rgba(255,255,255,0.12));
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}
.gl-modal-cancel:hover { background: var(--surface-2, rgba(255,255,255,0.06)); }

.gl-modal-save {
  flex: 1;
  padding: 0.75rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2, var(--accent)));
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.gl-modal-save:hover { opacity: 0.88; }
.gl-modal-save.gl-modal-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}
