.ic-calc { --src: url("/icons/calc.svg"); }

.calc-hero { padding: 44px 0 36px; }
.calc-hero h1 {
  font-family: "DM Davit Guramishvili", "FiraGO", sans-serif;
  font-size: clamp(36px, 4.6vw, 62px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.calc-hero .lead {
  margin-top: 16px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.65;
  max-width: 62ch;
}
.calc-hero .chips { margin-top: 18px; margin-bottom: 0; }
.calc-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--dim);
  font-size: 12px;
  margin-bottom: 18px;
}
.calc-crumb a { color: var(--brand); }
.calc-crumb a:hover { text-decoration: underline; }

.calc-hub { padding: 56px 0 72px; }
.calc-group { margin-top: 36px; }
.calc-group:first-child { margin-top: 0; }
.calc-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.calc-group-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}
.calc-group-head p { color: var(--dim); font-size: 13px; }

.calc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
a.calc-tile {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 22px;
  padding: 22px 22px 20px;
  min-height: 220px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
a.calc-tile:hover {
  background: #111827;
  border-color: #111827;
  color: #fff;
  transform: translateY(-3px);
}
a.calc-tile:hover p,
a.calc-tile:hover .calc-tile-go { color: #d1d5db; }
.calc-tile .icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--tint);
  color: #0d9488;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.calc-tile[data-tone="cycle"] .icon { background: #fff1f2; color: #e11d48; }
html[data-theme="dark"] .calc-tile[data-tone="cycle"] .icon { background: #1f2937; color: #fb7185; }
a.calc-tile:hover .icon {
  background: #0d9488;
  color: #fff;
}
a.calc-tile[data-tone="cycle"]:hover .icon { background: #e11d48; color: #fff; }
.calc-tile h3 {
  font-size: 18px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.calc-tile p {
  color: var(--paper-body);
  font-size: 13.5px;
  line-height: 1.55;
}
.calc-tile-go {
  margin-top: 16px;
  color: #0d9488;
  font-size: 13px;
  font-weight: 600;
}
a.calc-tile[data-tone="cycle"] .calc-tile-go { color: #e11d48; }
html[data-theme="dark"] a.calc-tile[data-tone="cycle"] .calc-tile-go { color: #fb7185; }

.calc-stage { padding: 28px 0 64px; }
.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.calc-card,
.calc-result {
  background: var(--paper-card);
  border: 1px solid var(--paper-line);
  border-radius: 24px;
  padding: 22px;
}
.calc-card { overflow: visible; }
.calc-card h2,
.calc-result h2 {
  font-size: 18px;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.calc-field { margin-bottom: 14px; }
.calc-field label,
.calc-field .lbl {
  display: block;
  color: var(--paper-dim);
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.calc-field input[type="date"],
.calc-field input[type="number"],
.calc-field select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--paper-line);
  background: var(--paper);
  color: var(--paper-text);
  border-radius: 14px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
}

.mc-date { position: relative; z-index: 1; }
.mc-date.is-open { z-index: 8; }
.mc-date-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.mc-date-btn {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr 22px;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--paper-line);
  background: var(--paper);
  border-radius: 16px;
  padding: 10px 14px;
  cursor: pointer;
  font-family: inherit;
}
.mc-date-btn small {
  display: block;
  color: var(--paper-dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.mc-date-btn b {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.mc-date-btn .ic { color: #0d9488; justify-self: end; }
.mc-date.has-value .mc-date-btn { border-color: #0d9488; }
.mc-date.is-open .mc-date-btn {
  border-color: #0d9488;
  outline: 2px solid #0d9488;
  outline-offset: 1px;
}
.mc-date.is-invalid .mc-date-btn { border-color: #e11d48; }
html[data-theme="dark"] .mc-date.is-invalid .mc-date-btn { border-color: #fb7185; }

.mc-cal {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 22px;
  padding: 12px;
}
.mc-cal button { font-family: inherit; }
.mc-cal-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}
.mc-cal-nav,
.mc-cal-title,
.mc-cal-foot button,
.mc-cal-months button {
  border: 1px solid var(--paper-line);
  background: var(--paper-card);
  border-radius: 12px;
  cursor: pointer;
  color: inherit;
}
.mc-cal-nav {
  height: 40px;
  font-size: 22px;
  line-height: 1;
}
.mc-cal-nav:hover,
.mc-cal-title:hover,
.mc-cal-foot button:hover,
.mc-cal-months button:hover { border-color: #0d9488; color: #0d9488; }
.mc-cal-title {
  height: 40px;
  width: 100%;
  font-family: "DM Davit Guramishvili", "FiraGO", sans-serif;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.mc-cal-dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}
.mc-cal-dows span {
  text-align: center;
  color: var(--paper-dim);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 4px 0;
}
.mc-cal-dows span.is-end { color: #e11d48; }
html[data-theme="dark"] .mc-cal-dows span.is-end { color: #fb7185; }
.mc-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.mc-cal-days button {
  height: 40px;
  border: 0;
  background: transparent;
  border-radius: 12px;
  font-size: 13px;
  cursor: pointer;
}
.mc-cal-days button:hover { background: var(--paper-card); }
.mc-cal-days button.is-out { color: var(--paper-dim); }
.mc-cal-days button.is-today { box-shadow: inset 0 0 0 1px #0d9488; }
.mc-cal-days button.is-on,
.mc-cal-days button.is-on.is-end,
.mc-cal-days button.is-on.is-out {
  background: #0d9488;
  color: #fff;
}
.mc-cal-months {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mc-cal-months button {
  min-height: 48px;
  padding: 8px 6px;
  font-size: 12.5px;
  line-height: 1.25;
}
.mc-cal-months button.is-on {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.mc-cal-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.mc-cal-foot button {
  height: 36px;
  padding: 0 12px;
  font-size: 12px;
}
.mc-cal-foot [data-today] {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}

.calc-field input:focus,
.calc-field select:focus {
  outline: 2px solid #0d9488;
  outline-offset: 1px;
}
.calc-stepper {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 8px;
}
.calc-stepper button {
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--paper-line);
  background: var(--paper);
  font-size: 22px;
  cursor: pointer;
}
.calc-stepper button:hover { border-color: #0d9488; color: #0d9488; }
.calc-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.calc-seg[data-cols="4"] { grid-template-columns: 1fr 1fr; }
.calc-seg label {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--paper-line);
  background: var(--paper);
  text-align: center;
  font-size: 13px;
  cursor: pointer;
}
.calc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.calc-seg label:has(input:checked) {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.calc-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.calc-actions .btn { flex: 1; }
.calc-note {
  margin-top: 14px;
  color: var(--paper-dim);
  font-size: 12.5px;
  line-height: 1.55;
}

.calc-result { min-height: 420px; }
.calc-result.is-empty {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--paper-dim);
  padding: 48px 24px;
}
.calc-result.is-empty .ic { color: #0d9488; margin-inline: auto; }
.calc-result.is-empty b {
  display: block;
  color: var(--paper-text);
  font-size: 20px;
  margin: 10px 0 6px;
}
.calc-result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}
.calc-kicker { color: #0d9488; font-size: 12px; letter-spacing: 0.12em; }
.calc-big {
  font-family: "DM Davit Guramishvili", "FiraGO", sans-serif;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.calc-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 18px;
}
.calc-metrics article {
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 16px;
  padding: 12px 14px;
  min-width: 0;
}
.calc-metrics small {
  display: block;
  color: var(--paper-dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.calc-metrics b { display: block; font-size: 14.5px; letter-spacing: -0.02em; line-height: 1.35; overflow-wrap: anywhere; }

.calc-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9px, 1fr));
  gap: 3px;
  margin: 8px 0 10px;
}
.calc-strip i {
  display: block;
  height: 28px;
  border-radius: 6px;
  background: var(--paper-line);
}
.calc-strip i[data-kind="period"] { background: #e11d48; }
.calc-strip i[data-kind="fertile"] { background: #7c3aed; }
.calc-strip i[data-kind="ovulation"] { background: #0d9488; }
.calc-strip i.is-today { box-shadow: inset 0 0 0 2px #111827; }
html[data-theme="dark"] .calc-strip i.is-today { box-shadow: inset 0 0 0 2px #fff; }
.calc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--paper-dim);
  font-size: 12px;
}
.calc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.calc-legend i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--paper-line);
}
.calc-legend .period { background: #e11d48; }
.calc-legend .fertile { background: #7c3aed; }
.calc-legend .ovulation { background: #0d9488; }

.calc-months {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 16px;
}
.calc-months span {
  display: grid;
  place-items: center;
  min-height: 64px;
  border-radius: 14px;
  border: 1px solid var(--paper-line);
  background: var(--paper);
  font-size: 12px;
  text-align: center;
  color: var(--paper-dim);
}
.calc-months span b { display: block; color: var(--paper-text); font-size: 16px; }
.calc-months span.is-on {
  background: #0d9488;
  border-color: #0d9488;
  color: #ccfbf1;
}
.calc-months span.is-on b { color: #fff; }

.calc-weeks {
  display: grid;
  grid-template-columns: repeat(40, minmax(0, 1fr));
  gap: 2px;
  margin: 10px 0 6px;
}
.calc-weeks i {
  height: 10px;
  border-radius: 99px;
  background: var(--paper-line);
}
.calc-weeks i.is-on { background: #0d9488; }
.calc-weeks i.is-now { background: #111827; }
html[data-theme="dark"] .calc-weeks i.is-now { background: #99f6e4; }

.calc-ring-wrap {
  margin-bottom: 8px;
}
.calc-ring { width: 160px; height: 160px; }
.calc-ring .track { fill: none; stroke: var(--paper-line); stroke-width: 10; }
.calc-ring .fill { fill: none; stroke: #0d9488; stroke-width: 10; stroke-linecap: round; }
.calc-ring text {
  fill: var(--paper-text);
  font-size: 22px;
  font-family: "FiraGO", sans-serif;
}
.calc-ring .sub { fill: var(--paper-dim); font-size: 9px; }

.calc-timeline { display: grid; gap: 0; margin-top: 8px; }
.calc-timeline li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--paper-line);
}
.calc-timeline li:last-child { border-bottom: 0; }
.calc-timeline i {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 99px;
  background: #0d9488;
}
.calc-timeline small { display: block; color: var(--paper-dim); font-size: 11px; }
.calc-timeline b { font-size: 15px; }

.calc-warn {
  margin-top: 16px;
  background: #111827;
  color: #d1d5db;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: inset 3px 0 0 #fb7185;
}
.calc-privacy {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--paper-dim);
  line-height: 1.5;
}

.calc-article { padding: 8px 0 72px; }
.calc-article h2 {
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.03em;
  margin: 28px 0 12px;
}
.calc-article h3 { font-size: 17px; margin: 18px 0 8px; }
.calc-article p {
  color: var(--paper-body);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 12px;
  max-width: 78ch;
}
.calc-article ul {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  list-style: none;
}
.calc-article li {
  position: relative;
  padding-left: 22px;
  color: var(--paper-body);
  font-size: 15px;
  line-height: 1.65;
}
.calc-article ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #0d9488;
}

.calc-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.calc-related a {
  display: block;
  background: var(--paper-card);
  border: 1px solid var(--paper-line);
  border-radius: 16px;
  padding: 14px 16px;
}
.calc-related a:hover { border-color: #0d9488; }
.calc-related small { display: block; color: #0d9488; font-size: 11px; margin-bottom: 4px; }
.calc-related b { font-size: 14px; }

.calc-hcg {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}
.calc-hcg div {
  display: grid;
  grid-template-columns: 72px 1fr 90px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--paper-dim);
}
.calc-hcg span {
  height: 10px;
  border-radius: 99px;
  background: #ccfbf1;
  overflow: hidden;
}
html[data-theme="dark"] .calc-hcg span { background: #042f2e; }
.calc-hcg span i {
  display: block;
  height: 100%;
  background: #0d9488;
}

@media (max-width: 1100px) {
  .calc-grid,
  .calc-layout,
  .calc-related,
  .calc-metrics { grid-template-columns: 1fr; }
  .calc-months { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .calc-hero { padding: 28px 0 24px; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-actions { flex-direction: column; }
  .calc-weeks { grid-template-columns: repeat(20, minmax(0, 1fr)); }
}
