/* Photosynth — shared design system (Arkreen-aligned: renewable green + energy teal) */

:root {
  --brand: #16C784;      /* emerald — renewable green */
  --brand-2: #0AA6C2;    /* teal — energy / electricity */
  --brand-deep: #0E9E66;
  --ink: #0c1a14;
  --muted: #5d6f66;
  --bg: #ffffff;
  --bg-soft: #f3faf6;
  --line: #e3efe9;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(12,26,20,.04), 0 8px 24px rgba(12,26,20,.05);
  --radius: 16px;
  --hero: linear-gradient(135deg, #0b3d2e 0%, #0e9e66 55%, #0aa6c2 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { max-width: 1040px; margin: 0 auto; padding: 12px 22px; display: flex; align-items: center; gap: 18px; }
.nav-logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -.3px; }
.nav-logo img { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--muted); font-size: 14.5px; font-weight: 600; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--brand-deep); }

/* ── Buttons ── */
.btn { display: inline-block; padding: 11px 20px; border-radius: 11px; font-weight: 700; font-size: 14.5px; cursor: pointer; border: 1px solid transparent; transition: transform .06s ease, background .15s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff !important; }
.btn-primary:hover { background: var(--brand-deep); }
.btn-light { background: #fff; color: var(--brand-deep) !important; border-color: rgba(255,255,255,.6); }
.btn-ghost { background: transparent; color: var(--brand-deep) !important; border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-on-dark { background: rgba(255,255,255,.14); color: #fff !important; border-color: rgba(255,255,255,.35); }
.btn-on-dark:hover { background: rgba(255,255,255,.24); }

/* ── Hero ── */
.hero { background: var(--hero); color: #fff; text-align: center; padding: 84px 22px 92px; position: relative; overflow: hidden; }
.hero .leaf { width: 64px; height: 64px; margin: 0 auto 14px; display: block; filter: drop-shadow(0 6px 18px rgba(0,0,0,.18)); }
.hero h1 { font-size: 46px; margin: 0 0 8px; letter-spacing: -1px; }
.hero .tag { font-size: 20px; font-weight: 600; opacity: .95; margin: 0 0 16px; }
.hero .sub { font-size: 17px; max-width: 640px; margin: 0 auto 26px; opacity: .9; }
.hero a { color: #d9fff0; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Sections / cards ── */
.section { padding: 56px 0; }
.section.soft { background: var(--bg-soft); }
.section h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -.5px; text-align: center; }
.section .lead { color: var(--muted); text-align: center; max-width: 640px; margin: 0 auto 34px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card .num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--bg-soft); color: var(--brand-deep); font-weight: 800; margin-bottom: 12px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ── Callouts / notes ── */
.callout { border-left: 4px solid var(--brand); background: var(--bg-soft); border-radius: 10px; padding: 18px 22px; margin: 18px 0; }
.callout h3 { margin: 0 0 6px; font-size: 16px; }
.callout p { margin: 6px 0 0; color: #3a4a43; }
.note { color: var(--muted); font-size: 14px; }

/* ── Code / formula ── */
code { background: var(--bg-soft); padding: 2px 7px; border-radius: 6px; font-size: 13.5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre { background: #0c2018; color: #d9f3e6; padding: 18px; border-radius: 12px; overflow: auto; font-size: 13.5px; line-height: 1.55; }
.formula { background: var(--ink); color: #eafff5; border-radius: 12px; padding: 22px; text-align: center; font-family: ui-monospace, Menlo, monospace; font-size: 17px; letter-spacing: .3px; }
.formula .em { color: var(--brand); }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; background: var(--bg-soft); font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; }
tr:last-child td { border-bottom: none; }
td.mono, .mono { font-family: ui-monospace, Menlo, monospace; }

/* ── Badges ── */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.b-completed { background: #e3f7ec; color: #0e8f54; }
.b-pending { background: #fff3d6; color: #8a6d1a; }
.b-failed { background: #fde4e4; color: #b3261e; }
.b-none { background: #eef2f0; color: #5d6f66; }

/* ── Footer ── */
footer { border-top: 1px solid var(--line); padding: 30px 22px; text-align: center; color: var(--muted); font-size: 13.5px; }
footer a { color: var(--muted); }
footer .dot { margin: 0 8px; opacity: .5; }

/* ── Dashboard ── */
.dash-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 28px 0 18px; }
.dash-head h1 { font-size: 24px; margin: 0; }
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
input[type=text] { flex: 1; min-width: 260px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; font-size: 14px; font-family: ui-monospace, Menlo, monospace; }
input[type=text]:focus { outline: none; border-color: var(--brand); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.stat .v { font-size: 26px; font-weight: 800; margin-top: 4px; letter-spacing: -.5px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.panel h2 { font-size: 15px; margin: 0 0 14px; text-align: left; }
.empty { color: var(--muted); padding: 18px 4px; }
svg text { font-size: 10px; fill: var(--muted); }

@media (max-width: 640px) {
  .hero h1 { font-size: 36px; }
  .nav-links { gap: 14px; }
  .nav-links a.hide-sm { display: none; }
}

/* ── Copy button on code blocks ── */
pre { position: relative; }
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,.12); color: #cfeede;
  border: 1px solid rgba(255,255,255,.22); border-radius: 7px;
  font: 600 12px/1 inherit; padding: 5px 11px; cursor: pointer;
  opacity: .65; transition: opacity .15s ease, background .15s ease;
}
pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: rgba(255,255,255,.24); }
.copy-btn.copied { color: #16C784; border-color: #16C784; }
