/* Rīki — the toolbox index and the Perekupu kalkulators. Light palette only. */

/* ── Toolbox index ─────────────────────────────────────────────────────── */
.tools { padding-top: 14px; padding-bottom: 60px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tool-card {
  position: relative; display: grid; gap: 6px; align-content: start;
  padding: 18px 18px 16px 18px; min-height: 220px;
  background: var(--field-strong); border: var(--outline); box-shadow: var(--offset);
  color: var(--ink); text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
a.tool-card:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--orange); }
.tool-card--soon { opacity: .62; }
.tool-card__sticker {
  justify-self: end; width: 96px; height: 96px; object-fit: contain; margin: -6px -4px 0 0;
  transform: rotate(6deg); filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(2px 4px 3px rgba(0, 0, 0, .25));
  background: none;
}
.tool-card__name { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 28px; line-height: 1; text-transform: uppercase; }
.tool-card__pitch { font-size: 14px; color: var(--ink-soft); }
.tool-card__go { margin-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.tool-card--soon .tool-card__go { color: var(--ink-mute); }

/* ── Calculator page ───────────────────────────────────────────────────── */
.pk { padding-top: 12px; padding-bottom: 80px; }
.pk-crumbs { font-size: 12px; color: var(--ink-mute); margin-bottom: 6px; }
.pk-crumbs a { color: inherit; }
.pk-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; margin-bottom: 18px; border-bottom: 3px solid var(--ink); padding-bottom: 12px; }
.pk-head h1 { font-size: clamp(40px, 6vw, 84px); line-height: .9; margin: 0 0 8px; }
.pk-head p { margin: 0; max-width: 62ch; color: var(--ink-soft); }
.pk-head__sticker { width: 130px; height: 130px; object-fit: contain; transform: rotate(-8deg); background: none; filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(3px 5px 4px rgba(0, 0, 0, .3)); }

