:root {
  color-scheme: dark;
  --app-bg: rgb(69, 91, 90);
  --app-text: rgb(224, 231, 216);
  --app-elevated: rgb(80, 101, 100);
  --app-bar: rgb(56, 78, 77);
  --app-accent: rgb(167, 196, 159);
  --app-accent-on: rgb(32, 48, 46);
  --app-separator: rgba(255, 255, 255, 0.12);
  --app-muted: rgba(224, 231, 216, 0.68);
  --ehd-bg-deep: rgb(31, 52, 50);
  --ehd-panel-bg: rgb(44, 63, 61);
  --ehd-key-white: rgb(236, 240, 232);
  --ehd-key-black: rgb(34, 40, 38);
  --ehd-key-active: rgb(167, 196, 159);
  --ehd-degree-tonic: rgb(106, 153, 197);
  --ehd-degree-predominant: rgb(122, 166, 161);
  --ehd-degree-dominant: rgb(106, 153, 197);
  --ehd-degree-borrowed: rgb(134, 166, 122);
  --ehd-degree-chromatic: rgb(197, 140, 101);
  --ehd-degree-modal: rgba(224, 231, 216, 0.55);
  --ehd-guitar-board-bg: rgba(0, 0, 0, 0.22);
  --ehd-guitar-nut: rgba(255, 255, 255, 0.58);
  --ehd-guitar-fret: rgba(255, 255, 255, 0.22);
  --ehd-guitar-string: rgba(255, 255, 255, 0.34);
  --ehd-guitar-label: var(--app-muted);
  --ehd-guitar-finger: var(--app-accent-on);
  --chrome-title-gradient: linear-gradient(
    90deg,
    rgb(153, 117, 133) 0%,
    rgb(163, 138, 122) 25%,
    rgb(153, 148, 122) 50%,
    rgb(128, 153, 138) 75%,
    rgb(128, 140, 168) 100%
  );
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.ehd-page {
  margin: 0;
  min-height: 100vh;
  line-height: 1.5;
  color: var(--app-text);
}

body[data-appearance="print"] {
  background: var(--ehd-bg-deep, rgb(244, 239, 230));
}

body[data-appearance="forest"] {
  background:
    radial-gradient(circle at 10% 4%, rgba(167, 196, 159, 0.14), transparent 24rem),
    radial-gradient(circle at 88% 8%, rgba(128, 140, 168, 0.14), transparent 25rem),
    var(--landing-bg-deep, rgb(31, 52, 50));
}

body[data-appearance="dark"] {
  background: var(--ehd-bg-deep, rgb(14, 12, 22));
}

.ehd-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ehd-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: min(58rem, 96vw);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 1.75rem) clamp(0.9rem, 3vw, 1.25rem) clamp(2rem, 5vw, 3rem);
}

.ehd-panel {
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: 14px;
  border: 1px solid var(--app-separator);
  background: var(--ehd-panel-bg);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.ehd-header {
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--app-separator);
}

.ehd-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.ehd-header h1 {
  margin: 0;
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  background: var(--chrome-title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ehd-lead {
  margin: 0.85rem 0 0;
  max-width: 46rem;
  color: var(--app-muted);
}

.ehd-header-credit {
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28rem 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--app-muted);
}

.ehd-header-credit-label {
  letter-spacing: 0.01em;
}

.ehd-header-credit-brand {
  display: inline-block;
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
}

.ehd-header-credit-brand:hover,
.ehd-header-credit-brand:focus-visible {
  outline: none;
  filter: brightness(1.08);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ehd-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--app-separator);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.ehd-transpose,
.ehd-notation-picker,
.ehd-appearance-picker {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ehd-key-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.ehd-transpose-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ehd-transpose-step {
  border: 1px solid var(--app-separator);
  border-radius: 6px;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-family: "Leland", "Bravura Text", "Segoe UI Symbol", serif;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--app-accent);
  background: rgba(167, 196, 159, 0.1);
  cursor: pointer;
}

.ehd-transpose-step:hover,
.ehd-transpose-step:focus-visible {
  outline: none;
  border-color: var(--app-accent);
  background: rgba(167, 196, 159, 0.22);
}

.ehd-key-display {
  min-width: 2.5rem;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--app-text);
}

