:root {
  --paper: #F6F3EC;
  --card: #FFFDF8;
  --green: #2F5D50;
  --green-deep: #22463C;
  --mustard: #E8B04A;
  --coral: #DD7A5C;
  --ink: #22313F;
  --muted: rgba(34, 49, 63, 0.68);
  --line: #D9D2C3;
  --sage: #B8C6BC;
  --font-display: 'Amiri', Georgia, serif;
  --font-body: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 22px;
  --shadow: 0 18px 42px rgba(34, 49, 63, 0.08);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.72;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; letter-spacing: 0; }

.bidi {
  display: inline-block;
  unicode-bidi: isolate;
}

.tl-container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* Floating Cardstock Pill Navbar */
.tl-header {
  position: fixed;
  top: 14px;
  inset-inline: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  padding-inline: 16px;
  pointer-events: none;
}

.tl-nav-pill {
  pointer-events: auto;
  width: min(1060px, 100%);
  padding: 8px 10px;
  padding-inline-start: 18px;
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tl-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  white-space: nowrap;
}

.tl-fold-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--green) 50%, var(--mustard) 50%);
  flex-shrink: 0;
}

.tl-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
}

.tl-nav-links a { color: var(--muted); }
.tl-nav-links a:hover { color: var(--ink); }

.tl-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
  white-space: nowrap;
}

.tl-btn:hover { transform: translateY(-2px); }

.tl-btn-mustard {
  background: var(--mustard);
  color: var(--ink);
}

.tl-btn-green {
  background: var(--green);
  color: #FFFDF8;
}

.tl-btn-card {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}

.tl-btn-sm {
  padding: 8px 15px;
  font-size: 12.5px;
  border-radius: 10px;
}

/* 1. Folded Cardstock Bar-Chart Hero */
.tl-hero {
  padding: 108px 0 64px;
}

.tl-kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 18px;
}

.tl-kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
}

.tl-hero-head {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: end;
  margin-bottom: 28px;
}

.tl-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.65rem, 4.9vw, 4.5rem);
  font-weight: 700;
  line-height: 1.32;
}

.tl-fold-word {
  color: var(--green);
  position: relative;
  display: inline-block;
}

.tl-fold-word::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 2px;
  height: 7px;
  border-radius: 3px;
  background: var(--mustard);
  z-index: -1;
}

.tl-hero-stage {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 8.6;
  background: #E8E2D5;
}

.tl-hero-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Interactive 12-Month Hover Columns Overlay */
.tl-bars-hitgrid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  z-index: 3;
}

.tl-bar-col {
  cursor: pointer;
  transition: background 0.2s;
}

.tl-bar-col:hover,
.tl-bar-col.active {
  background: linear-gradient(to top, rgba(47, 93, 80, 0.18), transparent 65%);
}

.tl-hud-deadline {
  position: absolute;
  top: 20px;
  inset-inline-start: 20px;
  z-index: 4;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  pointer-events: none;
}

.tl-hud-saved {
  position: absolute;
  bottom: 18px;
  inset-inline-end: 20px;
  z-index: 4;
  padding: 14px 20px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  pointer-events: none;
}

.tl-bar-tooltip {
  position: absolute;
  bottom: 84px;
  inset-inline-end: 24%;
  z-index: 5;
  padding: 7px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #FFFDF8;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(34, 49, 63, 0.28);
}

.tl-stage-cap {
  position: absolute;
  bottom: 14px;
  inset-inline-start: 20px;
  z-index: 4;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
}

.tl-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}

/* Sections */
.tl-sec {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.tl-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--green);
  margin-bottom: 16px;
}

.tl-eyebrow::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 9px solid var(--mustard);
  border-inline-start: 9px solid transparent;
}

.tl-h2 {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 3.8vw, 3.3rem);
  font-weight: 700;
  line-height: 1.32;
  margin-bottom: 14px;
}

