:root {
    --bg: #f6f8f5;
    --surface: #ffffff;
    --surface-soft: #eef6ef;
    --ink: #17313b;
    --muted: #617178;
    --green: #18b96d;
    --green-dark: #004b2d;
    --green-soft: #dff4e8;
    --line: #dce7df;
    --shadow: 0 20px 45px rgba(23, 49, 59, 0.08);
    --radius: 22px;
    --max-width: 1160px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 8%, rgba(24, 185, 109, 0.08), transparent 20rem),
        linear-gradient(180deg, #fbfcfa, var(--gb));
    line-height: 1.6;
    overflow-x: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(100% - 2rem, var(--max-width));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(14px);
    background: rgba(247, 250, 247, 0.9);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    width: 168px;
}

.brand img {
    width: 100%;
    height: auto;
}

.nav-toggle {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
    display: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-link {
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 650;
    font-size: 0.94;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--ink);
    background: var(--surface);
}

.nav-link.active {
    color: var(--surface);
    background: var(--green-dark);
}

.hero {
    padding: 7rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 18%, rgba(24, 185, 109, 0.16), transparent 20rem),
        linear-gradient(135deg, rgba(0, 75, 45, 0.06), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.hero-copy h1 {
    margin: 0;
    color: var(--muted);
    max-width: 58ch;
    overflow-wrap: anywhere;
}

.hero-copy p {
    margin: 0;
    color: var(--muted);
    max-width: 58ch;
    font-size: 1.12rem;
}

.hero-card {
    background: linear-gradient(145deg, #ffffff, #f1f7f2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.hero-media {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff, #edf6ef);
    box-shadow: var(--shadow);
    padding: 1rem;
    position: relative;
}

.hero-media::after {
    content: "";
    position: absolute;
    right: -1.1rem;
    bottom: -1.1rem;
    width: 38%;
    height: 38%;
    border-radius: 999px;
    background: rgba(24, 185, 109, 0.12);
    z-index: -1;
}

.hero-media img {
    width: 100%;
    max-height: 470px;
    border-radius: 16px;
    object-fit: contain;
    background: #f9fbf9;
}

.product-visual {
    position: relative;
    border-radius: 30px;
    padding: clamp(1rem, 2vw, 1.35rem);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 247, 240, 0.92)),
        radial-gradient(circle at 70% 0%, rgba(24, 185, 109, 0.18), transparent 22rem);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.product-visual img {
    width: 100%;
    max-height: 530px;
    object-fit: contain;
    border-radius: 22px;
    background: transparent;
}

.visual-note {
    display: grid;
    gap: 0.2rem;
    margin-top: 0.9rem;
    padding: 1rem;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
}

.visual-note span {
    color: var(--muted);
    font-size: 0.95rem;
}

.kicker {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: var(--green-dark);
    margin-bottom: 0.8rem;
    font-weight: 800;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.4rem;
}

.btn {
    border: 1px solid var(--green);
    border-radius: 999px;
    padding: 0.78rem 1.12rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: 180ms ease;
}

.btn-primary {
    background: var(--green-dark);
    color: var(--surface);
    border-color: var(--green-dark);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: #063d29;
    border-color: #063d29;
}

.btn-secondary {
    background: transparent;
    color: var(--green-dark);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: var(--surface);
}

.section {
    padding: 4.7rem 0;
}

.compact-section {
    padding-top: 1.5rem;
}

.section-title {
    margin: 0 0 0.6rem;
    font-size: clamp(1.75rem, 3vw, 2.65rem);
    letter-spacing: -0.035em;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.section-lead {
    color: var(--muted);
    margin: 0 0 1.4rem;
    max-width: 70ch;
}

.problem-card {
    display: grid;
    gap: 0.75rem;
    padding: clamp(1.5rem, 4vw, 2.6rem);
    border-radius: 30px;
    background: var(--green-dark);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.problem-card h2 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(1.8rem, 3.7vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
}

.problem-card p {
    max-width: 820px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
}

.problem-card .kicker {
    color: #9df0c3;
}

.grid {
    display: grid;
    gap: 1.1rem;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.product-card {
    position: relative;
    min-height: 440px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--line);
    background:
        linear-gradient(189deg, rgba(255, 255, 255, 0.72), #ffffff 54%),
        var(--surface);
    padding: clamp(1.3rem, 3vw, 2rem);
    box-shadow: var(--shadow);
}

.product-card::before {
    content: "";
    position: absolute;
    inset: 1rem;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(24, 185, 109, 0.14), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.product-card > * {
    position: relative;
}

.product-card p {
    margin: 0;
    color: var(--muted);
}

.product-index {
    position: absolute;
    top: 1.35rem;
    left: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-weight: 800;
}

.dark-card {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(180deg, rgba(0, 75, 45, 0.75), var(--green-dark)),
        var(--green-dark);
}

.dark-card p,
.dark-card .feature-list li {
    color: rgba(255, 255, 255, 0.78);
}

.dark-card .product-index {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.45rem;
    box-shadow: var(--shadow);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: #c6d7c4;
    box-shadow: 0 14px 32px rgba(24, 35, 27, 0.12);
}

.card-image {
    margin: -0.45rem -0.45rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    overflow: hidden;
    background: #f8faf8;
}

.card-image img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    background: #f8faf8;
}

.card-image.cover img {
    object-fit: cover;
}

.brand-band {
    background: var(--green-dark);
    color: #f4fff8;
    border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
}

.business-grid {
    display: grid;
    grtid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.metric-card {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 1.3rem;
    box-shadow: var(--shadow);
}

.metric-card > strong,
.metric-card-main > strong {
    display: block;
    color: var(--green-dark);
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.metric-card .detail-stat strong {
    display: inline;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

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

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.dashboard-header .section-lead {
    margin-bottom: 0.35rem;
}

.last-updated {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 550;
}

.device-selector {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.metric-card-wide {
    min-height: auto;
    gap: 0.6rem;
}

.metric-group-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 2rem 0 1rem;
}

.metric-group-heading h2 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.metric-group-heading span {
    color: var(--muted);
    font-size: 0.92rem;
}

.dashboard-metrics {
    margin-bottom: 2rem;
}

.dashboard-metrics.is-loading .metric-card {
    position: relative;
    overflow: hidden;
}

.dashboard-metrics.is-loading .metric-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 20%,
        rgba(255, 255, 255, 0.45) 45%,
        transparent 70%
    );
    transform: translateX(-100%);
    animation: dashboard-shimmer 1.4s ease-in-out infinite;
}

.dashboard-metrics.is-loading .metric-card strong,
.dashboard-metrics.is-loading .metric-card span:not(.kicker),
.dashboard-metrics.is-loading .sparkline,
.dashboard-metrics.is-loading .metric-expand-btn {
    opacity: 0.4;
}

@keyframes dashboard-shimmer {
    to {
        transform: translateX(100%);
    }
}

.sparkline {
    width: 120px;
    height: 36px;
    color: var(--green);
    margin: 0.15rem 0;
}

.sparkline-empty {
    fill: var(--muted);
    font-size: 10px;
    font-family: inherit;
}

.metric-card-expandable {
    gap: 0;
}

.metric-card-main {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 140px;
}

.metric-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.metric-expand-btn {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 200ms ease, color 200ms ease, border-color 200ms ease, background 200ms ease;
}

.metric-expand-btn svg {
    width: 1rem;
    height: 1rem;
}

.metric-expand-btn:hover,
.metric-expand-btn:focus-visible {
    color: var(--green-dark);
    border-color: var(--green);
    outline: none;
}

.metric-card-expandable.is-expanded {
    grid-column: 1 / -1;
}

.metric-card-expandable.is-expanded .metric-expand-btn {
    transform: rotate(180deg);
    color: var(--surface);
    background: var(--green-dark);
    border-color: var(--green-dark);
}

.metric-card-detail {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 0.85rem;
}

.metric-card-detail[hidden] {
    display: none;
}

.detail-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.detail-chart-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.detail-range {
    display: flex;
    gap: 0.4rem;
}

.detail-stat {
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 4.5rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.detail-stat span {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.detail-stat strong {
    color: var(--ink);
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.detail-chart {
    width: 100%;
    height: 220px;
    color: var(--green);
    background:
        linear-gradient(180deg, rgba(24, 185, 109, 0.06), rgba(255, 255, 255, 0)),
        #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.detail-chart-empty {
    fill: var(--muted);
    font-size: 14px;
    font-family: inherit;
}

.detail-chart-grid {
    stroke: rgba(15, 40, 28, 0.08);
    stroke-width: 1;
}

.detail-chart-axis {
    fill: var(--muted);
    font-size: 11px;
    font-family: inherit;
}

.detail-chart-area {
    fill: rgba(24, 185, 109, 0.16);
}

.detail-chart-line {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.detail-chart-dot {
    fill: #fff;
    stroke: currentColor;
    stroke-width: 2;
}

.camera-card {
    padding: 1.5rem;
}

.camera-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.camera-node-pill {
    font-size: 0.8rem;
}

.camera-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

#camera-source button:disabled {
    opacity: 0.6;
    cursor: progress;
}

.camera-frame {
    background: #000;
    height: min(380px, 55vw);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.camera-frame img {
    max-height: 100%;
    width: 100%;
    object-fit: contain;
}

.chat-card {
    margin-top: 2rem;
}

.chat-card:hover {
    transform: none;
}

.chat-log {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 120px;
    max-height: 420px;
    overflow-y: auto;
    padding: 0.25rem;
}

.card p.chat-empty {
    margin: auto 0;
}

.chat-message {
    max-width: 85%;
    padding: 0.65rem 0.9rem;
    border-radius: 16px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-message.from-user {
    align-self: flex-end;
    background: var(--green-dark);
    color: var(--surface);
    border-bottom-right-radius: 4px;
}

.chat-message.from-assistant {
    align-self: flex-start;
    background: var(--surface-soft);
    color: var(--ink);
    border-bottom-left-radius: 4px;
}

.chat-message.is-pending {
    color: var(--muted);
    font-style: italic;
}

.chat-message.is-error {
    align-self: flex-start;
    border: 1px solid rgba(230, 57, 70, 0.35);
    background: rgba(230, 57, 70, 0.08);
    color: #a4161a;
}

.chat-suggestions {
    margin-top: 1rem;
}

.chat-suggestions[hidden] {
    display: none;
}

.chat-form {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
}

.chat-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.78rem 1.1rem;
    font: inherit;
    color: var(--ink);
    background: var(--surface);
}

.chat-form input:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 1px;
}

.chat-form button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.auth-pending main {
    visibility: hidden;
}

.dashboard-account {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

#crops-button.needs-setup {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: var(--surface);
}

.plant-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(10, 24, 18, 0.62);
    overflow: auto;
}

.plant-modal[hidden] {
    display: none;
}

body.plant-modal-open {
    overflow: hidden;
}

.plant-modal-card {
    width: min(720px, 100%);
    padding: clamp(1.4rem, 3vw, 2.2rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.plant-modal-card .section-lead {
    margin-bottom: 1.2rem;
}

.plant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.plant-card {
    display: grid;
    gap: 0.35rem;
    text-align: left;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
    color: var(--ink);
    font: inherit;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.plant-card:hover,
.plant-card:focus-visible {
    border-color: var(--green);
    transform: translateY(-1px);
}

.plant-card.is-selected {
    background: var(--green-soft);
    border-color: var(--green-dark);
    box-shadow: inset 0 0 0 1px var(--green-dark);
}

.plant-card strong {
    color: var(--green-dark);
    letter-spacing: -0.02em;
}

.plant-card span {
    color: var(--muted);
    font-size: 0.92rem;
}

.plant-card-meta {
    margin-top: 0.2rem;
    font-weight: 650;
    color: var(--ink) !important;
}

.plant-conflict {
    margin: 1rem 0 0;
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 0.9rem;
    font-weight: 650;
}

.plant-tile-step {
    margin-top: 1.4rem;
}

.plant-tile-step h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.plant-tile-step .section-lead {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.plant-tile-row {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.plant-modal-actions {
    margin-top: 1.4rem;
}

.plant-modal-actions .btn {
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.plant-modal-actions .btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.onboard-modal {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(10, 24, 18, 0.62);
    overflow: auto;
}

.onboard-modal[hidden],
.tour-overlay[hidden] {
    display: none;
}

body.onboard-open {
    overflow: hidden;
}

/* Tour must be able to scroll targets into view; only the bubble captures clicks. */
body.tour-open {
    overscroll-behavior: none;
}

.tour-section {
    display: block;
}

.tour-section .metric-group-heading:first-child {
    margin-top: 2rem;
}

.onboard-card {
    width: min(720px, 100%);
    padding: clamp(1.4rem, 3vw, 2.2rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.onboard-progress {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.onboard-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: var(--line);
}

.onboard-dot.is-done {
    background: var(--green);
}

.onboard-dot.is-active {
    width: 1.35rem;
    background: var(--green-dark);
}

.onboard-options {
    display: grid;
    gap: 0.7rem;
}

.onboard-option {
    display: grid;
    gap: 0.25rem;
    text-align: left;
    padding: 0.95rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
    color: var(--ink);
    font: inherit;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.onboard-option:hover,
.onboard-option:focus-visible {
    border-color: var(--green);
    transform: translateY(-1px);
}

.onboard-option.is-selected {
    background: var(--green-soft);
    border-color: var(--green-dark);
    box-shadow: inset 0 0 0 1px var(--green-dark);
}

.onboard-option strong {
    color: var(--green-dark);
}

.onboard-option span {
    color: var(--muted);
    font-size: 0.92rem;
}

.onboard-actions {
    margin-top: 1.4rem;
}

.onboard-actions .btn,
.tour-actions .btn {
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.onboard-actions .btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.onboard-rec-headline {
    margin: 0 0 0.5rem;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 800;
    color: var(--green-dark);
    letter-spacing: -0.03em;
}

.onboard-rec-summary {
    margin: 0 0 1.1rem;
    color: var(--muted);
}

.onboard-rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.onboard-rec-card {
    display: grid;
    gap: 0.25rem;
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
}

.onboard-rec-card strong {
    color: var(--green-dark);
    font-size: 1.15rem;
}

.onboard-rec-card span:last-child {
    color: var(--muted);
    font-size: 0.9rem;
}

.onboard-why {
    margin: 0 0 1rem;
    padding-left: 1.15rem;
    color: var(--ink);
}

.onboard-why li {
    margin-bottom: 0.35rem;
}

.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: transparent;
    pointer-events: none;
}

.tour-overlay .tour-bubble,
.tour-overlay .tour-actions .btn {
    pointer-events: auto;
}

.tour-spotlight {
    position: fixed;
    border-radius: 18px;
    box-shadow: 0 0 0 9999px rgba(8, 18, 14, 0.55);
    border: 2px solid var(--green);
    pointer-events: none;
    /* No position transition — scrolling + animating the hole makes it drift mid-step. */
}

.tour-bubble {
    position: fixed;
    z-index: 51;
    max-width: 360px;
    padding: 1.1rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.tour-bubble strong {
    display: block;
    margin: 0.15rem 0 0.45rem;
    font-size: 1.15rem;
    color: var(--green-dark);
}

.tour-bubble p {
    margin: 0 0 1rem;
    color: var(--muted);
}

.tour-actions {
    margin-top: 0;
}

.account-email {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.auth-card {
    max-width: 460px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 2.4rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-card .section-lead {
    margin-bottom: 1.4rem;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.4rem;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-form label {
    display: grid;
    gap: 0.4rem;
    font-weight: 650;
    color: var(--ink);
}

.auth-form label[hidden],
.auth-form p[hidden] {
    display: none;
}

.auth-form input {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.78rem 1rem;
    font: inherit;
    color: var(--ink);
    background: var(--surface);
}

.auth-form input:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 1px;
}

.auth-hint,
.auth-error {
    margin: -0.4rem 0 0;
    font-size: 0.9rem;
}

.auth-hint {
    color: var(--muted);
}

.auth-error {
    color: #c53030;
    font-weight: 650;
}

.auth-form .btn {
    margin-top: 0.4rem;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.auth-form .btn:disabled,
.auth-sent .btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.auth-form[hidden],
.auth-tabs[hidden],
.auth-sent[hidden],
.auth-notice[hidden] {
    display: none;
}

.auth-sent {
    display: grid;
    gap: 1rem;
}

.auth-sent p {
    margin: 0;
}

.auth-sent strong {
    overflow-wrap: anywhere;
}

.auth-sent .auth-hint {
    margin: 0;
}

.auth-notice {
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 0.9rem;
    font-weight: 650;
}

.auth-sent .btn {
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.auth-back {
    justify-self: center;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 650;
    cursor: pointer;
    text-decoration: underline;
}

.brand-band .section-title,
.brand-band .section-lead {
    color: #f4fff8;
}

.brand-gallery {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.brand-gallery img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #fff;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    letter-spacing: -0.015em;
}

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

.metric {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin: 0;
    color: var(--green-dark);
}

.label {
    margin: 0.3rem 0 0;
    color: var(--muted);
}

.split-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
}

.stack-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.stack-visual {
    margin: 0;
}

.stack-visual video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 22px;
}

.eyebrow-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--muted);
    padding: 0.42rem 0.7rem;
    font-size: 0.9rem;
    font-weight: 650;
}

button.pill {
    cursor: pointer;
    font: inherit;
}

.pill.active {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: var(--surface);
}

.pill.has-alert {
    position: relative;
}

.pill.has-alert::after {
    content: "";
    position: absolute;
    top: -3px;
    right: -3px;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: #e63946;
    border: 2px solid var(--surface);
}

.alert-list {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.alert-list[hidden] {
    display: none;
}

.alert-item {
    border: 1px solid rgba(230, 57, 70, 0.35);
    background: rgba(230, 57, 70, 0.08);
    color: #a4161a;
    border-radius: 14px;
    padding: 0.65rem 0.9rem;
    font-size: 0.92rem;
    font-weight: 600;
}

.dashboard-metrics.is-stale .metric-card > strong,
.dashboard-metrics.is-stale .metric-card-main > strong {
    opacity: 0.5;
}

.number-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.4rem;
}

.number-card {
    padding: 1.15rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.number-card strong {
    display: block;
    color: var(--green-dark);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.1;
}

.tier-grid {
    margin-top: 1.2rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    gap: 0.7rem;
}

.feature-list li {
    border-left: 3px solid var(--green);
    padding-left: 0.85rem;
    color: var(--muted);
}

.quiet-section {
    background: var(--surface);
    border-block: 1px solid var(--line);
}

.contact-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.4rem;
}

.contact-list a,
.contact-list span {
    width: fit-content;
    color: var(--ink);
    font-weight: 700;
}

.contact-list a:hover,
.contact-list a:focus-visible {
    color: var(--muted);
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 1.7rem 0 2rem;
    color: var(--muted);
}

.footer-inner {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.focus-ring:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible,
.nav-link:focus-visible {
    outline: 3px solid rgba(24, 185, 109, 0.35);
    outline-offset: 2px;
}

.bg-soft {
    background-color: var(--surface-soft);
    border-block: 1px solid var(--line);
}

.showcase-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3rem;
}

.showcase-filters {
    display: flex;
    gap: 0.5rem;
    background: var(--surface);
    padding: 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    box-shadow: 0 4px 12px rgba(23, 49, 59, 0.04);
}

.filter-btn {
    border: none;
    background: transport;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: all 200ms ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    color: var(--ink);
}

.filter-btn.active {
    background: var(--green-dark);
    color: var(--surface);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.showcase-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    transition: transform 300ms ease, box-shadow 300ms ease;
    display: flex;
    flex-direction: column;
}

.showcase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(23, 49, 59, 0.12);
}

.card-img-wrap {
    position: relative;
    padding: 2rem;
    background: linear-gradient(100deg, #ffffff, #f7faf7);
    border-bottom: 1px solid --line;
    overflow: hidden;
}

.card-img-wrap img {
    width: 100%;
    height: 270px;
    object-fit: contain;
    transition: transform 500ms ease;
}

.showcase-card:hover .card-img-wrap img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--green-soft);
    color: var(--green-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.card-info {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    letter-spacing: -0.01rem;
}

.card-info p {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
    flex-grow: 1;
}

.text-link {
    font-weight: 700;
    color: var(--green-dark);
    display: inline-flex;
    align-items: center;
    transition: color 200ms ease;
}

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

.hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .hero-grid,
    .grid-3,
    .grid-2,
    .split-panel,
    .stack-showcase,
    .brand-gallery,
    .number-strip,
    .product-grid,
    .business-grid,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .device-selector {
        margin-bottom: 1.15rem;
    }

    .camera-frame {
        height: min(280px, 70vw);
    }

    .hero {
        padding-top: 4rem;
    }

    .product-card {
        min-height: auto;
        justify-content: flex-start;
        padding-top: 5rem;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 1.25rem, var(--max-width));
    }

    .brand {
        width: 132px;
        min-width: 0;
    }

    .nav-toggle {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .nav-menu {
        position: absolute;
        top: 72px;
        right: 1rem;
        left: 1rem;
        flex-direction: column;
        align-items: stretch;
        border-radius: 12px;
        border: 1px solid var(--line);
        background: var(--surface);
        padding: 0.45rem;
        box-shadow: var(--shadow);
        display: none;
        z-index: 1001;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-link {
        border-radius: 10px;
    }

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

    .hero-grid {
        gap: 1.5rem;
    }

    .hero-copy h1 {
        font-size: clamp(2.05rem, 10.5vw, 3rem);
        line-height: 1.05;
        letter-spacing: -0.04em;
    }

    .hero-copy p,
    .section-lead,
    .problem-card p {
        font-size: 1rem;
    }

    .product-visual {
        border-radius: 22px;
        padding: 0.75rem;
    }

    .product-visual img {
        max-height: 360px;
        border-radius: 16px;
    }

    .visual-note {
        padding: 0.85rem;
    }

    .section {
        padding: 3rem 0;
    }

    .compact-section {
        padding-top: 0.5rem;
    }

    .problem-card {
        border-radius: 22px;
        padding: 4.75rem 1.1rem 1.2rem;
    }

    .problem-card h2,
    .section-title {
        font-size: clamp(1.55rem, 8vw, 2.25rem);
        line-height: 1.12;
        letter-spacing: -0.03em;
    }

    .product-card {
        border-radius: 22px;
        padding: 4.75rem, 1.1rem 1.2rem;
    }

    .product-card h3 {
        font-size: clamp(1.55rem, 8vw, 2.15rem);
        line-height: 1.05;
    }

    .product-index {
        top: 1rem;
        left: 1rem;
        width: 2.55rem;
        height: 2.55rem;
    }

    .metric-grid {
        gap: 0.8rem;
    }

    .metric-card {
        min-height: auto;
        gap: 1rem;
    }

    .metric-card > strong,
    .metric-card-main > strong {
        font-size: clamp(1.65rem, 10vw, 2.4rem);
    }

    .sparkline {
        width: 100%;
        max-width: 160px;
    }

    .detail-chart {
        height: 180px;
    }

    .contact-list a,
    .contact-list span {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .button-group {
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .header-inner {
        min-height: 64px;
    }

    .nav-menu {
        top: 64px;
    }

    .brand {
        width: 110px;
    }
    
    .eyebrow-row {
        gap: 0.45rem;
    }

    .pill {
        font-size: 0.82rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}