/*
Theme Name: TaxHackAI 1099
Theme URI: https://taxhackai.com/
Author: OpenAI
Description: Mobile-first custom WordPress theme for TaxHackAI V1. No plugin dependency required for the core experience.
Version: 1.13.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: taxhackai
*/

:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #dc2626;
  --warning-soft: #fee2e2;
  --gold: #f59e0b;
  --gold-soft: #fef3c7;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.site-wrap {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 247, 251, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.site-header__inner,
.site-footer__inner,
.tah-container {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-branding {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.1;
}

.site-tagline {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 14px;
  align-items: center;
}

.site-nav a {
  color: var(--text);
  font-weight: 700;
}

.tah-main {
  padding: 20px 0 110px;
}

.tah-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.tah-brand h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0;
  line-height: 1.1;
}

.tah-brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.tah-rate-box,
.tah-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tah-rate-box {
  padding: 12px;
  min-width: 170px;
}

.tah-rate-box label,
.tah-field label {
  display: block;
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 700;
}

.tah-rate-box input,
.tah-field input,
.tah-field select,
.tah-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  background: #fff;
}

.tah-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tah-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .98rem;
}

.tah-status-pill.safe { background: var(--success-soft); color: #166534; }
.tah-status-pill.warn { background: var(--warning-soft); color: #991b1b; }

.tah-grid,
.tah-layout {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.tah-grid { grid-template-columns: repeat(3, 1fr); }
.tah-layout { grid-template-columns: 1.25fr .9fr; gap: 18px; }

.tah-home-1099-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tah-grid-1099-home {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 0;
}

.tah-mini-metric {
  padding: 16px;
}

.tah-mini-metric .label {
  color: var(--muted);
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.tah-mini-metric .value {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
}

.tah-mini-metric .sub {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.5;
}

.tah-mini-metric--full {
  grid-column: span 2;
}


.tah-card { padding: 18px; }

.tah-metric-card .label {
  color: var(--muted);
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.tah-metric-card .value {
  font-size: clamp(1.95rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 10px;
}

.tah-metric-card .sub,
.tah-tiny {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
}

.tah-tax-card { background: linear-gradient(180deg, var(--gold-soft), #fff); }

.tah-upload-area {
  border: 2px dashed #bfdbfe;
  background: #f8fbff;
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: .2s ease;
}

.tah-upload-area:hover,
.tah-upload-area.dragover {
  background: #eff6ff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.tah-upload-area h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.tah-upload-area p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.tah-button-row,
.tah-stack,
.tah-actions-inline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tah-stack { flex-direction: column; }

.tah-btn,
.tah-button-like {
  appearance: none;
  border: none;
  border-radius: 16px;
  padding: 15px 18px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.tah-btn:hover,
.tah-button-like:hover { transform: translateY(-1px); }
.tah-btn-primary { background: var(--primary); color: #fff; }
.tah-btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.tah-btn-success { background: var(--success); color: #fff; }

.tah-hidden { display: none !important; }

.tah-file-input-hidden {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
}

.tah-button-row-1099 .tah-btn {
  min-width: 170px;
}

.tah-login-card {
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.tah-section-title { font-size: 1.2rem; font-weight: 800; margin: 0 0 14px; }

.tah-summary-list,
.tah-quarter-list,
.tah-upload-stats,
.tah-review-list,
.tah-daily-list {
  display: grid;
  gap: 12px;
}

.tah-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.tah-row .k { color: var(--muted); font-weight: 700; }
.tah-row .v { font-weight: 800; text-align: right; }

.tah-review-item,
.tah-day-item,
.tah-upload-stat {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.tah-review-item .top,
.tah-day-item .top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.tah-review-item .desc,
.tah-day-item .desc {
  font-weight: 700;
  line-height: 1.4;
}

.tah-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 800;
  background: #f3f4f6;
  color: #374151;
}

.tah-badge.warn { background: var(--warning-soft); color: #991b1b; }
.tah-badge.safe { background: var(--success-soft); color: #166534; }
.tah-badge.gold { background: var(--gold-soft); color: #92400e; }

.tah-empty {
  color: var(--muted);
  text-align: center;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: #fff;
}

.tah-forms-list {
  display: grid;
  gap: 12px;
}

.tah-form-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.tah-form-note {
  margin-top: 10px;
}

.tah-1099-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tah-mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: .82rem;
  font-weight: 700;
}

.tah-footer-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(245, 247, 251, 0.95);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(229, 231, 235, 0.9);
  z-index: 30;
}

.tah-footer-nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.tah-nav-btn {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 10px;
  border-radius: 14px;
  font-size: .92rem;
  font-weight: 800;
  cursor: pointer;
}

.tah-nav-btn.active {
  background: var(--primary-soft);
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.site-footer {
  border-top: 1px solid rgba(229, 231, 235, 0.9);
  background: #fff;
}

.site-footer__inner {
  padding-top: 24px;
  padding-bottom: 24px;
  color: var(--muted);
  font-size: .95rem;
}

@media (max-width: 820px) {
  .site-header__inner,
  .tah-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .tah-grid,
  .tah-layout {
    grid-template-columns: 1fr;
  }

  .site-nav { display: none; }

  .tah-rate-box { width: 100%; }
}

@media (max-width: 820px) {
  .tah-grid-1099-home { grid-template-columns: 1fr; }
  .tah-mini-metric--full { grid-column: span 1; }
}

@media (max-width: 560px) {
  .tah-main { padding: 16px 0 118px; }
  .tah-card { padding: 16px; }
  .tah-footer-nav-inner { grid-template-columns: repeat(3, 1fr); }
  .tah-upload-area { padding: 18px 14px; }
  .tah-nav-btn { font-size: .9rem; padding: 12px 8px; }
  .site-title { font-size: 1.6rem; }
  .site-tagline { font-size: .9rem; }
}


/* 1.0.1 app-shell cleanup */
body.taxhackai-app-body {
  background: var(--bg);
}

.taxhackai-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

.site-title a:hover,
.site-nav a:hover {
  text-decoration: none;
}

.site-footer,
footer.site-footer,
#wpfooter {
  display: none !important;
}


/* 1.4.0 upload polish */

.tah-busy {
  opacity: .72;
  pointer-events: none;
}

.tah-upload-feedback {
  margin-top: 16px;
  border: 1px solid #dbeafe;
  background: #ffffff;
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.tah-upload-feedback.working {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.tah-upload-feedback.success {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.tah-upload-feedback.error {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fef2f2 0%, #ffffff 100%);
}

.tah-upload-feedback__top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.tah-upload-feedback__title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.tah-upload-steps {
  display: grid;
  gap: 10px;
}

.tah-upload-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: .96rem;
}

.tah-upload-step__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #fff;
  flex: 0 0 12px;
}

.tah-upload-step.active {
  color: #1d4ed8;
}

.tah-upload-step.active .tah-upload-step__dot {
  background: var(--primary);
  border-color: var(--primary);
}

.tah-upload-step.completed {
  color: #166534;
}

.tah-upload-step.completed .tah-upload-step__dot {
  background: var(--success);
  border-color: var(--success);
}

.tah-upload-step.error {
  color: #991b1b;
}

.tah-upload-step.error .tah-upload-step__dot {
  background: var(--warning);
  border-color: var(--warning);
}

.tah-upload-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tah-summary-chip {
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.tah-summary-chip .label {
  font-size: .84rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.tah-summary-chip .value {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
}

.tah-summary-chip--full {
  grid-column: 1 / -1;
}

.tah-trust-note {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.tah-upload-stat--note {
  align-items: flex-start;
}

.tah-upload-note {
  max-width: 28ch;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .tah-grid-1099-home { grid-template-columns: 1fr; }
  .tah-mini-metric--full { grid-column: span 1; }
}

@media (max-width: 560px) {
  .tah-upload-feedback__top {
    flex-direction: column;
  }

  .tah-upload-summary {
    grid-template-columns: 1fr;
  }
}


code {
  background: rgba(17, 24, 39, 0.06);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.92em;
}


/* 1.9.0 polish + duplicate verification */
.tah-upload-stat--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.tah-tech-details {
  width: 100%;
}

.tah-tech-details summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tah-tech-details summary::-webkit-details-marker {
  display: none;
}

.tah-tech-details summary::after {
  content: 'Show';
  color: var(--primary);
  font-size: .9rem;
  font-weight: 800;
}

.tah-tech-details[open] summary::after {
  content: 'Hide';
}

.tah-tech-details__body {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.tah-tech-details__note {
  color: var(--muted);
  line-height: 1.6;
  font-size: .96rem;
}


/* 1.10.1 1099 tracker */
.tah-upload-area .tah-button-like.tah-disabled {
  opacity: .6;
  pointer-events: none;
}

.tah-review-item .tah-row + .tah-row {
  margin-top: 8px;
}

#view-1099 .tah-card + .tah-card {
  margin-top: 0;
}

@media (max-width: 820px) {
  .tah-grid-1099-home { grid-template-columns: 1fr; }
  .tah-mini-metric--full { grid-column: span 1; }
}

@media (max-width: 560px) {
  .site-nav ul {
    gap: 10px;
  }
}


/* 1.13.0 final polish pass */

.tah-soft-callout {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 18px;
  box-shadow: var(--shadow);
  line-height: 1.5;
}

.tah-login-inline {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  font-weight: 600;
}

.tah-login-inline .tah-button-like {
  white-space: nowrap;
}

@media (max-width: 820px) {
  .site-nav {
    overflow-x: auto;
  }

  .site-nav ul {
    min-width: max-content;
    padding-bottom: 4px;
  }
}

@media (max-width: 560px) {
  .tah-button-row:not(.tah-footer-nav-inner) {
    flex-direction: column;
    align-items: stretch;
  }

  .tah-button-row:not(.tah-footer-nav-inner) .tah-btn,
  .tah-button-row:not(.tah-footer-nav-inner) .tah-button-like {
    width: 100%;
    justify-content: center;
  }

  .tah-login-inline {
    flex-direction: column;
    align-items: stretch;
  }
}


/* 1.13.0 final polish */
.tah-login-card .tah-tiny { max-width: 62ch; }
.tah-home-1099-note { margin-top: 12px; }


.tah-planner-snapshot {
  margin-bottom: 18px;
}

.tah-grid-planner {
  grid-template-columns: repeat(4, 1fr);
}

.tah-info-disclosure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.tah-info-disclosure summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 800;
}

.tah-info-disclosure summary::-webkit-details-marker {
  display: none;
}

.tah-info-disclosure[open] summary {
  border-bottom: 1px solid var(--border);
}

.tah-info-disclosure .tah-tiny {
  padding: 14px 16px 16px;
}

.tah-review-hint {
  margin: 10px 0 0;
}

@media (max-width: 900px) {
  .tah-grid-planner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .tah-grid-planner {
    grid-template-columns: 1fr 1fr;
  }

  .tah-info-disclosure summary {
    padding: 12px 14px;
  }
}
