/* ==========================================================================
   GST calculator
   Page-specific layout, receipt, rate comparison and motion.
   ========================================================================== */

[hidden] {
  display: none !important;
}

/* Hero -------------------------------------------------------------------- */

.gst-hero {
  background:
    radial-gradient(760px 420px at 92% 6%, rgba(255, 49, 49, 0.12), transparent 62%),
    radial-gradient(620px 380px at 4% 100%, rgba(255, 161, 120, 0.16), transparent 66%),
    var(--cream);
}

.gst-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.gst-hero-copy {
  min-width: 0;
}

.gst-hero-copy h1 {
  max-width: 760px;
}

.gst-hero-copy .lead {
  max-width: 640px;
}

.gst-hero-deco {
  position: relative;
  width: 100%;
  max-width: 330px;
  height: 370px;
  justify-self: end;
  perspective: 900px;
}

.gst-deco-receipt {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 220px;
  padding: 1.25rem;
  border: 1px solid rgba(35, 34, 40, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 242, 0.98)),
    var(--white);
  box-shadow: 0 26px 60px rgba(35, 34, 40, 0.2);
  transform: translate(-50%, -50%) rotate(-3deg);
  animation: gst-float 7s ease-in-out infinite;
}

.gst-deco-receipt::before,
.gst-deco-receipt::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cream);
  transform: translateY(-50%);
}

.gst-deco-receipt::before {
  left: -7px;
}

.gst-deco-receipt::after {
  right: -7px;
}

.gst-deco-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gst-deco-kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(28, 115, 87, 0.12);
}

.gst-deco-receipt > strong {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.95;
}

.gst-deco-label {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.66rem;
}

.gst-deco-bar {
  display: flex;
  gap: 2px;
  height: 8px;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--cream-2);
}

.gst-deco-bar i {
  display: block;
  height: 100%;
}

.gst-deco-bar i:nth-child(1) {
  width: 72%;
  background: #d8ccc2;
}

.gst-deco-bar i:nth-child(2),
.gst-deco-bar i:nth-child(3) {
  width: 14%;
  background: var(--red);
}

.gst-deco-bar i:nth-child(3) {
  background: var(--red-deep);
}

.gst-deco-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.42rem 0;
  border-bottom: 1px dashed rgba(35, 34, 40, 0.12);
  color: var(--muted);
  font-size: 0.64rem;
}

.gst-deco-line b {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.66rem;
}

.gst-deco-line--total {
  border-bottom: 0;
  color: var(--ink);
  font-weight: 700;
}

.gst-deco-line--total b {
  color: var(--red-deep);
}

.gst-deco-chip {
  position: absolute;
  z-index: 3;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(35, 34, 40, 0.12);
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 700;
  white-space: nowrap;
  animation: gst-chip-float 6s ease-in-out infinite;
}

.gst-deco-chip--one {
  top: 13%;
  left: 0;
  color: var(--red-deep);
  animation-delay: -1.5s;
}

.gst-deco-chip--two {
  right: 0;
  bottom: 23%;
  color: var(--green);
  animation-delay: -3.2s;
}

.gst-deco-chip--three {
  right: 6%;
  top: 6%;
  color: var(--indigo);
  animation-delay: -4.4s;
}

/* Calculator shell -------------------------------------------------------- */

.gst-calc-section {
  position: relative;
  overflow: clip;
  padding-block: clamp(2rem, 4vw, 3.5rem) clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(900px 480px at 86% 0%, rgba(255, 49, 49, 0.07), transparent 62%),
    var(--cream);
  border-bottom: 1px solid var(--line);
}

.gst-calc-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(35, 34, 40, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 34, 40, 0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 88%);
  pointer-events: none;
}

.gst-calc-section > .container {
  position: relative;
  z-index: 1;
}

html {
  scroll-padding-top: calc(var(--header-h) + 24px);
}

.gst-calc-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.gst-calc-inputs {
  min-width: 0;
  padding: clamp(1.4rem, 3.4vw, 2.7rem);
  background: var(--white);
}

.gst-calc-heading {
  margin-bottom: 1.5rem;
}

.gst-calc-heading-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
}

.gst-calc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gst-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(28, 115, 87, 0.12);
  animation: gst-pulse 2.2s ease-in-out infinite;
}

.gst-rate-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.gst-calc-heading h2 {
  margin-top: 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  text-wrap: balance;
}

.gst-calc-heading h2 em {
  color: var(--red);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.gst-calc-heading p {
  max-width: 460px;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.gst-form {
  display: grid;
  gap: 1.25rem;
}

.gst-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.gst-field legend {
  display: block;
  margin-bottom: 0.5rem;
  padding: 0;
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.gst-amount-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 68px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--cream);
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background 0.2s var(--ease);
}

.gst-amount-box:focus-within {
  border-color: var(--red);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--red-soft);
}

