/* EEXI Quickscan. The Decarbonizer design language, measured from the sandbox
   stylesheet rather than described from memory: Poppins, navy, hairline rules,
   square corners with five deliberate exceptions, de-boxed subsections, no
   vertical rules in tables. Only the rules this page uses are carried over. */

:root {
  --navy: #0A1543;
  --grey: #aab2c2;
  --line: #e6e9f0;
  --soft: #f6f7fa;
  --sel-row: #f0f1f3;
  --paper-warm: #f4f5f8;
  --ink: #15151a;
  --ink-soft: #3d3d47;
  --ink-muted: #6b6b75;
  /* Row rules are almost invisible; the header rule and the band seams have to
     carry. Deliberately separate tokens. */
  --rule2: rgba(10, 21, 67, .12);
  --rule2-soft: rgba(10, 21, 67, .06);
  --rule-band: rgba(10, 21, 67, .38);
  /* Air above every subsection body. One token, so no section can drift. */
  --sub-top: 50px;
  --fuel: #AFACAC;
}

* { 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 { font-weight: 600; margin: 0 }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 26px }
.xscroll { overflow-x: auto }
.hidden { display: none !important }
#tool { padding-bottom: 40px }

/* Copy is italic and justified. */
#tool p, #tool .note { font-style: italic; text-align: justify; color: var(--ink-muted); font-size: 12px }
#tool .note.perday { text-align: right; margin-top: 2px }

/* ===== header: white, navy wordmark, one hairline band rule =====
   The rule is drawn by ::after rather than as a border-bottom on the header,
   which would span the whole border box. left/right are 0 because this header
   sits INSIDE .wrap, which already carries the 26px gutter; the sandbox's 26px
   is for a header that carries its own. */
#tool .dz-header {
  background: #fff;
  padding: 19px 0;
  margin: 0 0 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between
}
#tool .dz-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; border-bottom: 1px solid var(--rule-band) }
#tool .dz-left { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap }
#tool .dz-brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap }
#tool .dz-mark { font-weight: 600; font-size: 1.25rem; letter-spacing: -.01em; color: var(--navy) }
#tool .dz-product { font-size: .9rem; color: var(--ink-soft) }
#tool .dz-product strong { color: var(--navy); font-weight: 600 }

#tool .dz-right { display: flex; align-items: center; gap: 10px }
#tool .dz-dd { position: relative }
#tool .dz-save {
  background: var(--navy); color: #fff; border: 0; padding: 9px 16px;
  border-radius: 0; font-family: 'Poppins', sans-serif; font-size: .85rem;
  font-weight: 500; cursor: pointer
}
#tool .dz-save:hover { background: #16224f }
#tool .dz-menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: #fff;
  border: 1px solid var(--rule2); border-radius: 0;
  box-shadow: 0 8px 24px rgba(10, 21, 67, .12); min-width: 200px; z-index: 20; overflow: hidden
}
#tool .dz-menu a {
  display: block; padding: 10px 14px; font-size: .85rem; color: var(--ink);
  cursor: pointer; border-bottom: 1px solid var(--rule2-soft)
}
#tool .dz-menu a:last-child { border-bottom: 0 }
#tool .dz-menu a:hover { background: var(--paper-warm); color: var(--navy) }

/* ===== blocks and subsections =====
   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. */
#tool .block { margin-bottom: 30px }
#tool .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. */
#tool .acc.closed { margin-bottom: 8px }
#tool .acc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0; cursor: pointer; user-select: none
}
#tool .acc-head h3 { font-weight: 500; font-size: 1.05rem; color: var(--navy) }
/* Pills: a deliberate exception to the square-corner rule, like the slider
   thumbs and the tooltip markers. Wider than tall. Up is always left and
   always closes; down is always right and always opens. */
#tool .acc-toggle { display: flex; gap: 6px }
#tool .acc-toggle button {
  width: 42px; height: 26px; border: 1px solid var(--line); background: #fff;
  cursor: pointer; color: var(--navy); font-size: 10px; font-family: inherit;
  border-radius: 999px; padding: 0
}
#tool .acc-toggle button.on { background: var(--navy); color: #fff; border-color: var(--navy) }
/* Content starts --sub-top below the label, from one token. */
#tool .acc-body { border-top: 0; overflow: visible; padding: var(--sub-top) 0 20px }
#tool .acc.closed .acc-body { display: none }

