/* ==========================================================================
   AutoTaxForms – Global dark theme stylesheet
   Replace your styles.css with this file.
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --bg: #0b1220;
  --card: #0f172a;
  --muted: #94a3b8;
  --text: #e5edf7;
  --brand: #4f8cff;
  --brand-2: #2d56ff;
  --ring: #93c5fd;
  --divider: rgba(255, 255, 255, .08);
  --ok: #22c55e;
  --warn: #fbbf24;
  --error: #ef4444;
}

/* ---------- Base / Reset ---------- */
* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block
}

a {
  color: inherit;
  text-decoration: none
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px
  }
}

section {
  padding: 56px 0;
  border-bottom: 1px solid var(--divider)
}

.muted {
  color: var(--muted)
}

.hidden {
  display: none !important
}

/* ---------- Header / Nav (shared with home) ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
  background: linear-gradient(to bottom, rgba(11, 18, 32, .9), rgba(11, 18, 32, .6));
  border-bottom: 1px solid var(--divider);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: .2px;
  color: inherit
}

.brand b {
  font-weight: 800
}

.nav a.link {
  opacity: .9;
  padding: 8px 10px;
  border-radius: 8px
}

.nav a.link:hover {
  background: rgba(255, 255, 255, .06);
  opacity: 1
}

/* Mobile navigation */
.nav nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Hamburger menu button - hidden by default */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, .06);
}

/* Hamburger icon */
.hamburger {
  display: flex;
  flex-direction: column;
  width: 20px;
  height: 16px;
  justify-content: space-between;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.3s ease;
}

/* Hamburger animation when active */
.mobile-menu-toggle.active .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav nav {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--divider);
    flex-direction: column;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .nav nav.mobile-menu-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav nav a.link {
    padding: 16px 20px;
    border-bottom: 1px solid var(--divider);
    display: block;
    width: 100%;
    text-align: left;
  }

  .nav nav a.link:last-child {
    border-bottom: none;
  }

  .nav nav a.link:hover {
    background: rgba(255, 255, 255, .06);
  }
}

/* Logo image: use <img class="logo" src="..."> */
.logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  box-shadow: 0 8px 26px rgba(79, 140, 255, .35), inset 0 0 12px rgba(255, 255, 255, .18);
}

/* ---------- Page head / breadcrumbs ---------- */
.page-head {
  padding: 22px 0;
  border-bottom: 1px solid var(--divider)
}

.crumb {
  color: var(--muted);
  font-size: 14px
}

.crumb a {
  color: #cfe0ff
}

.page-title {
  font-size: 28px;
  margin: 8px 0 0
}

/* ---------- Cards & Surfaces ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .35);
}

.card+.card {
  margin-top: 16px
}

h1 {
  font-size: 34px;
  margin: 0 0 8px;
  line-height: 1.2
}

h2 {
  font-size: 20px;
  margin: 0 0 10px
}

h3 {
  font-size: 18px;
  margin: 0 0 8px
}

/* ---------- Grid / Columns ---------- */
.grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px
}

@media (max-width:980px) {
  .grid {
    grid-template-columns: 1fr
  }
}

label.address-field {
  grid-column: 1 / -1;
}

/* ---------- Form controls ---------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px
}

.form-row.single {
  grid-template-columns: 1fr
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px
}

label {
  font-weight: 600
}

.required::after {
  content: " *";
  color: var(--warn);
  font-weight: 800;
  margin-left: 2px
}

input,
select,
textarea {
  background: #2a334a;
  /* 明显比背景亮一层 */
  border: 1px solid #3e4a63;
  color: var(--text);
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s, background .2s;
}

input:focus,
select:focus,
textarea:focus {
  background: #34415c;
  /* 聚焦时再亮一点 */
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(147, 197, 253, .15);
}

input.lock,
select.lock,
textarea.lock {
  background: #1c2538;
  border-color: #2f3a52;
  color: var(--muted);
  cursor: not-allowed;
}

.help,
.hint,
small.muted {
  font-size: 12px;
  color: var(--muted)
}

.error-text {
  font-size: 12px;
  color: var(--error)
}

/* Checkbox / Radio (basic) */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--brand)
}

/* ---------- Buttons ---------- */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  transition: .22s ease-in-out
}

.btn.primary {
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  color: white;
  box-shadow: 0 10px 22px rgba(79, 140, 255, .35)
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(79, 140, 255, .45)
}

.btn.secondary {
  background: transparent;
  border-color: var(--divider);
  color: #dbe6ff
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, .06)
}

.btn.ghost {
  background: transparent;
  color: var(--muted)
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, .06)
}

/* ---------- Summary / Side panel ---------- */
.summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.summary-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px dashed var(--divider);
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .02)
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--divider);
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, .03)
}

.note {
  font-size: 13px;
  color: #cad7ff
}

/* ---------- Sticky action bar (mobile) ---------- */
.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(11, 18, 32, .0), rgba(11, 18, 32, .85) 25%);
  padding: 16px;
  border-top: 1px solid var(--divider);
  display: none
}

.sticky-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  justify-content: flex-end
}

@media (max-width:980px) {
  .sticky-bar {
    display: block
  }
}