.gst-amount-symbol {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.gst-amount-input {
  width: 100%;
  min-width: 0;
  padding: 0.25rem 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.gst-amount-input::-webkit-outer-spin-button,
.gst-amount-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.gst-hint {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.gst-error {
  margin-top: 0.4rem;
  color: var(--red-deep);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.45;
}

.gst-quick-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.gst-quick-amounts button {
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.gst-quick-amounts button:hover {
  border-color: rgba(201, 31, 38, 0.4);
  background: var(--red-soft);
  color: var(--red-deep);
  transform: translateY(-1px);
}

.gst-choice-grid {
  display: grid;
  gap: 8px;
}

.gst-choice-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gst-choice {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.gst-choice input,
.gst-rate-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.gst-choice-body {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 58px;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.gst-choice:hover .gst-choice-body {
  border-color: rgba(201, 31, 38, 0.35);
  transform: translateY(-1px);
}

.gst-choice input:checked + .gst-choice-body {
  border-color: var(--red);
  background: var(--red-soft);
  box-shadow: 0 0 0 1px var(--red), 0 8px 20px rgba(201, 31, 38, 0.08);
}

.gst-choice input:focus-visible + .gst-choice-body {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.gst-choice-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  background: var(--cream-2);
  color: var(--red-deep);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}

.gst-choice-icon .icon {
  width: 15px;
  height: 15px;
}

.gst-choice input:checked + .gst-choice-body .gst-choice-icon {
  background: var(--red);
  color: var(--white);
}

.gst-choice-body strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.gst-choice-body small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.3;
}

.gst-choice input:checked + .gst-choice-body small {
  color: var(--red-deep);
}

.gst-rate-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.gst-rate-chip {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.gst-rate-chip-body {
  display: grid;
  gap: 2px;
  min-height: 62px;
  padding: 0.55rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
  text-align: center;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.gst-rate-chip:hover .gst-rate-chip-body {
  border-color: rgba(201, 31, 38, 0.35);
  transform: translateY(-1px);
}

.gst-rate-chip input:checked + .gst-rate-chip-body {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(201, 31, 38, 0.2);
  transform: translateY(-2px);
}

.gst-rate-chip input:focus-visible + .gst-rate-chip-body {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.gst-rate-chip-body strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.gst-rate-chip-body small {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gst-rate-chip input:checked + .gst-rate-chip-body small {
  color: rgba(255, 255, 255, 0.78);
}

.gst-special-row {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.9rem;
}

.gst-special-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.gst-special-row label,
.gst-custom-rate label {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
}

.gst-special-label > span {
  padding: 0.12rem 0.4rem;
  border: 1px solid rgba(201, 31, 38, 0.13);
  border-radius: 999px;
  background: rgba(255, 233, 229, 0.6);
  color: var(--red-deep);
  font-family: var(--font-display);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gst-select-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid rgba(201, 31, 38, 0.16);
  border-radius: 14px;
  background:
    radial-gradient(180px 70px at 0% 0%, rgba(255, 227, 216, 0.8), transparent 72%),
    linear-gradient(180deg, #fffdfb 0%, #fff7f2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(35, 34, 40, 0.04);
  overflow: hidden;
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.gst-select-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, rgba(201, 31, 38, 0.16), transparent 42%, rgba(28, 115, 87, 0.1));
  padding: 1px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.gst-select-shell:hover {
  border-color: rgba(201, 31, 38, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 24px rgba(201, 31, 38, 0.08);
  transform: translateY(-1px);
}

.gst-select-shell:focus-within {
  border-color: var(--red);
  box-shadow:
    0 0 0 4px var(--red-soft),
    0 12px 24px rgba(201, 31, 38, 0.08);
}

.gst-select-shell select {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 2.35rem 0.65rem 2.8rem;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  outline: 0;
  cursor: pointer;
}

.gst-select-shell select option {
  background: var(--white);
  color: var(--ink);
  font-weight: 500;
}

.gst-select-icon {
  position: absolute;
  left: 0.72rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: var(--red-soft);
  color: var(--red);
  box-shadow: inset 0 0 0 1px rgba(201, 31, 38, 0.08);
  pointer-events: none;
}

.gst-select-icon .icon {
  width: 14px;
  height: 14px;
}

.gst-select-chevron {
  position: absolute;
  right: 0.78rem;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
  pointer-events: none;
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}

.gst-select-chevron .icon {
  width: 14px;
  height: 14px;
}

.gst-select-shell:focus-within .gst-select-chevron {
  color: var(--red);
  transform: rotate(180deg);
}

.gst-custom-shell {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid rgba(201, 31, 38, 0.16);
  border-radius: 14px;
  background:
    radial-gradient(180px 70px at 0% 0%, rgba(255, 227, 216, 0.8), transparent 72%),
    linear-gradient(180deg, #fffdfb 0%, #fff7f2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(35, 34, 40, 0.04);
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.gst-custom-shell:focus-within {
  border-color: var(--red);
  box-shadow:
    0 0 0 4px var(--red-soft),
    0 12px 24px rgba(201, 31, 38, 0.08);
}

.gst-custom-shell input {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 2.2rem 0.65rem 0.8rem;
  border: 0;
  appearance: textfield;
  -moz-appearance: textfield;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  outline: 0;
}

.gst-custom-shell input::-webkit-outer-spin-button,
.gst-custom-shell input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.gst-custom-suffix {
  position: absolute;
  right: 0.85rem;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  pointer-events: none;
}

.gst-custom-rate {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.6rem;
}

.gst-route {
  --route-accent: var(--red);
  --route-accent-soft: var(--red-soft);
  --route-accent-deep: var(--red-deep);
  --route-glow: rgba(201, 31, 38, 0.1);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  gap: 0.55rem 0.7rem;
  align-items: center;
  margin-top: 0.8rem;
  padding: 0.7rem 0.75rem 0.65rem;
  border: 1px solid rgba(201, 31, 38, 0.16);
  border-radius: 16px;
  background:
    radial-gradient(220px 100px at 0% 0%, rgba(255, 227, 216, 0.62), transparent 72%),
    linear-gradient(135deg, rgba(255, 227, 216, 0.28), transparent 58%),
    var(--cream);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 8px 20px rgba(35, 34, 40, 0.04);
  overflow: hidden;
  transition:
    border-color 0.3s var(--ease),
    background 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.gst-route[data-supply="inter"] {
  --route-accent: var(--indigo);
  --route-accent-soft: var(--indigo-soft);
  --route-accent-deep: var(--indigo);
  --route-glow: rgba(55, 62, 140, 0.12);
  border-color: rgba(55, 62, 140, 0.18);
  background:
    radial-gradient(220px 100px at 0% 0%, rgba(226, 228, 250, 0.72), transparent 72%),
    linear-gradient(135deg, rgba(226, 228, 250, 0.3), transparent 58%),
    var(--cream);
}

.gst-route-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.gst-route-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gst-route-kicker .icon {
  width: 12px;
  height: 12px;
  color: var(--route-accent);
}

.gst-route-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  background: var(--route-accent-soft);
  color: var(--route-accent-deep);
  font-family: var(--font-display);
  font-size: 0.47rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.gst-route-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--route-accent);
  animation: gst-route-status-pulse 2.4s ease-in-out infinite;
}

.gst-route-node {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.gst-route-node > span:last-child {
  min-width: 0;
}

.gst-route-pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: none;
  border-radius: 9px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: background 0.25s var(--ease);
}

.gst-route-pin::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--route-accent);
  border-radius: 12px;
  opacity: 0;
  animation: gst-pin-ring 3.6s var(--ease-out) infinite;
}

.gst-route-node--buyer .gst-route-pin::after {
  animation-delay: 1.8s;
}

.gst-route[data-supply="inter"] [data-gst-buyer-pin] {
  background: var(--indigo);
}

.gst-route-node strong {
  display: block;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.2;
}

.gst-route-node small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.56rem;
}

.gst-route-line {
  position: relative;
  height: 2px;
  overflow: visible;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 5px, transparent 5px 10px);
}

.gst-route-line-fill {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, var(--route-accent) 0 5px, transparent 5px 10px);
  animation: gst-route-dash 1.05s linear infinite;
}

.gst-route-token {
  position: absolute;
  top: 50%;
  left: 0;
  display: grid;
  place-items: center;
  width: 18px;
  height: 22px;
  border: 1px solid var(--route-accent);
  border-radius: 4px;
  background: #fffdfb;
  box-shadow:
    0 3px 8px rgba(35, 34, 40, 0.16),
    0 0 0 2px rgba(255, 253, 249, 0.85);
  color: var(--route-accent);
  transform: translate(-50%, -50%) rotate(-6deg);
  animation: gst-route-token 4.2s cubic-bezier(0.45, 0, 0.55, 1) 0.35s infinite;
}

.gst-route-token .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.2;
}

.gst-route-tax-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.gst-route-tax {
  position: relative;
  overflow: hidden;
  justify-self: start;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: var(--route-accent-soft);
  color: var(--route-accent-deep);
  font-family: var(--font-display);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease);
}

.gst-route-tax::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: translateX(-110%);
  animation: gst-route-pill-shine 3.6s ease-in-out infinite;
}

.gst-route-note {
  color: var(--muted);
  font-size: 0.52rem;
  font-weight: 600;
  white-space: nowrap;
}

.gst-advanced {
  margin-top: -0.15rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--line);
}

.gst-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.gst-advanced summary::-webkit-details-marker {
  display: none;
}

.gst-advanced summary span {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gst-advanced[open] summary {
  color: var(--red-deep);
}

.gst-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 0.45rem;
  cursor: pointer;
}

.gst-check input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--red);
}

.gst-check strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
}