#tool .band {
  font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 1.05rem;
  color: var(--navy); margin-bottom: 10px; display: flex; align-items: center
}

/* ===== grids =====
   minmax(0, 1fr) rather than a bare 1fr: a bare 1fr has an auto minimum, so a
   wide table or a long label blows the column out. A section with one column
   of content still uses the two-column grid with an empty second cell, or a
   label and its field end up a page apart. */
#tool .grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px 40px; align-items: start }
#tool .grid-tot { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 26px; align-items: start }

/* ===== rows =====
   Label, value, unit. No rule between rows: the uniform height and the shared
   label column carry the alignment, and lines only add noise. Both grid
   columns use the same template, so rows line up across them. */
#tool .kv {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px 44px;
  gap: 10px; min-height: 34px; padding: 6px 0; align-items: center
}
#tool .kv .k { font-size: 12px; color: var(--ink-soft); display: flex; align-items: center }
#tool .kv .v { text-align: right }
#tool .kv .u { font-size: 12px; color: var(--ink-muted) }
#tool .kv.slider { grid-template-columns: minmax(0, 1fr) 150px 44px }

/* ===== tables =====
   No frame; the row rules carry the structure. Header cells are muted, 12.5px,
   weight 600, closed by a hairline. Total rows take a navy top rule. No
   vertical rules ever. */
#tool table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
  font-variant-numeric: tabular-nums; background: #fff
}
#tool th, #tool td { text-align: right; padding: 6px 9px; border-top: 1px solid var(--rule2-soft) }
#tool th.l, #tool td.l { text-align: left }
#tool thead th {
  font-weight: 600; color: var(--ink-muted); font-size: 12.5px;
  padding-bottom: 8px; border-top: 0; border-bottom: 1px solid var(--rule2);
  white-space: nowrap; vertical-align: bottom
}
#tool tbody tr:first-child td { border-top: 0 }
#tool tr.tot td { border-top: 1px solid var(--navy); font-weight: 600; color: var(--navy) }
#tool tr.gap td { border-top: 0; height: 14px; padding: 0 }
#tool td.dash { color: var(--grey) }

#tool .breaktab td.l { color: var(--ink-soft) }

/* ===== EEXI summary blocks =====
   The eleven rows of the EEXI sheet read as six figures: the five correction
   factors are one reading rather than five, and attained against required is
   one comparison rather than two rows a reader has to subtract by eye.
   A fixed three-column grid, so nothing moves when the category changes. */
#tool .blk6 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 14px;
  /* The air is mirrored top and bottom, measured rule to blocks rather than
     by one padding value, so the band reads as one group between two lines
     rather than as a row pushed away from the header.

     19px above the boxes and 19px below them to the seam. The seam to the
     section under it was 30px on top of a 33px pad, which put 63px of nothing
     between the reader's first figures and the ship they belong to; it is 18px
     now, so the seam closes the band and the next section starts. */
  margin: 19px 0 18px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--rule-band)
}
#tool .blk {
  border: 1px solid var(--rule2);
  background: #fff;
  padding: 12px 13px 11px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  transition: border-color .14s
}
#tool .blk:hover { border-color: var(--navy) }
#tool .blk-lab {
  font-size: 10.5px; color: var(--ink-muted); font-weight: 500;
  display: flex; align-items: center; justify-content: space-between; gap: 6px
}
#tool .blk-val {
  font-size: 23px; font-weight: 600; line-height: 1.15; margin-top: auto;
  color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.015em;
  /* A long answer - "Not Applicable" - shrinks rather than wrapping the box
     to two lines and pushing the row below it down. */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap
}
#tool .blk-val.sm { font-size: 15px }
#tool .blk-unit { font-size: 12px; font-weight: 400; color: var(--ink-muted); margin-left: 4px }
#tool .blk-sub { font-size: 10.5px; color: var(--ink-muted); margin-top: 3px; font-variant-numeric: tabular-nums }
#tool .blk-sub b { font-weight: 500; color: var(--ink-soft) }
/* The verdict box. Compliant is the tool's answer, so it carries the only
   colour on the page beyond navy. */