/* 2. Four-Beat Cardstock Chapter Switcher */
.tl-chapter-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: center;
}

.tl-beat-tabs {
  display: grid;
  gap: 10px;
}

.tl-beat-btn {
  text-align: start;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.2s;
}

.tl-beat-btn.active {
  background: var(--green);
  color: #FFFDF8;
  border-color: var(--green);
}

.tl-metrics-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.tl-metric-card {
  padding: 20px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
}

/* 3. Packages (Monthly/Annual Toggle + 3 Paper-Craft Cards + Receipt Estimator) */
.tl-billing-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 34px;
}

.tl-toggle-pill {
  display: inline-flex;
  padding: 5px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  gap: 4px;
}

.tl-toggle-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tl-toggle-btn.active {
  background: var(--ink);
  color: #FFFDF8;
}

.tl-pkg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 36px;
}

.tl-pkg-card {
  padding: 28px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tl-pkg-card.featured {
  background: var(--green);
  color: #FFFDF8;
  border-color: var(--green-deep);
}

.tl-pkg-art {
  height: 92px;
  border-radius: 14px;
  background: #ECE6D8;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px 0;
  overflow: hidden;
}

.tl-pkg-card.featured .tl-pkg-art {
  background: rgba(255, 253, 248, 0.14);
}

.tl-pkg-art i {
  display: block;
  width: 24px;
  border-radius: 4px 4px 0 0;
}

.tl-pkg-price {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 700;
  line-height: 1.25;
  margin: 10px 0 4px;
}

.tl-pkg-list {
  list-style: none;
  padding: 16px 0 0;
  margin: 16px 0 24px;
  border-top: 1px dashed rgba(128, 128, 128, 0.35);
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.tl-pkg-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-pkg-list li::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 8px solid var(--mustard);
  border-inline-start: 8px solid transparent;
  flex-shrink: 0;
}

/* Dashed Receipt Calculator */
.tl-receipt-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
}

.tl-receipt-slip {
  padding: 24px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.tl-receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

/* 4. Tax & ZATCA Deadlines Interactive Calendar */
.tl-entity-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tl-ent-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.tl-ent-btn.active {
  background: #7A858C;
  color: #FFFDF8;
  border-color: #7A858C;
}

.tl-year-track {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  padding: 18px 0;
  margin: 24px 0;
  border-block: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.tl-year-track span::after {
  content: '◆';
  display: block;
  color: var(--sage);
  font-size: 12px;
  margin-top: 4px;
}

.tl-year-track span.hot::after { color: var(--coral); }

.tl-dates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 32px;
}

.tl-date-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.tl-date-badge {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: #EFECE3;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.tl-date-badge.urgent {
  background: var(--coral);
  color: #FFFDF8;
  border-color: var(--coral);
}

.tl-date-badge strong {
  font-family: var(--font-display);
  font-size: 24px;
}

.tl-date-badge small {
  font-size: 10.5px;
  font-weight: 700;
}

/* 5. Client Portal (Three Taps) + FAQ + Contact */
.tl-portal-band {
  background: var(--green-deep);
  color: #FFFDF8;
  padding: 88px 0;
}

.tl-taps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.tl-tap-card {
  padding: 26px;
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.08);
  border: 1px solid rgba(255, 253, 248, 0.16);
}

.tl-contact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.tl-faq {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.tl-faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
}

/* Footer */
.tl-footer {
  border-top: 1px solid var(--line);
  padding: 52px 0 40px;
  background: #EDE8DC;
}

.tl-showcase-rail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .tl-nav-links { display: none; }
  .tl-hero-head,
  .tl-chapter-grid,
  .tl-metrics-3,
  .tl-pkg-grid,
  .tl-receipt-grid,
  .tl-dates-grid,
  .tl-taps-grid,
  .tl-contact-split { grid-template-columns: 1fr; }
  .tl-year-track { display: none; }
}