.gst-check small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.4;
}

/* Result panel and receipt ------------------------------------------------ */

.gst-calc-result {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: clamp(1.4rem, 3.4vw, 2.7rem);
  background:
    radial-gradient(520px 300px at 92% 8%, rgba(255, 49, 49, 0.24), transparent 68%),
    radial-gradient(420px 300px at 4% 100%, rgba(255, 161, 120, 0.13), transparent 70%),
    linear-gradient(135deg, #28252c 0%, #1b1a20 56%, #261b1c 100%);
  color: var(--cream);
}

.gst-calc-result::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 248, 242, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 248, 242, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 82%);
  pointer-events: none;
}

.gst-calc-result::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -130px;
  width: 300px;
  height: 300px;
  border: 1px dashed rgba(255, 248, 242, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 248, 242, 0.025), 0 0 0 68px rgba(255, 248, 242, 0.02);
  animation: gst-orbit-spin 38s linear infinite;
  pointer-events: none;
}

.gst-result-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.gst-scene-doc {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: 92px;
  height: 112px;
  padding: 17px 13px 12px;
  border: 1px solid rgba(255, 248, 242, 0.13);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 248, 242, 0.08), rgba(255, 248, 242, 0.025)),
    rgba(255, 248, 242, 0.02);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.16);
  opacity: 0.72;
  transform: rotate(var(--doc-rotate, -10deg));
  animation: gst-doc-drift 12s ease-in-out infinite;
}