.ehd-theme-buttons {
  display: inline-flex;
  gap: 0.35rem;
}

.ehd-notation-buttons {
  display: inline-flex;
  gap: 0.35rem;
}

.ehd-appearance-buttons {
  display: inline-flex;
  gap: 0.35rem;
}

.ehd-appearance-btn {
  border: 1px solid var(--app-separator);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  color: var(--app-muted);
  background: transparent;
  cursor: pointer;
}

.ehd-appearance-btn.is-active {
  color: var(--app-accent-on);
  border-color: var(--app-accent);
  background: var(--app-accent);
}

.ehd-ribbon {
  display: none;
}

body[data-appearance="forest"] .ehd-main-wrap {
  width: 100%;
  max-width: 74rem;
  margin: 0 auto;
  padding: clamp(0.75rem, 3vw, 1.65rem) clamp(0.9rem, 3vw, 1.5rem) clamp(2rem, 6vw, 3.5rem);
}

body[data-appearance="print"] .ehd-main-wrap,
body[data-appearance="dark"] .ehd-main-wrap {
  padding: clamp(1rem, 3vw, 1.75rem) clamp(0.9rem, 3vw, 1.25rem) 0;
}

.ehd-header h1 {
  font-family: var(--ehd-font-serif, "Source Serif 4", Georgia, serif);
}

.ehd-lead,
.ehd-section-intro {
  font-family: var(--ehd-font-serif, "Source Serif 4", Georgia, serif);
}

.ehd-kicker,
.ehd-key-label,
.ehd-controls,
.ehd-filters,
.ehd-filter-chip,
.ehd-notation-btn,
.ehd-appearance-btn,
.ehd-transpose-step {
  font-family: var(--ehd-font-sans, system-ui, sans-serif);
}

.ehd-notation-btn {
  border: 1px solid var(--app-separator);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  color: var(--app-muted);
  background: transparent;
  cursor: pointer;
}

.ehd-notation-btn.is-active {
  color: var(--app-accent-on);
  border-color: var(--app-accent);
  background: var(--app-accent);
}

.ehd-notation-btn[data-ehd-notation="symbol"] {
  font-family: "Leland", "Bravura Text", "Segoe UI Symbol", serif;
}

.ehd-chord-face--plain {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Rounded",
    "Helvetica Neue",
    sans-serif;
}

.ehd-chord-face--dual {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.04rem;
  line-height: 1.05;
}

