/* ==========================================================================
   Company31 tools — shared styling for the free diagnostic tools.
   Builds on styles.css (colours, fonts, buttons, header, footer).
   ========================================================================== */

.tool-intro { padding-block: clamp(40px, 6vw, 72px); background: var(--paper); }
.tool-intro .lead { margin-top: 0.4em; max-width: 46ch; }
.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 1.4em;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.tool-meta span { display: inline-flex; align-items: center; gap: 8px; }
.tool-meta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--azure); }

.tool-section { padding-block: clamp(20px, 3vw, 40px) clamp(56px, 8vw, 96px); background: var(--ice); }

.tool-card {
  background: var(--white);
  border: 1px solid rgba(18, 51, 158, .12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(24px, 4vw, 48px);
  max-width: 760px;
  margin-inline: auto;
}

/* ----- Progress --------------------------------------------------------- */
.progress {
  height: 6px;
  border-radius: 999px;
  background: var(--ice);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--current-blue), var(--azure));
  transition: width .35s ease;
}
.progress-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 14px 0 4px;
}

/* ----- Question step ---------------------------------------------------- */
.stage { margin-top: 18px; }
.q-prompt {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--current-blue);
  margin-bottom: 14px;
}
.q-text {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.25;
  color: var(--ink-navy);
  margin: 0 0 26px;
  text-wrap: balance;
}
.options { display: grid; gap: 12px; }
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1.08rem;
  color: var(--ink-navy);
  background: var(--paper);
  border: 1.5px solid rgba(18, 51, 158, .16);
  border-radius: 12px;
  padding: 15px 18px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.option:hover { border-color: var(--current-blue); background: var(--ice); }
.option:active { transform: translateY(1px); }
.option .key {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--ice);
  color: var(--current-blue);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.option.is-selected {
  border-color: var(--current-blue);
  background: var(--current-blue);
  color: var(--white);
}
.option.is-selected .key { background: rgba(255,255,255,.22); color: var(--white); }

.q-nav { margin-top: 22px; min-height: 24px; }
.q-back {
  background: none;
  border: none;
  padding: 4px 2px;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--text-muted);
}
.q-back:hover { color: var(--current-blue); }
.q-back[hidden] { display: none; }

/* ----- Result ----------------------------------------------------------- */
.result { animation: fadein .4s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .result { animation: none; } .progress-fill { transition: none; } }

.result-head {
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  margin: 0.3em 0 0.5em;
}
.result-read { font-size: 1.12rem; color: var(--text); max-width: 56ch; }
.result-read + .result-read { margin-top: 0.8em; }

.next-move {
  margin-top: 26px;
  background: var(--ice);
  border-radius: 14px;
  padding: 22px 24px;
}
.next-move .nm-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--current-blue);
  display: block;
  margin-bottom: 8px;
}
.next-move p { margin: 0; font-size: 1.1rem; color: var(--ink-navy); font-weight: 400; }

/* ----- Where it points (bars) ------------------------------------------ */
.places { margin-top: 30px; display: grid; gap: 14px; }
.places-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.place-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.place-name { font-family: var(--font-head); font-weight: 500; font-size: 1rem; color: var(--text-muted); }
.place-score { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted); }
.place-bar { height: 10px; border-radius: 999px; background: var(--ice); overflow: hidden; }
.place-fill { height: 100%; border-radius: 999px; background: rgba(28,79,216,.35); transition: width .5s ease; }
.place.is-primary .place-name { color: var(--ink-navy); font-weight: 600; }
.place.is-primary .place-score { color: var(--current-blue); }
.place.is-primary .place-fill { background: linear-gradient(90deg, var(--current-blue), var(--azure)); }

.caveat {
  margin-top: 26px;
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.tool-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.tool-actions .btn { font-size: 0.98rem; }
.copy-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--current-blue);
  opacity: 0;
  transition: opacity .2s ease;
}
.copy-note.show { opacity: 1; }

.tool-privacy {
  max-width: 760px;
  margin: 22px auto 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.place-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--current-blue);
  padding: 3px 9px;
  border-radius: 999px;
  margin-left: 10px;
  vertical-align: middle;
  white-space: nowrap;
}

/* ----- Tools landing ---------------------------------------------------- */
.tool-list { display: grid; gap: var(--gap); margin-top: 6px; }
@media (min-width: 860px) { .tool-list { grid-template-columns: repeat(3, 1fr); } }
.tool-list .card { display: flex; flex-direction: column; }
.tool-list .card .card-num { margin-bottom: 0.9em; }
.tool-list .card h3 { font-size: 1.35rem; }
.tool-list .card p { flex: 1; }
.tool-list .tool-time {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 14px 0 18px;
}
.tool-list .tool-start {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--current-blue);
  text-decoration: none;
}
.tool-list .tool-start:hover { color: var(--deep-royal); }
.tool-list .card a.stretch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.tool-list .card { position: relative; transition: transform .15s ease, box-shadow .2s ease; }
.tool-list .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ----- Planner (tool 3) ------------------------------------------------- */
.planner-section { margin-bottom: 30px; }
.planner-section:last-of-type { margin-bottom: 8px; }
.planner-section > .ps-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--current-blue);
  margin-bottom: 4px;
}
.planner-section > .ps-intro { color: var(--text-muted); margin: 0 0 20px; }
.field { margin-bottom: 20px; }
.field > label {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink-navy);
  margin-bottom: 8px;
}
.field input[type="text"] {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--ink-navy);
  background: var(--paper);
  border: 1.5px solid rgba(18, 51, 158, .16);
  border-radius: 10px;
  padding: 12px 14px;
}
.field input[type="text"]::placeholder { color: #9aa6bf; }
.field input[type="text"]:focus-visible { outline: 3px solid var(--azure); outline-offset: 1px; border-color: var(--current-blue); }
.choice { display: flex; flex-wrap: wrap; gap: 10px; }
.choice label {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-navy);
  background: var(--paper);
  border: 1.5px solid rgba(18, 51, 158, .16);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
}
.choice label:hover { border-color: var(--current-blue); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice input:checked + span { }
.choice label:has(input:checked),
.choice label.is-checked { background: var(--current-blue); color: var(--white); border-color: var(--current-blue); }
.choice label:has(input:focus-visible) { outline: 3px solid var(--azure); outline-offset: 2px; }
.planner-error { color: #b23a5e; font-size: 0.95rem; margin: 4px 0 16px; }
.planner-error[hidden] { display: none; }

/* Printable commitment */
.commitment { animation: fadein .4s ease both; }
.commit-title { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin: 0.3em 0 0.2em; }
.commit-rows { margin-top: 24px; display: grid; gap: 0; }
.commit-row { padding: 18px 0; border-top: 1px solid rgba(18, 51, 158, .12); }
.commit-row:last-child { border-bottom: 1px solid rgba(18, 51, 158, .12); }
.commit-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--current-blue);
  margin-bottom: 6px;
}
.commit-value { font-size: 1.18rem; color: var(--ink-navy); margin: 0; }
.commit-note {
  margin-top: 24px;
  background: var(--ice);
  border-radius: 14px;
  padding: 20px 22px;
  font-style: italic;
  color: var(--ink-navy);
}

/* ----- Print: clean one page result ------------------------------------- */
@media print {
  .site-header, .tool-intro, .site-footer, .tool-actions, .planner-actions, .skip-link, .progress, .progress-label { display: none !important; }
  body { background: #fff; }
  .tool-section { padding: 0; background: #fff; }
  .tool-card { box-shadow: none; border: none; max-width: 100%; padding: 0; }
  .result-head { color: #000; }
  .next-move { background: #f2f5fc; }
}