#tool .blk.pass .blk-val { color: #1c7c4a }
#tool .blk.fail .blk-val { color: #b3261e }
#tool .proftab td { border-top: 0; padding: 3px 9px }
#tool .proftab td.l { text-align: left; font-weight: 600; color: var(--navy) }
#tool .headtab td { font-weight: 600; color: var(--navy); font-size: 13px }

/* ===== the drawing =====
   Its own column beside the three headline inputs, centred in the height they
   take so a short silhouette does not sit at the top of an empty half. */
#tool .figure { display: flex; align-items: center; justify-content: center; min-height: 160px }
#tool .figure img { max-width: 100%; display: block }
/* An image that has not resolved shows nothing rather than a broken-image
   glyph: the chain walks four candidates and the last miss is an empty state. */
#tool .figure img[src=""], #tool .figure img:not([src]) { display: none }
/* The head block's two columns: the drawing takes the left, the inputs and the
   EEXI panel the right. */
#tool .grid2.head2 { align-items: center }

/* The fold control: one of the five round exceptions. */
#tool .foldrow { display: flex; justify-content: center; margin: 4px 0 26px }
#tool .fold {
  border: 1px solid var(--rule2); background: #fff; color: var(--navy);
  font-family: inherit; font-size: 12.5px; padding: 7px 18px;
  border-radius: 999px; cursor: pointer
}
#tool .fold:hover { border-color: var(--navy) }

#tool .chartbox { position: relative; height: 240px }
#tool .chartbox.donut { height: 150px }
/* The figure beside a slider: a readout, not a unit, so it takes the value
   colour rather than the muted one. */
#tool .kv .u.num { text-align: right; color: var(--navy); font-variant-numeric: tabular-nums }
/* The SFC readout sits under the engine fields, on the right, where the third
   screenshot has it. */
#tool .note.sfcnote { text-align: right; font-style: normal; color: var(--navy); margin: 6px 0 22px }

#tool .dayyear { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px }
#tool .radio, #tool .check { display: flex; align-items: center; gap: 8px; cursor: pointer }

/* ===== inputs ===== */
#tool input[type=text], #tool select {
  width: 100%; font-family: 'Poppins', sans-serif; font-size: 12.5px;
  /* The body's 1.55 is for prose. Left on a control it makes the content box
     taller than the text, and a select's option list is anchored to that box. */
  line-height: 1.2; color: var(--ink); background: #fff;
  border: 1px solid var(--rule2); border-radius: 0; padding: 5px 8px;
  height: 30px; box-sizing: border-box
}
#tool input[type=text] { text-align: right }

/* The unit sits INSIDE the field, as the Decarbonizer does it: the value reads
   left, the unit is pinned to the right edge, and the input reserves room for
   it so a long unit cannot land on the digits. */
#tool .v.un { position: relative }
#tool .v.un input { text-align: left; padding-right: 52px }
#tool .v.un i.u {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  font-style: normal; font-size: 11.5px; color: var(--ink-muted);
  pointer-events: none
}
/* A wider reservation where the unit is long. */
#tool .v.un.wide input { padding-right: 74px }
#tool select { text-align: left; cursor: pointer }
#tool input:focus, #tool select:focus { outline: 1px solid var(--navy); border-color: var(--navy) }
/* A figure outside its bounds while it is still being typed. Cleared when the
   field is left, which is when it is clamped. */
#tool input.oor, #tool input.oor:focus { outline: 1px solid #b3261e; border-color: #b3261e }

#tool input[type=checkbox] {
  appearance: none; -webkit-appearance: none; width: 14px; height: 14px;
  border: 1px solid var(--grey); background: #fff; border-radius: 0;
  display: inline-grid; place-content: center; cursor: pointer; margin: 0; flex: 0 0 auto
}
#tool input[type=checkbox]:checked { background: var(--navy); border-color: var(--navy) }
#tool input[type=checkbox]:checked::after {
  content: ''; width: 3px; height: 7px; border: solid #fff;
  border-width: 0 1.5px 1.5px 0; transform: translateY(-1px) rotate(45deg)
}
/* Radios are round: the second of the five exceptions. */
#tool input[type=radio] {
  appearance: none; -webkit-appearance: none; width: 14px; height: 14px;
  border: 1px solid var(--grey); background: #fff; border-radius: 50%;
  display: inline-grid; place-content: center; cursor: pointer; margin: 0; flex: 0 0 auto
}
#tool input[type=radio]:checked { border-color: var(--navy) }
#tool input[type=radio]:checked::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--navy) }