.ehd-chord-alt {
  font-family: var(--ehd-font-sans, system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.82;
  letter-spacing: 0.01em;
}

.ehd-popover-title .ehd-chord-face--dual {
  gap: 0.1rem;
}

.ehd-popover-title .ehd-chord-alt {
  font-size: 0.84rem;
}

.ehd-filters {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--app-separator);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.ehd-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.ehd-filter-clear {
  border: none;
  padding: 0.15rem 0.45rem;
  font: inherit;
  font-size: 0.78rem;
  color: var(--app-muted);
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ehd-filter-clear:hover,
.ehd-filter-clear:focus-visible {
  outline: none;
  color: var(--app-text);
}

.ehd-filter-group + .ehd-filter-group {
  margin-top: 0.7rem;
}

.ehd-filter-group-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.ehd-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ehd-filter-chip {
  border: 1px solid var(--app-separator);
  border-radius: 999px;
  padding: 0.2rem 0.62rem;
  font: inherit;
  font-size: 0.78rem;
  color: var(--app-muted);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.ehd-filter-chip:hover,
.ehd-filter-chip:focus-visible {
  outline: none;
  border-color: var(--app-accent);
  color: var(--app-text);
}

.ehd-filter-chip.is-active {
  color: var(--app-accent-on);
  border-color: var(--app-accent);
  background: var(--app-accent);
}

.ehd-empty-state {
  margin: 1.5rem 0 0;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--app-separator);
  border-radius: 8px;
  color: var(--app-muted);
  text-align: center;
}

.ehd-theme-btn {
  border: 1px solid var(--app-separator);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  color: var(--app-muted);
  background: transparent;
  cursor: pointer;
}

.ehd-theme-btn.is-active {
  color: var(--app-accent-on);
  border-color: var(--app-accent);
  background: var(--app-accent);
}

.ehd-chord-face,
.ehd-move-label {
  font-family: "Leland", "Bravura Text", "Segoe UI Symbol", serif;
  font-variant-ligatures: none;
}

.ehd-section h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.ehd-section-marker {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--section-color, var(--app-accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--section-color, var(--app-accent)) 28%, transparent);
}

.ehd-section .ehd-table-wrap {
  border-color: color-mix(in srgb, var(--section-color, var(--app-separator)) 35%, var(--app-separator));
}

.ehd-section .ehd-table thead th {
  color: rgba(255, 255, 255, 0.95);
  background: var(--section-color, var(--app-accent));
  border-bottom: none;
  font-weight: 700;
}

.ehd-section .ehd-table thead th + th {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.ehd-section + .ehd-section {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.ehd-section h2 {
  margin: 0;
  font-size: clamp(1.1rem, 2.8vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ehd-guide-cell {
  min-width: 12rem;
  max-width: 24rem;
}

.ehd-progression-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.ehd-progression-row .ehd-progression {
  flex: 1 1 auto;
}

.ehd-theory-info {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.2rem;
  border: 1px solid var(--app-separator);
  border-radius: 50%;
  padding: 0;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  color: var(--app-muted);
  background: rgba(0, 0, 0, 0.06);
  cursor: help;
}

.ehd-theory-info:hover,
.ehd-theory-info:focus-visible {
  color: var(--app-text);
  border-color: var(--app-accent);
  background: rgba(167, 196, 159, 0.16);
  outline: none;
}

.ehd-theory-popover {
  position: fixed;
  z-index: 45;
  max-width: min(340px, calc(100vw - 24px));
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--app-separator);
  border-radius: 8px;
  background: var(--app-bg, #f4f0e8);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.ehd-theory-popover[hidden] {
  display: none;
}

.ehd-row-theory,
.ehd-row-guide {
  display: grid;
  gap: 0.35rem;
}

.ehd-row-meta {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--app-muted);
}

.ehd-row-meta-label {
  display: inline-block;
  min-width: 5.5rem;
  font-weight: 600;
  color: var(--app-text);
}


.ehd-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--app-separator);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.ehd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.ehd-table th,
.ehd-table td {
  padding: 0.75rem 0.85rem;
  vertical-align: top;
  border-bottom: 1px solid var(--app-separator);
  text-align: left;
}

.ehd-table thead th {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ehd-table tbody tr:last-child th,
.ehd-table tbody tr:last-child td {
  border-bottom: none;
}

.ehd-table tbody th[scope="row"] {
  width: 24%;
  min-width: 9rem;
  font-weight: 600;
  color: var(--app-text);
}

.ehd-example-cell {
  width: 34%;
  min-width: 12rem;
}

.ehd-progression {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
}

.ehd-progression-sep {
  color: var(--app-muted);
  font-weight: 500;
}

.ehd-chord {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(167, 196, 159, 0.35);
  border-radius: 5px;
  padding: 0.22rem 0.5rem 0.22rem 0.55rem;
  min-height: 1.85rem;
  font: inherit;
  font-weight: 600;
  color: var(--app-accent);
  background: rgba(167, 196, 159, 0.12);
  cursor: help;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.ehd-chord-face {
  font-size: 1.02rem;
  line-height: 1.1;
}

.ehd-degree {
  font-family: "Leland", "Bravura Text", "Segoe UI Symbol", serif;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.12rem 0.3rem;
  border-radius: 4px;
  opacity: 0.92;
}

.ehd-degree--tonic,
.ehd-degree--dominant {
  color: var(--ehd-degree-tonic);
  background: color-mix(in srgb, var(--ehd-degree-tonic) 18%, transparent);
}

.ehd-degree--predominant {
  color: var(--ehd-degree-predominant);
  background: color-mix(in srgb, var(--ehd-degree-predominant) 18%, transparent);
}

.ehd-degree--borrowed {
  color: var(--ehd-degree-borrowed);
  background: color-mix(in srgb, var(--ehd-degree-borrowed) 18%, transparent);
}

.ehd-degree--chromatic {
  color: var(--ehd-degree-chromatic);
  background: color-mix(in srgb, var(--ehd-degree-chromatic) 18%, transparent);
}

.ehd-degree--modal {
  color: var(--ehd-degree-modal);
  background: rgba(255, 255, 255, 0.06);
}

.ehd-chord--borrowed {
  border-color: color-mix(in srgb, var(--ehd-degree-borrowed) 45%, transparent);
  background: color-mix(in srgb, var(--ehd-degree-borrowed) 12%, transparent);
}

.ehd-chord--dominant,
.ehd-chord--tonic {
  border-color: color-mix(in srgb, var(--ehd-degree-tonic) 40%, transparent);
}

.ehd-chord--chromatic {
  border-color: color-mix(in srgb, var(--ehd-degree-chromatic) 45%, transparent);
}

.ehd-chord:hover,
.ehd-chord:focus-visible {
  outline: none;
  border-color: var(--app-accent);
  background: rgba(167, 196, 159, 0.24);
  transform: translateY(-1px);
}

.ehd-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  border: none;
  padding: 0;
  background: rgba(0, 0, 0, 0.42);
  cursor: default;
}

.ehd-popover-backdrop[hidden] {
  display: none !important;
}

.ehd-popover {
  position: fixed;
  z-index: 41;
  padding: 0.85rem 0.9rem 0.75rem;
  border: 1px solid var(--app-separator);
  border-radius: 10px;
  background: var(--app-bar);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.ehd-popover[hidden] {
  display: none !important;
}

.ehd-popover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.ehd-popover-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--app-accent);
}

.ehd-popover-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--app-separator);
  border-radius: 999px;
  padding: 0;
  color: var(--app-muted);
  background: transparent;
  cursor: pointer;
}

.ehd-popover-close-icon {
  display: block;
  width: 0.72rem;
  height: 0.72rem;
}

.ehd-popover-close:hover,
.ehd-popover-close:focus-visible {
  color: var(--app-text);
  border-color: var(--app-accent);
  background: rgba(167, 196, 159, 0.12);
  outline: none;
}

.ehd-popover-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.ehd-popover-tab {
  border: 1px solid var(--app-separator);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font: inherit;
  font-size: 0.82rem;
  color: var(--app-muted);
  background: transparent;
  cursor: pointer;
}

.ehd-popover-tab.is-active {
  color: var(--app-accent-on);
  border-color: var(--app-accent);
  background: var(--app-accent);
}

.ehd-popover-panel {
  min-height: 8.5rem;
}

.ehd-voicing-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.ehd-voicing-step {
  border: 1px solid var(--app-separator);
  border-radius: 6px;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  color: var(--app-accent);
  background: rgba(167, 196, 159, 0.1);
  cursor: pointer;
}

.ehd-voicing-step:hover,
.ehd-voicing-step:focus-visible {
  outline: none;
  border-color: var(--app-accent);
  background: rgba(167, 196, 159, 0.22);
}

.ehd-voicing-label {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--app-text);
}

