/* T-Line Programming — site-wide styles */

:root {
  --color-bg: #f4f6f8;
  --color-surface: #ffffff;
  --color-text: #1a1d21;
  --color-muted: #5c6570;
  --color-accent: #0d9488;
  --color-accent-hover: #0f766e;
  --color-nav: #0f172a;
  --color-nav-border: #1e293b;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* Layout */

.site-header {
  background: var(--color-nav);
  color: #e2e8f0;
  border-bottom: 1px solid var(--color-nav-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand (navbar): logo + wordmark — wordmark always visible; hide broken img via .logo-img--failed */
.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  min-width: 0;
  max-width: min(100%, 18rem);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.brand-logo {
  flex-shrink: 0;
  box-sizing: content-box;
  height: clamp(1.65rem, 4.2vw, 2.25rem);
  width: auto;
  max-width: 2.75rem;
  max-height: 2.75rem;
  object-fit: contain;
  object-position: left center;
  vertical-align: middle;
}

img.logo-img--failed {
  display: none !important;
}

.brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-wrap:hover {
  text-decoration: none;
  color: #fff;
}

.brand-wrap:hover .brand-logo {
  opacity: 0.95;
}

@media (max-width: 380px) {
  .brand-text {
    font-size: 0.95rem;
  }

  .brand-logo {
    height: 1.5rem;
    max-width: 2.25rem;
  }
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(248, 250, 252, 0.25);
  color: #f8fafc;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.nav-toggle:hover {
  background: rgba(248, 250, 252, 0.08);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: center;
}

.nav-list a {
  color: #cbd5e1;
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav-list a:hover,
.nav-list a.active {
  color: #fff;
  text-decoration: none;
  border-bottom-color: var(--color-accent);
}

main {
  flex: 1;
}

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  width: 100%;
}

.content--narrow {
  max-width: 32rem;
}

/* Signup: wider column for profile sections */
.content--wide-auth {
  max-width: 40rem;
}

/* Hero */

.hero {
  background: linear-gradient(145deg, #0f172a 0%, #134e4a 55%, #0d9488 100%);
  color: #f8fafc;
  padding: 3.5rem 1.25rem 4rem;
  margin: 0 calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-logo-wrap {
  margin: 0 0 1rem;
  min-height: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.hero-logo {
  display: block;
  box-sizing: content-box;
  height: auto;
  width: auto;
  max-height: clamp(4rem, 14vw, 6.75rem);
  max-width: min(16rem, 58vw);
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 6px 20px rgba(15, 23, 42, 0.35));
}

@media (max-width: 640px) {
  .hero-logo {
    max-height: clamp(3.25rem, 18vw, 5rem);
    max-width: min(13rem, 72vw);
  }
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero .tagline {
  margin: 0 0 1.75rem;
  font-size: 1.125rem;
  color: rgba(248, 250, 252, 0.92);
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
  align-items: center;
}

.hero-value-line {
  margin: -0.35rem 0 1.25rem;
  font-size: 0.98rem;
  color: rgba(248, 250, 252, 0.9);
  max-width: 40rem;
  line-height: 1.55;
}

.hero-trust-banner {
  margin: 0 0 1.35rem;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  line-height: 1.55;
  background: rgba(15, 23, 42, 0.38);
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: var(--radius);
  max-width: 42rem;
}

.hero-trust-banner strong {
  color: #fff;
}

.hero-qr-label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(248, 250, 252, 0.75);
}

.hero-qr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

/* Homepage: choose Basic vs Advanced */
.home-qr-section {
  margin: 0 0 2.5rem;
  padding: 1.75rem 1.5rem 2rem;
  background: linear-gradient(180deg, #ecfdf5 0%, #f4f6f8 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.home-qr-heading {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  letter-spacing: -0.02em;
}

.home-qr-lead {
  margin: 0 0 1.5rem;
  color: var(--color-muted);
  max-width: 40rem;
}

.qr-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
}

.card--qr-featured {
  border-left: 4px solid var(--color-accent);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
}

.card--qr-featured h3 {
  font-size: 1.25rem;
}

/* Tools page: featured QR block vs muted placeholders */
.tools-qr-section {
  margin-bottom: 2.5rem;
}

.tools-qr-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  letter-spacing: -0.02em;
}

.tools-qr-intro {
  margin: 0 0 1.25rem;
  color: var(--color-muted);
  max-width: 46rem;
}

.tools-policy-callout {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  max-width: 46rem;
  font-size: 0.95rem;
  line-height: 1.55;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.28);
  border-radius: var(--radius);
  color: var(--color-text);
}

.tools-policy-callout strong {
  color: var(--color-accent-hover);
}

.tools-future-lead {
  margin: -0.35rem 0 1.1rem;
  font-size: 0.95rem;
  color: var(--color-muted);
  max-width: 40rem;
}

.tools-subscriber-note {
  margin: 1.5rem 0 0;
  padding: 0.85rem 1rem;
  max-width: 48rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--color-muted);
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
}

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

.card--qr-tools {
  padding: 1.65rem 1.5rem 1.75rem;
}

.card--bc-featured {
  border: 1px solid rgba(13, 148, 136, 0.35);
  background: linear-gradient(165deg, #f0fdfa 0%, #fff 55%);
}

/* Digital Business Card tool */
.bc-layout .bc-form-panel {
  max-width: 100%;
}

.bc-preview-panel {
  align-self: start;
}

.bc-output-heading {
  margin: 1.25rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bc-output-heading:first-of-type {
  margin-top: 0;
}

.bc-card-preview-wrap {
  margin-bottom: 0.5rem;
}

.bc-card-preview-frame {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  background: #e2e8f0;
}

.bc-card-preview-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.bc-card-preview-placeholder {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.92rem;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  background: #f8fafc;
}

.card--batch-teaser {
  border-left-color: #64748b;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.card--batch-teaser .card-kicker {
  color: #64748b;
}

.tools-more-section {
  margin-top: 0.5rem;
}

.tools-more-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

.card-grid--secondary {
  margin-top: 0;
  opacity: 0.92;
}

.card--muted {
  border-style: dashed;
  border-color: #cbd5e1;
  background: #f8fafc;
}

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

.nav-item-qr a {
  font-weight: 600;
}

.nav-auth a {
  font-weight: 600;
  color: #a5f3fc;
}

.nav-auth a:hover,
.nav-auth a.active {
  color: #fff;
}

.nav-auth-signup a {
  color: #fff;
  border: 1px solid rgba(248, 250, 252, 0.35);
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
}

.nav-auth-signup a:hover {
  background: rgba(248, 250, 252, 0.1);
  text-decoration: none;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: #fff;
  color: #0f172a;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: #f1f5f9;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(248, 250, 252, 0.5);
}

.btn-outline:hover {
  background: rgba(248, 250, 252, 0.1);
  border-color: #fff;
  text-decoration: none;
}

.btn-outline-muted {
  border-color: rgba(248, 250, 252, 0.38);
  color: rgba(248, 250, 252, 0.92);
}

.btn-outline-muted:hover {
  background: rgba(248, 250, 252, 0.08);
  border-color: rgba(248, 250, 252, 0.55);
  text-decoration: none;
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--color-accent-hover);
  text-decoration: none;
}

/* Placeholder / disabled-style actions (e.g. coming-soon tool cards) */
.btn-placeholder {
  opacity: 0.9;
  cursor: not-allowed;
  pointer-events: none;
}

.card .card-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.6rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.card h2,
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.card-narrow {
  max-width: 42rem;
}

.card-narrow p + p {
  margin-top: 1rem;
}

.section-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 2.5vw, 1.6rem);
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0 0 1.5rem;
  color: var(--color-muted);
  max-width: 42rem;
}

/* CTA strip */

.cta-strip {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-strip h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.cta-strip p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* Page header (inner pages) */

.page-hero {
  margin-bottom: 2rem;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.page-hero p {
  margin: 0;
  color: var(--color-muted);
  max-width: 40rem;
}

/* Contact */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.contact-card h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.contact-card dl {
  margin: 0;
}

.contact-card dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-top: 0.75rem;
}

.contact-card dt:first-of-type {
  margin-top: 0;
}

.contact-card dd {
  margin: 0.15rem 0 0;
  font-weight: 500;
}

/* Contact aside: single email block (no phone / hours) */
.contact-card--details h3 {
  margin-bottom: 0.5rem;
}

.contact-email-primary {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
}

.contact-email-primary a {
  word-break: break-word;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}

.form-group select {
  background-color: #fff;
  cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 0.75rem;
}

/* Auth forms */

.auth-card {
  padding: 1.5rem 1.5rem 1.75rem;
}

.auth-form .btn {
  width: 100%;
  margin-top: 0.25rem;
}

.auth-switch {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  color: var(--color-muted);
  text-align: center;
}

.auth-forgot {
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  text-align: center;
}

.auth-forgot a {
  color: var(--color-accent);
  font-weight: 500;
}

/* Extra emphasis after any login error (wrong password, etc.) */
.auth-forgot--after-error {
  margin-top: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(13, 148, 136, 0.06);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.auth-forgot--after-error a {
  font-weight: 700;
}

.auth-forgot-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-muted);
  line-height: 1.45;
}

.auth-dev-hint {
  margin-top: 0.75rem;
}

.label-optional {
  font-weight: 400;
  color: var(--color-muted);
  font-size: 0.88em;
}

.signup-card {
  padding-bottom: 2rem;
}

.signup-form-section {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

/* First profile block: no top rule whether or not an error alert is above it */
.signup-form > .signup-form-section:first-child,
.signup-form > .alert-error + .signup-form-section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.signup-section-title {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.signup-name-row,
.signup-mobile-row {
  margin-bottom: 0.15rem;
}

.dashboard-profile-card {
  margin-bottom: 1.5rem;
  padding: 1.35rem 1.5rem 1.5rem;
}

.dashboard-profile-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.dashboard-profile-lead {
  margin: 0 0 1rem;
}

.dashboard-profile-dl {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.dashboard-profile-dl > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.75rem 1rem;
  font-size: 0.95rem;
  align-items: baseline;
}

.dashboard-profile-dl dt {
  margin: 0;
  font-weight: 600;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.dashboard-profile-dl dd {
  margin: 0;
  word-break: break-word;
}

.dashboard-mobile-combined {
  font-variant-numeric: tabular-nums;
}

.dashboard-greeting {
  margin-top: 0.35rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.dashboard-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.dashboard-card p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--color-muted);
  line-height: 1.55;
}

.dashboard-lead {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  color: var(--color-muted);
  max-width: 46rem;
  line-height: 1.55;
}

.dashboard-lead code {
  font-size: 0.85em;
}

.dashboard-tools-link {
  margin-top: 2rem;
}

.dashboard-plan-banner {
  margin-bottom: 1.75rem;
  padding: 1.35rem 1.5rem 1.5rem;
  border: 1px solid rgba(13, 148, 136, 0.35);
  background: linear-gradient(135deg, #f0fdfa 0%, #fff 55%);
}

.dashboard-plan-title {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.dashboard-plan-body {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.55;
  max-width: 44rem;
}

.dashboard-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.plan-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 6px;
  vertical-align: middle;
}

.plan-pill--free {
  color: #475569;
  background: #e2e8f0;
}

.plan-pill--pro {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.18);
}

.plan-gate-kicker {
  margin: 0 0 0.5rem;
}

.plan-gate-card {
  padding: 1.5rem 1.5rem 1.75rem;
}

.plan-gate-lead {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  line-height: 1.55;
}

.plan-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.upgrade-tier {
  padding: 1.5rem 1.35rem 1.65rem;
}

.upgrade-tier--featured {
  border: 2px solid var(--color-accent);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.12);
}

.upgrade-tier-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.upgrade-tier-price {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-accent-hover);
}

.upgrade-tier-list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--color-muted);
  line-height: 1.6;
}

