/* EcoGuide — ecoguide.com.au
   Design language: "your power bill, redesigned".
   Signature: results print as a receipt docket — mono meter numerals, dotted
   leaders, perforated edge. Everything else is calm printed-matter: warm paper,
   gum-green ink, hard plate borders. */

@font-face {
  font-family: 'Bricolage';
  src: url('/assets/fonts/bricolage-200-800.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/assets/fonts/plexmono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/assets/fonts/plexmono-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #f2f0e7;        /* warm paper */
  --docket: #fdfcf6;       /* brighter receipt paper */
  --surface: #f9f8f0;      /* cards */
  --ink: #1c2b22;          /* gum green-black */
  --ink-2: #58685c;
  --green: #0e6b4a;        /* eucalyptus — interactive */
  --green-deep: #0a5138;
  --leaf: #e3ecdd;         /* soft tint */
  --hot: #aa4213;          /* sunburnt accent — used sparingly (AA on all light surfaces) */
  --line: #cfcdbd;
  --plate-border: #223528;
  --plate-shadow: 3px 3px 0 rgba(28, 43, 34, .14);
  --radius: 8px;
  --maxw: 1020px;
  --mono: 'Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --disp: 'Bricolage', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10160f;
    --docket: #1a2119;
    --surface: #161d15;
    --ink: #e9efe4;
    --ink-2: #9cab9c;
    --green: #52c48f;
    --green-deep: #82d8b1;
    --leaf: #1c2a20;
    --hot: #e8834e;
    --line: #32402f;
    --plate-border: #3d4d3c;
    --plate-shadow: 3px 3px 0 rgba(0, 0, 0, .45);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light dark; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.62 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
a, button, select, summary, input[type="search"] { touch-action: manipulation; }
:focus-visible { outline: 2.5px solid var(--green); outline-offset: 2px; border-radius: 4px; }
h1, h2 { text-wrap: balance; }
h1[id], h2[id], h3[id] { scroll-margin-top: 80px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
  border-radius: 8px; font-weight: 650;
}
.skip-link:focus { left: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
a { color: var(--green); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:not(:hover) { text-decoration: none; }
h1, h2, h3 { font-family: var(--disp); }
h1 { font-size: clamp(2rem, 5.5vw, 2.9rem); line-height: 1.06; letter-spacing: -.025em; font-weight: 780; margin: .25em 0 .35em; }
h2 { font-size: 1.4rem; font-weight: 720; letter-spacing: -.015em; margin: 1.7em 0 .5em; }
h3 { font-size: 1.02rem; font-weight: 680; margin: 1.1em 0 .35em; }
p { margin: .7em 0; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.mono, .stamp, .chip, .badge, .soon, .toast, .d-head, .result strong, .result .big, .total-row strong { font-family: var(--mono); }

/* squiggle underline for one word in the hero */
.uline {
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="90" height="8" viewBox="0 0 90 8"><path d="M2 5 Q 12 1 24 5 T 46 5 T 68 5 T 90 5" fill="none" stroke="%23aa4213" stroke-width="3.2" stroke-linecap="round"/></svg>') bottom left/auto 7px repeat-x;
  padding-bottom: 8px;
}

/* ---------- header: printed masthead ---------- */
.site-head { background: var(--paper); border-bottom: 2px solid var(--plate-border); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.site-head .wrap { display: flex; align-items: center; gap: 13px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--disp); font-weight: 800; font-size: 1.22rem; color: var(--ink); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo svg { width: 27px; height: 27px; }
.logo .au { color: var(--green); }
.nav { display: flex; gap: 15px; align-items: center; margin-left: auto; }
.nav a { color: var(--ink); font-weight: 600; font-size: .92rem; }
.nav a:hover { color: var(--green); }
.badge {
  display: none; min-width: 19px; height: 19px; padding: 0 5px; margin-left: 4px;
  background: var(--hot); color: #fff; border-radius: 6px;
  font-size: .72rem; line-height: 19px; text-align: center; font-weight: 600;
}
.badge.on { display: inline-block; }

/* location chip: a little meter tag */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px dashed var(--plate-border); background: var(--docket);
  color: var(--ink); border-radius: 6px; padding: 5px 11px;
  font-size: .8rem; font-weight: 600; cursor: pointer; letter-spacing: -.01em;
}
.chip:hover { border-style: solid; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.chip.unset .dot { background: var(--hot); }

/* ---------- search ---------- */
.search-box { position: relative; flex: 1 1 150px; max-width: 300px; margin-left: auto; }
.search-box input {
  width: 100%; padding: 9px 12px 9px 34px;
  border: 1.5px solid var(--plate-border); border-radius: var(--radius);
  background: var(--docket); color: var(--ink); font-size: .92rem; font-family: inherit;
}
.search-box input:focus { outline: 2.5px solid var(--green); outline-offset: 1px; }
.search-box::before {
  content: ""; position: absolute; left: 11px; top: 50%; width: 14px; height: 14px;
  transform: translateY(-50%); background: currentColor; opacity: .55;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3"><circle cx="11" cy="11" r="7"/><line x1="16.5" y1="16.5" x2="22" y2="22"/></svg>') center/contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3"><circle cx="11" cy="11" r="7"/><line x1="16.5" y1="16.5" x2="22" y2="22"/></svg>') center/contain no-repeat;
}
.results {
  position: absolute; top: calc(100% + 7px); left: 0; right: 0; z-index: 60;
  background: var(--docket); border: 1.5px solid var(--plate-border); border-radius: var(--radius);
  box-shadow: var(--plate-shadow); overflow: hidden; display: none;
}
.results.open { display: block; }
.results a { display: block; padding: 10px 14px; color: var(--ink); border-bottom: 1px dashed var(--line); }
.results a:last-child { border-bottom: none; }
.results a:hover, .results a.sel { background: var(--leaf); text-decoration: none; }
.results .r-title { font-weight: 650; font-size: .92rem; }
.results .r-blurb { font-size: .8rem; color: var(--ink-2); }
.results .r-none { padding: 12px 14px; font-size: .87rem; color: var(--ink-2); }

/* ---------- hero ---------- */
.hero { padding: 54px 0 26px; max-width: 660px; }
.hero p.lead { font-size: 1.1rem; color: var(--ink-2); margin: 0 0 1.5em; max-width: 540px; }
.hero .search-box { margin: 0; max-width: 440px; flex: none; }
.hero .search-box input { padding: 13px 16px 13px 40px; font-size: 1rem; }

/* ---------- section dividers: catalogue rules ---------- */
.hub-label { display: flex; align-items: center; gap: 10px; margin: 40px 0 4px; }
.hub-label svg { width: 21px; height: 21px; color: var(--green); flex: none; }
.hub-label h2 { margin: 0; font-size: 1.45rem; }
.hub-label span { font-size: .84rem; color: var(--ink-2); margin-left: 2px; }
.hub-label::after { content: ""; flex: 1; border-top: 2px solid var(--plate-border); opacity: .25; margin-left: 6px; }

/* ---------- cards: printed plates ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 13px; margin: 16px 0; }
.card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1.5px solid var(--plate-border);
  border-radius: var(--radius); padding: 15px 16px; color: var(--ink);
  box-shadow: var(--plate-shadow);
  transition: transform .1s ease, box-shadow .1s ease;
}
a.card:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(28,43,34,.18); text-decoration: none; }
.card svg { width: 26px; height: 26px; color: var(--green); flex: none; margin-top: 2px; }
.card h3 { margin: 0 0 3px; font-size: 1rem; }
.card p { margin: 0; font-size: .85rem; color: var(--ink-2); line-height: 1.45; }
.card.soon-card { box-shadow: none; border-style: dashed; background: transparent; }
.card.soon-card svg { color: var(--ink-2); opacity: .6; }
.soon {
  display: inline-block; color: var(--hot); font-size: .68rem; font-weight: 600;
  border: 1.5px solid currentColor; border-radius: 4px; padding: 1px 6px;
  letter-spacing: .06em; text-transform: uppercase; margin-top: 4px;
}

/* ---------- calculator plate ---------- */
.calc {
  background: var(--surface); border: 1.5px solid var(--plate-border);
  border-radius: var(--radius); box-shadow: var(--plate-shadow);
  padding: 20px; margin: 20px 0;
}
.calc .row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 4px; }
.field { flex: 1 1 150px; }
.field label { display: block; font-size: .78rem; font-weight: 650; color: var(--ink-2); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .05em; }
.field input, .field select {
  width: 100%; padding: 10px 12px; font-size: 1rem; font-family: var(--mono);
  border: 1.5px solid var(--plate-border); border-radius: var(--radius);
  background: var(--docket); color: var(--ink);
}
.field select { font-family: inherit; }
.field input:focus, .field select:focus { outline: 2.5px solid var(--green); outline-offset: 1px; }
.field .hint { font-size: .76rem; color: var(--ink-2); margin-top: 4px; }

/* ---------- THE DOCKET ---------- */
.result.docket {
  position: relative;
  background: var(--docket);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  padding: 14px 18px 24px;
  margin-top: 18px;
  box-shadow: 0 2px 10px rgba(28, 43, 34, .1);
}
.result.docket::after { /* perforated tear */
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px;
  background-image:
    linear-gradient(45deg, var(--docket) 30%, transparent 30%),
    linear-gradient(-45deg, var(--docket) 30%, transparent 30%);
  background-size: 12px 8px;
  background-repeat: repeat-x;
}
.d-head {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2); border-bottom: 1.5px dashed var(--line);
  padding-bottom: 8px; margin-bottom: 10px;
}
.result .big {
  font-size: clamp(1.9rem, 5vw, 2.5rem); font-weight: 600; letter-spacing: -.03em;
  color: var(--ink); font-variant-numeric: tabular-nums; margin: 2px 0 6px;
}
.result .big small { font-size: .42em; font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.result .lines { margin: 4px 0 0; font-size: .92rem; }
.result .lines > div { display: flex; align-items: baseline; padding: 4px 0; }
.result .lines .l { flex: 1; display: flex; align-items: baseline; color: var(--ink-2); min-width: 0; }
.result .lines .l::after { content: ""; flex: 1; border-bottom: 2px dotted var(--line); margin: 0 8px; transform: translateY(-4px); min-width: 20px; }
.result .lines strong { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result .lines .note { display: block; font-size: .84rem; color: var(--ink-2); padding-top: 8px; border-top: 1.5px dashed var(--line); margin-top: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: 1.5px solid var(--green-deep); cursor: pointer;
  font-weight: 650; font-size: .92rem; font-family: inherit;
  background: var(--green); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  margin-top: 12px; box-shadow: 2px 2px 0 rgba(28,43,34,.22);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(28,43,34,.22); }
.btn.ghost { background: var(--docket); color: var(--ink); border-color: var(--plate-border); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (prefers-color-scheme: dark) {
  .btn { color: #08130c; border-color: var(--green); }
  .btn.ghost { color: var(--ink); }
}

/* ---------- location banner ---------- */
.loc-banner {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--leaf); border: 1.5px dashed var(--plate-border);
  border-radius: var(--radius); padding: 12px 14px; margin: 16px 0; font-size: .92rem;
}
.loc-banner .search-box { max-width: 250px; margin: 0; }
.loc-banner.done { display: none; }

/* ---------- long-form content ---------- */
.content { max-width: 700px; }
.content table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: .92rem; }
.content th, .content td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.content th { color: var(--ink-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
details {
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; margin: 9px 0; background: var(--surface);
}
details summary { font-weight: 650; cursor: pointer; }
details[open] { border-color: var(--plate-border); }
details[open] summary { margin-bottom: 6px; }
.stamp {
  display: inline-block; background: transparent; border: 1.5px solid var(--line);
  border-radius: 4px; padding: 3px 10px; font-size: .74rem; color: var(--ink-2);
  margin: 6px 0; letter-spacing: .03em;
}
.related { margin: 26px 0; }
.related a {
  display: inline-block; background: var(--surface); border: 1.5px solid var(--plate-border);
  border-radius: var(--radius); padding: 7px 14px; margin: 4px 8px 4px 0;
  font-size: .88rem; font-weight: 600; color: var(--ink);
  box-shadow: 2px 2px 0 rgba(28,43,34,.12);
}
.related a:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 rgba(28,43,34,.16); text-decoration: none; }

/* ---------- ads ---------- */
.ad-slot {
  min-height: 90px; display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--line); border-radius: var(--radius); margin: 26px 0;
  color: var(--ink-2); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  font-family: var(--mono);
}
.ad-slot:empty::before { content: "advertisement"; }

/* ---------- My Home: the annual bill ---------- */
.bill { max-width: 560px; }
.myhome-item { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; font-size: .95rem; }
.myhome-item .n { font-weight: 600; }
.myhome-item .n .small { font-weight: 400; }
.myhome-item .fill { flex: 1; border-bottom: 2px dotted var(--line); transform: translateY(-4px); min-width: 24px; }
.myhome-item .c { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.myhome-item button { border: 0; background: none; color: var(--ink-2); cursor: pointer; font-size: 1rem; padding: 10px 12px; margin: -8px -6px; font-family: var(--mono); }
.myhome-item button:hover { color: var(--hot); }
.total-row {
  display: flex; align-items: baseline; gap: 8px; margin-top: 10px; padding-top: 12px;
  border-top: 3px double var(--ink); font-size: 1.05rem; font-weight: 700;
}
.total-row .fill { flex: 1; }
.total-row strong { font-size: 1.7rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.culprit { color: var(--hot); font-size: .85rem; font-weight: 600; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(120px);
  background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 6px;
  font-size: .84rem; font-weight: 600; box-shadow: var(--plate-shadow);
  transition: transform .22s ease; z-index: 99; max-width: 92vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast a { color: inherit; text-decoration: underline; }
.toast strong { color: inherit; }

/* ---------- footer: the fine print ---------- */
.site-foot { border-top: 2px solid var(--plate-border); margin-top: 64px; padding: 24px 0 42px; font-size: .84rem; color: var(--ink-2); }
.site-foot .links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; font-family: var(--mono); font-size: .8rem; }
.site-foot a { color: var(--ink-2); }
.site-foot .colophon { font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; margin-top: 14px; }

@media (max-width: 640px) {
  .site-head { position: static; }
  .nav { gap: 11px; }
  .nav .hide-m { display: none; }
  .site-head .search-box { order: 9; flex-basis: 100%; max-width: none; }
  .calc { padding: 15px; }
  .hero { padding-top: 38px; }
  .hub-label { flex-wrap: wrap; }
  .hub-label::after { display: none; }
  .hub-label span { flex-basis: 100%; margin-left: 31px; }
  /* 16px inputs stop iOS auto-zoom; bigger tap targets */
  .search-box input, .field input, .field select { font-size: 16px; }
  .btn, .chip { min-height: 44px; }
  .results a { padding: 12px 14px; }
}
@media print { .site-head, .ad-slot, .site-foot, .btn, .loc-banner { display: none !important; } }