.ehd-popover-loading,
.ehd-voicing-fallback,
.ehd-popover-source {
  margin: 0;
  font-size: 0.8rem;
  color: var(--app-muted);
}

.ehd-popover-source {
  margin-top: 0.45rem;
}

.ehd-voicing-notes {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: var(--app-text);
}

.ehd-piano {
  background: rgb(232, 232, 228);
  border-radius: 6px;
  padding: 2px 0;
}

.ehd-design-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
}

.ehd-design-nav a {
  color: var(--app-muted);
  text-decoration: none;
}

.ehd-design-nav a:hover {
  color: var(--app-text);
}

.ehd-design-nav a[aria-current="page"] {
  color: var(--app-accent);
  font-weight: 600;
}

.ehd-piano,
.ehd-guitar,
.ehd-piano-image,
.ehd-guitar-embed {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.ehd-guitar {
  border-radius: 6px;
  background: var(--ehd-guitar-board-bg);
}

.ehd-guitar-fret {
  stroke: var(--ehd-guitar-fret);
  stroke-width: 1;
}

.ehd-guitar-fret--nut {
  stroke: var(--ehd-guitar-nut);
  stroke-width: 3;
}

.ehd-guitar-string {
  stroke: var(--ehd-guitar-string);
  stroke-width: 1;
}

.ehd-guitar-string-label {
  fill: var(--ehd-guitar-label);
  font-size: 10px;
}

.ehd-guitar-fret-number {
  fill: var(--ehd-guitar-label);
  font-size: 9px;
  font-weight: 600;
  text-anchor: middle;
}

.ehd-guitar-fret-number--base {
  text-anchor: start;
  font-size: 10px;
  font-weight: 700;
}

.ehd-guitar-dot {
  fill: var(--ehd-key-active);
}

.ehd-guitar-finger {
  fill: var(--ehd-guitar-finger);
  font-size: 9px;
  font-weight: 700;
  text-anchor: middle;
}

.ehd-guitar-embed {
  min-height: 10rem;
  border: none;
  background: transparent;
}

.ehd-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: var(--app-bar);
  border-top: 1px solid var(--app-separator);
}