.upgrade-tier-list li {
  margin-bottom: 0.4rem;
}

.upgrade-placeholder-msg {
  font-size: 0.88rem;
  color: var(--color-muted);
  margin: 0 0 1rem;
}

.upgrade-stripe-note {
  margin-top: 1.75rem;
  font-size: 0.88rem;
  color: var(--color-muted);
  line-height: 1.55;
}

.upgrade-stripe-note code {
  font-size: 0.82em;
}

.upgrade-footer-links {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.batch-pro-badge {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.dashboard-card--active {
  border-left: 4px solid var(--color-accent);
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 100%);
}

.my-history-note {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--color-muted);
  max-width: 42rem;
}

.my-history-note code {
  font-size: 0.85em;
}

.my-history-empty {
  padding: 2rem 1.5rem;
}

.my-history-footer-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* Account security / auth audit table */
.security-events-card {
  padding: 0;
  overflow: hidden;
}

.security-section-title {
  margin: 0;
  padding: 1.25rem 1.5rem 0.75rem;
  font-size: 1.05rem;
}

.security-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.security-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.security-table th,
.security-table td {
  padding: 0.65rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.security-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  background: #f8fafc;
}

.security-cell-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.security-cell-ip code {
  font-size: 0.8rem;
}

.security-event-pill {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
}

