@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-color: #0ea5e9;
  --primary-hover: #0284c7;
  --bg-color: #050b14;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.7);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --glass-border: rgba(255, 255, 255, 0.1);
  --warning-bg: rgba(239, 68, 68, 0.08);
  --warning-border: rgba(239, 68, 68, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.8;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
}

header {
  padding: 2rem 0;
  border-bottom: 1px solid var(--glass-border);
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

main {
  padding: 4rem 0;
}

h1 {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #fff;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--accent);
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--text-main);
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.last-updated {
  font-style: italic;
  color: var(--primary-color);
  margin-bottom: 2.5rem;
}

/* Table of Contents */
.toc {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  margin-bottom: 3rem;
}

.toc-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.toc ul {
  list-style: none;
  padding: 0;
}

.toc > ul > li {
  margin-bottom: 0.5rem;
}

.toc > ul > li > ul {
  padding-left: 1.5rem;
  margin-top: 0.35rem;
}

.toc > ul > li > ul > li {
  margin-bottom: 0.25rem;
}

.toc a {
  color: var(--text-muted);
  font-size: 0.925rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.toc a:hover {
  color: var(--accent);
  text-decoration: none;
  padding-left: 4px;
}

/* Section divider headings */
.section-divider {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin-top: 4rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
}

/* Content sections */
section {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
}

/* Definition lists for Article 1 */
dl {
  margin: 0;
}

dt {
  font-weight: 700;
  color: var(--text-main);
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

dt:first-child {
  margin-top: 0;
}

dd {
  color: var(--text-muted);
  margin-left: 0;
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--glass-border);
}

/* Address block */
address {
  font-style: normal;
  color: var(--text-muted);
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0 1.5rem;
  line-height: 2;
}

address a {
  color: var(--accent);
}

/* Legal caps sections */
.legal-caps p {
  font-size: 0.85rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* E911 Warning box */
.e911-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 12px;
  padding: 2rem;
  margin: 1.25rem 0;
}

.e911-warning p {
  color: var(--text-muted);
}

.e911-warning p:last-child {
  margin-bottom: 0;
  color: #fca5a5;
  font-size: 0.9rem;
}

.e911-warning ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.e911-warning li {
  color: var(--text-muted);
  padding: 0.6rem 0 0.6rem 1.5rem;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.e911-warning li:last-child {
  border-bottom: none;
}

.e911-warning li::before {
  content: '⚠';
  position: absolute;
  left: 0;
  font-size: 0.85rem;
}

.e911-warning li strong {
  color: #fca5a5;
}

/* Back to top button */
#back-to-top {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.4);
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 99;
}

#back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* Text alignment utilities */
.text-center {
  text-align: center;
}

/* Footer */
footer {
  background-color: #030712;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center;
}

.copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.3rem; }
  section { padding: 1.5rem; }
  .toc { padding: 1.5rem; }
  .section-divider { font-size: 1.4rem; }
  .e911-warning { padding: 1.25rem; }
  #back-to-top { width: 40px; height: 40px; font-size: 1.25rem; bottom: 1rem; right: 1rem; }
}

/* Customer Terms — document extras */
.version-tag {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.seller-block {
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.download-line {
  margin-bottom: 1.25rem;
}

.btn-download {
  display: inline-block;
  background: var(--primary-color);
  color: #fff !important;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
}

.btn-download:hover {
  background: var(--primary-hover);
  color: #fff !important;
}

.scope-note {
  margin-bottom: 2rem;
}

.terms-doc .rule-box {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0 1.5rem;
  color: var(--text-muted);
}

.terms-doc .part-banner {
  background: #0b3d5c;
  color: #fff;
  padding: 0.85rem 1.15rem;
  margin: 2.5rem 0 0.85rem;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 8px;
}

.terms-doc .part-banner.first {
  margin-top: 1.5rem;
}

.terms-doc .part-note,
.terms-doc .warn {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.terms-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.925rem;
}

.terms-doc th,
.terms-doc td {
  border: 1px solid var(--glass-border);
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: top;
  color: var(--text-muted);
}

.terms-doc th {
  background: #0b3d5c;
  color: #fff;
}

.terms-doc tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

.terms-doc ol,
.terms-doc ul {
  margin: 0.35rem 0 1.25rem;
  padding-left: 1.35rem;
  color: var(--text-muted);
}

.terms-doc li {
  margin-bottom: 0.45rem;
}

.terms-doc .sig {
  margin-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  padding-top: 1rem;
}

.terms-doc .previous-versions {
  margin-top: 3rem;
}

.terms-doc .muted {
  font-size: 0.9rem;
  color: var(--text-muted);
}

footer .copy a {
  color: var(--text-muted);
}

footer .copy a:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .terms-doc table { font-size: 0.85rem; }
  .btn-download { display: block; text-align: center; }
}