.ehd-footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  margin: 0;
  padding: 1rem 1.25rem;
  list-style: none;
}

.ehd-footer-nav a {
  color: var(--app-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.ehd-footer-nav a:hover {
  color: var(--app-text);
}

.ehd-footer-nav a:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.ehd-credit.download-section {
  margin-top: clamp(1.25rem, 3.5vw, 1.75rem);
  padding: 0 clamp(0.9rem, 3vw, 1.25rem) clamp(2rem, 5vw, 3rem);
}

.ehd-credit-line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.55rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--app-muted);
}

.ehd-credit-label {
  letter-spacing: 0.01em;
}

.ehd-credit-brand {
  display: inline-block;
  text-decoration: none;
  font-size: clamp(1.35rem, 4.2vw, 1.85rem);
}

.ehd-credit-brand:hover,
.ehd-credit-brand:focus-visible {
  outline: none;
  filter: brightness(1.08);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ehd-credit .app-store-downloads {
  margin-top: 0.2rem;
}

@media (max-width: 720px) {
  .ehd-main {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  body[data-appearance="forest"] .ehd-section {
    padding: 1rem 0.9rem 1.05rem;
  }

  body[data-appearance="dark"] .ehd-section {
    padding: 1.1rem 1rem 1.15rem;
  }

  .ehd-table-wrap {
    border-radius: 10px;
  }

  .ehd-table thead {
    display: none;
  }

  .ehd-table tbody tr {
    display: grid;
    gap: 0.75rem;
    padding: 1.15rem 1.1rem;
    border-bottom: none;
  }

  .ehd-table tbody tr + tr {
    padding-top: 1.35rem;
  }

  .ehd-table tbody tr:last-child {
    border-bottom: none;
  }

  .ehd-table tbody th,
  .ehd-table tbody td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    border: none;
  }

  .ehd-table tbody th[scope="row"] {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--app-separator);
  }

  .ehd-table tbody th::before {
    content: "Move";
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--app-muted);
  }

  .ehd-example-cell::before {
    content: "Example";
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--app-muted);
  }

  .ehd-guide-cell::before {
    content: "Guide";
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--app-muted);
  }
}
