:root {
  --c-primary: #2A6F4E;
  --c-primary-alt: #3D8A64;
  --c-accent: #C5A35A;
  --c-bg: #FFFFFF;
  --c-surface: #FAFBFB;
  --c-text: #0E0F10;
  --c-muted: #6B7378;
  --c-border: #D8DEE2;
  --c-danger: #B00020;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0, 0, 0, .06);
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial;
  background: var(--c-bg);
  color: var(--c-text)
}

/* App Pages Layout - Common constrained layout for intake, diagnosis, health-guide */
body.artemis-app-page .site-header,
body.artemis-app-page .site-main,
body.artemis-app-page .site-footer,
body.artemis-app-page .artemis-health-guide-page .container {
  padding: 20px;
  max-width: 960px;
  margin: 0 auto;
}

/*.container{max-width:960px;margin:0 auto;padding:0 var(--sp-4)}*/
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border)
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) 0
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: inherit;
  text-decoration: none
}

.brand-mark {
  font-size: 1.4rem
}

.site-nav ul {
  display: flex;
  gap: var(--sp-4);
  list-style: none;
  margin: 0;
  padding: 0
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.site-nav a {
  text-decoration: none;
  color: var(--c-text);
  opacity: .85
}

.site-nav a:hover {
  opacity: 1
}

/* Auth Links */
.auth-links {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: var(--sp-4);
}

.auth-link {
  padding: var(--sp-2) var(--sp-4);
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.login-link,
.dashboard-link {
  color: var(--c-primary);
  border: 1px solid var(--c-primary);
  opacity: 1;
}

.login-link:hover,
.dashboard-link:hover {
  background: var(--c-primary);
  color: white;
}

.signup-link {
  background: var(--c-primary);
  color: white;
  opacity: 1;
}

.signup-link:hover {
  background: var(--c-primary-alt);
}

.logout-link {
  color: var(--c-muted);
  opacity: 1;
}

.logout-link:hover {
  color: var(--c-text);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
  z-index: 1001;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--c-text);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--c-surface);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--sp-7) var(--sp-4) var(--sp-4);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }

  .site-nav.is-open {
    right: 0;
  }

  .site-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .site-nav ul li {
    width: 100%;
    border-bottom: 1px solid var(--c-border);
  }

  .site-nav ul li a {
    display: block;
    padding: var(--sp-3) 0;
    width: 100%;
  }

  .auth-links {
    flex-direction: column;
    width: 100%;
    margin-left: 0;
    margin-top: var(--sp-4);
    gap: var(--sp-3);
  }

  .auth-link {
    width: 100%;
    text-align: center;
  }

  /* Mobile menu overlay */
  body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  body.menu-open {
    overflow: hidden;
  }
}

.hero {
  padding: var(--sp-7) 0;
  text-align: center
}

.hero .sub {
  color: var(--c-muted)
}

.actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  margin-top: var(--sp-4);
  flex-wrap: wrap
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none
}

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

.btn-secondary {
  background: #fff;
  border-color: var(--c-border);
  color: var(--c-text)
}

.btn-ghost {
  background: transparent;
  border-color: var(--c-border);
  color: var(--c-text)
}

.card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--sp-4)
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4)
}

@media(min-width:720px) {
  .cards {
    grid-template-columns: 1fr 1fr
  }
}

.progress {
  height: 6px;
  background: var(--c-border);
  border-radius: 99px;
  overflow: hidden;
  margin: var(--sp-4) 0
}

.progress .bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--c-primary), var(--c-primary-alt))
}

label {
  display: block;
  margin-bottom: var(--sp-3)
}

input[type=text],
input[type=date],
input[type=time],
input[type=search],
select,
textarea {
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: #fff;
  outline: none
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(42, 111, 78, .15)
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: .6rem
}

.checkbox input {
  margin-top: .2rem
}

.nav {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4)
}

.notice {
  padding: var(--sp-3);
  border-radius: 10px;
  border: 1px solid var(--c-border);
  background: var(--c-surface)
}

.notice.success {
  border-color: #2E7D32
}

.safety-banner {
  background: #FFF8E1;
  border: 1px solid #F3E2A0;
  padding: var(--sp-3);
  border-radius: 10px;
  margin-bottom: var(--sp-4)
}

.protocol-list {
  list-style: none;
  margin: 0;
  padding: 0
}

.protocol-item {
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: var(--sp-3);
  margin-bottom: var(--sp-3);
  background: #fff
}

.protocol-item .row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3)
}

.protocol-item .col {
  flex: 1 1 150px
}

.badge {
  padding: .1rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  font-size: .75rem
}

.badge-warning {
  background: #FFF3E0;
  border-color: #F3C48B
}

.page-header {
  margin-bottom: var(--sp-4)
}

.page-header .hero-img {
  border-radius: var(--radius)
}

.footer-inner {
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--c-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap
}

.footer-nav ul {
  display: flex;
  gap: var(--sp-4);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap
}

.footer-nav a {
  text-decoration: none;
  color: var(--c-text);
  opacity: .85;
  font-size: .9rem
}

.footer-nav a:hover {
  opacity: 1;
  text-decoration: underline
}

@media(max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    text-align: center
  }
  
  .footer-nav ul {
    justify-content: center
  }
}

.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4)
}

@media(min-width:720px) {
  .how-grid {
    grid-template-columns: repeat(3, 1fr)
  }
}

#intake-toast {
  position: fixed;
  inset-inline: var(--sp-4);
  bottom: var(--sp-4);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: .5rem 1rem;
  box-shadow: var(--shadow);
  display: none
}

.plant-card h3 {
  margin: 0 0 .5rem 0
}

@media (prefers-reduced-motion:no-preference) {
  .btn {
    transition: transform .15s ease, box-shadow .15s ease
  }

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