/* =========================
   Base
========================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body#tone-chart-page {
  margin: 0;
  background: #f5f7fb;
  color: #1f2937;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.75;
}

#tone-chart-page a {
  color: #2563eb;
}

#tone-chart-page code {
  font-family: Consolas, Monaco, "Courier New", monospace;
}

/* =========================
   Header
========================= */

#tone-chart-page .site-header {
  padding: 46px 20px;
  background: linear-gradient(135deg, #d7ffd2, #effff4);
  border-bottom: 1px solid #c7eec3;
}

#tone-chart-page .header-inner {
  width: min(92%, 1050px);
  margin: 0 auto;
}

#tone-chart-page .eyebrow {
  margin: 0 0 8px;
  color: #15803d;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#tone-chart-page h1 {
  max-width: 900px;
  margin: 0;
  color: #0f172a;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

#tone-chart-page .header-description {
  max-width: 780px;
  margin: 18px 0 0;
  color: #334155;
  font-size: 18px;
}

/* =========================
   Main
========================= */

#tone-chart-page .page {
  width: min(92%, 1050px);
  margin: 34px auto 60px;
  padding: 38px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

#tone-chart-page p {
  font-size: 17px;
}

#tone-chart-page h2 {
  margin: 58px 0 18px;
  padding-left: 14px;
  color: #111827;
  border-left: 6px solid #22c55e;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.3;
}

#tone-chart-page section[id] {
  scroll-margin-top: 24px;
}

/* =========================
   Table of Contents
========================= */

#tone-chart-page .toc {
  padding: 24px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

#tone-chart-page .toc-title {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 19px;
  font-weight: 800;
}

#tone-chart-page .toc ol {
  margin: 0;
  padding-left: 24px;
}

#tone-chart-page .toc li {
  margin: 7px 0;
}

#tone-chart-page .toc a {
  font-weight: 700;
  text-decoration: none;
}

#tone-chart-page .toc a:hover {
  text-decoration: underline;
}

/* =========================
   Notes
========================= */

#tone-chart-page .important-note {
  margin: 24px 0;
  padding: 18px 20px;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
}

/* =========================
   Frequency Table
========================= */

#tone-chart-page .table-wrap {
  width: min(100%, 560px);
  max-height: 620px;
  margin: 24px auto 0;
  overflow: auto;
  border: 1px solid #dbe3ec;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

#tone-chart-page .frequency-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

#tone-chart-page .frequency-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 13px 16px;
  color: #ffffff;
  background: #166534;
  text-align: left;
}

#tone-chart-page .frequency-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #e5e7eb;
}

#tone-chart-page .frequency-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

#tone-chart-page .frequency-table tbody tr:hover {
  background: #ecfdf5;
}

#tone-chart-page .frequency-table td:first-child {
  width: 52%;
  color: #0f172a;
  font-weight: 700;
}

#tone-chart-page .frequency-table td:last-child {
  font-variant-numeric: tabular-nums;
}

#tone-chart-page .source-note {
  max-width: 560px;
  margin: 12px auto 0;
  color: #64748b;
  font-size: 14px;
}

/* =========================
   Code
========================= */

#tone-chart-page pre {
  margin: 22px 0;
  padding: 20px;
  overflow-x: auto;
  color: #e5e7eb;
  background: #0f172a;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.13);
}

#tone-chart-page pre code {
  font-size: 14px;
  line-height: 1.65;
}

/* =========================
   tone() Card
========================= */

#tone-chart-page .argument-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}

#tone-chart-page .argument-grid.single-card {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}

#tone-chart-page .argument-card {
  padding: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
}

#tone-chart-page .argument-label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  color: #166534;
  background: #dcfce7;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

#tone-chart-page .argument-card > code {
  display: block;
  padding: 12px;
  color: #e5e7eb;
  background: #0f172a;
  border-radius: 10px;
}

#tone-chart-page .argument-card p {
  margin-bottom: 0;
  font-size: 15px;
}

/* =========================
   Next Step
========================= */

#tone-chart-page .next-step {
  margin-top: 58px;
  padding: 30px;
  text-align: center;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  border: 1px solid #bfdbfe;
  border-radius: 18px;
}

#tone-chart-page .next-step h2 {
  margin-top: 8px;
  padding-left: 0;
  border-left: none;
}

#tone-chart-page .next-step-label {
  display: inline-block;
  margin: 0;
  padding: 5px 11px;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

#tone-chart-page .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 10px;
  padding: 12px 22px;
  color: #ffffff;
  background: #2563eb;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

#tone-chart-page .primary-button:hover {
  color: #ffffff;
  background: #1d4ed8;
  transform: translateY(-2px);
}

/* =========================
   Footer
========================= */

#tone-chart-page footer {
  padding: 26px 20px;
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

/* =========================
   Mobile
========================= */

@media (max-width: 720px) {
  #tone-chart-page .site-header {
    padding: 32px 16px;
  }

  #tone-chart-page .page {
    width: min(94%, 680px);
    padding: 24px 16px;
  }

  #tone-chart-page .argument-grid,
  #tone-chart-page .argument-grid.single-card {
    grid-template-columns: 1fr;
  }

  #tone-chart-page .table-wrap {
    width: 100%;
    max-height: 520px;
  }

  #tone-chart-page .frequency-table th,
  #tone-chart-page .frequency-table td {
    padding: 10px 12px;
  }

  #tone-chart-page .primary-button {
    width: 100%;
  }
}
