/* Shared shell for /tools/ pages.
   Tenants: Culling Time Calculator, XMP Preset Inspector (.xpi-*). */

.tool-wrap { max-width: 46rem; margin: 0 auto; padding: clamp(6rem, 12vh, 9rem) var(--pad-x) 5rem; }
.tool-head { text-align: center; margin-bottom: 3rem; }
.tool-title {
  font-family: var(--f-display); font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 500; color: var(--highlight); line-height: 1.05; margin-top: 1rem;
}
.tool-title em { font-style: italic; color: var(--amber); }
.tool-lede { color: var(--dim); max-width: 34rem; margin: 1.2rem auto 0; font-size: 1.05rem; line-height: 1.6; }

.tool-card {
  border: 1px solid var(--line); border-radius: 0.8rem; background: var(--carbon-2);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.tool-field { margin-bottom: 1.8rem; }
.tool-field label {
  display: flex; justify-content: space-between; align-items: baseline;
  color: var(--silver); font-size: 0.95rem; margin-bottom: 0.6rem;
}
.tool-field output { color: var(--amber); font-size: 1.05rem; }
/* accent-color left the UNFILLED track at the browser default, which iOS paints
   near-white - a bright bar across a near-black page. Styling it means dropping
   accent-color, and WebKit has no filled-portion pseudo-element, so the fill is
   a gradient driven by --pct (set per slider in the tool's JS). 0% is a sane
   pre-JS state. Visual language follows .gp-slider in product.css; the thumb is
   bigger than that one because these are meant to be dragged with a thumb. */
.tool-field input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px; outline: none; cursor: pointer;
  background: linear-gradient(90deg,
    var(--amber) 0 var(--pct, 0%), var(--line) var(--pct, 0%) 100%);
}
.tool-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--amber); border: 0;
  box-shadow: 0 0 0 4px rgb(232 163 61 / 0.18);
}
.tool-field input[type="range"]::-moz-range-track { background: transparent; height: 4px; }
.tool-field input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--amber); border: 0;
  box-shadow: 0 0 0 4px rgb(232 163 61 / 0.18);
}
.tool-field input[type="range"]:focus-visible { outline: 2px solid var(--amber); outline-offset: 6px; }
.tool-hint { color: var(--dim); font-size: 0.6rem; letter-spacing: 0.08em; margin-top: 0.45rem; }

.tool-results {
  display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 1rem;
  margin-top: 2.2rem; padding-top: 1.8rem; border-top: 1px solid var(--line-soft);
}
.tool-stat { text-align: center; }
.tool-stat-num {
  display: block; font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--highlight);
}
.tool-stat.is-big .tool-stat-num { color: var(--amber); font-size: clamp(2rem, 5vw, 3.2rem); }
.tool-stat-label { color: var(--dim); font-size: 0.58rem; letter-spacing: 0.12em; }
.tool-verdict { text-align: center; color: var(--silver); margin-top: 1.4rem; font-size: 1rem; }

.tool-share { text-align: center; margin: 2rem 0; }
.tool-share .tool-hint { margin-top: 0.8rem; }

.tool-cta {
  border: 1px solid rgb(232 163 61 / 0.3); border-radius: 0.8rem;
  background: rgb(232 163 61 / 0.05); padding: 1.8rem; text-align: center; margin: 3rem 0;
}
.tool-cta p { color: var(--silver); max-width: 32rem; margin: 0.8rem auto 1.4rem; line-height: 1.6; }
.tool-cta strong { color: var(--highlight); }

.tool-method { margin-top: 3rem; }
.tool-method h2 {
  font-family: var(--f-display); font-size: 1.4rem; font-weight: 500;
  color: var(--highlight); margin-bottom: 0.8rem;
}
.tool-method p { color: var(--dim); line-height: 1.7; font-size: 0.95rem; }
/* Two paragraphs in a row ran together - the first tenant only ever had one. */
.tool-method p + p { margin-top: 0.9rem; }
/* site.css:92 is `a { color: inherit; text-decoration: none }`, so every prose
   container styles its own links or they are invisible. */
.tool-method a { color: var(--amber); text-decoration: underline; text-underline-offset: 0.2em; }

@media (max-width: 620px) {
  .tool-results { grid-template-columns: 1fr; gap: 1.4rem; }
}

