/* Hallmark · page: WhatsApp pricing calculator (tool)
 * macrostructure: Night hero → calculator (inputs | result) → per-market rate table → FAQ
 * theme: "Night + Mint" (shared tokens) · nav: N11 · footer: Ft3 + mast
 */
.rc-section { padding-block-start: var(--space-xl); }
.rc {
  display: grid;
  gap: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  border: var(--rule-width) solid var(--color-rule);
  background: var(--color-paper-2);
}
.rc__inputs { display: grid; gap: var(--space-md); align-content: start; }
.rc__row { display: grid; gap: var(--space-md); }
.rc__field { display: grid; gap: var(--space-3xs); }
.rc__field[hidden] { display: none; }
.rc__label { font-size: var(--text-sm); font-weight: var(--weight-strong); padding: 0; }
.rc__hint { font-size: var(--text-xs); color: var(--color-muted); }
.rc__group { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); padding-block-start: var(--space-xs); border-block-start: var(--rule-width) dashed var(--color-rule); }
.rc select, .rc input[type="number"] {
  width: 100%;
  min-height: 2.75rem;
  margin-block-start: var(--space-3xs);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-md);
  border: var(--rule-width) solid var(--color-control);
  background: var(--color-paper);
  color: var(--color-ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.rc select:focus-visible, .rc input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.rc__currency { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs); border: 0; margin: 0; padding: 0; }
.rc__currency legend { width: 100%; margin-block-end: var(--space-3xs); }
.rc__currency label { position: relative; }
.rc__currency input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rc__currency span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--space-md); border-radius: var(--radius-pill); border: var(--rule-width) solid var(--color-control); background: var(--color-paper); font-weight: var(--weight-strong); font-size: var(--text-sm); cursor: pointer; }
.rc__currency input:checked + span { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper); }
.rc__currency input:focus-visible + span { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.rc__result { display: grid; gap: var(--space-sm); align-content: start; padding: var(--space-md); border-radius: var(--radius-md); background: var(--color-paper); border: 2px solid var(--color-ink); }
.rc__brand { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-muted); }
.rc__total { display: flex; align-items: baseline; gap: var(--space-2xs); }
.rc__total .tabular { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-display); letter-spacing: -0.035em; line-height: 1; }
.rc__per { font-size: var(--text-sm); color: var(--color-muted); }
.rc__lines { display: grid; gap: var(--space-3xs); padding-block-start: var(--space-xs); border-block-start: var(--rule-width) dashed var(--color-rule); }
.rc__lines li { display: flex; justify-content: space-between; gap: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.rc__lines li span:last-child { color: var(--color-ink); white-space: nowrap; }
.rc__note { font-size: var(--text-xs); color: var(--color-muted); }

@media (min-width: 48rem) {
  .rc { padding: var(--space-lg); }
  .rc__row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: end; }
}
@media (min-width: 64rem) {
  .rc { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); padding: var(--space-xl); column-gap: var(--space-2xl); }
  .rc__result { align-self: start; }
}

/* Shared with the comparison pages: rate table */
.vs { position: relative; overflow-x: auto; border-radius: var(--radius-lg); border: var(--rule-width) solid var(--color-rule); background: var(--color-paper); }
.vs:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.vs__table { width: 100%; min-width: 26rem; border-collapse: collapse; font-size: var(--text-sm); }
.vs__table th, .vs__table td { padding: var(--space-sm); border-block-end: var(--rule-width) solid var(--color-rule); text-align: start; vertical-align: top; }
.vs__table tbody tr:last-child > * { border-block-end: 0; }
.vs__table thead > tr > * { background: var(--color-paper-2); font-family: var(--font-display); font-size: var(--text-md); letter-spacing: -0.02em; }
.vs__table tbody th { font-weight: var(--weight-strong); }
.vs__table tbody td { color: var(--color-muted); }
.vs__table tbody td:last-child { color: var(--color-ink); }
.vs__note { margin-block-start: var(--space-sm); font-size: var(--text-xs); color: var(--color-muted); }

