/* ============================================================
   Custom Page Module Styles — GoFreight Theme Design System
   ============================================================ */

/* ------------------------------------------------------------
   1. Container & Layout Base
   ------------------------------------------------------------ */
.custom-page-wrap,
.custom-page-section,
.custom-page-hero-section,
.custom-page-strip-section,
.custom-page-why-now-section,
.custom-page-tax-section,
.custom-page-tax-viewport {
  letter-spacing: -0.03em;
}

.custom-page-wrap {
  max-width: var(--container-width, 1400px);
  margin: 0 auto;
}

.custom-page-section {
  padding: 80px 40px;
}

.custom-page-section--dark {
  background: var(--surface-background-dark);
  border-top: none;
  color: var(--text-muted-inverted, rgba(255, 255, 255, 0.8));
}

.custom-page-section--dark h2,
.custom-page-section--dark h3,
.custom-page-section--dark h4 {
  color: var(--text-primary-inverted, #FFFFFF);
}

/* Section Header Typography */
.custom-page-sechead {
  max-width: 640px;
  margin-bottom: 40px;
}

.custom-page-sechead--center {
  text-align: center;
  margin: 0 auto 80px;
}

.custom-page-sechead p {
  margin-top: 10px;
}

.custom-page-lede--dark {
  color: var(--text-muted-inverted, rgba(255, 255, 255, 0.8));
}

.custom-page-fn {
  display: block;
  margin-top: 20px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 640px;
}


/* ------------------------------------------------------------
   2. Hero Section
   ------------------------------------------------------------ */
.custom-page-hero-section {
  padding: 40px;
  background: var(--surface-background-white, #FFFFFF);
}

.custom-page-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.custom-page-hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.custom-page-hero-title {
  margin-bottom: 10px;
}

.custom-page-hero-desc {
  margin-bottom: 40px;
}

.custom-page-hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.custom-page-hero-btn-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 6px;
}

.custom-page-hero-sub {
  font-size: 12px;
  margin: 0;
}

.custom-page-hero-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
}

.custom-page-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.custom-page-hero-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 50%, #F0F9F7 100%);
  border-radius: 12px;
  border: 1px dashed #CBD5E1;
}


/* ------------------------------------------------------------
   3. Trust Strip
   ------------------------------------------------------------ */
.custom-page-strip-section {
  padding: 40px;
  margin-bottom: 40px;
}

.custom-page-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  overflow: hidden;
}

.custom-page-strip-item {
  border-right: 1px solid var(--border-primary, #E2E5EA);
  padding-right: 20px;
}

.custom-page-strip-item:last-child {
  border-right: none;
}

.custom-page-strip-item span {
  display: block;
  font-size: 18px;
  color: var(--text-primary, #2D3136);
  margin-bottom: 10px;
  font-weight: 600;
}


/* ------------------------------------------------------------
   4. Why Now Section
   ------------------------------------------------------------ */
.custom-page-why-now-section {
  background: var(--surface-background-light);
}

.custom-page-why-now-section .custom-page-wrap {
  max-width: 1140px;
  margin: 40px auto;
}

/* Scroll Animation Setup */
.custom-page-why-now-section .custom-page-sechead {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.custom-page-why-now-card {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: stretch;
}

.custom-page-why-now-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.custom-page-why-now-item {
  padding: 0;
  border-bottom: none;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.custom-page-why-now-item:first-child {
  padding-top: 0;
}

.custom-page-why-now-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.custom-page-why-now-date {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-500);
  margin-bottom: 20px;
  font-size: 12px;
  margin-top: 4px;
}

.custom-page-why-now-date::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border-primary, rgba(0, 0, 0, 0.15));
}

.custom-page-why-now-item:last-child .custom-page-why-now-date::after {
  display: none;
}

.custom-page-why-now-header {
  margin-bottom: 10px;
}

.custom-page-why-now-media {
  position: relative;
  top: auto;
  width: 100%;
  height: 460px;
  min-height: 320px;
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(45px) scale(0.97);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Revealed state when scrolled into view */
.custom-page-why-now-section.is-visible .custom-page-sechead {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}

.custom-page-why-now-item:nth-child(1) { transition-delay: 0.1s; }
.custom-page-why-now-item:nth-child(2) { transition-delay: 0.25s; }
.custom-page-why-now-item:nth-child(3) { transition-delay: 0.4s; }

.custom-page-why-now-media.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

/* Left column item individual scroll reveal */
.custom-page-why-now-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.custom-page-why-now-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.custom-page-why-now-sources {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  text-align: center;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}


/* ------------------------------------------------------------
   5. Two-System Tax Stage & Interactive Viewport (Option 1)
   ------------------------------------------------------------ */
.custom-page-tax-section {
  position: relative;
  overflow: hidden;
  padding: 100px 40px;
  background: #FFFFFF;
}

.custom-page-tax-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: stretch;
  position: relative;
  width: 100%;
}

/* Left Sidebar: 4 Cards Stack */
.custom-page-tax-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;

}