/* Sliders: thin neutral track, round navy thumb, no coloured fill. */
#tool input[type=range] { appearance: none; -webkit-appearance: none; width: 100%; height: 14px; background: transparent; margin: 0; cursor: pointer }
#tool input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: var(--line) }
#tool input[type=range]::-moz-range-track { height: 3px; border-radius: 2px; background: var(--line) }
#tool input[type=range]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--navy); border: none; margin-top: -5.5px }
#tool input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--navy); border: none }
#tool input[type=range]:focus { outline: none }
#tool input[type=range]:focus-visible { outline: 1px solid var(--navy) }

/* Tooltip markers are round: squared off they read as tiny buttons rather than
   as the "there is more here" dot they are. */
#tool .ii {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--rule2);
  background: transparent; font-family: Georgia, serif; font-size: 10px;
  font-style: italic; font-weight: 400; color: var(--ink-muted);
  margin-left: 8px; cursor: help; vertical-align: middle; flex-shrink: 0
}
#tip {
  position: fixed; z-index: 99999; background: var(--navy); color: #fff;
  font: 400 12px/1.45 'Poppins', sans-serif; padding: 9px 12px; border-radius: 0;
  max-width: 280px; box-shadow: 0 6px 18px rgba(10, 21, 67, .22);
  pointer-events: none; opacity: 0; transition: opacity .07s ease;
  white-space: normal; left: -9999px; top: 0
}

@media (max-width: 880px) {
  #tool .grid2, #tool .grid-tot { grid-template-columns: minmax(0, 1fr) }
  #tool .blk6 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  #tool .kv { grid-template-columns: minmax(0, 1fr) 120px 40px }
}

/* ===== email report modal =====
   One box for all three outputs, in the tool's own vocabulary: navy caption
   bar, hairline border, square corners. .hidden carries !important so it
   beats the flex here. */
.rpt-mask {
  position: fixed; inset: 0; background: rgba(10, 21, 67, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 60;
}
.rpt-box {
  background: #fff; border: 1px solid var(--rule2);
  box-shadow: 0 18px 48px rgba(10, 21, 67, .22); width: 100%; max-width: 440px;
}
.rpt-head {
  background: var(--navy); color: #fff; font-weight: 600; font-size: .72rem;
  letter-spacing: .06em; text-transform: uppercase; padding: 10px 16px;
}
.rpt-body { padding: 16px }
.rpt-lab {
  display: block; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 500; margin-bottom: 6px;
}
.rpt-inp {
  width: 100%; font-family: inherit; font-size: 13px; color: var(--navy);
  background: #fff; border: 1px solid var(--rule2); border-radius: 0; padding: 9px 11px;
}
.rpt-inp:focus { outline: 0; border-color: var(--navy) }
/* Empty until app.js writes to it, so the box does not jump when a message
   appears. */
.rpt-msg:empty { display: none }
.rpt-msg {
  margin-top: 12px; padding: 8px 10px; font-size: 12.5px; background: var(--soft);
  border-left: 3px solid var(--navy); color: var(--navy);
}
.rpt-msg.bad { border-left-color: #b3261e; color: #b3261e }
.rpt-act { display: flex; justify-content: flex-end; gap: 10px; padding: 0 16px 16px }
/* The two buttons carry their own rules here: this tool scopes .dz-save to
   #tool and the box sits outside it, so the class alone would give Cancel the
   browser's default button. */
.rpt-act .dz-save {
  background: var(--navy); color: #fff; border: 0; padding: 9px 18px; border-radius: 0;
  font-family: 'Poppins', sans-serif; font-size: .85rem; font-weight: 500; cursor: pointer
}
.rpt-act .dz-save:hover { background: #16224f }
.rpt-act .dz-save[disabled] { opacity: .55; cursor: default }
.rpt-act .dz-btn2 {
  background: transparent; color: var(--navy); border: 1px solid var(--rule2);
  padding: 9px 18px; border-radius: 0;
  font-family: 'Poppins', sans-serif; font-size: .85rem; font-weight: 500; cursor: pointer
}
.rpt-act .dz-btn2:hover { border-color: var(--navy); background: rgba(10, 21, 67, .04) }