/* ═════ Template checker ═════ */
.tc-section { padding-block-start: var(--space-xl); }
.tc {
  display: grid;
  gap: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  border: var(--rule-width) solid var(--color-rule);
  background: var(--color-paper-2);
}
.tc__inputs { display: grid; gap: var(--space-md); align-content: start; min-width: 0; }
.tc__row { display: grid; gap: var(--space-md); }
.tc__field { display: grid; gap: var(--space-3xs); min-width: 0; }
.tc__label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2xs); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.tc__opt, .tc__hint { font-size: var(--text-xs); font-weight: normal; color: var(--color-muted); }
.tc__count { font-size: var(--text-xs); font-weight: normal; color: var(--color-muted); }
.tc__count.is-over { color: var(--color-danger); font-weight: var(--weight-strong); }
.tc__group { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); }
.tc__set { display: grid; gap: var(--space-sm); margin: 0; padding: var(--space-xs) 0 0; border: 0; border-block-start: var(--rule-width) dashed var(--color-rule); min-width: 0; }
.tc__set[hidden] { display: none; }
.tc__set legend { padding: 0; }
.tc__examples { display: grid; gap: var(--space-2xs); }
.tc__chips { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.tc__chips .chip-btn[aria-pressed="true"] { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper); }
.tc select, .tc input[type="text"], .tc input[type="url"], .tc input[type="tel"], .tc textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-md);
  border: var(--rule-width) solid var(--color-control);
  background: var(--color-paper);
  color: var(--color-ink);
  font: inherit;
}
.tc textarea { resize: vertical; line-height: 1.5; }
/* Highlight layer: a mirror behind the textarea paints variables and promotional words */
.tc__hlwrap { position: relative; display: grid; }
.tc__hlwrap > * { grid-area: 1 / 1; }
.tc__hl, .tc__hlwrap textarea { padding: var(--space-2xs) var(--space-sm); border: var(--rule-width) solid transparent; font: inherit; line-height: 1.5; letter-spacing: normal; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; }
.tc__hl { overflow: hidden; color: transparent; border-radius: var(--radius-md); background: var(--color-paper); pointer-events: none; }
.tc__hlwrap textarea { position: relative; background: transparent; border-color: var(--color-control); }
.tc__hl mark { color: transparent; border-radius: 3px; }
.tc__hl .hl-var { background: var(--color-accent-soft); }
.tc__hl .hl-bad { background: color-mix(in oklch, var(--color-danger) 22%, transparent); box-shadow: 0 2px 0 var(--color-danger); }
.tc__hl .hl-promo { background: color-mix(in oklch, var(--color-warning) 30%, transparent); box-shadow: 0 0 0 2px color-mix(in oklch, var(--color-warning) 35%, transparent); animation: tc-glow 1.6s var(--ease-out) infinite alternate; }
@keyframes tc-glow { to { box-shadow: 0 0 10px 2px color-mix(in oklch, var(--color-warning) 55%, transparent); } }
.tc select:focus-visible, .tc input:focus-visible, .tc textarea:focus-visible, .tc__rm:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tc__samples { display: grid; gap: var(--space-sm); grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); }
.tc__btns { display: grid; gap: var(--space-xs); }
.tc__btns:empty { display: none; }
.tc__btn { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2xs); }
.tc__btn > input { grid-column: 1 / -1; }
.tc__btn > .tc__rm { grid-column: 2; grid-row: 1; }
.tc__rm { min-width: 2.75rem; min-height: 2.75rem; border-radius: var(--radius-md); border: var(--rule-width) solid var(--color-control); background: var(--color-paper); color: var(--color-ink); font: inherit; font-size: var(--text-lg); line-height: 1; cursor: pointer; }
.tc__rm:hover { border-color: var(--color-danger); color: var(--color-danger); }
.tc__set > .chip-btn { justify-self: start; }

.tc__result { display: grid; gap: var(--space-sm); align-content: start; min-width: 0; }