/* ---------- Tables (if used) ---------- */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--divider)
}

.table th {
  text-align: left;
  color: #cfe0ff;
  font-weight: 700
}

.table tr:hover td {
  background: rgba(255, 255, 255, .03)
}

/* ---------- FAQ (optional) ---------- */
details {
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px 0
}

summary {
  cursor: pointer;
  font-weight: 700
}

details[open] {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02))
}

/* ---------- Download page ---------- */
.download-hero {
  background: linear-gradient(180deg, rgba(79, 140, 255, 0.12), rgba(11, 18, 32, 0.85));
  border-bottom: 1px solid var(--divider);
  padding: 60px 0;
}

.download-hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 34px;
  align-items: center;
}

@media (max-width: 960px) {
  .download-hero-inner {
    grid-template-columns: 1fr;
  }
}

.download-copy h2 {
  font-size: 28px;
  margin: 12px 0 10px;
}

.download-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--divider);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.store-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.store-actions .btn {
  min-width: 220px;
}

@media (max-width: 520px) {
  .store-actions .btn {
    width: 100%;
  }
}

.download-note {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.download-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(17, 24, 39, .8));
  border: 1px solid var(--divider);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .45);
}

.download-card h3 {
  margin: 0 0 12px;
}

.download-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.download-list li {
  margin-bottom: 10px;
}

.download-steps {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.download-steps li {
  margin-bottom: 8px;
}

.download-benefits h2 {
  margin-bottom: 20px;
}

.download-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 960px) {
  .download-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.download-feature {
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}

.download-feature h3 {
  margin: 0 0 10px;
}

.download-feature p {
  color: var(--muted);
}

.download-feedback {
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: 16px;
  border: 1px dashed var(--divider);
  background: rgba(79, 140, 255, 0.08);
  color: var(--muted);
  font-size: 14px;
}

.download-feedback strong {
  color: #e5edf7;
}

.download-feedback a {
  color: inherit;
  text-decoration: underline;
}

.download-support {
  margin-top: 18px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 36px 0;
  color: var(--muted);
  font-size: 13px
}

.footer .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--divider);
  padding-top: 16px;
  margin-top: 8px
}

.notice {
  font-size: 12px;
  color: var(--muted)
}

/* ---------- Responsive Typography ---------- */
@media (max-width:600px) {
  h1 {
    font-size: 28px
  }

  .page-title {
    font-size: 24px
  }
}

/* ---------- Print (keep PDFs & exports clean) ---------- */
@media print {
  :root {
    --bg: #fff;
    --text: #000;
    --muted: #444;
    --divider: #ddd;
  }

  body {
    background: #fff;
    color: #000
  }

  header,
  .sticky-bar {
    display: none !important
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd
  }

  a {
    text-decoration: underline
  }
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  /* 黑 → 白 */
  cursor: pointer;
}

button.export {
  background: linear-gradient(135deg, #4f8cff, #2d56ff);
  color: #fff;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(79, 140, 255, 0.4);
  transition: transform .2s, box-shadow .2s;
}

button.export {
  display: block;
  margin: 20px auto 40px;
  /* 上 15px, 下 50px, 居中 */
  background: linear-gradient(135deg, #4f8cff, #2d56ff);
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  /* 字体更大 */
  padding: 16px 36px;
  /* 按钮更大 */
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(79, 140, 255, 0.45);
  transition: transform .2s, box-shadow .2s;
}

button.export:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 28px rgba(79, 140, 255, 0.6);
}

.form-support {
  border-top: 1px solid var(--divider);
  background: rgba(15, 23, 42, 0.6);
  padding: 48px 0;
}

.form-support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.form-support-card {
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.form-support-card h3 {
  margin: 0;
  font-size: 20px;
}

.form-support-card p {
  margin: 0;
  color: var(--muted);
}

.form-support-card ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
}

.form-support-card a {
  color: var(--text);
  text-decoration: underline;
}

@media (max-width: 980px) {
  .form-support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:980px) {
  #guide_nav_card {
    grid-column: 1 / -1 !important;
    position: static !important;
  }
}

@media (max-width: 680px) {
  .form-support {
    padding: 40px 0;
  }

  .form-support-grid {
    grid-template-columns: 1fr;
  }
}




.guide-quiz-entry {
  background: rgba(79, 140, 255, 0.08);
  border-bottom: 1px solid var(--divider);
}
.guide-quiz-entry .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}
.guide-quiz-entry h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.guide-quiz-entry .btn {
  font-size: 16px;
  font-weight: 600;
}

@media (max-width:640px) {
  .guide-quiz-entry .container {
    flex-direction: column;
    align-items: flex-start;
  }
  .guide-quiz-entry .btn {
    width: 100%;
  }
}

body.modal-open {
  overflow: hidden;
}
.guide-quiz-modal[hidden] {
  display: none;
}
.guide-quiz-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}
.guide-quiz-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}
.guide-quiz-card {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100% - 40px));
  margin: 90px auto;
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.guide-quiz-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.guide-quiz-result {
  margin-top: 16px;
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 14px;
  background: rgba(79, 140, 255, 0.08);
}
