/* The full-page savings app. Colors, fonts and the shared parts (search
   results, plan cards, questions, estimate box) come from style.css; this
   file only lays out the page. */

/* style.css fixes the map page to the window; this page scrolls. A class on
   <html>, not html:has(), so a browser without :has() can still scroll. */
html.save, body.save { height: auto; min-height: 100%; overflow: auto; background: var(--paper); }
body.save { --gutter: 24px; --qlab-w: 130px; --qrow-gap: 12px; }
.save main { max-width: 880px; margin: 0 auto; padding: 0 var(--gutter) 80px; }
.save [hidden] { display: none !important; }

/* nav */
#nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1080px; margin: 0 auto; padding: 22px var(--gutter); }
#brand-link { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
#brand-link span { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
#nav .links { display: flex; gap: 22px; font-size: 14px; }
#nav .links a { color: var(--ink); opacity: 0.65; }
#nav .links a:hover { opacity: 1; color: var(--teal); text-decoration: none; }

/* landing: one question, one box */
/* svh: the phone screen with its browser toolbars showing (100vh assumes them
   hidden, which pushes the search box down). vh stays as the fallback. */
#landing { min-height: calc(100vh - 160px); min-height: calc(100svh - 160px); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 24px 0 60px; }
#landing .strip { width: 260px; margin-bottom: 28px; overflow: visible; }
#landing .strip text { font-size: 9px; fill: var(--ink); opacity: 0.45; font-family: "Work Sans", sans-serif; }
#landing h1 { font-family: "Space Grotesk", sans-serif; font-size: clamp(32px, 5.6vw, 54px); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0; max-width: 780px; }
#landing h1 .hl { color: var(--teal); }
#landing h1 .nowrap { white-space: nowrap; }
#landing .lede { font-size: 17px; line-height: 1.5; opacity: 0.65; max-width: 540px; margin: 18px 0 0; }
#landing .standout { font-size: 18px; font-weight: 600; line-height: 1.45; color: var(--teal); max-width: 540px; margin: 14px 0 0; }
/* The differentiator from other tools (Jon): one size up from a note, darker, bold. */
#landing .sourced { font-size: 14px; font-weight: 600; opacity: 0.85; max-width: 540px; margin: 14px 0 0; }
#start-search { position: relative; width: min(460px, 100%); margin-top: 34px; text-align: left; }
#again-search { position: relative; width: min(300px, 100%); }
#again-search .field { margin-top: 0; }

/* result header */
.where { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 12px; }
.where .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.5; }
.where h2 { font-family: "Space Grotesk", sans-serif; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; margin: 4px 0 0; }

/* 1. the number */
#hero { margin-top: 28px; padding: 28px 30px; border-radius: 18px; background: rgba(28, 110, 92, 0.08); }
#hero .k { font-size: 15px; opacity: 0.7; }
#hero .v { font-family: "Space Grotesk", sans-serif; font-weight: 700; line-height: 1.05; margin-top: 6px; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; font-size: clamp(44px, 8vw, 68px); }
#hero .v .win { color: var(--teal); }
#hero .v .lose { color: var(--maroon); }
#hero .v .none { font-size: clamp(30px, 5vw, 44px); color: var(--ink); }
#hero .v i { font-size: 20px; font-weight: 500; font-style: normal; opacity: 0.7; }
#hero .v .m { font-family: "Work Sans", sans-serif; font-size: 18px; font-weight: 500; opacity: 0.7; }
#hero .s { margin-top: 12px; font-size: 13.5px; line-height: 1.5; opacity: 0.7; }

/* 2. status */
.status { margin-top: 20px; font-size: 16px; line-height: 1.55; }
.status .badge { display: inline-block; margin-right: 8px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 2px; }
.status .badge.good { background: var(--teal); color: var(--paper); }
.status .badge.none { background: rgba(28, 37, 48, 0.08); color: var(--ink); }