/* Phone */
.tc__stage { display: grid; justify-items: center; padding: var(--space-md) 0; }
.phone { position: relative; width: min(100%, 20rem); border-radius: 2.25rem; padding: 0.6rem; background: var(--color-ink); box-shadow: 0 24px 48px -24px color-mix(in oklch, var(--color-ink) 55%, transparent); isolation: isolate; }
.phone__bar { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-sm) var(--space-sm) var(--space-xs); border-radius: 1.75rem 1.75rem 0 0; background: var(--color-spark); color: var(--color-ink); }
.phone__avatar { display: grid; place-items: center; inline-size: 2rem; block-size: 2rem; border-radius: 50%; background: var(--color-ink); color: var(--color-paper); font-weight: var(--weight-strong); font-size: var(--text-sm); }
.phone__name { font-weight: var(--weight-strong); font-size: var(--text-sm); }
.phone__chat { position: relative; display: grid; align-content: start; gap: var(--space-2xs); min-block-size: 26rem; padding: var(--space-sm); border-radius: 0 0 1.75rem 1.75rem; overflow: hidden;
  background-color: var(--color-paper-3);
  background-image: radial-gradient(color-mix(in oklch, var(--color-ink) 9%, transparent) 1px, transparent 1.5px);
  background-size: 14px 14px; }
.phone__day { justify-self: center; padding: 2px var(--space-xs); border-radius: var(--radius-sm); background: var(--color-paper); font-size: var(--text-xs); color: var(--color-muted); }
.phone__typing { justify-self: start; display: flex; gap: 4px; padding: 0.7rem 0.85rem; border-radius: 12px; border-start-start-radius: 4px; background: var(--color-paper); }
.phone__typing[hidden] { display: none; }
.phone__typing span { inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--color-muted); animation: tc-dot 900ms var(--ease-out) infinite; }
.phone__typing span:nth-child(2) { animation-delay: 150ms; }
.phone__typing span:nth-child(3) { animation-delay: 300ms; }
@keyframes tc-dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-4px); opacity: 1; } }
.tc__msg { display: grid; gap: 3px; justify-items: start; transform-origin: 0 0; }
.tc__msg[hidden] { display: none; }
.tc__msg.is-in { animation: tc-pop 420ms cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes tc-pop { from { opacity: 0; transform: scale(0.6) translateY(12px); } }
.tc__bubble { display: grid; gap: var(--space-2xs); inline-size: fit-content; max-inline-size: 100%; padding: var(--space-xs) var(--space-sm); border-radius: 12px; border-start-start-radius: 4px; background: var(--color-paper); font-size: var(--text-sm); line-height: 1.45; overflow-wrap: anywhere; box-shadow: 0 1px 1px color-mix(in oklch, var(--color-ink) 12%, transparent); }
.tc__ph { font-weight: var(--weight-strong); }
.tc__pf { font-size: var(--text-xs); color: var(--color-muted); }
.tc__bubble mark { background: var(--color-accent-soft); color: inherit; border-radius: 3px; padding: 0 2px; transition: background-color 300ms var(--ease-out); }
.tc__bubble mark.is-empty { background: transparent; color: var(--color-danger); outline: 1px dashed currentColor; }
.tc__empty, .tc__nojs { color: var(--color-muted); }
.tc__pbtns { display: grid; gap: 3px; inline-size: 100%; }
.tc__pbtns li { padding: var(--space-2xs); border-radius: 10px; background: var(--color-paper); text-align: center; font-size: var(--text-sm); font-weight: var(--weight-strong); color: var(--color-accent-text); overflow-wrap: anywhere; box-shadow: 0 1px 1px color-mix(in oklch, var(--color-ink) 12%, transparent); }

/* Review: scan line, stamp, sparks */
.phone__scan { position: absolute; inset-inline: 0.6rem; inset-block-start: 3.6rem; block-size: 3px; border-radius: 3px; background: var(--color-accent); box-shadow: 0 0 18px 4px color-mix(in oklch, var(--color-accent) 60%, transparent); opacity: 0; pointer-events: none; }
.phone.is-scanning .phone__scan { animation: tc-scan 1s var(--ease-out) both; }
@keyframes tc-scan { 0% { opacity: 0; transform: translateY(0); } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; transform: translateY(25rem); } }
.tc__stamp { position: absolute; inset-block-end: 1.75rem; inset-inline: 10%; z-index: 2; padding: var(--space-xs) var(--space-sm); border: 4px double currentColor; border-radius: var(--radius-md); background: color-mix(in oklch, var(--color-paper) 88%, transparent); font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-display); letter-spacing: -0.01em; line-height: 1.1; text-align: center; text-transform: uppercase; transform: rotate(-7deg); animation: tc-stamp 460ms cubic-bezier(.2, 1.4, .4, 1) both; }
.tc__stamp[hidden] { display: none; }
.tc__stamp.is-good { color: var(--color-success); }
.tc__stamp.is-warn { color: var(--color-warning); }
.tc__stamp.is-bad { color: var(--color-danger); }
@keyframes tc-stamp { 0% { opacity: 0; transform: rotate(-16deg) scale(2.2); } 70% { opacity: 1; transform: rotate(-6deg) scale(0.94); } 100% { transform: rotate(-7deg) scale(1); } }
.spark { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; z-index: 3; inline-size: 8px; block-size: 8px; margin: -4px; border-radius: 2px; background: var(--color-spark); pointer-events: none; animation: tc-spark 800ms var(--ease-out) forwards; }
.spark:nth-child(odd) { background: var(--color-accent); }
@keyframes tc-spark { from { opacity: 1; transform: rotate(var(--r)) translateX(0) scale(1); } to { opacity: 0; transform: rotate(var(--r)) translateX(var(--d)) scale(0.3); } }

