/* EWR Corporate — tools. One tool at a time, one question at a time. */

/* ================= the picker ================= */

.pick {
  padding: clamp(3rem, 8vw, 6rem) var(--gut) clamp(3.5rem, 8vw, 6rem);
  max-width: var(--maxw);
}

.pick__title {
  margin: 0;
  font-size: clamp(2rem, 1.15rem + 3.6vw, 3.6rem);
  line-height: 1.07;
  max-width: 19ch;
}

.pick__lede {
  margin: clamp(1.25rem, 2.5vw, 1.75rem) 0 0;
  max-width: 48ch;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.15rem);
}

.pick__list {
  list-style: none;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}
.pick__list li { border-bottom: 1px solid var(--rule); }

.pcard {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(0.75rem, 2.5vw, 2rem);
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: clamp(1.5rem, 3vw, 2.4rem) 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: background 0.16s ease, padding 0.16s ease;
}
.pcard:hover,
.pcard:focus-visible {
  background: var(--paper-hi);
  padding-left: 1rem;
  padding-right: 1rem;
}

.pcard__n {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ewr-dark);
  padding-top: 0.3rem;
}

.pcard__name {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
  line-height: 1.15;
}
.pcard__desc {
  display: block;
  margin-top: 0.6rem;
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 0.97rem;
}
.pcard__meta {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.pcard__go {
  align-self: center;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ewr-dark);
  border-bottom: 1px solid var(--ewr);
  padding-bottom: 3px;
}

/* ================= panel shell ================= */

.panel {
  padding: clamp(1.75rem, 4vw, 2.75rem) var(--gut) clamp(3.5rem, 8vw, 6rem);
  max-width: var(--maxw);
}
.panel--dark {
  background: var(--deep);
  color: var(--paper-hi);
  max-width: none;
}

.panel__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.panel--dark .panel__top { border-bottom-color: var(--deep-hi); }

