/* ShovelCalc — vivid, friendly, fast. */
:root {
  --bg: #f7faf5;
  --surface: #ffffff;
  --ink: #142019;
  --muted: #5d6b62;
  --line: #e2eae0;
  --green: #12a150;
  --green-dark: #0b7a3b;
  --green-soft: #e3f7ea;
  --orange: #ff8a1f;
  --orange-soft: #fff1e2;
  --yellow: #ffd23f;
  --sky: #2bb3ff;
  --sky-soft: #e4f5ff;
  --berry: #ff4f7b;
  --berry-soft: #ffe8ee;
  --violet: #7a5cff;
  --violet-soft: #efebff;
  --shadow: 0 1px 2px rgba(20, 32, 25, .06), 0 8px 24px rgba(20, 32, 25, .07);
  --shadow-lift: 0 2px 4px rgba(20, 32, 25, .08), 0 16px 40px rgba(20, 32, 25, .12);
  --radius: 18px;
  --max: 1120px;
  font-size: 17px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1612;
    --surface: #17211b;
    --ink: #eef5ef;
    --muted: #9fb0a5;
    --line: #26352c;
    --green: #2fd07a;
    --green-dark: #2fd07a;
    --green-soft: #143222;
    --orange-soft: #3a2614;
    --sky-soft: #10293a;
    --berry-soft: #3a1621;
    --violet-soft: #221d40;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .35), 0 16px 40px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}
a { color: var(--green-dark); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--green), #0fd27a); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(18, 161, 80, .35); }
.logo-mark svg { width: 20px; height: 20px; }
.logo b { color: var(--orange); }
.site-header nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.site-header nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; padding: 7px 12px; border-radius: 999px; }
.site-header nav a:hover, .site-header nav a[aria-current] { background: var(--green-soft); color: var(--green-dark); }
@media (max-width: 640px) { .site-header nav a.hide-sm { display: none; } }