/* Dial + price: dial and headline side by side, the reason full width below */
.tc__meter { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); column-gap: var(--space-md); row-gap: var(--space-xs); align-items: center; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); border: 2px solid var(--color-ink); background: var(--color-paper); transition: border-color 300ms var(--ease-out); }
[data-tone="warn"] .tc__meter { border-color: var(--color-warning); }
[data-tone="ok"] .tc__meter { border-color: var(--color-success); }
.gauge { inline-size: 100%; overflow: visible; }
.gauge path { fill: none; stroke-width: 14; stroke-linecap: round; }
.gauge__ut { stroke: color-mix(in oklch, var(--color-success) 70%, var(--color-paper)); }
.gauge__mk { stroke: color-mix(in oklch, var(--color-warning) 75%, var(--color-paper)); }
.gauge__needle { --a: -58deg; transform-box: view-box; transform-origin: 100px 100px; transform: rotate(var(--a)); transition: transform 750ms cubic-bezier(.34, 1.56, .64, 1); }
.gauge__needle line { stroke: var(--color-ink); stroke-width: 5; stroke-linecap: round; }
.gauge__needle circle { fill: var(--color-ink); }
.gauge__lab { font-family: var(--font-mono); font-size: 17px; fill: var(--color-muted); }
.tc__cost { display: grid; gap: 2px; min-width: 0; }
.tc__cost .tc__vtitle { font-size: var(--text-md); line-height: 1.2; }
.tc__price { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.tc__price .tabular { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-display); letter-spacing: -0.03em; line-height: 1.1; }
.tc__per { font-size: var(--text-xs); color: var(--color-muted); }
@media (max-width: 29.99rem) {
  .tc__meter { grid-template-columns: minmax(0, 5.25rem) minmax(0, 1fr); column-gap: var(--space-sm); padding-inline: var(--space-sm); }
  .tc__cost .tc__vtitle { font-size: var(--text-base); }
  .tc__price .tabular { font-size: var(--text-lg); }
}
.tc__cur { display: inline-flex; padding: 2px; border-radius: var(--radius-pill); border: var(--rule-width) solid var(--color-rule); background: var(--color-paper-2); }
.tc__cur button { min-inline-size: 2rem; min-block-size: 1.75rem; padding: 0 var(--space-2xs); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-muted); font: inherit; font-size: var(--text-xs); font-weight: var(--weight-strong); cursor: pointer; }
.tc__cur button[aria-pressed="true"] { background: var(--color-ink); color: var(--color-paper); }
.tc__cur button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
@media (pointer: coarse) { .tc__cur button { min-inline-size: 2.75rem; min-block-size: 2.25rem; } }
.tc__why { grid-column: 1 / -1; display: grid; gap: var(--space-2xs); padding-block-start: var(--space-xs); border-block-start: var(--rule-width) dashed var(--color-rule); font-size: var(--text-sm); }
.tc__vtext { color: var(--color-muted); }
.tc__review { justify-self: stretch; justify-content: center; }

