/* Shared styles for nugaapp.com's free tools (/contraction-timer, /kick-counter).
   Builds on guides/guide.css + week/week.css tokens (cream / ink / terracotta /
   sage). The dial echoes the app's own timers: a ring that fills, a serif
   number, one line under it. */

.tool-hero {
  padding: 44px 0 26px;
  text-align: center;
}
.tool-hero .subtitle {
  color: var(--muted);
  font-size: 18px;
  max-width: 52ch;
  margin: 0 auto;
}

.tool {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 22px;
  align-items: start;
}
.panel {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 26px 50px -38px color-mix(in srgb, var(--ink-soft) 35%, transparent);
}
.tool-side {
  display: grid;
  gap: 22px;
}
.field-label {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}

/* ---------- the dial ---------- */

.tool-main {
  text-align: center;
}
.dial {
  position: relative;
  display: block;
  width: min(100%, 300px);
  aspect-ratio: 1;
  margin: 6px auto 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.dial-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.dial-track {
  fill: none;
  stroke: color-mix(in srgb, var(--ink) 9%, transparent);
  stroke-width: 7;
}
.dial-fill {
  fill: none;
  stroke: var(--sage-dark);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.45s ease;
}
.dial-face {
  position: absolute;
  inset: 13%;
  display: grid;
  place-content: center;
  gap: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fffdf9, #f4eee2);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 18px 40px -24px color-mix(in srgb, var(--ink) 40%, transparent);
  transition:
    background 0.3s ease,
    transform 0.15s ease;
}
.dial:active .dial-face {
  transform: scale(0.985);
}
.dial.is-on .dial-face {
  background: radial-gradient(circle at 50% 35%, #5f7d61, #4f6f51);
}
.dial-top {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.dial-big {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: clamp(54px, 9vw, 72px);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.dial-sub {
  font-size: 14px;
  color: var(--muted);
}
.dial.is-on .dial-top,
.dial.is-on .dial-sub {
  color: color-mix(in srgb, #fffdf9 82%, transparent);
}
.dial.is-on .dial-big {
  color: #fffdf9;
}
.dial:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 4px;
}
.dial-hint {
  margin: 18px 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
}
.tool-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}
.ghost {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.ghost:hover:not(:disabled) {
  border-color: #d6c6a6;
}
.ghost:disabled {
  opacity: 0.45;
  cursor: default;
}
.ghost:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}
.private {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- stats, checks, log ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.stats div {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 12px;
  border-radius: 14px;
  background: var(--cream);
}
.stats strong {
  white-space: nowrap;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stats span {
  font-size: 12.5px;
  color: var(--muted);
}
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.checks li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
}
.checks li::before {
  content: none;
}
.checks .tick {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid #cdbfa6;
  display: grid;
  place-items: center;
}
.checks li.ok .tick {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
}
.checks li.ok .tick::after {
  content: "";
  width: 9px;
  height: 5px;
  border: solid #fffdf9;
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg);
}
.checks b {
  display: block;
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
}
.checks small {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
}
.checks-note {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}
.checks-note.is-met {
  color: var(--ink);
  font-weight: 600;
}
.log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow: auto;
}
.log li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  margin: 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.log li::before {
  content: none;
}
.log li:first-child {
  border-top: 0;
}
.log b {
  flex: none;
  min-width: 74px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.log span {
  color: var(--muted);
}
.log-empty {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* ---------- the reading below the tool ---------- */

.below {
  max-width: 680px;
  margin: 64px auto 0;
  padding: 0 28px;
}

/* ---------- safety ---------- */

.call-now {
  max-width: 924px;
  margin: 22px auto 0;
  padding: 24px 28px;
  border: 1px solid color-mix(in srgb, var(--terracotta-dark) 35%, var(--line));
  border-radius: 22px;
  background: color-mix(in srgb, var(--terracotta) 6%, var(--cream-2));
}
.call-now h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--terracotta-dark);
}
.call-now p {
  margin: 0 0 8px;
  color: var(--ink-soft);
}
.call-now ul {
  margin: 0 0 8px;
  padding-left: 1.2em;
  columns: 2;
  column-gap: 32px;
}
.call-now li {
  break-inside: avoid;
}
.call-now-foot {
  font-weight: 600;
}
.alert-card {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--terracotta-dark);
  background: color-mix(in srgb, var(--terracotta) 9%, var(--cream-2));
  color: var(--ink);
  font-size: 15px;
  text-align: left;
}
.alert-card b {
  display: block;
  margin-bottom: 2px;
  color: var(--terracotta-dark);
}

@media (max-width: 820px) {
  .tool {
    grid-template-columns: 1fr;
    padding: 0 18px;
  }
  .call-now {
    margin: 22px 18px 0;
  }
  .call-now ul {
    columns: 1;
  }
  .below {
    margin-top: 48px;
    padding: 0 22px;
  }
}
@media (max-width: 420px) {
  .panel {
    padding: 20px;
  }
  .stats {
    gap: 8px;
  }
  .stats div {
    padding: 11px 10px;
  }
  .stats strong {
    font-size: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dial-fill,
  .dial-face {
    transition: none;
  }
}