/* Tool pages (QR generator, etc.) */

.tool-breadcrumb {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0 0 0.5rem;
}

.tool-breadcrumb a {
  color: var(--color-accent);
  font-weight: 500;
}

.tool-breadcrumb-sep {
  margin: 0 0.35rem;
  color: #94a3b8;
}

/* QR tool: two columns on desktop; stack on narrow screens */
.qr-tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  width: 100%;
}

@media (max-width: 900px) {
  .qr-tool-layout {
    grid-template-columns: 1fr;
  }
}

.qr-form-panel,
.qr-preview-panel {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Preview column: center the QR in the middle; meta/actions stay anchored below */
.qr-preview-panel {
  min-height: 420px;
}

@media (max-width: 900px) {
  .qr-preview-panel {
    min-height: auto;
  }
}

.qr-preview-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  margin: 0.25rem 0 0.75rem;
}

.qr-preview-panel .qr-preview,
.qr-preview-panel .qr-preview-empty {
  margin: 0;
}

/* Inside the stage, avoid double-stacking min-heights from .qr-preview */
.qr-preview-stage .qr-preview,
.qr-preview-stage .qr-preview-empty {
  min-height: 220px;
  width: 100%;
  max-width: 304px;
}

.qr-preview-footnote {
  margin-top: auto;
  padding-top: 0.5rem;
}