/* Checks list reveal on review */
.tc__list.is-reveal > li { animation: tc-rise 360ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes tc-rise { from { opacity: 0; transform: translateY(8px); } }

.tc__vtitle { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-display); letter-spacing: -0.02em; }
.tc__hits { display: flex; flex-wrap: wrap; gap: var(--space-3xs); }
.tc__hits:empty { display: none; }
.tc__hits li { padding: 0 var(--space-2xs); border-radius: var(--radius-sm); background: var(--color-paper-2); border: var(--rule-width) solid var(--color-warning); font-family: var(--font-mono); font-size: var(--text-xs); }
.tc__summary { font-weight: var(--weight-strong); }
.tc__summary.is-fail { color: var(--color-danger); }
.tc__summary.is-pass { color: var(--color-success); }
.tc__list { display: grid; gap: var(--space-2xs); }
.tc__item { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: var(--space-xs); align-items: baseline; font-size: var(--text-sm); }
.tc__tag { padding: 1px 0; border-radius: var(--radius-sm); border: var(--rule-width) solid currentColor; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-strong); text-align: center; text-transform: uppercase; }
.tc__item--fail .tc__tag { color: var(--color-danger); }
.tc__item--warn .tc__tag { color: var(--color-warning); }
.tc__item--info .tc__tag { color: var(--color-muted); }
.tc__item--pass .tc__tag { color: var(--color-success); }
.tc__item--pass, .tc__item--info { color: var(--color-muted); }
.tc__note { font-size: var(--text-xs); color: var(--color-muted); }

@media (min-width: 48rem) {
  .tc { padding: var(--space-lg); }
  .tc__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tc__btn { grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) minmax(0, 1.4fr) auto; }
  .tc__btn > input { grid-column: auto; }
  .tc__btn > .tc__rm { grid-column: -2; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .tc__hl .hl-promo, .phone__typing span, .tc__msg.is-in, .phone.is-scanning .phone__scan, .tc__stamp, .tc__list.is-reveal > li { animation: none; }
  .gauge__needle, .tc__meter, .tc__bubble mark { transition: none; }
}
@media (min-width: 64rem) {
  .tc { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); padding: var(--space-xl); column-gap: var(--space-2xl); }
}

/* Utility vs marketing pairs */
.pairs { display: grid; gap: var(--space-md); }
.pair { display: grid; gap: var(--space-xs); align-content: start; padding: var(--space-md); border-radius: var(--radius-lg); border: var(--rule-width) solid var(--color-rule); background: var(--color-paper); }
.pair__side { display: grid; gap: var(--space-3xs); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-md); background: var(--color-paper-2); border-inline-start: 3px solid var(--color-success); }
.pair__side--mk { border-inline-start-color: var(--color-warning); }
.pair__tag { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-strong); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-muted); }
.pair__msg { font-size: var(--text-sm); overflow-wrap: anywhere; }
.pair__why { font-size: var(--text-sm); color: var(--color-muted); }
@media (min-width: 48rem) { .pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ═════ Tools hub ═════ */
.tool-cards { display: grid; gap: var(--space-md); }
.tool-card { position: relative; display: grid; gap: var(--space-xs); align-content: start; padding: var(--space-lg); border-radius: var(--radius-lg); border: var(--rule-width) solid var(--color-rule); background: var(--color-paper-2); transition: border-color 160ms var(--ease-out); }
.tool-card:hover { border-color: var(--color-ink); }
.tool-card__title { font-size: var(--text-xl); }
.tool-card__title a { color: inherit; text-decoration: none; }
.tool-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tool-card__title a:focus-visible { outline: none; }
.tool-card:has(a:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tool-card p { color: var(--color-muted); }
.tool-card__go { font-weight: var(--weight-strong); color: var(--color-accent-text); }
@media (min-width: 48rem) { .tool-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .tool-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .tool-card { transition: none; } }