.custom-page-tax-card {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-primary, #E2E5EA);
  padding-bottom: 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;

}

.custom-page-tax-card:hover {
  border-color: #CBD5E1;

}

.custom-page-tax-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
}

.custom-page-tax-card p {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 0;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, margin-top 0.35s ease;
}

.custom-page-tax-card.is-active p {
  max-height: 140px;
  opacity: 1;
  margin-top: 8px;
}

/* Progress bar inside active card */
.custom-page-tax-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
}

.custom-page-tax-card.is-active .custom-page-tax-progress-bar {
  height: 100%;
  background: var(--brand-500, #34AA97);
  width: 0%;
  transition: width 0.1s linear;
}

/* Right Column: Viewport (16:9 Aspect Ratio) */
.custom-page-tax-viewport {
  position: relative;
  background: radial-gradient(circle at bottom right, rgba(255, 233, 161, 0.4) 0%, rgba(232, 242, 221, 0.4) 50%, rgba(241, 244, 248, 1) 100%);
  border-radius: 10px;
  padding: 16px;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; /* Center horizontally in desktop flex layout */
  box-shadow: none;
  overflow: hidden;
  box-sizing: border-box;
  letter-spacing: -0.03em;
}

/* Dual Windows Container Layout */
.custom-page-mock-container {
  display: flex;
  gap: 12px;
  width: 100%; /* Fluid container width to allow windows to slide across full viewport */
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
  overflow: visible; /* Prevent clipping during sliding */
}

.custom-page-tax-viewport:not(.mode-rekey) .custom-page-mock-container {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.97);
}

.custom-page-mock-window {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
  position: absolute;
  top: 50%;
  left: 50%; /* Center the window by default */
  width: 800px; /* Fixed design size */
  height: 520px;
  transform: translate(-50%, -50%); /* Center aligning transform */
}

.custom-page-mock-window--tms {
  z-index: 1;
}

.custom-page-mock-window--abi {
  z-index: 2;
}

/* Mode 1: You Key It Twice - Animation Flow (TMS slides out left, ACE slides in right) */
.custom-page-tax-viewport.mode-rekey .custom-page-mock-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

.custom-page-tax-viewport.mode-rekey .custom-page-mock-window {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 520px;
  box-sizing: border-box;
}

