/* Free tools — shared layout on top of site.css */

.tool-narrow { max-width: 720px; }

.tool-hero { position: relative; padding: 112px 0 72px; }
.tool-hero::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 520px; pointer-events: none;
  background:
    radial-gradient(520px 320px at 50% 0%, rgba(216, 168, 240, .16), transparent 70%),
    radial-gradient(380px 240px at 85% 40%, rgba(255, 138, 61, .07), transparent 70%);
}
.tool-hero .container { position: relative; }

.crumbs { display: flex; gap: 8px; color: var(--subtle); font-size: 13px; margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }

.tool-hero h1 { font-size: clamp(38px, 6vw, 62px); margin-bottom: 16px; }
.h1-sub {
  display: block; margin-top: 14px;
  font-family: var(--font-body); font-size: 15px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.tool-hero .lead { margin: 0 0 28px; max-width: 600px; }

/* ---------- Form ---------- */
.tool-card {
  display: grid; gap: 18px; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
  border: 1px solid var(--border); box-shadow: inset 0 1px 0 var(--highlight);
}
.field { display: grid; gap: 8px; min-width: 0; }
.field-label { font-family: var(--font-head); font-weight: 500; font-size: 16px; }
.field-label em { font-style: normal; font-family: var(--font-body); font-size: 12px; color: var(--subtle); margin-left: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field input {
  width: 100%; min-width: 0; height: 52px; padding: 0 16px; border-radius: 16px;
  background: rgba(0, 0, 0, .45); border: 1px solid var(--border-strong); color: var(--text);
  font: 500 17px/1 var(--font-body); color-scheme: dark; -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.field-date input { height: 60px; font-size: 20px; font-family: var(--font-head); }
.field input::placeholder { color: var(--subtle); }
.field input:focus { outline: none; border-color: var(--lilac); box-shadow: 0 0 0 4px rgba(216, 168, 240, .18); }
.field input::-webkit-date-and-time-value { text-align: left; }

.toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; color: var(--muted); font-size: 15px; justify-self: start; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-ui { position: relative; width: 44px; height: 26px; flex-shrink: 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); transition: background .2s; }
.toggle-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.toggle input:checked + .toggle-ui { background: var(--lilac); border-color: var(--lilac); }
.toggle input:checked + .toggle-ui::after { transform: translateX(18px); background: #000; }
.toggle input:focus-visible + .toggle-ui { box-shadow: 0 0 0 4px rgba(216, 168, 240, .3); }

.field-error { color: #ff9b9b; font-size: 14px; }

/* ---------- Result ---------- */
.result { margin-top: 28px; scroll-margin-top: 84px; animation: pop .45s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.result-head {
  text-align: center; padding: 36px 24px; border-radius: var(--radius);
  background: radial-gradient(420px 200px at 50% 0%, rgba(216, 168, 240, .2), transparent 70%), linear-gradient(180deg, #161616, #0a0a0a);
  border: 1px solid var(--border); box-shadow: inset 0 1px 0 var(--highlight);
}
.result-kicker { color: var(--muted); font-size: 16px; }
.result-big { font-family: var(--font-head); font-weight: 600; font-size: clamp(30px, 6vw, 44px); line-height: 1.15; margin: 8px 0 12px; }
.result-days {
  display: inline-block; padding: 6px 16px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  font-family: var(--font-head); font-size: 16px; color: var(--pink);
}

/* 5 stats: months + weeks on top, hours / minutes / seconds below */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 14px; }
.stat { grid-column: span 2; }
.stat:nth-child(-n+2) { grid-column: span 3; }
.stat { padding: 18px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.stat b { display: block; font-family: var(--font-head); font-weight: 600; font-size: 24px; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat span { color: var(--muted); font-size: 13.5px; }

.result-h { font-size: 24px; margin: 32px 0 14px; }
.milestones { list-style: none; display: grid; gap: 10px; }
.milestones li {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
}
.ms-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; font-size: 19px; background: var(--surface-2); }
.ms-ico.anniv { background: var(--pink); }
.ms-ico.round { background: var(--lilac); }
.ms-text { flex: 1; min-width: 0; }
.ms-text strong { display: block; font-family: var(--font-head); font-weight: 500; font-size: 17px; }
.ms-text small { color: var(--subtle); font-size: 13px; }
.ms-left { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--muted); white-space: nowrap; }
.milestones li.today { border-color: var(--lilac); }
.milestones li.today .ms-left { color: var(--lilac); }

.tool-cta {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  margin-top: 28px; padding: 24px; border-radius: var(--radius);
  background: radial-gradient(500px 200px at 0% 0%, rgba(216, 168, 240, .16), transparent 70%), linear-gradient(180deg, #181818, #0b0b0b);
  border: 1px solid var(--border-strong); box-shadow: inset 0 1px 0 var(--highlight);
}
.tool-cta img { width: 72px; height: auto; }
.tool-cta h2 { font-size: 22px; margin-bottom: 4px; }
.tool-cta p { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.btn-cta { padding: 15px 24px; font-size: 17px; white-space: nowrap; }

.share-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px auto 0;
  background: none; border: 0; color: var(--muted); font-size: 15px; padding: 10px 14px; border-radius: 999px;
}
.share-btn:hover { color: var(--text); background: var(--surface); }
.share-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Content ---------- */
.prose h2 { font-size: clamp(28px, 4vw, 38px); margin: 0 0 14px; }
.prose h2 + p { margin-top: 0; }
.prose p { color: var(--muted); font-size: 17px; margin-bottom: 16px; }
.prose p + h2, .table-wrap + h2 { margin-top: 56px; }
.prose a, .faq details a { color: var(--lilac); text-decoration: underline; text-underline-offset: 3px; }

.table-wrap { overflow-x: auto; margin-top: 24px; border-radius: 20px; border: 1px solid var(--border); }
.ms-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ms-table th, .ms-table td { text-align: left; padding: 14px 16px; vertical-align: top; }
.ms-table th { font-family: var(--font-head); font-weight: 500; color: var(--muted); background: var(--surface); }
.ms-table td { color: var(--muted); border-top: 1px solid var(--border); }
.ms-table td:first-child { color: var(--text); font-family: var(--font-head); font-weight: 500; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { .result { animation: none; } }

@media (max-width: 600px) {
  .tool-hero { padding: 92px 0 56px; }
  .tool-card { padding: 20px; gap: 16px; border-radius: 24px; }
  .field-row { grid-template-columns: 1fr; gap: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat, .stat:nth-child(-n+2) { grid-column: auto; }
  .stat:last-child { grid-column: 1 / -1; }
  .stat b { font-size: 21px; }
  .result-head { padding: 28px 18px; border-radius: 24px; }
  .tool-cta { grid-template-columns: auto 1fr; padding: 20px; border-radius: 24px; }
  .tool-cta img { width: 56px; }
  .btn-cta { grid-column: 1 / -1; width: 100%; }
  .ms-table td:nth-child(3), .ms-table th:nth-child(3) { display: none; }
  .footer-cols { flex-wrap: wrap; gap: 32px 48px; }
}