.gst-scene-doc::before {
  content: "";
  width: 22px;
  height: 3px;
  margin-bottom: 9px;
  border-radius: 99px;
  background: rgba(255, 248, 242, 0.24);
}

.gst-scene-doc--a {
  --doc-rotate: -11deg;
  top: 7%;
  left: 4%;
}

.gst-scene-doc--b {
  --doc-rotate: 9deg;
  right: 5%;
  bottom: 9%;
  width: 74px;
  height: 94px;
  animation-delay: -4.5s;
  animation-direction: reverse;
}

.gst-scene-doc-line {
  display: block;
  height: 2px;
  margin-top: 6px;
  border-radius: 99px;
  background: rgba(255, 248, 242, 0.17);
}

.gst-scene-doc-line--short {
  width: 58%;
}

.gst-scene-doc-mark {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-top: auto;
  margin-left: auto;
  border-radius: 50%;
  background: rgba(28, 115, 87, 0.28);
  color: #9ce6cf;
}

.gst-scene-doc-mark .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.8;
}

.gst-scene-doc-mark--rupee {
  background: rgba(201, 31, 38, 0.24);
  color: #ffaaa5;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
}

.gst-scene-scan {
  position: absolute;
  top: -12%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 73, 70, 0.6), transparent);
  box-shadow: 0 0 20px 4px rgba(255, 49, 49, 0.14);
  animation: gst-scan 9s linear infinite;
}

.gst-scene-watermark {
  position: absolute;
  top: 2%;
  right: 3%;
  color: transparent;
  background: linear-gradient(100deg, rgba(255, 248, 242, 0.1), rgba(255, 248, 242, 0.025) 46%, rgba(255, 49, 49, 0.16));
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 180% 100%;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 8vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.09em;
  line-height: 0.8;
  opacity: 0.55;
  animation: gst-watermark 8s ease-in-out infinite;
}

.gst-result-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.gst-result-kicker {
  color: rgba(255, 248, 242, 0.56);
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.gst-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid rgba(142, 224, 197, 0.26);
  border-radius: 999px;
  background: rgba(28, 115, 87, 0.22);
  color: #9ce6cf;
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gst-live-pill span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ce6cf;
  animation: gst-pulse 2.2s ease-in-out infinite;
}

.gst-receipt {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 1.2rem;
  border-radius: 20px;
  background:
    linear-gradient(180deg, #fffdf9 0%, #fff8f2 100%),
    var(--cream);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
  color: var(--ink);
  animation: gst-receipt-in 0.7s var(--ease-out) 0.12s backwards;
}

.gst-receipt::before,
.gst-receipt::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  transform: translateY(-50%);
}

.gst-receipt::before {
  left: -8px;
}

.gst-receipt::after {
  right: -8px;
}

.gst-print-head,
.gst-print-disclaimer {
  display: none;
}

.gst-receipt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed rgba(35, 34, 40, 0.18);
}

.gst-receipt-head > div > span {
  display: block;
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.gst-receipt-head > div > strong {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.gst-receipt-badge {
  flex: none;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gst-receipt-total {
  display: grid;
  gap: 0.1rem;
  margin-top: 0.85rem;
}

.gst-receipt-total > span {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gst-receipt-total > strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transform-origin: left center;
}

.gst-receipt-total > strong.is-long {
  font-size: clamp(1.55rem, 6.2vw, 2.45rem);
  letter-spacing: -0.055em;
}

.gst-receipt-total > strong.is-pulsing {
  animation: gst-total-pop 0.52s var(--ease-out);
}

.gst-receipt-total > small {
  margin-top: 0.15rem;
  color: var(--red-deep);
  font-size: 0.63rem;
  font-weight: 600;
}

.gst-split-bar {
  position: relative;
  display: flex;
  gap: 2px;
  height: 10px;
  margin-top: 0.8rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--cream-2);
}

.gst-split-seg {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  transition: width 0.55s var(--ease-out);
}

.gst-split-seg--base {
  background: #d8ccc2;
}

.gst-split-seg--cgst {
  background: #e26a6d;
}

.gst-split-seg--sgst {
  background: var(--red);
}

.gst-split-seg--igst {
  background: var(--indigo);
}

.gst-split-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 18%, rgba(255, 255, 255, 0.6) 50%, transparent 82%);
  opacity: 0;
  transform: translateX(-110%);
  pointer-events: none;
}