.qr-tool-heading {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.qr-tool-lead {
  margin: 0 0 1.25rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.qr-form textarea {
  min-height: 120px;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.9rem;
}

.qr-form-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.qr-form-section:first-of-type {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
}

.qr-form-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

.qr-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

@media (max-width: 520px) {
  .qr-form-grid {
    grid-template-columns: 1fr;
  }
}

.qr-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.45;
}

.qr-field-hint code {
  font-size: 0.85em;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.qr-form-section-title .section-optional {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-muted);
}

.form-file-input {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 8px;
  cursor: pointer;
}

.form-file-input::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--color-text);
  cursor: pointer;
}

.form-file-input:hover::file-selector-button {
  background: #e2e8f0;
}

.adv-svg-logo-note {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  color: var(--color-muted);
}

.qr-callout {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--color-text);
  max-width: 42rem;
}

.qr-download-note {
  margin-top: 0.75rem;
}

/* Advanced QR: one content panel visible at a time */
.adv-type-panel {
  display: none;
}

.adv-type-panel.is-active {
  display: block;
}

/* Advanced QR — Contact Card (vCard) */
.adv-vcard-panel {
  padding: 1rem 1.1rem;
  margin-top: 0.25rem;
  background: linear-gradient(165deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.adv-vcard-intro {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--color-text-muted, #475569);
}

.adv-vcard-intro strong {
  color: var(--color-text);
}

.vcard-name-row {
  margin-bottom: 0.25rem;
}

.adv-payload-code--multiline {
  display: block;
  margin-top: 0.35rem;
  max-height: 7.5rem;
  overflow: auto;
  padding: 0.5rem 0.65rem;
  background: #f1f5f9;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  font-size: 0.8rem;
  line-height: 1.35;
}

.form-group input[type="color"] {
  height: 2.75rem;
  padding: 0.2rem;
  cursor: pointer;
}

.adv-checkbox label {
  font-weight: 600;
  cursor: pointer;
}

.adv-payload-note {
  font-size: 0.85rem;
  word-break: break-word;
}

.adv-payload-code {
  display: inline;
  white-space: pre-wrap;
  word-break: break-all;
}

.tool-actions {
  margin-top: 0.25rem;
}

.qr-secondary-actions {
  margin-top: 1rem;
}

.qr-download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 1rem;
}

.qr-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 1rem;
  background: #f8fafc;
  border-radius: var(--radius);
  border: 1px dashed #cbd5e1;
}

.qr-preview img,
.qr-preview-img {
  display: block;
  max-width: min(100%, 360px);
  width: auto;
  height: auto;
  aspect-ratio: 1;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  background: #fff;
}

.qr-preview-empty {
  min-height: 220px;
}

