/* Compliance calendar (/due-dates) and document checklists (/checklists, /documents-for-...) */
.res-wrap {
  max-width: 960px;
}

.res-intro {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: 1.8;
  max-width: 760px;
  margin: 0 0 1.5rem;
}

.res-updated {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin: 0 0 1.5rem;
}

/* Filter chips */
.dd-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 2rem;
}

.dd-filter {
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.dd-filter:hover {
  border-color: var(--color-button);
  color: var(--color-button);
}

.dd-filter[aria-pressed="true"] {
  background: var(--color-button);
  border-color: var(--color-button);
  color: var(--color-white);
}

/* Month tables */
.dd-month {
  margin: 0 0 2.5rem;
}

.dd-month h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.dd-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.dd-table th,
.dd-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: top;
  font-size: var(--text-sm);
}

.dd-table th {
  background: var(--color-bg-alt);
  color: var(--color-text-tertiary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.dd-table tr:last-child td {
  border-bottom: 0;
}

.dd-date {
  white-space: nowrap;
  font-weight: 700;
  color: var(--color-text-primary);
}

.dd-date small {
  display: block;
  font-weight: 400;
  color: var(--color-text-tertiary);
  font-size: var(--text-xs);
}

.dd-what {
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.dd-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  background: #EFF6FF;
  color: var(--color-accent);
}

.dd-tag[data-cat="Income Tax"] { background: #ECFDF5; color: #047857; }
.dd-tag[data-cat="TDS"],
.dd-tag[data-cat="TCS"],
.dd-tag[data-cat="TDS / TCS"] { background: #FEF3C7; color: #92400E; }
.dd-tag[data-cat="ROC"] { background: #F3E8FF; color: #6B21A8; }
.dd-tag[data-cat="Payroll"] { background: #F1F5F9; color: #334155; }

.dd-row.is-past td {
  opacity: 0.45;
}

.dd-row.is-past .dd-what::after {
  content: ' (passed)';
  font-style: italic;
}

.dd-row.is-next td {
  background: #FFFBEB;
}

.dd-row[hidden] {
  display: none;
}

.dd-note {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  line-height: 1.7;
  border-left: 3px solid var(--color-border);
  padding-left: 1rem;
  margin: 0 0 2rem;
}

/* Checklists */
.cl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 2.5rem;
}

.cl-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.cl-group {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 1.4rem 1.5rem;
  break-inside: avoid;
}

.cl-group h2 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 0.9rem;
}

.cl-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cl-group label {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.55;
  cursor: pointer;
}

.cl-group input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  accent-color: var(--color-button);
}

.cl-group input:checked + span {
  text-decoration: line-through;
  color: var(--color-text-tertiary);
}

.cl-note {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin: 1.75rem 0 0;
  line-height: 1.7;
}

/* Hub page cards */
.cl-hub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.cl-hub a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  border-radius: var(--border-radius-lg);
  background: var(--color-white);
  text-decoration: none;
  transition: transform var(--duration-fast), box-shadow var(--duration-fast), border-color var(--duration-fast);
}

.cl-hub a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--color-card-shadow);
}

.cl-hub strong {
  color: var(--color-text-primary);
  font-size: var(--text-base);
}

.cl-hub span {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

.cl-hub em {
  font-style: normal;
  color: var(--color-button);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-top: 0.35rem;
}

@media (max-width: 760px) {
  .cl-groups {
    grid-template-columns: 1fr;
  }
  .dd-table thead {
    display: none;
  }
  .dd-table,
  .dd-table tbody,
  .dd-table tr,
  .dd-table td {
    display: block;
    width: 100%;
  }
  .dd-table tr {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border-light);
  }
  .dd-table td {
    padding: 0.15rem 0;
    border: 0;
  }
  .dd-date small {
    display: inline;
    margin-left: 0.35rem;
  }
}