.gst-split-bar.is-shimmer::after {
  animation: gst-bar-shine 0.8s var(--ease-out);
}

.gst-split-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.57rem;
}

.gst-split-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.gst-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.gst-dot--base {
  background: #d8ccc2;
}

.gst-dot--cgst {
  background: #e26a6d;
}

.gst-dot--sgst {
  background: var(--red);
}

.gst-dot--igst {
  background: var(--indigo);
}

.gst-receipt-lines {
  margin-top: 0.7rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(35, 34, 40, 0.16);
}

.gst-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.36rem 0;
  border-bottom: 1px dashed rgba(35, 34, 40, 0.12);
  font-size: 0.74rem;
}

.gst-line:last-child {
  border-bottom: 0;
}

.gst-line > span {
  color: var(--muted);
}

.gst-line > strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gst-line--tax > span,
.gst-line--tax > strong {
  color: var(--ink);
  font-weight: 800;
}

.gst-line--tax > strong {
  color: var(--red-deep);
}

.gst-receipt-rule {
  margin: 0.35rem 0 0.55rem;
  border-top: 1px dashed rgba(35, 34, 40, 0.18);
}

.gst-reconcile {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.55rem;
  border-radius: 10px;
  background: var(--cream-2);
  color: var(--ink-3);
  font-size: 0.62rem;
  line-height: 1.35;
}

.gst-reconcile-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}

.gst-reconcile-icon .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.6;
}

.gst-reconcile p {
  margin: 0;
  overflow-wrap: anywhere;
}

.gst-receipt-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  padding-right: 4.4rem;
  border-top: 1px dashed rgba(35, 34, 40, 0.16);
  color: var(--muted);
  font-size: 0.55rem;
  line-height: 1.4;
}

.gst-receipt-foot span + span::before {
  content: "·";
  margin-right: 0.6rem;
  color: var(--muted-2);
}

.gst-stamp {
  position: absolute;
  right: 0.85rem;
  bottom: 2.55rem;
  display: grid;
  place-items: center;
  gap: 1px;
  width: 62px;
  height: 62px;
  border: 2px solid rgba(201, 31, 38, 0.34);
  border-radius: 50%;
  color: rgba(201, 31, 38, 0.6);
  font-family: var(--font-display);
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-10deg);
  opacity: 0.68;
  pointer-events: none;
  animation: gst-stamp-in 0.5s var(--ease-out) 0.5s backwards;
}

.gst-stamp .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.8;
}

.gst-result-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
}

.gst-result-actions .btn {
  min-height: 38px;
  padding: 0.45rem 0.7rem;
  font-size: 0.72rem;
}

.gst-result-actions .btn .icon {
  width: 14px;
  height: 14px;
}

.gst-result-actions .btn.is-copied {
  background: var(--green);
  color: var(--white);
}

.gst-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem;
  border: 0;
  background: transparent;
  color: rgba(255, 248, 242, 0.58);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.gst-reset:hover {
  color: var(--white);
}

.gst-reset .icon {
  width: 14px;
  height: 14px;
}

.gst-result-note {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.6rem;
  color: rgba(255, 248, 242, 0.5);
  font-size: 0.58rem;
  line-height: 1.4;
}

.gst-result-note .icon {
  width: 12px;
  height: 12px;
}

.gst-noscript {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink-3);
  font-size: 0.8rem;
  line-height: 1.6;
}

.gst-noscript a {
  color: var(--red);
  font-weight: 700;
}

/* Rate comparison --------------------------------------------------------- */

.gst-compare {
  position: relative;
  overflow: hidden;
  margin-top: 1.2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.gst-compare::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 49, 49, 0.12), transparent 68%);
  pointer-events: none;
}

.gst-compare-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.gst-compare-head .eyebrow {
  margin-bottom: 0.55rem;
}

.gst-compare-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  text-wrap: balance;
}

.gst-compare-head h2 em {
  color: var(--red);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.gst-compare-head > p {
  max-width: 300px;
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
  text-align: right;
}

.gst-compare-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.gst-compare-card {
  position: relative;
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--cream);
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.gst-compare-card.is-selected {
  border-color: var(--red);
  background: var(--red-soft);
  box-shadow: 0 12px 28px rgba(201, 31, 38, 0.1);
  transform: translateY(-2px);
}

.gst-compare-rate {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gst-compare-card.is-selected .gst-compare-rate {
  color: var(--red-deep);
}

.gst-compare-card > strong {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.gst-compare-label {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gst-compare-card > small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.4;
}

.gst-compare-note {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.5;
}

.gst-compare-note .icon {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
  color: var(--gold);
}

/* Formula cards ----------------------------------------------------------- */

.gst-formula-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.gst-formula-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
}

.gst-formula-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--red);
}