.qr-preview-placeholder {
  color: var(--color-muted);
  font-size: 0.95rem;
  text-align: center;
  padding: 1rem;
}

.qr-meta {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Tools: two buttons in one card */
.card-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn-secondary-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  border: 2px solid var(--color-accent);
  background: transparent;
  color: var(--color-accent);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.btn-secondary-tool:hover {
  background: rgba(13, 148, 136, 0.08);
  text-decoration: none;
}

/* QR History table */
.history-table-wrap {
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.history-table th,
.history-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  vertical-align: top;
}

.history-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  font-weight: 700;
  background: #f8fafc;
}

.history-table tbody tr:hover {
  background: rgba(13, 148, 136, 0.04);
}

.history-cell-text {
  max-width: 14rem;
}

.history-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.history-code {
  font-size: 0.85rem;
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.history-cell-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.history-th-actions,
.history-cell-actions {
  white-space: nowrap;
  vertical-align: middle;
  text-align: right;
}

.history-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
}

.btn-history-action {
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  line-height: 1.2;
}

.history-dl-muted {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  padding: 0.25rem 0.4rem;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  cursor: help;
}

/* History item preview + regeneration */
.history-regen-alert {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 48rem;
}

.history-regen-alert--logo {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #78350f;
}

.history-regen-alert--warn {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.history-regen-alert--notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.qr-history-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .qr-history-preview-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: start;
  }
}

.qr-history-preview-heading {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.qr-history-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.qr-history-dl > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
}

.qr-history-dl dt {
  margin: 0;
  font-weight: 600;
  color: var(--color-muted);
}

.qr-history-dl dd {
  margin: 0;
  word-break: break-word;
}

.qr-history-payload-title {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.qr-history-payload-snippet {
  margin: 0;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 12rem;
  overflow: auto;
}

.qr-history-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 1.25rem;
}

.qr-history-preview-footnote {
  margin-top: 1rem;
}

.qr-preview--history {
  min-height: 220px;
}

.qr-preview--empty {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.history-preview-empty-msg {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.history-empty {
  padding: 2rem 1.5rem;
  text-align: center;
}

.history-empty-lead {
  margin: 0 0 0.5rem;
  font-weight: 600;
  font-size: 1.05rem;
}

.history-actions {
  margin-top: 1.5rem;
}

.history-meta-note {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  color: var(--color-muted);
  max-width: 42rem;
}

/* Batch QR roadmap placeholder */

.batch-roadmap-card {
  margin-top: 0.5rem;
}

.batch-status {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  line-height: 1.55;
}

.batch-pill {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent-hover);
  background: rgba(13, 148, 136, 0.12);
  border-radius: 6px;
  vertical-align: middle;
}

.policy-strong {
  color: var(--color-text);
}

.batch-roadmap-title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.batch-roadmap-list {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--color-muted);
  line-height: 1.65;
}

.batch-roadmap-list li {
  margin-bottom: 0.35rem;
}

.batch-cta-lead {
  margin: 0 0 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.batch-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

/* QR History — subscriber gate (public /qr-history URL, no data shown) */

.subscriber-gate-lead {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  max-width: 40rem;
}

.subscriber-gate-card p {
  margin: 0 0 1rem;
  line-height: 1.6;
  color: var(--color-text);
}

.subscriber-gate-future {
  font-size: 0.88rem;
  color: var(--color-muted);
}

.subscriber-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

/* 404 */

.error-page {
  text-align: center;
  padding: 3rem 1rem 4rem;
  max-width: 28rem;
  margin: 0 auto;
}

.error-page h1 {
  font-size: 4rem;
  margin: 0 0 0.5rem;
  color: var(--color-accent);
  line-height: 1;
}

.error-page h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.error-page p {
  color: var(--color-muted);
  margin: 0 0 1.5rem;
}

/* Footer */

.site-footer {
  margin-top: auto;
  background: var(--color-nav);
  color: #94a3b8;
  padding: 1.5rem 1.25rem;
  font-size: 0.9rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-inner--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.footer-row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.footer-links {
  color: #94a3b8;
}

.footer-policy {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #64748b;
  max-width: 40rem;
}

.site-footer a {
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #fff;
}

/* Mobile nav */

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .nav-list {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-nav-border);
    margin-top: 0.75rem;
  }

  .nav-list.is-open {
    display: flex;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .nav-wrap {
    width: 100%;
    order: 3;
  }
}