/* Mode 1: You Key It Twice - 10s Paced Flow with Easing Curves */
.custom-page-tax-viewport.mode-rekey .custom-page-mock-window--tms {
  animation: tms-slide-out-left 10s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

.custom-page-tax-viewport.mode-rekey .custom-page-mock-window--abi {
  animation: ace-slide-in-right 10s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes tms-slide-out-left {
  0%, 40% {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
  55%, 100% {
    transform: translate(-150%, -50%);
    opacity: 0;
  }
}

@keyframes ace-slide-in-right {
  0%, 40% {
    transform: translate(150%, -50%);
    opacity: 0;
  }
  55%, 100% {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

/* ------------------------------------------------------------
   TMS Window CSS Sizing & Layout (Pixel-Perfect from original SVG)
   ------------------------------------------------------------ */
.tms-html-window {
  width: 800px;
  height: 520px;
  background: #F1F4F8;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

.tms-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 39px;
  display: flex;
  align-items: center;
}

.tms-dots {
  position: absolute;
  left: 14.5px;
  display: flex;
  gap: 6px;
}

.tms-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #D9D9D9;
}

.tms-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #5E6369;
  letter-spacing: -0.03em;
  margin: 0;
}

.tms-divider {
  position: absolute;
  top: 39px;
  left: 0;
  width: 100%;
  height: 1px;
  background: #E2E5EA;
}

.tms-sidebar {
  position: absolute;
  top: 40px;
  left: 0;
  width: 47px;
  height: 480px;
  background: #E2E5EA;
  border-right: 1px solid #E2E5EA;
  box-sizing: border-box;
}

.tms-content {
  position: absolute;
  top: 40px;
  left: 47px;
  width: 753px;
  height: 480px;
  box-sizing: border-box;
  background: var(--surface-background-light)
}

.tms-section-label {
  position: absolute;
  left: 11px; /* 58px from window left edge */
  top: 13.5px; /* 62.59px relative to y=39 header separator */
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #2D3136;
  letter-spacing: -0.03em;
}

.tms-card {
  position: absolute;
  left: 11.5px; /* 58.5px from window left edge */
  width: 731px;
  height: 233px;
  background: #FFFFFF;
  border: 1px solid #E2E5EA;
  border-radius: 3.5px;
  box-sizing: border-box;
}

.tms-card-1 {
  top: 37.5px; /* 76.5px relative to y=39 header separator */
}

.tms-card-2 {
  top: 281.5px; /* 320.5px relative to y=39 header separator */
}

.tms-field {
  position: absolute;
  width: 169.5px;
  height: 29px; /* Match input box height */
  box-sizing: border-box;
}

.tms-field-label {
  position: absolute;
  bottom: 31px; /* 2px above input box */
  left: 0;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 500;
  color: #2D3136;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.tms-input-box {
  width: 169.5px;
  height: 29px;
  border: 1px solid #E2E5EA;
  background: #FFFFFF;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding-left: 7.5px;
  font-family: "Inter", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ------------------------------------------------------------
   ACE (Filing Platform) Window CSS Sizing & Layout (Pixel-Perfect)
   ------------------------------------------------------------ */
.ace-html-window {
  width: 800px;
  height: 520px;
  background: #F1F4F8;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

/* Force global Inter font and primary text color for all children inside Filing Platform (ACE) window */
.ace-html-window,
.ace-html-window * {
  font-family: "Inter", sans-serif !important;
  color: var(--text-primary) !important;
}

.ace-table tr.row-highlight td {
  color: #FFFFFF !important;
}

.ace-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 39px;
  display: flex;
  align-items: center;
}

.ace-dots {
  position: absolute;
  left: 14.5px;
  display: flex;
  gap: 6px;
}

.ace-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #D9D9D9;
}

.ace-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #5E6369;
  letter-spacing: -0.03em;
  margin: 0;
}

.ace-divider {
  position: absolute;
  top: 39px;
  left: 0;
  width: 100%;
  height: 1px;
  background: #E2E5EA;
}

.ace-menu-bar {
  position: absolute;
  top: 40px;
  left: 0;
  width: 100%;
  height: 21px;
  background: #E2E5EA;
  display: flex;
  align-items: center;
  padding-left: 10px;
  gap: 12px;
  box-sizing: border-box;
}

.ace-menu-bar span {
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  color: #000000;
  cursor: default;
}

.ace-tabs {
  position: absolute;
  top: 61px;
  left: 0;
  width: 100%;
  height: 21px;
  display: flex;
  background: #C2C7CF;
  box-sizing: border-box;
}

.ace-tab {
  height: 21px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  color: #000000;
  background: #C2C7CF;
  border-right: 1px solid #C2C7CF;
  cursor: default;
}

.ace-tab.ace-tab--active {
  background: #F1F4F8;
  font-weight: bold;
  border-top: 1px solid #C2C7CF;
  border-left: 1px solid #C2C7CF;
  border-right: 1px solid #C2C7CF;
}

.ace-content {
  position: absolute;
  top: 82px;
  left: 0;
  width: 800px;
  height: 438px;
  border-left: 1px solid #BDBDBD;
  border-right: 1px solid #BDBDBD;
  border-bottom: 1px solid #BDBDBD;
  box-sizing: border-box;
}

.ace-column {
  position: absolute;
  top: 8px; /* 90px relative to header separator at y=82 */
  height: 420px;
  border: 1px solid #B5B5B5;
  box-sizing: border-box;
  background: #F1F4F8;
}

.ace-column.col-1 {
  left: 7.1px;
  width: 233.2px;
}

.ace-column.col-2 {
  left: 248.4px;
  width: 283.9px;
}

.ace-column.col-3 {
  left: 542.5px;
  width: 251.4px;
}

.ace-column-title {
  position: absolute;
  top: -6px;
  left: 8px;
  background: #F1F4F8;
  padding: 0 4px;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #000000;
}

.ace-field {
  position: absolute;
  left: 0; /* Align field wrapper to column boundary to match inline absolute inputs */
  width: 214.9px;
  height: 18px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.ace-label {
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  color: #000000;
  position: absolute;
  left: 8.1px; /* Offset the label by the original margin */
}

.ace-label-bold {
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #000000;
}

.ace-input-box {
  height: 18px;
  border: 1px solid #BDBDBD;
  background: #FFFFFF;
  box-sizing: border-box;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  color: #000000;
  display: flex;
  align-items: center;
  padding-left: 4px;
  position: absolute;
}

.ace-btn {
  height: 18px;
  border: 1px solid #BDBDBD;
  background: #DBDBDB;
  box-sizing: border-box;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  cursor: default;
}

.ace-field-stacked {
  position: absolute;
  left: 8.1px;
  width: 214.9px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.ace-input-row {
  position: relative;
  width: 100%;
  height: 18px;
  margin-top: 4px;
}

.ace-input-row .ace-input-box {
  left: 0;
}

.ace-input-row .ace-btn {
  right: 0;
}

.ace-display-box {
  width: 100%;
  height: 70px;
  border: 1px solid #BDBDBD;
  background: #FFFFFF;
  box-sizing: border-box;
  padding: 4px 6px;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  line-height: 1.25;
  color: #000000;
  text-align: left;
}

.ace-btn-light {
  height: 18px;
  border: 1px solid #BDBDBD;
  background: #DBDBDB;
  box-sizing: border-box;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  color: #000000;
  display: flex;
  align-items: center;
  padding-left: 4px;
  position: absolute;
}

.ace-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #BDBDBD;
  margin-top: 4px;
  background: #FFFFFF;
}

.ace-table th {
  background: #DBDBDB;
  border-bottom: 1px solid #B5B5B5;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #000000;
  text-align: left;
  padding: 2px 4px;
}

.ace-table td {
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  color: #000000;
  padding: 2px 4px;
  text-align: left;
}

.ace-table tr.row-highlight td {
  background: #000080;
  color: #FFFFFF;
}

.ace-button-row {
  position: absolute;
  left: 8.1px;
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
}

.ace-btn-classic {
  height: 20px;
  border: 1px solid #BDBDBD;
  background: #DBDBDB;
  box-sizing: border-box;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.ace-btn-dark {
  height: 18px;
  border: 1px solid #BDBDBD;
  background: #DBDBDB;
  box-sizing: border-box;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  color: #000000;
  display: flex;
  align-items: center;
  padding-left: 6px;
  position: absolute;
}

.ace-log-box {
  width: 100%;
  height: 270px;
  border: 1px solid #BDBDBD;
  background: #FFFFFF;
  box-sizing: border-box;
  padding: 4px 6px;
  font-family: "Tahoma", sans-serif;
  font-size: 10px;
  line-height: 1.3;
  color: #000000;
  overflow-y: auto;
  text-align: left;
}

.ace-status-bar {
  position: absolute;
  top: 520px;
  left: 0;
  width: 100%;
  height: 20px;
  background: #F2F2F2;
  border-top: 1px solid #C3C3C3;
  box-sizing: border-box;
}

/* Sequential typing animation EXCLUSIVELY for text inside HTML input boxes */
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  animation: tms-svg-input-type 0.35s forwards cubic-bezier(0.25, 1, 0.5, 1);
  display: inline-block;
}

@keyframes tms-svg-input-type {
  0% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    clip-path: inset(0 0% 0 0);
    opacity: 1;
  }
}

.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-1 { animation-delay: 0.10s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-2 { animation-delay: 0.22s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-3 { animation-delay: 0.34s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-4 { animation-delay: 0.46s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-5 { animation-delay: 0.58s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-6 { animation-delay: 0.70s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-7 { animation-delay: 0.82s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-8 { animation-delay: 0.94s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-9 { animation-delay: 1.06s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-10 { animation-delay: 1.18s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-11 { animation-delay: 1.30s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-12 { animation-delay: 1.42s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-13 { animation-delay: 1.54s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-14 { animation-delay: 1.66s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-15 { animation-delay: 1.78s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-16 { animation-delay: 1.90s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-17 { animation-delay: 2.02s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-18 { animation-delay: 2.14s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-19 { animation-delay: 2.26s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-20 { animation-delay: 2.38s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-21 { animation-delay: 2.50s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-22 { animation-delay: 2.62s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-23 { animation-delay: 2.74s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-24 { animation-delay: 2.86s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-25 { animation-delay: 2.98s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-26 { animation-delay: 3.10s; }
.custom-page-tax-viewport.mode-rekey .tms-html-window .tms-svg-input-val-27 { animation-delay: 3.22s; }

/* Sequential field-by-field typing in ACE HTML window with Easing Curve */
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  animation: ace-svg-input-type 0.35s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

.custom-page-tax-viewport.mode-rekey .ace-html-window span.ace-svg-input-val {
  display: inline-block;
}

.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-display-box span.ace-svg-input-val,
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-log-box span.ace-svg-input-val {
  display: block;
  width: 100%;
}

@keyframes ace-svg-input-type {
  0% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    clip-path: inset(0 0% 0 0);
    opacity: 1;
  }
}

.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-1  { animation-delay: 5.50s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-2  { animation-delay: 5.60s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-3  { animation-delay: 5.75s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-4  { animation-delay: 5.85s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-5  { animation-delay: 6.00s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-6  { animation-delay: 6.15s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-7  { animation-delay: 6.35s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-8  { animation-delay: 6.50s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-9  { animation-delay: 6.70s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-10 { animation-delay: 6.85s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-11 { animation-delay: 7.05s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-12 { animation-delay: 7.25s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-13 { animation-delay: 7.45s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-14 { animation-delay: 7.55s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-15 { animation-delay: 7.70s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-16 { animation-delay: 7.85s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-17 { animation-delay: 8.00s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-18 { animation-delay: 8.20s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-19 { animation-delay: 8.40s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-20 { animation-delay: 8.60s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-21 { animation-delay: 8.85s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-22 { animation-delay: 9.00s; }
.custom-page-tax-viewport.mode-rekey .ace-html-window .ace-svg-input-val-23 { animation-delay: 9.20s; }

/* Typing Cursor */
.custom-page-typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background-color: var(--brand-500, #34AA97);
  margin-left: 2px;
  vertical-align: middle;
  animation: custom-page-blink 0.7s infinite;
}

@keyframes custom-page-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Overlays Setup */
.custom-page-tax-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(10px);
}

/* Mode 2: Drift Overlay (Monochrome Completed Document Sheets) */
.custom-page-tax-viewport.mode-drift .overlay-drift {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  justify-content: center;
}

.drift-sheets-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 660px;
  max-width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.drift-doc-sheet {
  flex: 1;
  width: 275px;
  aspect-ratio: 210 / 297; /* Standard A4 paper ratio */
  background: #FFFFFF;
  border: none;
  border-radius: 8px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  flex-shrink: 0;
  box-sizing: border-box;
}

.drift-sheet-header {
  padding: 10px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drift-sheet-title {
  display: flex;
  flex-direction: column;
}

.drift-doc-type {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.drift-doc-id {
  font-size: 10px;
  color: #64748B;
}

.drift-sheet-body {
  padding: 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
}

.drift-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  background: #F8FAFC;
  border: none;
  border-radius: 4px;
  font-size: 10px;
}

.drift-field-row--mismatch {
  background: #FEF2F2;
  border: 1px solid #EF4444;
}

.drift-lbl {
  font-size: 9.5px;
  font-weight: 500;
  color: #64748B;
}

.drift-val {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
}

.drift-val--bold {
  font-weight: 600;
  color: var(--text-primary);
}

.drift-val--mismatch {
  font-weight: 600;
  color: #475569;
}

/* Centered Badge Wrapper between two sheets */
.drift-badge-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: auto;
  margin: 0 2px;
}

.drift-break-badge {
  font-size: 13px;
  font-weight: 600;
  background: #E2E8F0;
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  border: none;
}

/* Mode 2: Static display for Mismatch Pairs (Animations removed) */
.custom-page-tax-viewport.mode-drift .drift-field-row--mismatch {
  transition: all 0.35s ease;
}

/* Mode 3: Status Chat Overlay & Sequential Animations */
.custom-page-tax-viewport.mode-status .overlay-status {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.tax-chat-window {
  background: transparent;
  border: none;
  border-radius: 0;
  width: 100%;
  max-width: 640px;
  box-shadow: none;
  overflow: visible;
}

.tax-chat-messages {
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

.chat-bubble {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: none;
}

/* Left - Right - Left Scattered Alignment */
.chat-bubble--cust {
  align-self: flex-start;
  max-width: 60%;
  margin-left: 0;
}

.chat-bubble--ops {
  align-self: flex-end;
  max-width: 60%;
  margin-left: auto;
}

.chat-bubble--desk {
  align-self: flex-start;
  max-width: 60%;
  margin-left: 24px; /* Scattered offset */
}

/* Staggered sequential appearance in Mode 3 */
.custom-page-tax-viewport.mode-status .chat-bubble:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}

.custom-page-tax-viewport.mode-status .chat-bubble:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.65s;
}

.custom-page-tax-viewport.mode-status .chat-bubble:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1.15s;
}

.chat-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none;
  overflow: hidden;
}

.chat-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.chat-avatar--cust {
  background: #EEF2FF;
  color: #4338CA;
}

.chat-avatar--ops {
  background: #DCFCE7;
  color: #15803D;
}

.chat-avatar--desk {
  background: #FEF3C7;
  color: #B45309;
}

.chat-bubble-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.chat-user-role {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-unselected);
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 12px;
  border-radius: 4px;
}

.chat-text {
  background: #FFFFFF;
  padding: 20px;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

/* Mode 4: Pay Twice Overlay (2 Distinct A4 Monochrome Invoices) */
.custom-page-tax-viewport.mode-paytwice .overlay-paytwice {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.tax-invoices-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  max-width: 680px;
}

/* Base A4 Sheet */
.tax-invoice-sheet {
  flex: 1;
  background: #FFFFFF;
  padding: 20px 18px;
  aspect-ratio: 210 / 297;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: none;
  font-family: inherit;
  color: var(--text-primary);
  box-sizing: border-box;
}

/* Common Typography Labels */
.inv-lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #64748B;
  text-transform: uppercase;
}

.inv-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}

.inv-val-mono {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ------------------------------------------------------------
   Invoice 1: Modern SaaS Layout
   ------------------------------------------------------------ */
.tax-invoice-sheet--modern {
  border-top: 4px solid #0F172A;
}

.inv-mod-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid #E2E8F0;
}


.inv-mod-company {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px 0 0 0;
}

.inv-mod-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.inv-mod-num {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
}

.inv-mod-date {
  font-size: 9px;
  font-weight: 500;
  color: #64748B;
}

.inv-mod-bill {
  margin: 12px 0;
}

.inv-mod-table {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.inv-mod-row {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-primary);
}

.inv-mod-row--head {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #94A3B8;
  border-bottom: 1px solid #F1F5F9;
  padding-bottom: 4px;
}

.inv-mod-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: auto;
}

.inv-mod-total-lbl {
  font-size: 9.5px;
  font-weight: 700;
  color: #475569;
  letter-spacing: -0.03em;
}

.inv-mod-total-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}

/* ------------------------------------------------------------
   Invoice 2: Classic Billing Form Layout
   ------------------------------------------------------------ */
.inv-cls-header {
  border-bottom: 2px double #334155;
  padding-bottom: 8px;
}

.inv-cls-top-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.inv-cls-tag {
  font-size: 8px;
  font-weight: 700;
  border: 1px solid #CBD5E1;
  padding: 1px 4px;
}

.inv-cls-num {
  font-size: 10px;
  font-weight: 700;
}

.inv-cls-company {
  font-size: 10px;
  margin: 0;
  text-transform: uppercase;
}

.inv-cls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  padding: 6px 8px;
  margin: 10px 0;
}

.inv-cls-cell {
  display: flex;
  flex-direction: column;
}

.inv-cls-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inv-cls-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px dashed #CBD5E1;
  padding-bottom: 6px;
}

.inv-cls-item-desc {
  display: flex;
  flex-direction: column;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
}

.inv-cls-sub {
  font-size: 8.5px;
  font-weight: 400;
  color: #64748B;
}

.inv-cls-item-amt {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.inv-cls-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inv-cls-total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--text-primary);
  border-bottom: 1px solid var(--text-primary);
  padding: 5px 0;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
}

.inv-cls-price {
  font-size: 13px;
  font-weight: 800;
}



/* ------------------------------------------------------------
   7. One Record Section
   ------------------------------------------------------------ */
.one-record-main-visual {
  width: 100%;
  margin: 0 auto 40px auto;
}

.one-record-main-visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.one-record-image-placeholder {
  width: 100%;
  height: 400px;
  background-color: #E2E8F0;
  border-radius: 8px;
}


.one-record-steps {
  width: 100%;
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: flex-start;
}

.one-record-step-item {
  position: relative;
  display: flex;
  flex-direction: column;
}

.step-item-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.step-num {
  font-size: 14px;
  color: var(--brand-500, #34AA97);
  background: rgba(52, 170, 151, 0.12);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.step-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, rgba(52, 170, 151, 0.4) 0%, rgba(0, 0, 0, 0.08) 100%);
}

.one-record-step-item:last-child .step-line {
  display: none;
}

.step-title {
  margin: 0 0 10px 0;
}


/* ------------------------------------------------------------
   8. Coverage Table Component
   ------------------------------------------------------------ */
.custom-page-cov {
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  width: 100%;
}

.custom-page-cov-row {
  display: grid;
  grid-template-columns: 200px 1fr 100px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #EEF2F6;
  gap: 20px;
}

.custom-page-cov-row:last-child {
  border-bottom: 1px solid #EEF2F6;
}

.custom-page-cov-row > div:first-child {
  padding: 0;
  background: transparent;
  border: none;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 14px;
}

.custom-page-cov-row > div:nth-child(2) {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.custom-page-cov-row > div:last-child {
  padding: 0;
  text-align: center;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.custom-page-code {
  font-size: 14px;
  color: var(--text-muted);
  border-right: 1px solid #CBD5E1;
  padding-right: 16px;
  margin-right: 16px;
  display: inline-block;
  line-height: 1.4;
}

.custom-page-code:last-child {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}

.custom-page-code--off {
  background: transparent;
  color: var(--text-muted);
  text-decoration: line-through;
}


/* ------------------------------------------------------------
   9. Filing Register Section (Dark Theme)
   ------------------------------------------------------------ */
.custom-page-register {
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
}

.custom-page-reg-head {
  display: grid;
  grid-template-columns: 140px 1fr 200px;
  gap: 20px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--gray-400, #9AA1AA);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.custom-page-reg-head > div:last-child {
  text-align: right;
}

.custom-page-reg-row {
  display: grid;
  grid-template-columns: 140px 1fr 200px;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  align-items: start;
}

.custom-page-reg-row:last-child {
  border-bottom: none;
}

.custom-page-rd {
  font-size: 14px;
  color: #FFFFFF;
  font-weight: 500;
}

.custom-page-rt span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
  display: block;
  word-break: normal;
  overflow-wrap: break-word;
}

.custom-page-rs {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.custom-page-rs-date {
  font-size: 12px;
  color: var(--gray-400, #9AA1AA);
}

.custom-page-reg-foot {
  padding: 20px 0;
  font-size: 12px;
  color: var(--gray-400, #9AA1AA);
}


/* ------------------------------------------------------------
   10. Comparison Table
   ------------------------------------------------------------ */
.custom-page-cmp-container {
  position: relative;
  width: 100%;
}

.custom-page-cmp-wrapper {
  width: 100%;
}

.custom-page-cmp {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  border: none;
  font-size: 16px;
  margin-top: 32px;
}

.custom-page-cmp th,
.custom-page-cmp td {
  padding: 20px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-primary, #E2E5EA);
  border-top: none;
  border-left: none;
  border-right: none;
  vertical-align: top;
  line-height: 1.5;
}

.custom-page-cmp thead th {
  background: transparent;
  vertical-align: bottom;
  border-bottom: 1px solid var(--text-primary, #2D3136);
}

.custom-page-cmp tbody th {
  color: var(--text-primary);
  background: transparent;
  font-weight: 500;
}

.custom-page-cmp tbody td {
  color: var(--text-muted);
  font-size: 14px;
}

/* Highlighted GoFreight Column */
.custom-page-cmp .custom-page-us {
  background: var(--brand-50, #F0F9F7);
}

.custom-page-cmp th.custom-page-us {
  border-top: 1px solid var(--brand-500, #34AA97);
  border-left: 1px solid var(--brand-500, #34AA97);
  border-right: 1px solid var(--brand-500, #34AA97);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  padding-top: 16px;
}

.custom-page-cmp td.custom-page-us {
  border-left: 1px solid var(--brand-500, #34AA97);
  border-right: 1px solid var(--brand-500, #34AA97);
  background: var(--brand-50, #F0F9F7);
}

.custom-page-cmp tbody tr:last-child td.custom-page-us {
  border-bottom: 1px solid var(--brand-500, #34AA97);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}


/* ------------------------------------------------------------
   11. Launch Ledger Grid
   ------------------------------------------------------------ */
.custom-page-ledger {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border: none;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.custom-page-led-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--surface-background-white, #FFFFFF);
  border: 1px solid var(--border-primary, #E2E5EA);
  border-radius: 10px;
}

.custom-page-led-row:last-child {
  border-bottom: 1px solid var(--border-primary, #E2E5EA);
}

.custom-page-led-row span:first-child {
  color: var(--text-primary, #2D3136);
}

.custom-page-led-row .custom-page-tag {
  margin-top: auto;
}


/* ------------------------------------------------------------
   12. Tags & Badges
   ------------------------------------------------------------ */
.custom-page-tag {
  font-size: 14px;
  white-space: nowrap;
  font-weight: 500;
}

.custom-page-tag--launch {
  background: var(--brand-50);
  color: var(--brand-500);
  padding: 6px 12px;
  border-radius: 4px;
}

.custom-page-tag--later,
.custom-page-tag--tracking {
  background: var(--gray-50);
  color: var(--gray-400);
  padding: 6px 12px;
  border-radius: 4px;
}

.custom-page-tag--live {
  color: #2FA896;
  background: transparent;
  padding: 0;
}

.custom-page-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
}

.custom-page-badge--handled {
  background: rgba(20, 184, 166, 0.15);
  color: #4EC1AC;
}

.custom-page-badge--pending {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}


/* ============================================================
   13. Responsive Media Queries
   ============================================================ */


/* Tablet Landscape & Mobile (<= 1024px) */
@media (max-width: 1024px) {
  .custom-page-tax-viewport {
    width: 100%;
    display: block !important;
    height: auto;
  }

  .custom-page-mock-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: visible;
  }

  .custom-page-mock-window {
    display: block !important;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 520px;
    transform: translate(-50%, -50%);
  }

}

/* Tablet Portrait (<= 991px) */
@media (max-width: 991px) {
  .custom-page-sechead--center {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 40px;
  }

  .custom-page-tax-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .custom-page-mock-container {
    grid-template-columns: 1fr;
  }

  .custom-page-tax-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .custom-page-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }


  .custom-page-why-now-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .custom-page-why-now-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px 20px;
    align-items: start;
  }

  .custom-page-why-now-date {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    height: 100%;
    margin-bottom: 0;
  }

  .custom-page-why-now-date::after {
    width: 1px;
    flex: 1;
    min-height: 30px;
    background-color: var(--border-primary, rgba(0, 0, 0, 0.15));
    display:none;

  }

  .custom-page-why-now-header {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0;
  }

  .custom-page-why-now-item p {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
  }

  .custom-page-why-now-media {
    min-height: 280px;
    height: 320px;
  }

  .why-now-section-wrap {
  margin: 0;
}

  .one-record-steps {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    gap: 0;
  }

  .one-record-step-item {
    position: relative;
    padding-left: 48px;
    padding-bottom: 32px;
  }

  .one-record-step-item:last-child {
    padding-bottom: 0;
  }

  .step-item-header {
    margin-bottom: 0;
  }

  .step-num {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
  }

  .step-line {
    position: absolute;
    left: 14px;
    top: 30px;
    bottom: 0;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, rgba(52, 170, 151, 0.4) 0%, rgba(0, 0, 0, 0.08) 100%);
    flex: none;
  }

  .one-record-step-item:last-child .step-line {
    display: none;
  }

  .step-title {
    margin: 0 0 6px 0;
  }

  .step-desc {
    margin: 0;
  }

  .custom-page-strip {
    grid-template-columns: 1fr;
  }

  .custom-page-strip-item {
    border-right: none;
    border-bottom: 1px solid var(--border-primary, #E2E5EA);
    padding-bottom: 20px;
  }

  .custom-page-strip-item:last-child {
    border-bottom: none;
  }

  .custom-page-ledger {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .custom-page-reg-head {
    display: none;
  }

  .custom-page-reg-row {
    grid-template-columns: 1fr;
  }

  .custom-page-rs {
    align-items: flex-start;
    text-align: left;
    margin-top: 16px;
    flex-direction: row;
  }

  .custom-page-cmp-container {
    position: relative;
  }

  .custom-page-cmp-container::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%);
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
  }

  .custom-page-cmp-container.is-scrolled-end::after {
    opacity: 0;
  }

  .custom-page-cmp-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .custom-page-cmp {
    min-width: 720px;
    margin-top: 0;
  }

}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  .custom-page-section {
    padding: 40px 20px;
  }

  .custom-page-hero-section,
  .custom-page-strip-section {
    padding: 40px 20px;
    margin-bottom: 0px;
  }


  .custom-page-hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .custom-page-hero-actions .button {
    width: 100%;
    justify-content: center;
  }

  .custom-page-cov-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 0;
  }


  .custom-page-cov-row > div:nth-child(2) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 0;
  }

  .custom-page-code {
    font-size: 20px;
    color: var(--text-primary);
    padding-right: 12px;
    margin-right: 12px;
  }

  .custom-page-cov-row > div:last-child {
    justify-content: flex-start;
    margin-top: 4px;
  }

  .custom-page-ledger {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Make sidebar flex-column so JS-injected viewport slots in after active card */
  .custom-page-tax-sidebar {
    display: flex;
    flex-direction: column;
  }

  /* Hide the original viewport slot in the layout — it will be moved inside sidebar by JS */
  .custom-page-tax-layout {
    display: block;
  }

  .custom-page-tax-viewport {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    padding: 0;
    overflow: hidden;
    margin: 12px 0;
  }

  .custom-page-tax-overlay {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  .drift-sheets-wrapper {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 380px;
    gap: 8px;
  }

  .drift-doc-sheet {
    width: 100%;
    aspect-ratio: auto;
    border-radius: 8px;
    box-shadow: none;
  }

  .drift-sheet-header {
    padding: 6px 10px;
  }

  .drift-sheet-body {
    padding: 6px 8px;
    gap: 2px;
  }

  .drift-field-row {
    padding: 3px 6px;
    font-size: 10px;
  }

  .drift-lbl {
    font-size: 9px;
  }

  .drift-val {
    font-size: 9.5px;
  }

  .drift-badge-wrapper {
    margin: 2px 0;
    width: 100%;
    justify-content: center;
  }

  .drift-break-badge {
    font-size: 11px;
    padding: 3px 10px;
  }

  /* Mode 3 Mobile: Nobody knows the status */
  .tax-chat-window {
    width: 100%;
    max-width: 100%;
  }

  .tax-chat-messages {
    gap: 14px;
    padding: 0;
  }

  .chat-bubble {
    max-width: 90%;
  }

  .chat-bubble--desk {
    margin-left: 10px;
  }

  .chat-avatar-circle {
    width: 34px;
    height: 34px;
  }

  .chat-user-name {
    font-size: 13px;
  }

  /* Mode 4 Mobile: You pay twice for one entry (100% Proportional Vector Transform Scaling) */
  .tax-invoices-container {
    width: 520px;
    max-width: 520px;
    flex-shrink: 0;
    gap: 14px;
    justify-content: center;
  }