.gst-formula-card:nth-child(2)::before {
  background: var(--gold);
}

.gst-formula-card:nth-child(3)::before {
  background: var(--indigo);
}

.gst-formula-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red-deep);
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.gst-formula-tag--gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.gst-formula-tag--indigo {
  background: var(--indigo-soft);
  color: var(--indigo);
}

.gst-formula-card h3 {
  margin-top: 0.7rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.gst-formula-card p {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.gst-formula {
  margin-top: 0.75rem;
  padding: 0.65rem 0.7rem;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.67rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.gst-formula-example {
  margin-top: auto;
  padding-top: 0.8rem;
  color: var(--red-deep);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
}

.gst-math-note,
.gst-rate-note,
.gst-split-note {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.55;
}

.gst-math-note .icon,
.gst-rate-note .icon,
.gst-split-note .icon {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
  color: var(--gold);
}

/* Rate guide -------------------------------------------------------------- */

.gst-rate-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.gst-rate-card {
  position: relative;
  overflow: hidden;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: var(--radius);
  background: var(--white);
}

.gst-rate-card--gold {
  border-top-color: var(--gold);
}

.gst-rate-card--red {
  border-top-color: var(--red);
}

.gst-rate-card--ink {
  border-top-color: var(--ink);
}

.gst-rate-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 1;
}

.gst-rate-name {
  display: block;
  margin-top: 0.35rem;
  color: var(--green);
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.gst-rate-card--gold .gst-rate-name {
  color: var(--gold);
}

.gst-rate-card--red .gst-rate-name {
  color: var(--red-deep);
}

.gst-rate-card--ink .gst-rate-name {
  color: var(--ink-3);
}

.gst-rate-card p {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.gst-rate-special {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  overflow: hidden;
  margin-top: 1rem;
  padding: 1.2rem 1.35rem;
  border-radius: var(--radius);
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(255, 49, 49, 0.2), transparent 70%),
    var(--ink);
  color: var(--cream);
}

.gst-rate-special::before {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -100px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 248, 242, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255, 248, 242, 0.025);
  pointer-events: none;
}

.gst-rate-special > div {
  position: relative;
  z-index: 1;
}

.gst-rate-special-tag {
  color: #ff9c97;
  font-family: var(--font-display);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.gst-rate-special h3 {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.gst-rate-special p {
  max-width: 700px;
  margin-top: 0.35rem;
  color: rgba(255, 248, 242, 0.68);
  font-size: 0.74rem;
  line-height: 1.55;
}

.gst-rate-special p strong {
  color: #ffb0aa;
}

.gst-rate-special-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex: none;
}

.gst-rate-special .btn--outline {
  --btn-fg: var(--cream);
  --btn-border: rgba(255, 248, 242, 0.3);
}

.gst-rate-special .btn--outline:hover {
  --btn-bg: var(--cream);
  --btn-fg: var(--ink);
  --btn-border: var(--cream);
}

.gst-rate-special .btn .icon {
  width: 13px;
  height: 13px;
}

/* Split explainer --------------------------------------------------------- */

.gst-split-explainer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.gst-split-card {
  position: relative;
  overflow: hidden;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--cream);
}

.gst-split-card--inter {
  background:
    radial-gradient(420px 240px at 100% 0%, rgba(73, 70, 168, 0.1), transparent 70%),
    var(--white);
}

.gst-split-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--white);
  color: var(--red);
  box-shadow: var(--shadow-xs);
}

.gst-split-card--inter .gst-split-icon {
  color: var(--indigo);
}

.gst-split-icon .icon {
  width: 19px;
  height: 19px;
}

.gst-split-tag {
  display: block;
  margin-top: 0.8rem;
  color: var(--red);
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gst-split-card--inter .gst-split-tag {
  color: var(--indigo);
}

.gst-split-card h3 {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.gst-split-card p {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.65;
}

.gst-mini-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
  padding: 0.55rem 0.6rem;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: var(--white);
}

.gst-mini-pin {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: none;
  border-radius: 8px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 0.52rem;
  font-weight: 800;
}

.gst-mini-line {
  flex: 1;
  min-width: 18px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 8px);
}

.gst-mini-tax {
  margin-left: auto;
  padding: 0.22rem 0.42rem;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red-deep);
  font-family: var(--font-display);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.gst-mini-route--inter .gst-mini-tax {
  background: var(--indigo-soft);
  color: var(--indigo);
}

.gst-mini-route--inter .gst-mini-pin:last-of-type {
  background: var(--indigo);
}

/* FAQ and related --------------------------------------------------------- */

#faqs .faq-aside h2,
#faqs .faq-aside p {
  text-wrap: pretty;
}

/* Motion ------------------------------------------------------------------ */

@keyframes gst-float {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(-3deg);
  }
  50% {
    transform: translate(-50%, calc(-50% - 10px)) rotate(-2deg);
  }
}

@keyframes gst-chip-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes gst-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(28, 115, 87, 0.35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(28, 115, 87, 0);
  }
}