/* sections */
.save .block { margin-top: 44px; }
.save h3 { font-family: "Space Grotesk", sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.save h4 { font-size: 14px; font-weight: 600; margin: 24px 0 0; }
.save .sub { font-size: 14.5px; line-height: 1.55; opacity: 0.7; margin: 8px 0 0; max-width: 680px; }
.save .hint { font-size: 12px; opacity: 0.55; margin-top: 6px; }

/* 2a. rates: three prices as bars, the flat price as a line across them */
.chart { --col-w: 150px; --col-gap: 28px; margin-top: 20px; }
.chart .bars { position: relative; width: max-content; display: flex; align-items: flex-end; gap: var(--col-gap); margin-top: 40px; border-bottom: 1px solid var(--line); }
.chart .labels { display: flex; gap: var(--col-gap); margin-top: 8px; }
.chart .col { width: var(--col-w); display: flex; flex-direction: column; align-items: center; text-align: center; }
/* Over the flat line, with the page color behind, so the line never runs through a figure. */
.chart .n { position: relative; z-index: 2; padding: 0 6px; background: var(--paper); font-family: "Space Grotesk", sans-serif; font-size: 28px; font-weight: 700; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.chart .bar { width: 64px; border-radius: 8px 8px 2px 2px; }
.chart .flat .bar { background: rgba(28, 37, 48, 0.28); }
.chart .low .bar { background: var(--teal); }
.chart .low .n { color: var(--teal); }
.chart .peak .bar { background: var(--maroon); }
.chart .peak .n { color: var(--maroon); }
.chart .flatline { position: absolute; left: 0; right: 0; border-top: 2px dashed rgba(28, 37, 48, 0.35); z-index: 1; pointer-events: none; }
.chart .k { font-size: 13px; font-weight: 600; }
.chart .w { font-size: 12px; opacity: 0.6; margin-top: 2px; }
@media (max-width: 560px) { .chart { --col-w: 96px; --col-gap: 12px; } .chart .n { font-size: 21px; } .chart .bar { width: 44px; } }
.save .plan .seasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 28px; }
.save .plan .seasons .season + .season { margin-top: 0; }

/* call to action: ask the utility */
#switch { margin-top: 26px; }
#switch .cta.switch { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; padding: 15px 26px; margin-top: 0; font-size: 15.5px; text-decoration: none; }
#switch .cta.switch:hover { color: var(--paper); }
#switch .s { margin-top: 8px; font-size: 12.5px; opacity: 0.6; }

/* 3. factors: questions beside the breakdown */
.save .calc-grid { margin-top: 8px; }
.save .qrow select.field { margin-top: 0; flex: 1 1 200px; max-width: 360px; }
.save .refine .qrow { margin-top: 12px; }
/* Optional, but easy to find: a card that opens in place. */
.save .refine { margin-top: 22px; border: 1px solid rgba(28, 110, 92, 0.3); border-radius: 12px; padding: 0; background: rgba(28, 110, 92, 0.04); }
.save .refine summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; color: var(--ink); }
.save .refine summary::-webkit-details-marker { display: none; }
.save .refine summary::after { content: "+"; grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 22px; font-weight: 500; color: var(--teal); }
.save .refine[open] summary::after { content: "−"; }
.save .refine summary .t { font-family: "Space Grotesk", sans-serif; font-size: 16.5px; font-weight: 600; color: var(--teal); }
.save .refine summary .d { font-size: 12.5px; font-weight: 400; opacity: 0.65; line-height: 1.4; }
@media (hover: hover) { .save .refine summary:hover { background: rgba(28, 110, 92, 0.06); border-radius: 12px; } }
.save .refine[open] > :not(summary) { margin-left: 16px; margin-right: 16px; }
.save .refine[open] { padding-bottom: 16px; }
.save .qrow .field.bill { margin-top: 0; flex: 1 1 100px; max-width: 160px; }
.save .qrow select.field.unit { flex: 0 0 84px; }
.save .questions .hint { padding-left: calc(var(--qlab-w) + var(--qrow-gap)); }
.save .qrow:has(#f-miles) { flex-wrap: nowrap; }
.save .qrow .inline .field { width: 80px; }
@media (min-width: 780px) {
  .save .calc-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .save .calc-grid .estbox { position: sticky; top: 16px; }
}

/* 4. utility and plans */
#plans select.field { max-width: 420px; }
#plans .fact { margin-top: 16px; }
#plans .plans { gap: 12px; }

/* "Get in touch" on the savings page: the questions and the button on one line, no box. */
.touch { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.touch .touch-q { margin: 0; flex: 1 1 320px; font-size: 16px; font-weight: 500; line-height: 1.5; }
.touch a.cta { flex: none; width: auto; padding: 12px 26px; margin-top: 0; text-decoration: none; }
.touch a.cta:hover { color: var(--paper); }

/* Contact page: one centered column, no boxes. */
.save main.contact { max-width: 620px; margin: 0 auto; padding-top: 72px; text-align: center; }
.save main.contact .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin: 0 0 10px; }
.save main.contact .intro { font-size: 17px; line-height: 1.55; opacity: 0.75; margin: 16px 0 0; }
.save main.contact .cta { display: inline-block; width: auto; padding: 14px 32px; margin-top: 30px; text-decoration: none; }
.save main.contact .cta:hover { color: var(--paper); }
.save main.contact .address { font-size: 13.5px; opacity: 0.6; margin-top: 12px; }

/* "The utility and plans behind this" with "Report a problem" beside it. */
.plans-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.report-open { border: 0; background: none; padding: 0; font: inherit; font-size: 13.5px; color: var(--ink); opacity: 0.75; cursor: pointer; }
.report-open span { color: var(--teal); font-weight: 600; text-decoration: underline; }
.report-open:hover { opacity: 1; }
#report { margin-top: 12px; max-width: 680px; }
#report textarea { width: 100%; margin-top: 0; resize: vertical; font: inherit; }
#report input[name="email"] { width: 100%; max-width: 360px; margin-top: 8px; }
.report-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
#report .cta { margin-top: 0; width: auto; padding: 10px 22px; }
.report-status { font-size: 13px; opacity: 0.8; }

/* How We Calculate page */
#nav .links a.on { opacity: 1; color: var(--teal); }
.save main.page { padding-top: 24px; }
.save main.page h1 { font-family: "Space Grotesk", sans-serif; font-size: clamp(30px, 5vw, 42px); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; }
.controls .qlab { margin-top: 0; }
.controls select.field { margin-top: 0; width: auto; min-width: 90px; }
.controls .seg { margin-top: 0; flex-wrap: wrap; max-width: 100%; }
.controls .seg button { flex: none; padding: 7px 14px; }
.controls .seg button:disabled { opacity: 0.35; cursor: default; }
.hourchart { margin: 22px 0 0; }
.hourchart svg { width: 100%; max-width: 720px; display: block; }
.hourchart svg text { font-size: 6px; fill: var(--ink); opacity: 0.5; font-family: "Work Sans", sans-serif; }
.hourchart figcaption { margin-top: 10px; font-size: 14.5px; line-height: 1.5; }
.save .source { font-size: 12px; opacity: 0.55; margin-top: 10px; line-height: 1.5; }
.save .legend span { margin-right: 12px; white-space: nowrap; }
.save .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.save .formula { margin: 18px 0 0; max-width: 680px; padding: 14px 18px; border-radius: 12px;
  background: rgba(28, 110, 92, 0.08); font-size: 16px; font-weight: 500; line-height: 1.5; }
/* The rate chart's price axis must read clearly (Jon), so it is darker than the hour labels. */
.hourchart svg text.axis { opacity: 0.8; }
/* Band prices sit above their bars in the flat label's style; the paper halo keeps them clear of the flat line. */
.hourchart svg text.price { opacity: 0.8; stroke: var(--paper); stroke-width: 2px; paint-order: stroke; stroke-linejoin: round; }
.hourchart svg .grid { stroke: var(--ink); stroke-opacity: 0.12; stroke-width: 0.4; }
.hourchart svg .flat { stroke: var(--ink); stroke-opacity: 0.6; stroke-width: 0.7; stroke-dasharray: 3 2; }
.save .estbox.example { max-width: 420px; }
/* "More details": an accordion row with a chevron on the right, not the default triangle. */
.save details.more { max-width: 720px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.save details.more summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 2px; font-family: "Space Grotesk", sans-serif; font-size: 18px; font-weight: 600;
}
.save details.more summary::-webkit-details-marker { display: none; }
.save details.more summary::after {
  content: ""; width: 8px; height: 8px; margin-right: 6px;
  border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal);
  transform: rotate(45deg); transition: transform 0.15s;
}
.save details.more[open] summary::after { transform: rotate(-135deg); }
.save details.more[open] { padding-bottom: 18px; }
.save details.more h4 { font-family: "Space Grotesk", sans-serif; font-size: 16px; font-weight: 600; margin: 18px 0 0; }
.save .notes { padding-left: 18px; }
.save .notes li + li { margin-top: 6px; }

/* Touch: the nav, logo and "Report a problem" are short lines of text; give
   them the same 44px target as style.css's touch rules. */
@media (pointer: coarse) {
  #brand-link, #nav .links a { min-height: 44px; min-width: 44px; align-items: center; }
  #nav .links a { display: flex; }
  .report-open { padding: 14px 0; }
}

@media (max-width: 560px) {
  #nav .links { gap: 14px; font-size: 13px; }
  #brand-link span { display: none; }
  #hero { padding: 22px 20px; }
  body.save { --qlab-w: 110px; }
  .save .questions .hint { padding-left: 0; }
  /* A phone has no room for a label beside its answer: the label goes on its
     own line, so long answers and the EV miles are not cut off. */
  .save .qrow, .save .qrow:has(#f-miles) { flex-wrap: wrap; }
  .save .qrow .qlab { flex-basis: 100%; }
  .save .qrow select.field { max-width: none; }
}