.pk-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 26px; align-items: start; }
.pk-form { display: grid; gap: 16px; }
.pk-group { margin: 0; padding: 14px 16px 16px; background: var(--field-strong); border: var(--outline); box-shadow: var(--offset-sm); }
.pk-group legend {
  display: flex; align-items: center; gap: 8px; padding: 2px 10px; margin-left: -4px;
  background: var(--paper); border: 2px solid var(--ink);
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 20px; text-transform: uppercase;
}
.pk-step { display: inline-grid; place-items: center; width: 22px; height: 22px; background: var(--ink); color: var(--paper); font-size: 13px; font-style: normal; }
.pk-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 14px; margin-top: 8px; }
.pk-field { display: grid; gap: 4px; align-content: start; }
.pk-field label { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--ink); }
.pk-input { position: relative; display: block; }
.pk-input .input { width: 100%; padding-right: 64px; }
.pk-unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ink-mute); pointer-events: none; }
.pk-hint { font-size: 12px; color: var(--ink-mute); }
.pk-group--pirkums .pk-fields { grid-template-columns: minmax(0, 1fr); }
.pk-group--pirkums .input { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 28px; height: auto; padding-top: 6px; padding-bottom: 6px; }
.pk-routes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.chip { padding: 5px 10px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.chip:hover { background: var(--field-strong); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.pk-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pk-disclaimer { margin: 0; font-size: 12px; color: var(--ink-mute); max-width: 70ch; }

/* ── Result column ─────────────────────────────────────────────────────── */
.pk-result { position: sticky; top: calc(var(--header-h) + 12px); display: grid; gap: 16px; }

/* Thermal receipt with torn edges. */
.receipt {
  --tear: 8px;
  position: relative;
  padding: 18px 18px 20px;
  background: #fffefa;
  color: #222;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px; line-height: 1.45;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .45);
  transform: rotate(-.8deg);
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(var(--tear) * 2) var(--tear) repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tear) * 2) var(--tear) repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--tear)) no-repeat;
  mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(var(--tear) * 2) var(--tear) repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tear) * 2) var(--tear) repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--tear)) no-repeat;
}
.receipt__head { margin: 6px 0 10px; text-align: center; font-weight: 700; letter-spacing: .08em; }
.receipt__group { margin: 10px 0 2px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.receipt__row { display: flex; justify-content: space-between; gap: 10px; }
.receipt__row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt__row span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.receipt__row--sub { color: #777; border-top: 1px dashed #bbb; margin-top: 2px; padding-top: 2px; }
.receipt__row--big { font-weight: 700; font-size: 14px; }
.receipt__total { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 2px dashed #222; font-weight: 700; font-size: 15px; }
.receipt__foot { margin: 10px 0 4px; text-align: center; color: #777; }

/* The yellow "PĀRDOD" sign in the car window. */
.forsale {
  position: relative; display: grid; justify-items: center; gap: 2px;
  padding: 16px 14px 14px;
  background: var(--amber); color: var(--ink);
  border: 3px solid var(--ink); box-shadow: var(--offset);
  transform: rotate(1.2deg);
}
.forsale::before, .forsale::after { content: ""; position: absolute; top: -10px; width: 56px; height: 20px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(0, 0, 0, .08); }
.forsale::before { left: 14px; transform: rotate(-8deg); }
.forsale::after { right: 14px; transform: rotate(8deg); }
.forsale__word { font-family: var(--font-display); font-style: normal; font-weight: 800; font-size: 26px; letter-spacing: .14em; }
.forsale__price { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: clamp(54px, 7vw, 80px); line-height: .95; }
.forsale__note { font-size: 12px; font-weight: 700; }

.verdict { display: grid; gap: 4px; padding: 12px 14px; background: var(--field-strong); border: var(--outline); }
.verdict div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.verdict div b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.verdict__line { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--rule-soft); font-size: 15px; }
.verdict__line b { color: var(--accent-ink); }

.market { padding: 10px 12px; font-size: 14px; background: color-mix(in srgb, #2f9e44 14%, var(--paper)); border-left: 4px solid #2f9e44; }
.market--over { background: color-mix(in srgb, var(--orange) 14%, var(--paper)); border-left-color: var(--orange); }

/* Million counter: an odometer. */
.million { padding: 14px; background: var(--field-strong); border: var(--outline); box-shadow: var(--offset-sm); text-align: center; }
.million__odo { display: inline-flex; gap: 3px; padding: 6px; background: var(--ink); border-radius: 4px; }
.million__odo i {
  display: grid; place-items: center; width: 30px; height: 42px;
  background: linear-gradient(#fff 0 48%, #e9e4d6 52% 100%); color: var(--ink);
  font-family: var(--font-display); font-style: normal; font-weight: 800; font-size: 30px;
}
.million__odo i:last-child { background: linear-gradient(#fff 0 48%, #f2d5c8 52% 100%); color: var(--burgundy); }
.million__odo--never i { width: 60px; font-size: 34px; }
.million__lead { margin: 10px 0 2px; font-size: 16px; }
.million__lead b { font-family: var(--font-display); font-style: italic; font-size: 22px; }
.million__when { margin: 0; font-size: 14px; color: var(--ink-soft); }

.rank { display: grid; gap: 2px; justify-items: start; padding: 10px 14px; background: var(--ink); color: var(--paper); transform: rotate(-.6deg); }
.rank__label { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.rank b { font-family: var(--font-display); font-style: italic; font-size: 26px; text-transform: uppercase; line-height: 1; }
.rank span:last-child { font-size: 13px; opacity: .85; }
.shirts { margin: 0; font-size: 13px; color: var(--ink-soft); }

/* Phone price bar (hidden on wide screens, where the result column is sticky). */
.pk-bar { display: none; }
@media (max-width: 980px) {
  .pk-layout { grid-template-columns: minmax(0, 1fr); }
  .pk-result { position: static; scroll-margin-top: calc(var(--header-h) + 10px); }
  .pk-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: var(--amber); color: var(--ink); border-top: 3px solid var(--ink);
    text-decoration: none; font-size: 13px; font-weight: 700;
    transition: transform .2s ease;
  }
  .pk-bar[data-hidden] { transform: translateY(110%); }
  .pk-bar:hover { color: var(--ink); }
  .pk-bar b { font-family: var(--font-display); font-style: italic; font-size: 22px; }
  .pk-bar__go { padding: 4px 8px; background: var(--ink); color: var(--paper); }
  body:has(.pk-bar) .site-footer { padding-bottom: 70px; }
}
@media (max-width: 560px) {
  .pk-head { grid-template-columns: minmax(0, 1fr); }
  .pk-head__sticker { display: none; }
  .million__odo i { width: 24px; height: 36px; font-size: 24px; }
}

/* ── Shared bits for the newer tools ───────────────────────────────────── */
.tool-page .pk-head { margin-bottom: 16px; }
.pk-check { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 10px; font-weight: 700; font-size: 14px; }
.pk-check .pk-hint { flex-basis: 100%; margin-left: 26px; font-weight: 400; }
.pk-group .pk-check + .pk-field, .pk-group .pk-field + .pk-check { margin-top: 14px; }
.chip--on, a.chip.chip--on { background: var(--ink); color: var(--paper); }
a.chip { display: inline-block; text-decoration: none; }

/* ── Kura beha tu esi? ─────────────────────────────────────────────────── */
.beha { max-width: 720px; padding: 18px; background: var(--field-strong); border: var(--outline); box-shadow: var(--offset); }
.beha__progress { margin: 0 0 6px; font-weight: 700; color: var(--ink-mute); }
.beha__bar { height: 8px; margin-bottom: 14px; background: var(--paper); border: 2px solid var(--ink); }
.beha__bar span { display: block; height: 100%; background: var(--orange); transition: width .3s ease; }
.beha__q { font-size: clamp(28px, 5vw, 40px); margin: 0 0 14px; }
.beha__answers { display: grid; gap: 10px; }
.beha .quiz__option, .beha__answers .quiz__option {
  min-height: 56px; padding: 12px 14px; text-align: left;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink);
  font: inherit; font-size: 17px; font-weight: 700; cursor: pointer;
}
.beha .quiz__option:hover { background: var(--amber); }
.beha-result {
  position: relative; max-width: 760px; padding: 22px 22px 20px;
  background: var(--field-strong); border: var(--outline); box-shadow: 8px 8px 0 var(--orange);
}
.beha-result__kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); }
.beha-result__model { margin: 0; font-size: clamp(72px, 16vw, 150px); line-height: .85; }
.beha-result__title { margin: 6px 0 12px; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: clamp(26px, 4vw, 36px); text-transform: uppercase; }
.beha-result__text { font-size: 18px; max-width: 60ch; }
.beha-result__sat { padding: 10px 12px; background: var(--paper); border-left: 4px solid var(--orange); }
.beha-result__design { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 10px; background: var(--paper); border: 2px solid var(--ink); color: var(--ink); text-decoration: none; }
.beha-result__design img { width: 110px; height: 110px; object-fit: contain; background: none; filter: none; }
.beha-result__design:hover { color: var(--ink); background: var(--amber); }
.beha-result__actions { margin-top: 14px; }
.beha-others { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 18px; }
.beha-others > span { font-size: 13px; color: var(--ink-mute); margin-right: 4px; }

/* ── Sludinājumu tulks ─────────────────────────────────────────────────── */
.tulks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.tulks__form { display: grid; gap: 8px; padding: 16px; background: var(--field-strong); border: var(--outline); box-shadow: var(--offset-sm); }
.tulks__label { font-weight: 700; font-size: 13px; }
.tulks__form .textarea { width: 100%; font-size: 16px; }
.tulks__out { padding: 16px; background: var(--paper); border: var(--outline); box-shadow: var(--offset-sm); min-height: 200px; }
.tulks__empty { margin: 0; color: var(--ink-mute); }
.tulks__meter { height: 18px; border: 2px solid var(--ink); background: var(--field-strong); }
.tulks__meter span { display: block; height: 100%; background: #e03131; }
.tulks__meter span[data-level="ok"] { background: var(--amber); }
.tulks__meter span[data-level="good"] { background: #2f9e44; }
.tulks__score { margin: 8px 0 2px; font-size: 18px; }
.tulks__score b { font-family: var(--font-display); font-style: italic; font-size: 30px; }
.tulks__verdict { margin: 0 0 12px; font-weight: 700; }
.tulks__text { padding: 12px; background: var(--field-strong); border: 1px dashed var(--ink-mute); line-height: 1.7; white-space: pre-wrap; }
.tulks__text mark { padding: 1px 3px; background: color-mix(in srgb, var(--amber) 70%, transparent); color: var(--ink); cursor: help; }
.tulks__text sup { margin-right: 2px; font-size: 10px; font-weight: 700; color: var(--accent-ink); }
.tulks__list { margin: 14px 0 0; padding-left: 1.4em; display: grid; gap: 8px; }
.tulks__list q { display: block; font-weight: 700; }
.tulks__list q::before, .tulks__list q::after { content: '"'; }
.tulks__list span { color: var(--ink-soft); }
@media (max-width: 860px) { .tulks { grid-template-columns: minmax(0, 1fr); } }

/* ── Desmitnieka meklētājs ─────────────────────────────────────────────── */
.tenmm { display: grid; gap: 10px; }
.tenmm__status { display: flex; flex-wrap: wrap; gap: 8px 18px; min-height: 44px; align-items: center; padding: 8px 12px; background: var(--ink); color: var(--paper); font-size: 15px; }
.tenmm__status b { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--amber); }
.tenmm__floor {
  position: relative; height: min(70vh, 620px); min-height: 380px; overflow: hidden;
  background-color: #8d8a84;
  background-image:
    radial-gradient(ellipse at 30% 40%, rgba(0, 0, 0, .14), transparent 45%),
    radial-gradient(ellipse at 70% 75%, rgba(40, 30, 10, .18), transparent 40%),
    radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.5px);
  background-size: 100% 100%, 100% 100%, 5px 5px;
  border: var(--outline); box-shadow: inset 0 0 40px rgba(0, 0, 0, .35);
}
.tenmm__intro, .tenmm__done { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 20px; text-align: center; color: #fff; text-shadow: 0 1px 2px #000; }
.tenmm__intro p { margin: 0; font-size: 20px; font-weight: 700; }
.socket {
  position: absolute; left: 0; top: 0;
  width: calc(54px * var(--s)); height: calc(54px * var(--s));
  margin: calc(-27px * var(--s)) 0 0 calc(-27px * var(--s));
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fafafa, #bfc3c7 45%, #7d8186 75%, #5c6065);
  border: 2px solid #3b3e42; box-shadow: 2px 4px 6px rgba(0, 0, 0, .45), inset 0 0 0 calc(10px * var(--s)) rgba(0, 0, 0, .08);
  transform: rotate(var(--r)); cursor: pointer; padding: 0;
  transition: transform .15s ease;
}
/* Seen from the side: chrome barrel with the size stamped on it. */
.socket span {
  display: grid; place-items: center; min-width: 62%; height: 46%; padding: 0 3px;
  background: rgba(255, 255, 255, .55); border-radius: 3px;
  font-family: var(--font-display); font-style: normal; font-weight: 800; font-size: calc(19px * var(--s)); line-height: 1; color: #1c1e21;
}
.socket:hover { transform: rotate(var(--r)) scale(1.08); }
.socket.is-found { background: radial-gradient(circle, #ffe08a, var(--amber)); transform: rotate(0) scale(1.4); }
.socket.is-wrong { animation: socket-shake .35s ease; background: radial-gradient(circle, #ffb3ad, #e03131); }
@keyframes socket-shake { 25% { transform: rotate(var(--r)) translateX(-5px); } 75% { transform: rotate(var(--r)) translateX(5px); } }
.tenmm__time { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 30px; }
.tenmm__time b { font-size: 96px; line-height: .9; color: var(--amber); }
.tenmm__rank { margin: 4px 0; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 32px; text-transform: uppercase; }
.tenmm__done p { margin: 0; }
.tenmm__best { opacity: .85; font-size: 15px; }
.tenmm__start { justify-self: center; min-width: 220px; min-height: 52px; }
.tenmm.is-playing .tenmm__intro { display: none; }

/* ── Ceļa naudas dalītājs ──────────────────────────────────────────────── */
.split__big { display: grid; justify-items: center; padding: 16px; background: var(--amber); border: 3px solid var(--ink); box-shadow: var(--offset); text-align: center; }
.split__big span { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.split__big b { font-family: var(--font-display); font-style: italic; font-size: clamp(56px, 8vw, 84px); line-height: .95; }
.split__big small { font-weight: 700; font-size: 13px; }
[data-split-result] { display: grid; gap: 14px; }
.split__people { list-style: none; margin: 0; padding: 0; border: var(--outline); background: var(--paper); }
.split__people li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--rule-soft); }
.split__people li:last-child { border-bottom: 0; }
.split__people small { color: var(--ink-mute); }
.coffee { display: grid; gap: 8px; justify-items: start; }
.coffee__out { margin: 0; min-height: 1.4em; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 26px; }
.coffee__out.is-spinning { color: var(--ink-mute); }

/* ── Rūsas rādītājs ────────────────────────────────────────────────────── */
.rust { display: grid; gap: 12px; padding: 16px; background: var(--field-strong); border: var(--outline); box-shadow: var(--offset); }
.rust__gauge { position: relative; height: 26px; border: 2px solid var(--ink); background: linear-gradient(90deg, #2f9e44, var(--amber) 45%, #b5651d 70%, #6b2d0c); }
.rust__gauge span { position: absolute; top: -8px; bottom: -8px; left: var(--rust); width: 6px; margin-left: -3px; background: var(--ink); box-shadow: 0 0 0 2px var(--paper); transition: left .4s ease; }
.rust__winters { margin: 6px 0 0; font-family: var(--font-display); font-style: italic; font-size: 34px; text-align: center; }
.rust__winters b { font-size: 110px; line-height: .85; color: #b5651d; }
.rust__until { margin: 0; text-align: center; color: var(--ink-soft); }
.rust__tips { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: 14px; }
.rust__spots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