@keyframes gst-receipt-in {
  from {
    opacity: 0;
    transform: translateY(16px) rotate(0.5deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes gst-total-pop {
  0% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes gst-bar-shine {
  0% {
    opacity: 0;
    transform: translateX(-110%);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(110%);
  }
}

@keyframes gst-stamp-in {
  from {
    opacity: 0;
    transform: rotate(-18deg) scale(1.35);
  }
  to {
    opacity: 0.68;
    transform: rotate(-10deg) scale(1);
  }
}

@keyframes gst-route-dash {
  to {
    background-position: 10px 0;
  }
}

@keyframes gst-route-status-pulse {
  0%,
  100% {
    opacity: 0.5;
    box-shadow: 0 0 0 0 transparent;
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 0 4px var(--route-glow);
  }
}

@keyframes gst-pin-ring {
  0% {
    opacity: 0;
    transform: scale(0.84);
  }
  14% {
    opacity: 0.6;
  }
  46%,
  100% {
    opacity: 0;
    transform: scale(1.32);
  }
}

@keyframes gst-route-token {
  0% {
    left: 0;
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-7deg) scale(0.72);
  }
  10% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-7deg) scale(1);
  }
  48% {
    left: 100%;
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-7deg) scale(1);
  }
  58%,
  100% {
    left: 100%;
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-7deg) scale(0.9);
  }
}

@keyframes gst-route-pill-shine {
  0%,
  46% {
    transform: translateX(-110%);
  }
  78%,
  100% {
    transform: translateX(110%);
  }
}

@keyframes gst-orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes gst-doc-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(var(--doc-rotate, -10deg));
  }
  50% {
    transform: translate3d(0, -10px, 0) rotate(calc(var(--doc-rotate, -10deg) + 2deg));
  }
}

@keyframes gst-scan {
  0% {
    top: -12%;
    opacity: 0;
  }
  12%,
  82% {
    opacity: 1;
  }
  100% {
    top: 112%;
    opacity: 0;
  }
}

@keyframes gst-watermark {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1100px) {
  .gst-hero-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .gst-hero-deco {
    max-width: 270px;
    height: 340px;
  }

  .gst-deco-receipt {
    width: 195px;
  }

  .gst-deco-receipt > strong {
    font-size: 2.9rem;
  }
}

@media (max-width: 1000px) {
  .gst-hero-grid {
    grid-template-columns: 1fr;
  }

  .gst-hero-deco {
    display: none;
  }

  .gst-calc-shell {
    grid-template-columns: 1fr;
  }

  .gst-calc-result {
    padding-top: 1.6rem;
  }

  .gst-formula-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gst-rate-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .gst-calc-heading h2 {
    font-size: 1.9rem;
  }

  .gst-compare-head {
    display: block;
  }

  .gst-compare-head > p {
    max-width: none;
    margin-top: 0.55rem;
    text-align: left;
  }

  .gst-compare-grid {
    grid-template-columns: 1fr;
  }

  .gst-compare-card {
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 0.7rem;
  }

  .gst-compare-card .gst-compare-rate {
    grid-row: 1 / span 3;
    align-self: start;
    padding-top: 0.2rem;
  }

  .gst-compare-card > strong {
    grid-column: 2;
    grid-row: 1;
  }

  .gst-compare-label {
    display: block;
    grid-column: 2;
    grid-row: 2;
  }

  .gst-compare-card > small {
    grid-column: 2;
    grid-row: 3;
  }

  .gst-rate-special {
    display: block;
  }

  .gst-rate-special-actions {
    margin-top: 0.9rem;
  }

  .gst-split-explainer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .gst-calc-inputs,
  .gst-calc-result {
    padding: 1.2rem;
  }

  .gst-calc-shell {
    border-radius: var(--radius-lg);
  }

  .gst-choice-grid--2 {
    grid-template-columns: 1fr;
  }

  .gst-rate-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gst-formula-grid,
  .gst-rate-guide {
    grid-template-columns: 1fr;
  }

  .gst-receipt {
    padding: 1rem;
  }

  .gst-receipt-total > strong {
    font-size: 2.35rem;
  }

  .gst-receipt-foot {
    padding-right: 0;
  }

  .gst-stamp {
    display: none;
  }

  .gst-result-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gst-result-actions .btn,
  .gst-result-actions .gst-reset {
    width: 100%;
    justify-content: center;
  }

  .gst-result-actions .gst-reset {
    min-height: 38px;
  }

  .gst-rate-card {
    padding: 1rem;
  }

  .gst-rate-value {
    font-size: 2rem;
  }

  .gst-route {
    grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
    padding: 0.6rem;
  }

  .gst-route-pin {
    width: 28px;
    height: 28px;
    font-size: 0.5rem;
  }

  .gst-route-node strong {
    font-size: 0.62rem;
  }

  .gst-route-node small {
    font-size: 0.52rem;
  }
}