/* --- /tools/ index -------------------------------------------------------- */

.tool-index { display: grid; gap: 1rem; }
.tool-index-card {
  display: block; text-decoration: none;
  border: 1px solid var(--line); border-radius: 0.8rem; background: var(--carbon-2);
  padding: clamp(1.5rem, 4vw, 2.2rem); transition: border-color 0.15s, background 0.15s;
}
.tool-index-card:focus-visible { border-color: var(--amber); background: rgb(232 163 61 / 0.05); }
@media (hover: hover) {
  .tool-index-card:hover { border-color: var(--amber); background: rgb(232 163 61 / 0.05); }
}
.tool-index-card h2 {
  font-family: var(--f-display); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 500;
  color: var(--highlight); margin: 0.6rem 0 0.8rem; line-height: 1.2;
}
.tool-index-card p { color: var(--dim); line-height: 1.65; font-size: 0.95rem; }
.tool-index-go { display: inline-block; margin-top: 1.2rem; color: var(--amber); font-size: 0.62rem; letter-spacing: 0.12em; }

/* --- XMP Preset Inspector ------------------------------------------------- */

.xpi-drop {
  border: 1px dashed var(--line); border-radius: 0.8rem; background: var(--carbon-2);
  padding: clamp(2.5rem, 8vw, 4rem) 1.5rem; text-align: center; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.xpi-drop:focus-visible, .xpi-drop.is-over { border-color: var(--amber); background: rgb(232 163 61 / 0.05); }
@media (hover: hover) {
  .xpi-drop:hover { border-color: var(--amber); background: rgb(232 163 61 / 0.05); }
}
.xpi-drop.is-over { border-style: solid; }
.xpi-drop-main { color: var(--highlight); font-size: 1.15rem; margin-bottom: 0.6rem; }

.xpi-sample-line { text-align: center; color: var(--dim); font-size: 0.9rem; margin-top: 1rem; }
.xpi-link {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: var(--amber); text-decoration: underline; text-underline-offset: 0.2em;
}
.xpi-err {
  margin-top: 1.5rem; padding: 1rem 1.2rem; border-radius: 0.6rem;
  border: 1px solid rgb(220 90 80 / 0.4); background: rgb(220 90 80 / 0.07);
  color: var(--silver); text-align: center; font-size: 0.95rem;
}

.xpi-out { margin-top: 2.5rem; }
.xpi-result-head { text-align: center; margin-bottom: 2.5rem; }
.xpi-name {
  font-family: var(--f-display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 500;
  color: var(--highlight); margin: 0.6rem 0 0.4rem; line-height: 1.15;
}
.xpi-desc { color: var(--dim); font-style: italic; margin-top: 0.8rem; }
.xpi-summary {
  color: var(--silver); max-width: 34rem; margin: 1.2rem auto 0; line-height: 1.6;
}

.xpi-section {
  border: 1px solid var(--line); border-radius: 0.8rem; background: var(--carbon-2);
  padding: clamp(1.2rem, 3vw, 1.8rem); margin-bottom: 1rem;
}
.xpi-section h3 {
  font-family: var(--f-display); font-size: 1.1rem; font-weight: 500;
  color: var(--amber); margin-bottom: 1rem;
}
.xpi-rows {
  display: grid; grid-template-columns: minmax(9rem, auto) 1fr;
  gap: 0.7rem 1.2rem; margin: 0; align-items: center;
}
.xpi-rows dt { color: var(--silver); font-size: 0.92rem; }
.xpi-rows dd { margin: 0; display: flex; align-items: center; gap: 0.9rem; }
.xpi-val { color: var(--highlight); font-size: 0.9rem; min-width: 4.5rem; }

.xpi-bar {
  position: relative; flex: 1; height: 3px; border-radius: 2px;
  background: var(--line); min-width: 3rem;
}
.xpi-bar-fill { position: absolute; top: 0; height: 100%; border-radius: 2px; background: var(--amber); min-width: 2px; }

.xpi-untouched { background: none; border-style: dashed; }
.xpi-untouched p { color: var(--dim); font-size: 0.92rem; line-height: 1.6; }

@media (max-width: 620px) {
  .xpi-rows { grid-template-columns: 1fr; gap: 0.3rem; }
  .xpi-rows dd { margin-bottom: 0.7rem; }
}