/* ---------- hero (home) ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(255, 210, 63, .55), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(43, 179, 255, .35), transparent 60%),
    linear-gradient(135deg, #0e9a4b 0%, #14b85d 55%, #20c56a 100%);
  color: #fff;
}
.hero .wrap { padding-top: 56px; padding-bottom: 64px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5.5vw, 3.4rem); max-width: 18ch; margin: 0 0 12px; }
.hero p { font-size: 1.15rem; max-width: 52ch; margin: 0 0 26px; color: rgba(255, 255, 255, .92); }
.search { position: relative; max-width: 560px; }
.search input {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 16px 18px 16px 50px;
  border: 0; border-radius: 999px; background: #fff; color: #142019;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.search input:focus { outline: 3px solid var(--yellow); }
.search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: #5d6b62; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-chips a { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.hero-chips a:hover { background: rgba(255, 255, 255, .3); }

/* ---------- sections / cards ---------- */
.section { padding-top: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 18px; }
.card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: transparent; }
.card strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.card span { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.card.soon { opacity: .55; box-shadow: none; pointer-events: none; }
.card.soon strong::after { content: "Soon"; margin-left: 8px; font-size: .7rem; background: var(--line); color: var(--muted); padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.55rem; }
.t-green { background: var(--green-soft); }
.t-orange { background: var(--orange-soft); }
.t-sky { background: var(--sky-soft); }
.t-berry { background: var(--berry-soft); }
.t-violet { background: var(--violet-soft); }
.no-results { display: none; color: var(--muted); margin-top: 16px; }

.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 18px; }
.cat { border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); font-weight: 700; display: flex; flex-direction: column; gap: 6px; transition: transform .15s ease; }
.cat:hover { transform: translateY(-2px); }
.cat .emoji { font-size: 1.8rem; }
.cat small { font-weight: 500; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: #fff; margin-bottom: 8px; }

/* ---------- calculator page ---------- */
.page-hero { background: linear-gradient(180deg, var(--green-soft), var(--bg)); }
.page-hero .wrap { padding-top: 6px; padding-bottom: 8px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-top: 16px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
h1 { font-size: clamp(1.8rem, 4.2vw, 2.6rem); line-height: 1.12; letter-spacing: -0.025em; margin: 10px 0 8px; }
h1 .icon { display: inline-grid; vertical-align: middle; margin-right: 10px; width: 52px; height: 52px; }
h2 { font-size: 1.45rem; margin: 44px 0 10px; letter-spacing: -0.015em; }
h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.lede { color: var(--muted); font-size: 1.08rem; max-width: 64ch; margin: 0 0 22px; }
article p, article li { max-width: 72ch; }

.calc-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .calc-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.05rem; }
.panel-title .n { width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: .8rem; }
.panel + .panel { margin-top: 16px; }
.results-panel {
  position: sticky; top: 84px;
  background: linear-gradient(160deg, #0e9a4b, #16b65f 60%, #1fc46a);
  color: #fff; border: 0; box-shadow: 0 18px 40px rgba(18, 161, 80, .3);
}
.results-panel .panel-title { color: #fff; }
.results-panel .panel-title .n { background: var(--yellow); color: #142019; }

.units { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.units label { padding: 6px 16px; border-radius: 999px; cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--muted); }
.units input { position: absolute; opacity: 0; pointer-events: none; }
.units label:has(input:checked) { background: var(--green); color: #fff; box-shadow: 0 3px 10px rgba(18, 161, 80, .35); }
.units label:has(input:focus-visible) { outline: 2px solid var(--green); }

.area { border: 1.5px dashed var(--line); border-radius: 14px; padding: 10px 12px 12px; margin: 0 0 10px; display: grid; gap: 8px; }
.area legend { font-size: .8rem; font-weight: 700; color: var(--green-dark); padding: 0 6px; }
.dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.remove { justify-self: end; background: none; border: 0; color: var(--berry); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 5px; font-size: .88rem; }
.field > span { color: var(--muted); font-weight: 600; }
.field em { font-style: normal; font-weight: 500; }
input[type=number], select {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; width: 100%; min-width: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 20%, transparent); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.btn-add { margin-top: 2px; background: var(--green-soft); color: var(--green-dark); border: 0; border-radius: 12px; padding: 10px 14px; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.btn-add:hover { filter: brightness(.97); }
.hint { color: var(--muted); font-size: .82rem; margin: 6px 0 0; }

/* results */
.headline { font-size: 1.05rem; margin-bottom: 14px; }
.headline .big { display: block; font-size: 3.4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.stats div { background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 9px 11px; }
.stats dt { font-size: .75rem; opacity: .85; }
.stats dd { margin: 0; font-weight: 800; font-size: 1.05rem; }
.cost h3 { margin: 18px 0 8px; font-size: 1rem; color: #fff; }
.verdict { margin: 10px 0 0; padding: 10px 12px; background: var(--yellow); color: #142019; border-radius: 12px; font-weight: 600; }
.tip { margin: 12px 0 0; font-size: .9rem; background: rgba(255, 255, 255, .14); padding: 10px 12px; border-radius: 12px; }
.note { opacity: .85; font-size: .8rem; margin: 14px 0 0; }
.empty { margin: 0; font-size: 1rem; opacity: .95; }

/* content */
.table-wrap { overflow-x: auto; max-width: 720px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .95rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { background: var(--green-soft); color: var(--green-dark); font-weight: 700; }
.formula { background: var(--orange-soft); border-radius: 14px; padding: 14px 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; max-width: 720px; overflow-x: auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; max-width: 760px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 8px 0 0; }
.related { display: flex; flex-wrap: wrap; gap: 10px; }
.related a { display: inline-flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; box-shadow: var(--shadow); }
.related a:hover { border-color: var(--green); }
.disclaimer { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 44px; padding-top: 14px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 72px; background: #0f1a14; color: #b7c6bc; font-size: .9rem; }
.site-footer .wrap { padding-top: 32px; padding-bottom: 36px; display: grid; gap: 14px; }
.site-footer .logo { color: #fff; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: #dfe9e2; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 0; max-width: 72ch; }

/* mobile floating result bar */
.result-bar { display: none; }
@media (max-width: 860px) {
  .result-bar:not([hidden]) {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
    padding: 14px 18px; border: 0; border-radius: 16px; cursor: pointer;
    font: inherit; color: #fff; text-align: left;
    background: linear-gradient(135deg, #0e9a4b, #1fc46a);
    box-shadow: 0 12px 30px rgba(18, 161, 80, .4);
    transition: transform .2s ease, opacity .2s ease;
  }
  .result-bar strong { font-size: 1.15rem; }
  .result-bar .go { background: var(--yellow); color: #142019; font-weight: 700; font-size: .85rem; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
  body.results-visible .result-bar { transform: translateY(140%); opacity: 0; pointer-events: none; }
  .results-panel { position: static; }
}

.panel-title .opt { font-weight: 500; color: var(--muted); font-size: .85rem; }