.back {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.back:hover { color: var(--ink); border-bottom-color: var(--ewr); }
.panel--dark .back { color: #A9BFB6; }
.panel--dark .back:hover { color: #fff; }

.panel__label {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ewr-dark);
}
.panel--dark .panel__label { color: #E0A38A; }

.panel--dark .calc { max-width: var(--maxw); margin-inline: auto; }
.panel--dark .panel__top { max-width: var(--maxw); margin-inline: auto; }

/* ================= 01 · the stepper ================= */

.quiz { max-width: 46rem; }

.quiz__meter {
  height: 3px;
  background: var(--rule);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.quiz__meter-fill {
  height: 100%;
  width: 10%;
  background: var(--ewr);
  transition: width 0.28s cubic-bezier(0.2, 0.75, 0.3, 1);
}

.quiz__count {
  margin: 0.85rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.quiz__area { color: var(--ewr-dark); }

.quiz__q { border: 0; margin: 0; padding: 0; }

.quiz__legend {
  padding: 0;
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 clamp(1.5rem, 3vw, 2.25rem);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.012em;
  max-width: 24ch;
}

.opts { display: grid; gap: 0.6rem; }

.opt {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  padding: clamp(0.95rem, 2vw, 1.15rem) 1.1rem;
  border: 1px solid var(--rule);
  background: var(--paper-hi);
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}
.opt:hover { border-color: var(--ink); }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt:has(input:focus-visible) { outline: 2px solid var(--ewr); outline-offset: 3px; }

.opt__key {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.opt__label { font-size: clamp(0.98rem, 0.95rem + 0.2vw, 1.08rem); line-height: 1.35; }

.opt.is-on { border-color: var(--ewr); background: #F6E9E3; }
.opt.is-on .opt__key { background: var(--ewr); border-color: var(--ewr); color: #fff; }

.quiz__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: clamp(1.5rem, 3vw, 2rem);
}
.quiz__hint { margin: 0; font-size: 0.86rem; color: var(--ink-soft); }
.quiz__nav .btn:disabled { display: none; }

/* ================= shared result block ================= */

.result { max-width: 52rem; padding-top: clamp(2rem, 4vw, 3rem); }

.result__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem clamp(1rem, 3vw, 2rem);
  border-top: 2px solid var(--ink);
  padding-top: 1.25rem;
}

.result__num {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.5rem, 2rem + 6vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--ewr-dark);
}

.result__of {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.result__band {
  margin: 0.4rem 0 -0.15rem;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.8rem);
  line-height: 1.2;
}

.result__say {
  margin: 1.35rem 0 0;
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 0.97rem + 0.25vw, 1.1rem);
}

.dims { list-style: none; margin: clamp(2rem, 4vw, 3rem) 0 0; padding: 0; }

.dim {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto 6.5rem;
  align-items: center;
  gap: 0.75rem clamp(0.75rem, 2vw, 1.5rem);
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
}
.dim:last-child { border-bottom: 1px solid var(--rule); }

.dim__name { margin: 0; font-family: var(--serif); font-size: 1.12rem; }
.dim__cells { display: flex; gap: 3px; }
.cell {
  width: 14px; height: 20px;
  border: 1px solid var(--rule);
  background: transparent;
}
.cell.is-on { background: var(--deep); border-color: var(--deep); }
.dim.is-weak .cell.is-on { background: var(--ewr); border-color: var(--ewr); }
.dim.is-mixed .cell.is-on { background: var(--deep-hi); border-color: var(--deep-hi); }

.dim__score { margin: 0; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); }
.dim__score b { color: var(--ink); }
.dim__word {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: right;
  color: var(--ink-soft);
}
.dim.is-weak .dim__word { color: var(--ewr-dark); }

.next { margin-top: clamp(2rem, 4vw, 3rem); }
.next__h { margin: 0 0 1rem; font-size: 1.4rem; }
.next__list { margin: 0; padding: 0; list-style: none; }
.next__list li {
  padding: 0.9rem 0 0.9rem 1.1rem;
  border-left: 2px solid var(--ewr);
  margin-bottom: 0.75rem;
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 0.97rem;
}
.next__list b { color: var(--ink); }

.result__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}
.result__note { margin: 1rem 0 0; font-size: 0.84rem; color: var(--ink-soft); max-width: 46ch; }

/* ================= 02 · cost calculator ================= */

.calc {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
}

.calc__intro {
  margin: 0 0 1.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #A9BFB6;
}

.calc__field + .calc__field {
  margin-top: clamp(1.5rem, 3vw, 2.1rem);
  padding-top: clamp(1.5rem, 3vw, 2.1rem);
  border-top: 1px solid var(--deep-hi);
}
.calc__field label { display: block; font-size: 1.02rem; }
.calc__hint { margin: 0.35rem 0 0; font-size: 0.85rem; color: #A9BFB6; }

.calc__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.5rem;
  align-items: center;
  gap: 1rem;
  margin-top: 0.9rem;
}

.calc__val {
  font-family: var(--mono);
  font-size: 1.05rem;
  text-align: right;
  color: #fff;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--deep-hi);
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 26px;
  background: var(--ewr);
  border: 0;
  cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 26px;
  border-radius: 0;
  background: var(--ewr);
  border: 0;
  cursor: grab;
}

.calc__out {
  position: sticky;
  top: 1.5rem;
  background: #14312A;
  border: 1px solid var(--deep-hi);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.calc__hl-label {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #E0A38A;
}
.calc__hl-num {
  margin: 0.5rem 0 0;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 1.6rem + 4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
.calc__hl-sub { margin: 0.85rem 0 0; font-size: 0.9rem; color: #A9BFB6; max-width: 34ch; }

.calc__mini {
  margin: clamp(1.5rem, 3vw, 2rem) 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--deep-hi);
}
.calc__mini > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}
.calc__mini dt { font-size: 0.88rem; color: #A9BFB6; }
.calc__mini dd { margin: 0; font-family: var(--mono); font-size: 0.95rem; color: #fff; }

.calc__foot { margin: 1.25rem 0 0; font-size: 0.82rem; color: #8FA79D; }

/* ================= 03 · minute book ================= */

.mb { margin-top: clamp(2.25rem, 5vw, 3.25rem); max-width: 46rem; }

.mb__intro {
  margin: 0 0 clamp(1.75rem, 3.5vw, 2.5rem);
  max-width: 48ch;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.05rem + 0.6vw, 1.5rem);
  line-height: 1.35;
}

.mb-g { border: 0; margin: 0 0 clamp(1.75rem, 3.5vw, 2.5rem); padding: 0; }
.mb-g__legend {
  padding: 0 0 0.75rem;
  width: 100%;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ewr-dark);
}

.mb-item {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: background 0.14s ease;
}
.mb-item:hover { background: var(--paper-hi); }
.mb-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.mb-item:has(input:focus-visible) { outline: 2px solid var(--ewr); outline-offset: 2px; }

.mb-item__box {
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid var(--ink-soft);
  display: grid;
  place-items: center;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.mb-item__box::after {
  content: "";
  width: 0.62rem;
  height: 0.34rem;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0.4);
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
  margin-top: -3px;
}
.mb-item input:checked ~ .mb-item__box { background: var(--deep); border-color: var(--deep); }
.mb-item input:checked ~ .mb-item__box::after { opacity: 1; transform: rotate(-45deg) scale(1); }
.mb-item__text { font-size: 1rem; line-height: 1.35; }

.mb__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(1.5rem, 3vw, 2rem);
}
.mb__count { margin: 0; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; color: var(--ink-soft); }
.mb__acts { display: flex; gap: 0.6rem; }
.mb__fine { margin: 1.25rem 0 0; font-size: 0.82rem; color: var(--ink-soft); max-width: 60ch; }

.mb-out__track {
  height: 4px;
  background: var(--rule);
  margin-top: clamp(1.5rem, 3vw, 2rem);
}
.mb-out__fill { height: 100%; width: 0; background: var(--ewr); transition: width 0.4s cubic-bezier(0.2, 0.75, 0.3, 1); }

.gaps { list-style: none; margin: clamp(2rem, 4vw, 2.75rem) 0 0; padding: 0; }
.gap {
  padding: 1rem 0 1rem 1.1rem;
  border-top: 1px solid var(--rule);
  border-left: 2px solid transparent;
}
.gap:last-child { border-bottom: 1px solid var(--rule); }
.gap.is-hard { border-left-color: var(--ewr); }
.gap__t { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.25; }
.gap__w { margin: 0.4rem 0 0; font-size: 0.92rem; color: var(--ink-soft); max-width: 62ch; }
.gap.is-clear { border-left-color: var(--deep); }

/* ================= closing band ================= */

.tclose {
  background: var(--deep);
  color: var(--paper-hi);
  padding: clamp(4rem, 9vw, 7rem) var(--gut);
}
.tclose__inner { max-width: var(--maxw); }
.tclose__title {
  margin: 0;
  font-size: clamp(1.85rem, 1.2rem + 2.5vw, 3.1rem);
  line-height: 1.1;
  max-width: 19ch;
  font-weight: 300;
}
.tclose__lede {
  margin: 1.35rem 0 2.25rem;
  max-width: 52ch;
  color: #C3D2CB;
  font-size: clamp(1rem, 0.97rem + 0.3vw, 1.12rem);
}

/* ================= responsive ================= */

@media (max-width: 900px) {
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc__out { position: static; }
  .dim { grid-template-columns: minmax(0, 1fr) auto; }
  .dim__cells { order: 3; }
  .dim__score { order: 2; text-align: right; }
  .dim__word { order: 4; text-align: right; }
}

@media (max-width: 620px) {
  .pcard { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .pcard__go { grid-column: 2; margin-top: 1rem; justify-self: start; }
  .pcard:hover, .pcard:focus-visible { padding-left: 0.5rem; padding-right: 0.5rem; }
  .opt { grid-template-columns: 1.9rem minmax(0, 1fr); padding-left: 0.85rem; padding-right: 0.85rem; }
  .result__head { gap: 0.25rem 1rem; }
  .mb__bar { flex-direction: column; align-items: stretch; }
  .mb__acts { flex-direction: column; }
  .result__acts .btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .quiz__meter-fill, .mb-out__fill, .pcard, .opt { transition: none; }
}

/* the closing band belongs to the picker; a tool in use gets the page to itself */
body.is-tool .tclose { display: none; }