@media (max-width: 420px) {
  .gst-calc-inputs,
  .gst-calc-result {
    padding: 1rem;
  }

  .gst-result-actions {
    grid-template-columns: 1fr;
  }

  .gst-quick-amounts button {
    flex: 1 1 calc(50% - 0.4rem);
  }

  .gst-receipt-head {
    gap: 0.5rem;
  }

  .gst-receipt-badge {
    padding: 0.2rem 0.4rem;
    font-size: 0.48rem;
  }

  .gst-receipt-total > strong {
    font-size: 2.05rem;
  }

  .gst-line {
    font-size: 0.7rem;
  }

  .gst-line > strong {
    font-size: 0.72rem;
  }

  .gst-reconcile {
    font-size: 0.58rem;
  }

  .gst-receipt-foot {
    font-size: 0.52rem;
  }

  .gst-rate-special {
    padding: 1rem;
  }
}

/* Reduced motion ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .gst-hero-deco,
  .gst-deco-receipt,
  .gst-deco-chip,
  .gst-live-dot,
  .gst-live-pill span,
  .gst-receipt,
  .gst-receipt-total > strong.is-pulsing,
  .gst-split-bar.is-shimmer::after,
  .gst-stamp,
  .gst-route-line-fill,
  .gst-route-token,
  .gst-route-status::before,
  .gst-route-pin::after,
  .gst-route-tax::after,
  .gst-scene-doc,
  .gst-scene-watermark,
  .gst-calc-result::after {
    animation: none !important;
  }

  .gst-scene-scan {
    display: none;
  }

  .gst-split-seg,
  .gst-compare-card,
  .gst-rate-chip-body,
  .gst-choice-body,
  .gst-quick-amounts button,
  .gst-select-shell,
  .gst-select-chevron,
  .gst-custom-shell {
    transition: none !important;
  }
}

/* Print ------------------------------------------------------------------- */

@page {
  margin: 12mm;
}

@media print {
  html,
  body {
    background: var(--white) !important;
    color: #000 !important;
  }

  .skip-link,
  .announce,
  .site-header,
  .mobile-menu,
  .gst-hero,
  .gst-calc-inputs,
  .gst-result-scene,
  .gst-result-top,
  .gst-result-actions,
  .gst-result-note,
  .gst-compare,
  .gst-noscript,
  #how-it-works,
  #rates,
  #split,
  #faqs,
  #related,
  .cta-wrap,
  .footer,
  .wa-float {
    display: none !important;
  }

  .gst-calc-section {
    padding: 0 !important;
    border: 0 !important;
    background: var(--white) !important;
  }

  .gst-calc-section::before {
    display: none !important;
  }

  .gst-calc-section > .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .gst-calc-shell {
    display: block !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: var(--white) !important;
  }

  .gst-calc-result {
    display: block !important;
    overflow: visible !important;
    padding: 0 !important;
    background: var(--white) !important;
    color: #000 !important;
  }

  .gst-calc-result::before,
  .gst-calc-result::after,
  .gst-receipt::before,
  .gst-receipt::after {
    display: none !important;
  }

  .gst-receipt {
    max-width: 190mm;
    margin: 0 auto;
    padding: 10mm;
    border: 1px solid #222 !important;
    border-radius: 0 !important;
    background: var(--white) !important;
    box-shadow: none !important;
    color: #000 !important;
    animation: none !important;
  }

  .gst-print-head {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 5mm;
    margin-bottom: 5mm;
    border-bottom: 1px solid #222;
    font-size: 9pt;
    line-height: 1.4;
  }

  .gst-print-head strong {
    display: block;
    font-family: var(--font-display);
    font-size: 12pt;
  }

  .gst-print-head span {
    color: #333;
  }

  .gst-receipt-head {
    border-color: #ccc;
  }

  .gst-receipt-head > div > span,
  .gst-receipt-total > span,
  .gst-receipt-foot,
  .gst-split-legend,
  .gst-line > span,
  .gst-compare-label,
  .gst-receipt-total > small {
    color: #444 !important;
  }

  .gst-receipt-head > div > strong,
  .gst-receipt-total > strong,
  .gst-line > strong {
    color: #000 !important;
  }

  .gst-receipt-total > small {
    color: #333 !important;
  }

  .gst-receipt-badge {
    border-color: #999 !important;
    color: #333 !important;
  }

  .gst-split-bar,
  .gst-split-legend,
  .gst-dot {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .gst-split-seg {
    transition: none !important;
  }

  .gst-receipt-lines,
  .gst-receipt-foot,
  .gst-line,
  .gst-receipt-rule,
  .gst-receipt-head {
    border-color: #ccc !important;
  }

  .gst-reconcile {
    background: #f4f4f4 !important;
    color: #333 !important;
  }

  .gst-reconcile-icon {
    background: #e8f3ee !important;
    color: #1c7357 !important;
  }

  .gst-stamp {
    display: none !important;
  }

  .gst-print-disclaimer {
    display: block !important;
    margin-top: 6mm;
    padding-top: 3mm;
    border-top: 1px solid #ddd;
    color: #444;
    font-size: 8pt;
    line-height: 1.45;
  }

  .gst-receipt-foot span + span::before {
    color: #777;
  }
}