/* Printing a checklist or the calendar: just the content */
@media print {
  .navbar,
  .footer,
  .scroll-progress,
  .hero-pattern,
  .breadcrumb,
  .cl-actions,
  .dd-filters,
  .svc-cta,
  .svc-related,
  .res-noprint {
    display: none !important;
  }
  @page {
    size: A4;
    margin: 10mm 11mm 11mm;
  }
  html,
  body {
    background: #fff !important;
    font-size: 10pt;
    /* The site sets overflow-x: hidden, which makes browsers print the page as one
       unbreakable block (title alone on page 1, content pushed to page 2). */
    overflow: visible !important;
    height: auto !important;
  }
  /* styles.css says "section { page-break-inside: avoid }" for print, which pushes a whole
     checklist to the next page whenever it doesn't fit under the title. Let it flow. */
  section {
    position: static !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }
  /* styles.css also prints each link's address after it; not wanted on a checklist */
  a[href]::after {
    content: none !important;
  }
  /* Compact title block: no dark band, no forced height, nothing that pushes content to page 2 */
  .page-header {
    display: block !important;
    min-height: 0 !important;
    padding: 0 0 3mm !important;
    margin: 0 0 4mm !important;
    background: none !important;
    border-bottom: 1px solid #999;
    overflow: visible !important;
  }
  .page-header::before,
  .page-header::after {
    display: none !important;
  }
  .page-header .container,
  .section .container {
    max-width: none !important;
    padding: 0 !important;
  }
  .page-header-title {
    color: #000 !important;
    font-size: 17pt !important;
    margin: 0 0 1mm !important;
    letter-spacing: 0;
  }
  .page-header-subtitle {
    color: #444 !important;
    font-size: 9.5pt !important;
    margin: 0 !important;
  }
  .section {
    padding: 0 !important;
    background: #fff !important;
  }
  .res-intro {
    font-size: 9.5pt;
    line-height: 1.45;
    margin: 0 0 4mm;
    max-width: none;
    color: #222;
  }

  /* Checklists: two newspaper-style columns that flow across pages,
     so short sections sit under each other instead of leaving gaps */
  .cl-groups {
    display: block !important;
    column-count: 2;
    column-gap: 6mm;
  }
  .cl-group {
    display: block;
    width: 100%;
    margin: 0 0 3mm;
    padding: 2.5mm 3.2mm;
    border: 1px solid #bbb;
    border-radius: 2mm;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .cl-group h2 {
    font-size: 10.5pt;
    margin: 0 0 2mm;
    color: #000;
    break-after: avoid;
  }
  .cl-group ul {
    gap: 1.2mm;
  }
  .cl-group label {
    font-size: 9pt;
    line-height: 1.3;
    color: #111;
    gap: 2mm;
  }
  .cl-group input[type="checkbox"] {
    width: 3.2mm;
    height: 3.2mm;
    margin-top: 0.4mm;
  }
  .cl-note {
    font-size: 8pt;
    line-height: 1.4;
    margin: 2mm 0 0;
    color: #444;
  }
  .cl-print-footer {
    display: block !important;
    margin-top: 2mm;
    padding-top: 2mm;
    border-top: 1px solid #ccc;
    font-size: 8pt;
    color: #444;
  }

  /* Compliance calendar: compact table, rows never split, header repeats on each page */
  .dd-month {
    margin: 0 0 5mm;
    break-inside: auto;
  }
  .dd-month h2 {
    font-size: 12pt;
    margin: 0 0 2mm;
    break-after: avoid;
  }
  /* A printed page is narrow enough to trigger the phone layout (table turned into cards);
     always print a real table, with the header repeated on each page */
  .dd-table {
    display: table !important;
    width: 100% !important;
    border: 1px solid #bbb;
    border-radius: 0;
  }
  .dd-table thead {
    display: table-header-group !important;
  }
  .dd-table tbody {
    display: table-row-group !important;
  }
  .dd-table tr {
    display: table-row !important;
    padding: 0 !important;
  }
  .dd-table th,
  .dd-table td {
    display: table-cell !important;
    width: auto !important;
    border-bottom: 1px solid #ddd !important;
  }
  .dd-date {
    width: 21% !important;
  }
  .dd-date small {
    display: inline !important;
    margin-left: 1.5mm !important;
    font-size: 8pt !important;
  }
  /* Dates that have already passed are left off the printout */
  .dd-row.is-past {
    display: none !important;
  }
  .dd-month:not(:has(.dd-row:not(.is-past))) {
    display: none !important;
  }
  .dd-table th,
  .dd-table td {
    padding: 1.4mm 2.5mm;
    font-size: 8.5pt;
  }
  .dd-row {
    break-inside: avoid;
  }
  .dd-row.is-past td {
    opacity: 1;
    color: #777;
  }
  .dd-row.is-next td {
    background: none;
  }
  .dd-tag {
    padding: 0;
    background: none !important;
    color: #000 !important;
    font-weight: 600;
  }
  .dd-note {
    font-size: 8pt;
    margin: 0;
  }
  #faq {
    display: none !important;
  }
}

.cl-print-footer {
  display: none;
}

/* Brand line at the top of printouts only (never shown on screen) */
.print-brand {
  display: none;
}

@media print {
  .print-brand {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-end;
    gap: 6mm;
    padding: 0 0 2.5mm;
    margin: 0 0 4mm;
    border-bottom: 2px solid #1E3A8A;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-brand-name {
    font-size: 16pt;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0F172A;
    line-height: 1.1;
  }
  .print-brand-name span {
    color: #1D4ED8;
  }
  .print-brand-name small {
    display: block;
    font-size: 8.5pt;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #475569;
    margin-top: 1mm;
  }
  .print-brand-name em {
    display: block;
    font-style: normal;
    font-size: 8.5pt;
    font-weight: 400;
    letter-spacing: 0;
    color: #334155;
    margin-top: 1mm;
  }
  .print-brand-contact {
    font-size: 8pt;
    line-height: 1.45;
    color: #334155;
    text-align: right;
  }
  /* The firm's details are now at the top, so the footer line is no longer needed */
  .cl-print-footer {
    display: none !important;
  }
  .page-header-title {
    font-size: 15pt !important;
  }
}
