/* ArthiQuery calculator components. No external assets or font requests. */
.aq-single-calculator .aq-entry-content.aq-narrow-container {
  max-width: 1050px;
}

.aq-single-calculator .aq-entry-content > :not(.aqc-calculator):not(.aqc-related) {
  max-width: 780px;
  margin-right: auto;
  margin-left: auto;
}

.aqc-calculator,
.aqc-calculator *,
.aqc-calculator *::before,
.aqc-calculator *::after {
  box-sizing: border-box;
}

.aqc-calculator [hidden] {
  display: none !important;
}

.aqc-calculator {
  --aqc-navy: var(--aq-navy-950, #07192d);
  --aqc-navy-soft: var(--aq-navy-800, #123452);
  --aqc-teal: var(--aq-teal-700, #0f766e);
  --aqc-teal-dark: var(--aq-teal-800, #0b655f);
  --aqc-teal-soft: var(--aq-teal-50, #eaf8f6);
  --aqc-teal-line: var(--aq-teal-100, #ccefeb);
  --aqc-page: var(--aq-page, #f4f7f8);
  --aqc-white: var(--aq-white, #fff);
  --aqc-ink: var(--aq-ink-900, #102332);
  --aqc-muted: var(--aq-ink-600, #4e6271);
  --aqc-line: var(--aq-line, #dce5ea);
  --aqc-line-strong: var(--aq-line-strong, #c5d2da);
  --aqc-danger: var(--aq-danger, #b4232c);
  width: 100%;
  margin: 0 0 3rem;
  border: 1px solid var(--aqc-line);
  border-radius: 16px;
  padding: clamp(1rem, 3vw, 1.75rem);
  background: var(--aqc-white);
  color: var(--aqc-ink);
}

.aqc-calculator__title,
.aq-entry-content .aqc-calculator__title {
  margin: 0 0 1.25rem;
  color: var(--aqc-navy);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.aqc-calculator__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 1.25rem;
  align-items: stretch;
}

.aqc-calculator__input-panel,
.aqc-calculator__result-panel {
  min-width: 0;
  border: 1px solid var(--aqc-line);
  border-radius: 12px;
  padding: clamp(1rem, 2.5vw, 1.35rem);
}

.aqc-calculator__input-panel {
  background: var(--aqc-white);
}

.aqc-calculator__result-panel {
  min-height: 430px;
  background: var(--aqc-page);
}

.aqc-result-empty {
  display: grid;
  min-height: 380px;
  margin: 0;
  place-items: center;
  color: var(--aqc-muted);
  text-align: center;
}

.aqc-form {
  display: grid;
  gap: 1rem;
}

.aqc-field {
  display: grid;
  gap: 0.4rem;
}

.aqc-field label,
.aqc-check {
  color: var(--aqc-navy);
  font-size: 0.91rem;
  font-weight: 700;
}

.aqc-field small {
  color: var(--aqc-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.aqc-field input,
.aqc-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--aqc-line-strong);
  border-radius: 9px;
  padding: 0.7rem 0.8rem;
  background: var(--aqc-white);
  color: var(--aqc-ink);
  font: inherit;
  line-height: 1.2;
}

.aqc-field input::placeholder {
  color: #72828e;
  opacity: 1;
}

.aqc-field input:hover,
.aqc-field select:hover {
  border-color: #aabac4;
}

.aqc-field input:focus-visible,
.aqc-field select:focus-visible,
.aqc-check input:focus-visible,
.aqc-button:focus-visible,
.aqc-chart-tab:focus-visible,
.aqc-text-button:focus-visible,
.aqc-advanced summary:focus-visible,
.aqc-faq summary:focus-visible,
.aqc-table-scroll:focus-visible {
  outline: 3px solid var(--aqc-teal-line);
  outline-offset: 2px;
  border-color: var(--aqc-teal);
}

.aqc-input-prefix,
.aqc-input-suffix {
  position: relative;
}

.aqc-input-prefix > span,
.aqc-input-suffix > span {
  position: absolute;
  top: 50%;
  color: var(--aqc-muted);
  font-weight: 700;
  transform: translateY(-50%);
  pointer-events: none;
}

.aqc-input-prefix > span {
  left: 0.85rem;
}

.aqc-input-suffix > span {
  right: 0.85rem;
}

.aqc-input-prefix input {
  padding-left: 1.8rem;
}

.aqc-input-suffix input {
  padding-right: 2.1rem;
}

.aqc-advanced {
  border: 1px solid var(--aqc-line);
  border-radius: 10px;
  background: var(--aqc-white);
}

.aqc-advanced summary {
  cursor: pointer;
  padding: 0.8rem 0.9rem;
  color: var(--aqc-navy);
  font-size: 0.9rem;
  font-weight: 750;
}

.aqc-advanced__body {
  display: grid;
  gap: 1rem;
  border-top: 1px solid var(--aqc-line);
  padding: 1rem;
}

.aqc-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.aqc-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--aqc-teal);
}

.aqc-error {
  border: 1px solid #efb9bd;
  border-radius: 9px;
  padding: 0.75rem 0.9rem;
  background: #fff6f6;
  color: #8f1d25;
  font-size: 0.84rem;
}

.aqc-error ul {
  margin: 0;
  padding-left: 1.1rem;
}

.aqc-error li + li {
  margin-top: 0.3rem;
}

.aqc-form__actions,
.aqc-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.aqc-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0.65rem 0.95rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
}

.aqc-button--primary {
  background: var(--aqc-teal);
  color: var(--aqc-white);
}

.aqc-button--primary:hover {
  background: var(--aqc-teal-dark);
}

.aqc-button--quiet,
.aqc-button--secondary {
  border-color: var(--aqc-line-strong);
  background: var(--aqc-white);
  color: var(--aqc-navy);
}

.aqc-button--quiet:hover,
.aqc-button--secondary:hover {
  border-color: var(--aqc-teal);
  background: var(--aqc-teal-soft);
}

.aqc-results {
  display: grid;
  gap: 1rem;
}

.aqc-print-title {
  display: none;
}

.aqc-print-brand,
.aqc-print-footer {
  display: none;
}

.aqc-result-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.aqc-result-card {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  border: 1px solid var(--aqc-line);
  border-radius: 10px;
  padding: 0.85rem;
  background: var(--aqc-white);
}

.aqc-result-card span {
  color: var(--aqc-muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.aqc-result-card strong {
  overflow-wrap: anywhere;
  color: var(--aqc-navy);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.25;
}

.aqc-result-card--primary {
  grid-column: 1 / -1;
  border-color: var(--aqc-teal-line);
  background: var(--aqc-teal-soft);
}

.aqc-result-card--primary strong {
  color: var(--aqc-teal-dark);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.aqc-result-summary {
  margin: 0;
  border-left: 3px solid var(--aqc-teal);
  padding: 0.8rem 0.9rem;
  background: var(--aqc-white);
  color: var(--aqc-ink);
  font-size: 0.87rem;
  line-height: 1.65;
}

.aqc-chart-tabs {
  display: flex;
  gap: 0.35rem;
  border-bottom: 1px solid var(--aqc-line);
}

.aqc-chart-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0.6rem 0.75rem;
  background: transparent;
  color: var(--aqc-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}

.aqc-chart-tab[aria-selected="true"] {
  border-bottom-color: var(--aqc-teal);
  color: var(--aqc-teal-dark);
}

.aqc-chart-panel {
  min-height: 220px;
  border-radius: 10px;
  padding: 0.8rem;
  background: var(--aqc-white);
}

.aqc-pie-wrap {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.aqc-pie {
  position: relative;
  width: min(100%, 180px);
  aspect-ratio: 1;
  margin: auto;
  border-radius: 50%;
  background: conic-gradient(var(--aqc-teal) 0 var(--aqc-deposit-share, 50%), var(--aqc-navy-soft) var(--aqc-deposit-share, 50%) 100%);
}

.aqc-pie::after {
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  background: var(--aqc-white);
  content: "";
}

.aqc-chart-legend {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aqc-chart-legend li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.05rem 0.5rem;
  color: var(--aqc-ink);
  font-size: 0.8rem;
}

.aqc-chart-legend strong {
  grid-column: 2;
  color: var(--aqc-navy);
  font-size: 0.82rem;
}

.aqc-dot {
  width: 10px;
  height: 10px;
  margin-top: 0.25rem;
  border-radius: 50%;
}

.aqc-dot--deposit {
  background: var(--aqc-teal);
}

.aqc-dot--interest {
  background: var(--aqc-navy-soft);
}

.aqc-growth-chart {
  width: 100%;
  min-height: 220px;
}

.aqc-growth-bars {
  display: flex;
  min-width: min-content;
  height: 220px;
  gap: clamp(3px, 0.8vw, 9px);
  align-items: flex-end;
  overflow-x: auto;
  padding: 0.75rem 0.35rem 0;
}

.aqc-growth-column {
  display: grid;
  width: clamp(18px, 3vw, 34px);
  height: 100%;
  flex: 1 0 18px;
  grid-template-rows: minmax(0, 1fr) 2.5rem;
  gap: 0.35rem;
  align-items: end;
  justify-items: stretch;
}

.aqc-growth-bar {
  display: block;
  min-height: 3px;
  border-radius: 5px 5px 1px 1px;
  background: var(--aqc-teal);
}

.aqc-growth-bar--negative {
  background: var(--aqc-danger);
}

.aqc-growth-column small {
  overflow: hidden;
  color: var(--aqc-muted);
  font-size: 0.6rem;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
}

.aqc-chart-empty {
  display: grid;
  min-height: 190px;
  margin: 0;
  place-items: center;
  color: var(--aqc-muted);
  text-align: center;
}

.aqc-growth-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.aqc-growth-grid {
  stroke: var(--aqc-line);
  stroke-width: 1;
}

.aqc-growth-area {
  fill: var(--aqc-teal-soft);
}

.aqc-growth-line {
  fill: none;
  stroke: var(--aqc-teal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.aqc-growth-point {
  fill: var(--aqc-white);
  stroke: var(--aqc-teal-dark);
  stroke-width: 3;
}

.aqc-growth-label {
  fill: var(--aqc-muted);
  font-family: inherit;
  font-size: 12px;
}

.aqc-result-actions {
  padding-top: 0.25rem;
}

.aqc-action-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--aqc-teal-dark);
  font-size: 0.78rem;
}

.aqc-schedule,
.aqc-history {
  margin-top: 1.25rem;
  border: 1px solid var(--aqc-line);
  border-radius: 12px;
  padding: clamp(1rem, 2.5vw, 1.25rem);
  background: var(--aqc-white);
}

.aqc-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.9rem;
}

.aq-entry-content .aqc-section-heading h2,
.aqc-section-heading h2 {
  margin: 0;
  color: var(--aqc-navy);
  font-size: 1.1rem;
}

.aqc-section-heading p {
  margin: 0;
  color: var(--aqc-muted);
  font-size: 0.76rem;
}

.aqc-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--aqc-line);
  border-radius: 9px;
}

.aq-entry-content .aqc-table-scroll table,
.aqc-table-scroll table {
  min-width: 820px;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  background: var(--aqc-white);
  font-variant-numeric: tabular-nums;
}

.aq-entry-content .aqc-table-scroll th,
.aq-entry-content .aqc-table-scroll td,
.aqc-table-scroll th,
.aqc-table-scroll td {
  border: 0;
  border-bottom: 1px solid var(--aqc-line);
  padding: 0.65rem 0.75rem;
  text-align: right;
  white-space: nowrap;
}

.aq-entry-content .aqc-table-scroll th,
.aqc-table-scroll th {
  background: var(--aqc-teal-soft);
  color: var(--aqc-navy);
  font-size: 0.75rem;
}

.aq-entry-content .aqc-table-scroll td,
.aqc-table-scroll td {
  color: var(--aqc-ink);
  font-size: 0.78rem;
}

.aqc-table-scroll th:first-child,
.aqc-table-scroll td:first-child,
.aqc-table-scroll th:nth-child(2),
.aqc-table-scroll td:nth-child(2) {
  text-align: left;
}

.aqc-table-scroll tbody tr:last-child td {
  border-bottom: 0;
}

.aqc-history-list {
  display: grid;
  gap: 0.6rem;
}

.aqc-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--aqc-line);
  border-radius: 9px;
  padding: 0.75rem 0.85rem;
}

.aqc-history-item > div:first-child {
  display: grid;
  gap: 0.2rem;
}

.aqc-history-item strong {
  color: var(--aqc-navy);
  font-size: 0.84rem;
}

.aqc-history-item small {
  color: var(--aqc-muted);
  font-size: 0.72rem;
}

.aqc-history-actions {
  display: flex;
  gap: 0.55rem;
}

.aqc-history-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--aqc-line);
  border-radius: 9px;
  padding: 0.75rem 0.85rem;
}

.aqc-history-card__copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.aqc-history-card__copy strong {
  color: var(--aqc-navy);
  font-size: 0.85rem;
}

.aqc-history-card__copy span {
  color: var(--aqc-muted);
  font-size: 0.74rem;
}

.aqc-history-card__actions {
  display: flex;
  gap: 0.6rem;
  flex: 0 0 auto;
}

.aqc-text-button {
  border: 0;
  padding: 0.25rem;
  background: transparent;
  color: var(--aqc-teal-dark);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

.aqc-text-button--danger {
  color: var(--aqc-danger);
}

.aqc-cashflows {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--aqc-line);
  border-radius: 10px;
  padding: 0.9rem;
}

.aqc-cashflows legend {
  padding: 0 0.3rem;
  color: var(--aqc-navy);
  font-size: 0.91rem;
  font-weight: 750;
}

.aqc-field-hint {
  margin: 0 0 0.8rem;
  color: var(--aqc-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.aqc-cashflow-list {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}

.aqc-cashflow-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(180px, 1.2fr) auto;
  gap: 0.6rem;
  align-items: end;
  border-bottom: 1px solid var(--aqc-line);
  padding-bottom: 0.7rem;
}

.aqc-cashflow-row label {
  display: grid;
  gap: 0.35rem;
  color: var(--aqc-navy);
  font-size: 0.78rem;
  font-weight: 700;
}

.aqc-cashflow-row input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--aqc-line-strong);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  background: var(--aqc-white);
  color: var(--aqc-ink);
  font: inherit;
}

.aqc-noscript {
  margin: 1rem 0 0;
  border: 1px solid #eed290;
  border-radius: 9px;
  padding: 0.75rem;
  background: #fff9e8;
}

.aqc-faqs {
  margin-top: 2.5rem;
}

.aqc-faqs__list {
  display: grid;
  gap: 0.55rem;
}

.aqc-faq {
  border: 1px solid var(--aq-line, #dce5ea);
  border-radius: 10px;
  background: var(--aq-white, #fff);
}

.aqc-faq summary {
  cursor: pointer;
  padding: 0.9rem 1rem;
  color: var(--aq-navy-950, #07192d);
  font-weight: 750;
}

.aqc-faq[open] summary {
  border-bottom: 1px solid var(--aq-line, #dce5ea);
}

.aqc-faq__answer {
  padding: 0.9rem 1rem;
}

.aqc-faq__answer p:last-child {
  margin-bottom: 0;
}

.aqc-related {
  margin-top: 2.5rem;
}

.aqc-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.aq-entry-content .aqc-related__card,
.aqc-related__card {
  display: grid;
  gap: 0.35rem;
  border: 1px solid var(--aq-line, #dce5ea);
  border-radius: 10px;
  padding: 1rem;
  background: var(--aq-white, #fff);
  color: var(--aq-navy-950, #07192d);
  text-decoration: none;
}

.aqc-related__card:hover {
  border-color: var(--aq-teal-700, #0f766e);
  background: var(--aq-teal-50, #eaf8f6);
}

.aqc-related__card span {
  color: var(--aq-ink-600, #4e6271);
  font-size: 0.78rem;
}

.aq-entry-content pre.wp-block-preformatted {
  overflow-x: auto;
  border: 1px solid var(--aq-line, #dce5ea);
  border-left: 3px solid var(--aq-teal-700, #0f766e);
  border-radius: 8px;
  padding: 1rem;
  background: var(--aq-teal-50, #eaf8f6);
  color: var(--aq-navy-950, #07192d);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

@media (max-width: 860px) {
  .aqc-calculator__layout {
    grid-template-columns: 1fr;
  }

  .aqc-calculator__result-panel {
    min-height: 300px;
  }

  .aqc-result-empty {
    min-height: 250px;
  }

  .aqc-related__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .aqc-calculator {
    border-radius: 12px;
    padding: 0.75rem;
  }

  .aqc-calculator__input-panel,
  .aqc-calculator__result-panel {
    border-radius: 10px;
    padding: 0.85rem;
  }

  .aqc-result-cards,
  .aqc-pie-wrap,
  .aqc-related__grid {
    grid-template-columns: 1fr;
  }

  .aqc-result-card--primary {
    grid-column: auto;
  }

  .aqc-form__actions .aqc-button--primary {
    flex: 1 1 auto;
  }

  .aqc-result-actions .aqc-button {
    flex: 1 1 calc(50% - 0.55rem);
  }

  .aqc-history-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .aqc-history-item,
  .aqc-cashflow-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .aqc-history-item {
    flex-direction: column;
  }

  .aqc-history-actions {
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aqc-calculator *,
  .aqc-calculator *::before,
  .aqc-calculator *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media print {
  @page {
    margin: 14mm;
  }

  body.aqc-printing * {
    visibility: hidden !important;
  }

  body.aqc-printing .aqc-print-target,
  body.aqc-printing .aqc-print-target * {
    visibility: visible !important;
  }

  body.aqc-printing .aqc-print-target {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    border: 0;
    padding: 0;
    background: #fff;
  }

  body.aqc-printing .aqc-calculator__title,
  body.aqc-printing .aqc-calculator__input-panel,
  body.aqc-printing .aqc-chart-tabs,
  body.aqc-printing .aqc-chart-panel,
  body.aqc-printing .aqc-result-actions,
  body.aqc-printing .aqc-action-status,
  body.aqc-printing .aqc-history,
  body.aqc-printing noscript {
    display: none !important;
  }

  body.aqc-printing .aqc-calculator__layout {
    display: block;
  }

  body.aqc-printing .aqc-print-brand {
    display: block;
    margin: 0 0 7mm;
    border-bottom: 1px solid #dce5ea;
    padding: 0 0 5mm;
  }

  body.aqc-printing .aqc-print-brand img {
    display: block;
    width: 175px;
    height: auto;
  }

  body.aqc-printing .aqc-print-footer {
    display: block;
    position: fixed;
    right: 0;
    bottom: -7mm;
    left: 0;
    border-top: 1px solid #dce5ea;
    padding-top: 2.5mm;
    color: #07192d;
    font-size: 9pt;
    font-weight: 700;
    text-align: center;
  }

  body.aqc-printing .aqc-calculator__result-panel,
  body.aqc-printing .aqc-schedule {
    min-height: 0;
    margin: 0 0 8mm;
    border: 0;
    padding: 0;
    background: #fff;
  }

  body.aqc-printing .aqc-print-title {
    display: block;
    margin: 0 0 6mm;
    color: #07192d;
    font-size: 20pt;
  }

  body.aqc-printing .aqc-result-card,
  body.aqc-printing .aqc-result-summary {
    break-inside: avoid;
  }

  body.aqc-printing .aqc-table-scroll {
    overflow: visible;
  }

  body.aqc-printing .aqc-table-scroll table {
    min-width: 0;
    font-size: 7pt;
  }

  body.aqc-printing .aqc-table-scroll th,
  body.aqc-printing .aqc-table-scroll td {
    padding: 3px 4px;
  }
}
