/* ==========================================================================
   ARDO — mvp-tool.css
   Shared stylesheet for the 30 additional MVP tools. Loaded after base.css,
   which supplies the fonts, tokens, body and .wrap shell.

   This sheet re-skins the class vocabulary the MVP markup already uses
   (.hero, .card, .grid, .metrics, .two, .check, .output …) onto the P1
   system — ink and amber on warm paper. Class names are unchanged: no MVP
   HTML depends on anything defined here that it did not already use.
   Tokens are never redefined; see base.css.
   ========================================================================== */

/* --- Shell ------------------------------------------------------------- */
.wrap {
  max-width: 62rem;
  padding-block: var(--s-8) var(--s-16);
}

/* --- Hero -------------------------------------------------------------- */
.hero { padding-block: var(--s-4) var(--s-8); }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  margin: 0 0 var(--s-3);
}

.hero h1 {
  font-size: var(--t-2xl);
  letter-spacing: var(--track-hero);
  margin: 0 0 var(--s-4);
}

.lead {
  font-size: var(--t-md);
  color: var(--ink-mute);
  max-width: var(--measure);
  margin: 0;
}

/* Heading for the content sections (.steps / .uses / .faq) that tool.css
   styles. Its own rule lives in home.css, which these pages do not load, so
   without this the heading sits flush against the first item below it. */
.section-head {
  font-size: var(--t-xl);
  margin-bottom: var(--s-8);
}

/* --- Cards ------------------------------------------------------------- */
.card {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--s-6);
  margin-top: var(--s-6);
}

.card h2 {
  font-size: var(--t-lg);
  margin: 0 0 var(--s-6);
}

.card h3 {
  font-size: var(--t-base);
  margin: var(--s-8) 0 var(--s-3);
}

/* --- Form controls ----------------------------------------------------- */
label {
  display: block;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--s-4);
}

input, select, textarea {
  display: block;
  width: 100%;
  margin-top: var(--s-2);
  padding: var(--s-3);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-card);
  font: inherit;
  font-weight: 400;
  color: var(--ink-soft);
}

input:hover, select:hover, textarea:hover { border-color: var(--ink-mute); }

textarea {
  min-height: 8rem;
  resize: vertical;
}

/* Numeric fields read as data — mono keeps digits aligned. */
input[type="number"] { font-family: var(--mono); }

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}

.check {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin: var(--s-2) 0;
  font-size: var(--t-sm);
  font-weight: 400;
}

.check input {
  width: auto;
  margin: 0;
  accent-color: var(--amber);
}

/* --- Buttons ----------------------------------------------------------- */
button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: var(--s-3) var(--s-6);
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: background-color 120ms linear, border-color 120ms linear;
}

.primary {
  background: var(--amber);
  color: #ffffff;
}
.primary:hover { background: var(--amber-deep); }

.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.secondary:hover { border-color: var(--ink); }

button:disabled { opacity: 0.5; cursor: not-allowed; }
button:disabled:hover { background: var(--amber); border-color: var(--rule-strong); }
.secondary:disabled:hover { background: transparent; }

/* --- Results ----------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 0.85fr);
  gap: var(--s-6);
  align-items: start;
}

.result {
  position: sticky;
  top: var(--s-4);
}

.big {
  font-family: var(--mono);
  font-size: var(--t-xl);
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
  margin-top: var(--s-4);
}

.metrics div {
  background: var(--paper-sunk);
  border-radius: var(--radius);
  padding: var(--s-3);
}

.metrics span {
  display: block;
  font-size: var(--t-xs);
  color: var(--ink-mute);
}

.metrics strong {
  display: block;
  font-family: var(--mono);
  font-size: var(--t-md);
  font-weight: 500;
  color: var(--ink);
  margin-top: var(--s-1);
}

/* Rendered output that is an image rather than text (e.g. a QR canvas). */
.output canvas {
  display: block;
  margin-bottom: var(--s-4);
}

.output pre {
  white-space: pre-wrap;
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--s-4);
  font-family: var(--mono);
  font-size: var(--t-sm);
  line-height: var(--lh-body);
  color: var(--ink-soft);
  overflow: auto;
}

/* --- Notes and warnings ------------------------------------------------ */
.muted, .note {
  font-size: var(--t-sm);
  color: var(--ink-mute);
}

/* Input-validation warning. The result still renders alongside it; the
   warning says why that result should not be trusted. */
.warn {
  display: flex;
  gap: var(--s-3);
  background: var(--alert-soft);
  border: 1px solid var(--alert);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
  font-size: var(--t-sm);
  color: var(--alert);
}

.warn::before {
  content: "!";
  font-family: var(--mono);
  font-weight: 700;
  flex: none;
}

.warn:empty { display: none; }

/* --- Utility ----------------------------------------------------------- */
.hidden { display: none; }

footer {
  border-top: 1px solid var(--rule);
  margin-top: var(--s-16);
  padding-block: var(--s-6);
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--ink-mute);
  text-align: center;
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 60rem) {
  .grid { grid-template-columns: 1fr; }
  .result { position: static; }
}

@media (max-width: 44rem) {
  .two, .metrics { grid-template-columns: 1fr; }
  .card { padding: var(--s-4); }
  .wrap { padding-block: var(--s-6) var(--s-12); }
}
