/* ============================================================
   Carbon Footprint Steel - stylesheet
   ------------------------------------------------------------
   The Decarbonizer's design language, written once. The sandbox
   stylesheet accumulated override blocks, so its live values are the
   LAST rule for each selector; those live values are what is written
   here, in one place per selector. If a rule here disagrees with the
   sandbox, the sandbox has moved on and this file should be re-measured,
   not patched further down.
   ============================================================ */

:root {
  --navy: #0A1543;
  --line: #e6e9f0;
  --soft: #f6f7fa;
  --grey: #aab2c2;
  --sel-row: #f0f1f3;
  --paper-warm: #f4f5f8;
  --ink: #15151a;
  --ink-soft: #3d3d47;
  --ink-muted: #6b6b75;

  /* Row rules and block borders: fine faint. */
  --rule2: rgba(10, 21, 67, .12);
  --rule2-soft: rgba(10, 21, 67, .06);
  /* Structural seams - the header rule. Deliberately separate from
     --rule2: those are hairlines, this one has to carry. */
  --rule-band: rgba(10, 21, 67, .38);

  /* Air above every subsection body. One number retunes the tool:
       below  20px (.acc-body padding-bottom)
            + 30px (.acc margin-bottom)
            +  7px (next .acc-head padding-top)  = 57px
       above   7px (this .acc-head padding-bottom)
            + 50px (this token)                  = 57px */
  --sub-top: 50px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  background: #fff;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

h3 {
  margin: 0;
  font-weight: 600;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 26px;
}

a {
  color: var(--navy);
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* Square corners across the tool: no rounded boxes. The exceptions are
   listed together further down rather than scattered, so the rule and
   its carve-outs read as one decision. */
#siteHeader *,
#tool * {
  border-radius: 0;
}

/* ---------- header ------------------------------------------------
   White, brand left. The rule is drawn by ::after inset to the gutter:
   a border-bottom spans the whole 1180px border box and would sit 26px
   proud of the content column at each end. */
#siteHeader .dz-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 19px 26px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  color: var(--ink);
  border-bottom: 0;
  box-shadow: none;
}

#siteHeader .dz-header::after {
  content: '';
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 0;
  border-bottom: 1px solid var(--rule-band);
}

#siteHeader .dz-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

#siteHeader .dz-mark {
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -.01em;
  color: var(--navy);
}

#siteHeader .dz-product {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--ink-soft);
  opacity: 1;
}

#siteHeader .dz-product strong {
  font-weight: 500;
  color: var(--navy);
}

/* ---------- layout ------------------------------------------------ */
#tool {
  padding-top: 14px;
  color: var(--ink);
}

/* minmax(0, 1fr), never a bare 1fr: a wide child cannot blow the column
   out. A section with one column of content still uses this grid with an
   empty second cell, or a label and its field end up a page apart. */
.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 44px;
  align-items: start;
}

.grid2 > * {
  min-width: 0;
}

.intro {
  padding: var(--sub-top) 0 20px;
}

.band {
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0 0 10px;
}

/* The results column carries no heading, but the block still has to
   start on the same line as the first input row beside it. The spacer is
   a .band with nothing in it rather than a margin of its own: same
   class, so the height it reserves stays correct if the band's font or
   spacing is ever retuned. */
.band.empty {
  visibility: hidden;
}

.band.empty::before {
  content: '\00a0';
}

/* ---------- rows --------------------------------------------------
   Label, value, unit. No rule between rows: the uniform height and the
   shared label column carry the alignment, and lines only add noise.
   The third column is reserved whether or not a row has a tooltip, so
   fields above and below stay on the same vertical line. */
.kv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 16px;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 6px 0;
}

.kv > .k {
  grid-column: 1;
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 5px;
}

.kv > :not(.k):not(.ii) {
  grid-column: 2;
}

.kv > .ii {
  grid-column: 3;
  margin-left: 0;
  justify-self: end;
}

/* A result is text, not an input. It takes the input's padding and a
   transparent border so it occupies the same box: without them the row
   is 7px shorter and a result drifts off the line of the field beside
   it, which is what rule 7 is about. */
.kv .v {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  text-align: right;
  padding: 7px 8px;
  border: 1px solid transparent;
}

.kv .v .u {
  color: var(--ink-muted);
  font-style: normal;
  margin-left: 5px;
}

input[type=text],
input[type=number],
select {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
}

input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input:focus,
select:focus {
  outline: 1px solid var(--navy);
  border-color: var(--navy);
}

.kv input,
.kv select {
  width: 100%;
}

/* ---------- tooltip marker ---------------------------------------- */
.ii {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--rule2);
  background: transparent;
  font-family: Georgia, serif;
  font-size: 10px;
  font-style: italic;
  color: var(--ink-muted);
  cursor: help;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ---------- accordions --------------------------------------------
   De-boxed: no frame, no panel fill, no rule under the head bar. A
   subsection is a bare label plus its toggle pills, with content
   flowing on the page. Spacing does the separating. */
.acc {
  border: 0;
  background: #fff;
  margin-bottom: 30px;
}

/* A closed subsection is one line of a list, so consecutive closed ones
   press together; the 30px stays for open ones, whose content needs
   separating from what follows. */
.acc.closed {
  margin-bottom: 8px;
}

.acc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  cursor: pointer;
}

.acc-head h3 {
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--navy);
}

.acc-toggle {
  display: flex;
  gap: 6px;
}

.acc-toggle button {
  width: 42px;
  height: 26px;
  border: 1px solid var(--rule2);
  background: #fff;
  color: var(--ink-muted);
  font-size: 10px;
  cursor: pointer;
}

.acc-toggle button.on {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.acc-body {
  border-top: 0;
  padding: var(--sub-top) 0 20px;
}

.acc.closed .acc-body {
  display: none;
}

/* ---------- summary block -----------------------------------------
   The result block. Same component as the Decarbonizer's summary band:
   a hairline frame, a small muted label and the figure pushed to the
   foot of the box by margin-top:auto. Its top edge sits on the top edge
   of the first input row beside it. */
.blk {
  border: 1px solid var(--rule2);
  background: #fff;
  padding: 12px 13px 11px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.blk-lab {
  font-size: 10.5px;
  color: var(--ink-muted);
  font-weight: 500;
}

.blk-val {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.15;
  margin-top: auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.015em;
}

.blk-unit {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-muted);
  margin-left: 5px;
}

/* ---------- copy ---------------------------------------------------- */
p,
.note {
  font-size: 11px;
  color: var(--ink-muted);
  font-style: italic;
  text-align: justify;
}

/* ---------- shape exceptions --------------------------------------
   Square corners everywhere, with these deliberate exceptions. A
   tooltip marker squared off reads as a tiny button rather than as the
   "there is more here" dot it is. */
#tool .ii {
  border-radius: 50%;
}

#tool .acc-toggle button {
  border-radius: 999px;
}

@media (max-width: 820px) {
  .grid2 {
    grid-template-columns: minmax(0, 1fr);
  }
}
