/* ============================================================
   GigTaxHelper — legal / document pages
   Dark theme layer that matches the marketing site.

   This stylesheet is loaded AFTER each page's own <style> block,
   so it wins every equal-specificity cascade tie and the original
   light rules remain as a harmless fallback if this file ever
   fails to load. Page content is never affected.
   ============================================================ */

:root {
  --bg: #0d0d24;
  --bg-soft: #12122e;
  --bg-card: #1a1a3e;
  --bg-card-2: #1f1f4a;
  --card: #1a1a3e;              /* legacy token used by the original blocks */
  --line: rgba(148, 163, 184, 0.16);
  --border: rgba(148, 163, 184, 0.16);   /* legacy token */
  --muted: #a7aecf;             /* legacy token */
  --text: #eceefb;
  --text-muted: #a7aecf;
  --text-dim: #6f77a3;

  --violet: #3b2fcc;
  --violet-light: #5a4fe5;
  --violet-soft: #9a93f2;
  --indigo: #6d5ce7;
  --teal: #00c9a7;
  --accent: #9a93f2;            /* legacy token */

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 44px -22px rgba(2, 6, 23, 0.9);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  max-width: none;                /* cancels the legacy 800px clamp */
  padding: 0;
  font-family: var(--font);
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 12% -6%, rgba(90, 79, 229, 0.20), transparent 62%),
    radial-gradient(760px 380px at 92% 4%, rgba(0, 201, 167, 0.10), transparent 62%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---------- Top bar ---------- */
.doc-topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(13, 13, 36, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 20;
}
.doc-topbar .doc-topbar-inner {
  width: min(900px, 92vw);
  margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 0;
  font-size: 0.92rem;
}
.doc-topbar a { font-weight: 600; }
.doc-topbar .doc-langs { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.doc-topbar .doc-langs a,
.doc-topbar .doc-langs span {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none !important;
}
.doc-topbar .doc-langs .is-active {
  background: linear-gradient(120deg, var(--violet-light), var(--indigo));
  border-color: transparent; color: #fff;
}
.doc-topbar .doc-langs a:hover { color: #fff; border-color: var(--violet-light); background: rgba(148, 163, 184, 0.12); }

/* ---------- Layout ---------- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 44px;
  box-shadow: var(--shadow);
}

/* Bare pages (no .container / .card wrapper) still get breathing room */
body > h1,
body > h2,
body > p,
body > ul,
body > ol,
body > div {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
body > h1 { padding: 40px 20px 0; }
body > h2,
body > p,
body > ul,
body > ol { padding-left: 20px; padding-right: 20px; }

/* ---------- Typography ---------- */
h1 {
  margin: 0 0 6px;
  padding-bottom: 0;
  border-bottom: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.1rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--text);
}

h2 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  font-size: 1.16rem;
  letter-spacing: -0.01em;
  color: var(--violet-soft);
}

h3 {
  margin-top: 1.4rem;
  margin-bottom: 0.4rem;
  font-size: 1.02rem;
  color: var(--text);
}

p, li { color: var(--text-muted); }
p { margin-top: 0.45rem; margin-bottom: 0.45rem; }

strong { color: var(--text); }

ul, ol { margin: 0.4rem 0 0.9rem 1.2rem; padding-left: 1.1rem; }
li { margin-bottom: 0.35rem; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* ---------- Links ---------- */
a {
  color: var(--violet-soft);
  text-decoration: none;
  background: none;
  padding: 0;
  border-radius: 0;
}
a:hover, a:focus { text-decoration: underline; color: #fff; }

/* ---------- Legacy helper classes ---------- */
.meta,
.effective-date {
  color: var(--text-dim);
  font-style: normal;
  font-size: 0.95rem;
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

.contact,
.contact-info {
  margin-top: 1rem;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--bg-card-2), var(--bg-card));
  border: 1px solid var(--line);
}

.hint { margin-top: 12px; font-size: 0.92rem; color: var(--text-dim); }

.links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* Chooser-page buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 600; font-size: 0.95rem;
  padding: 0.62rem 1.15rem; border-radius: 10px;
  border: 1px solid transparent;
  background: linear-gradient(120deg, var(--violet-light), var(--indigo));
  color: #fff !important;
  text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
  box-shadow: 0 10px 26px -12px rgba(90, 79, 229, 0.85);
}
.btn:hover, .btn:focus { transform: translateY(-1px); color: #fff !important; text-decoration: none !important; }

.btn.secondary {
  background: transparent;
  color: var(--text) !important;
  border-color: var(--line);
  box-shadow: none;
}
.btn.secondary:hover, .btn.secondary:focus { border-color: var(--violet-light); color: #fff !important; }

/* Tables, if any legal page ever uses one */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.94rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--text-muted); }
thead th { background: rgba(148, 163, 184, 0.06); color: var(--text-dim); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.07em; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .container { padding: 24px 14px 48px; }
  .card { padding: 24px 20px; border-radius: var(--radius-sm); }
  h1 { font-size: 1.5rem; }
  .doc-topbar .doc-topbar-inner { font-size: 0.86rem; gap: 10px; }
}
