/* The palette is an amp, not an app: tweed cream, tolex brown, tube-glow
   amber, brass on the dark panels. Fraunces carries the headline voice the
   way a badge logo carries an amp face. */
:root {
  --ink: #211711;
  --muted: #7d7065;
  --line: #e6dccb;
  --accent: #c2511e;
  --accent-dark: #94380f;
  --bg: #f5efe2;
  --card: #fffcf3;
  --night: #241a13;
  --brass: #e0aa4e;
  --shadow: 0 16px 45px rgba(58, 38, 22, 0.09);
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fraunces-latin-397b623a.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(194, 81, 30, 0.07), transparent 26rem),
    var(--bg);
  font: 16px/1.55 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 2rem 1.5rem 4.5rem;
  flex: 1;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(231, 224, 215, 0.85);
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: blur(16px);
}

header.site .bar {
  width: min(1180px, 100%);
  min-height: 4.4rem;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.wordmark {
  flex: none;
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.22rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.wordmark span { color: var(--accent); }
.wordmark:hover { text-decoration: none; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  font-size: 0.88rem;
  font-weight: 650;
}

.primary-nav a { color: var(--muted); }
.primary-nav a:hover { color: var(--ink); text-decoration: none; }
.primary-nav a.active { color: var(--accent-dark); }

/* Keep the companion app distinct from the catalog sections. */
.primary-nav .editor-link {
  padding: 0.36rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-dark);
}
.primary-nav .editor-link:hover { color: white; background: var(--accent); }

.mobile-nav { display: none; position: relative; }
.mobile-nav summary {
  padding: 0.38rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--card);
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary::after { content: " +"; color: var(--muted); }
.mobile-nav[open] summary::after { content: " −"; }
.mobile-nav summary:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }
.mobile-nav nav {
  width: 14rem;
  padding: 0.45rem;
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  background: var(--card);
  box-shadow: var(--shadow);
}
.mobile-nav nav a { padding: 0.55rem 0.65rem; border-radius: 7px; color: var(--ink); font-size: 0.88rem; font-weight: 650; }
.mobile-nav nav a:hover { background: var(--bg); text-decoration: none; }
.mobile-nav nav a.active { color: var(--accent-dark); background: var(--bg); }
.mobile-nav nav a:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: -1px; }
.mobile-nav nav .mobile-account-link { margin-top: 0.35rem; padding-top: 0.75rem; border-top: 1px solid var(--line); color: var(--accent-dark); }

.account {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: auto;
  font-size: 0.86rem;
  white-space: nowrap;
}

.account .who { color: var(--muted); max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
.account .who.active { color: var(--accent-dark); }
.account .publish, .signin { font-weight: 750; }

.linkish {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--accent-dark);
  background: none;
  font: inherit;
  cursor: pointer;
}

.linkish:hover { text-decoration: underline; }

footer.site { border-top: 1px solid var(--line); background: var(--card); }
.footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.84rem;
}
.footer-inner p { margin: 0; }

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Display type: Fraunces, set tight but not crushed. Headlines should feel
   like an amp badge, not a billboard, so sizes stay a notch under huge. */
.page-head h1, .discovery-hero h1, .tone-hero h1, .tone-detail-hero h1, .download-hero h1,
.section-head h2, .detail-columns h2, .lineage-section h2, .day-one h2, .editor-cta h2,
.feature-grid article h2, .empty-state h2, .dialog h1, .dialog h2, .profile-hero h1,
.chain-title, .download-setup h2 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.page-head { max-width: 48rem; margin: 0.5rem 0 2rem; }
.page-head h1, .discovery-hero h1, .tone-hero h1, .tone-detail-hero h1, .download-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4.5vw, 4.2rem);
  line-height: 1.02;
}
.page-head h1 { font-size: clamp(2rem, 4vw, 3.3rem); }
.page-head p:last-child { margin: 0.75rem 0 0; font-size: 1.02rem; }
.browse-head { max-width: 54rem; }

.discovery-hero { padding: clamp(2.25rem, 4.5vw, 4rem) 0 clamp(2.5rem, 5vw, 4.25rem); }
.discovery-hero h1 { max-width: 900px; font-size: clamp(3rem, 6.5vw, 5.6rem); }
.discovery-hero > p:not(.eyebrow, .search-examples) {
  max-width: 48rem;
  margin: 1.25rem 0 1.75rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-search {
  width: min(800px, 100%);
  display: flex;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.hero-search input[type="search"] {
  min-width: 0;
  flex: 1;
  padding: 0.85rem 1rem;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 1.05rem;
}
.hero-search input[type="submit"], .filters input[type="submit"],
.auth-form input[type="submit"], .tone-form input[type="submit"] {
  border: 1px solid var(--night);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  color: white;
  background: var(--night);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.hero-search input[type="submit"] { padding-inline: 1.4rem; }
.search-examples { margin: 1rem 0 0; color: var(--muted); font-size: 0.86rem; }
.discovery-steps {
  margin: -1.25rem 0 4rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  list-style: none;
}
.discovery-steps li { min-width: 0; padding: 1.25rem 1.25rem 1.25rem 0; display: flex; align-items: flex-start; gap: 0.85rem; }
.discovery-steps li + li { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.discovery-steps li > span {
  flex: none;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
}
.discovery-steps div { min-width: 0; display: flex; flex-direction: column; }
.discovery-steps strong { line-height: 1.3; }
.discovery-steps small { margin-top: 0.25rem; color: var(--muted); line-height: 1.4; }

/* Day one: the state of having no catalog yet, worn proudly rather than
   papered over with placeholder cards. */
.day-one {
  margin: 0 0 3.5rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  border: 1px dashed #cec3b8;
  border-radius: 24px;
  background: var(--card);
}
.day-one h2 { margin: 0; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.05; }
.day-one > p:not(.eyebrow) { max-width: 44rem; margin: 1rem 0 0; color: var(--muted); font-size: 1.08rem; }
.day-one-actions { margin-top: 1.9rem; display: flex; flex-wrap: wrap; gap: 0.7rem; }
.day-one .chain-demo { margin: 2rem 0 0; }

.chain-demo { margin: 0 0 4rem; }
.chain-demo figcaption { margin-top: 0.4rem; color: var(--muted); font-size: 0.84rem; }

.discovery-section { margin: 0 0 3.5rem; }
.section-head {
  margin: 0 0 1.2rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}
.section-head h2, .detail-columns h2, .lineage-section h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.1;
}
.section-head > a { font-size: 0.9rem; font-weight: 700; }
.section-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 0.65rem; }
.section-actions .button { font-size: 0.82rem; }

.tone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
/* A card is a record sleeve on a shelf: a small square of colour, the name,
   the context, the hardware. The sleeve colours cycle through sunbursts a
   guitar case would recognise, never a colour a spreadsheet would pick. */
.tone-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 6px 22px rgba(58, 38, 22, 0.035);
}
.tone-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 9px 28px rgba(58, 38, 22, 0.075); }
.tone-card-head { display: flex; align-items: center; gap: 0.85rem; }
.tone-card-head > div { min-width: 0; }
.tone-art {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: rgba(255, 250, 240, 0.94);
  background:
    linear-gradient(135deg, rgba(194, 81, 30, 0.94), rgba(44, 26, 18, 0.97)),
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(255,255,255,.08) 12px 13px);
  text-decoration: none;
}
.tone-card .tone-art { flex: none; width: 3.4rem; aspect-ratio: 1; border-radius: 10px; }
.tone-card:nth-child(3n + 2) .tone-art { background: linear-gradient(135deg, #b8862f, #241708); }
.tone-card:nth-child(3n + 3) .tone-art { background: linear-gradient(135deg, #96352c, #200f0e); }
.tone-art span { font-family: "Fraunces", Georgia, serif; font-size: 1.1rem; font-weight: 600; letter-spacing: 0; }
.tone-art:hover { text-decoration: none; filter: saturate(1.15); }
.tone-card h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; letter-spacing: -0.015em; }
.tone-card h3 a { color: var(--ink); display: block; overflow-wrap: anywhere; }
.tone-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tone-context { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.84rem; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tone-card-match {
  margin: 0.7rem 0 0;
  padding-top: 0.6rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.tone-card-match strong { color: var(--accent-dark); font-weight: 750; }
.tone-card-meta { margin-top: 0.8rem; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.card-stats { flex: none; display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); font-size: 0.72rem; line-height: 1.35; white-space: nowrap; }
.card-stats .card-availability { color: var(--accent-dark); font-weight: 750; }
.device-chips, .tag-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.device-chips span, .device-chips a, .tag {
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #faf7f2;
  font-size: 0.68rem;
  font-weight: 700;
}
.device-chips a { position: relative; z-index: 1; }
.device-chips a:hover { color: var(--accent-dark); border-color: var(--accent); text-decoration: none; }
.device-chips .selected { color: var(--accent-dark); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: #fff7ee; }
.device-chips small { margin-left: 0.15rem; color: inherit; font-size: 0.62rem; }

.split-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.link-list { border-top: 1px solid var(--line); }
.link-list > a {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink);
}
.link-list > a:hover { color: var(--accent-dark); text-decoration: none; }
.link-list span:first-child { display: flex; flex-direction: column; }
.link-list small { color: var(--muted); }
.link-list.large { max-width: 52rem; }
.link-list.large > a { padding: 1.15rem 0; }

.editor-cta {
  margin: 1rem 0 0;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: white;
  background: var(--night);
}
.editor-cta h2 { margin: 0; font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.05; }
.editor-cta p:not(.eyebrow) { max-width: 45rem; color: #c9c0b9; }
.editor-cta .eyebrow { color: var(--brass); }
.editor-cta .button { color: var(--night); background: var(--brass); white-space: nowrap; }
.contribute-cta { margin-top: 3rem; }

.catalog-tools { max-width: 58rem; margin: 0 0 1rem; }
.catalog-search { width: min(52rem, 100%); display: flex; gap: 0.5rem; }
.catalog-search-compact { margin-bottom: 1rem; }
.catalog-search input[type="search"] {
  min-width: 0;
  min-height: 3rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  flex: 1;
  color: var(--ink);
  background: var(--card);
  font: inherit;
}
.catalog-search input[type="submit"], .filter-actions input[type="submit"] {
  min-height: 3rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--night);
  border-radius: 10px;
  color: white;
  background: var(--night);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.catalog-search .search-clear {
  padding: 0.55rem 0.2rem;
  align-self: center;
  flex: none;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}
.catalog-filters { margin-top: 0.65rem; }
.catalog-filters summary { width: fit-content; color: var(--accent-dark); font-size: 0.86rem; font-weight: 750; cursor: pointer; }
.catalog-filters summary span { color: var(--muted); font-weight: 600; }
.filter-fields {
  margin-top: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(8rem, 1fr));
  gap: 0.75rem;
  background: rgba(255, 252, 243, 0.62);
}
.filter-fields label { min-width: 0; }
.filter-fields label > span { margin-bottom: 0.25rem; display: block; color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.filter-fields select { width: 100%; }
.filter-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.85rem; }
.filter-actions input[type="submit"] { min-height: 2.55rem; }
.original-filter-fields { width: min(30rem, 100%); grid-template-columns: minmax(12rem, 1fr); }
.result-count { margin: 0.8rem 0 1.25rem; color: var(--muted); font-size: 0.86rem; }
.search-suggestions { width: min(52rem, 100%); margin: 0 0 2.25rem; }
.search-suggestions h2 { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: clamp(1.55rem, 2.8vw, 2.15rem); font-weight: 600; line-height: 1.1; }
.search-suggestions > .muted { margin: 0.35rem 0 1rem; }
.search-suggestions .link-list { background: rgba(255, 252, 243, 0.34); }
.search-suggestions .link-list a { padding-inline: 0.8rem; }
.suggestion-recovery { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.86rem; }
.search-best { margin: 0 0 2.25rem; }
.search-best-card {
  padding: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 16px;
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  background: var(--card);
  box-shadow: var(--shadow);
}
.search-best-card .tone-art { width: 6rem; aspect-ratio: 1; border-radius: 13px; }
.search-best-card .tone-art span { font-size: 1.75rem; }
.search-best-copy { min-width: 0; }
.search-best-copy h2, .search-more-head h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
}
.search-best-copy h2 a { color: var(--ink); }
.search-best-copy > p:not(.tone-context) { margin: 0.55rem 0 0.75rem; color: var(--muted); font-size: 0.9rem; }
.search-best-card > .button { white-space: nowrap; }
.search-same-title {
  margin: -0.75rem 0 2.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 252, 243, 0.55);
}
.search-same-title > summary { padding: 0.9rem 1rem; color: var(--accent-dark); cursor: pointer; }
.search-same-title > summary strong { margin-left: 0.25rem; }
.search-same-title > summary span { margin-left: 0.45rem; color: var(--muted); font-size: 0.84rem; }
.search-same-title-body { padding: 1rem; border-top: 1px solid var(--line); }
.search-same-title-body > p { max-width: 48rem; margin: 0 0 1rem; color: var(--muted); font-size: 0.9rem; }
.same-title-tone-list .tone-listing { background: var(--card); }
.search-more-head {
  margin: 0 0 1rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}
.search-more-head > span { color: var(--muted); font-size: 0.82rem; }
.search-more-head .muted { margin: 0.35rem 0 0; max-width: 42rem; font-size: 0.84rem; }
.pagination {
  max-width: 42rem;
  margin: 2.25rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}
.pagination a { font-weight: 750; }
.pagination a:first-child, .pagination > span:first-child { justify-self: start; }
.pagination a:last-child, .pagination > span:last-child { justify-self: end; }
.pagination [aria-disabled="true"] { opacity: 0.45; }

.filter-fields select {
  min-height: 2.65rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--card);
  font: inherit;
  font-size: 0.86rem;
}
.catalog-tools :focus, .catalog-search :focus, .tone-form :focus, .auth-form :focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.breadcrumbs {
  margin: 0 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.tone-hero, .tone-detail-hero {
  margin: 1rem 0 4rem;
  display: grid;
  grid-template-columns: minmax(13rem, 25rem) 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.tone-art-large { aspect-ratio: 1; border-radius: 22px; box-shadow: var(--shadow); }
.tone-art-large span { font-size: clamp(3rem, 7vw, 5.5rem); }
.tone-hero h1, .tone-detail-hero h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
.song-hero {
  margin: 0.5rem 0 2.25rem;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
}
.song-hero .tone-art-large { width: 7.5rem; border-radius: 18px; }
.song-hero .tone-art-large span { font-size: 2.35rem; }
.song-hero h1 { margin-bottom: 0.4rem; font-size: clamp(2.35rem, 5vw, 4rem); }
.song-summary { margin: 0; color: var(--muted); font-size: 0.92rem; }
.song-summary strong { color: var(--ink); }
.song-hero .lede { margin: 0.65rem 0 0; font-size: 1rem; }
.song-hero .tag-row { margin-top: 0.8rem; }
.part-name { margin: 0.8rem 0; color: var(--accent-dark); font-size: 1.3rem; font-weight: 800; }
.lede { max-width: 48rem; color: var(--muted); font-size: 1.16rem; }
.tag-row { margin-top: 1.25rem; }

.tones-head { margin-top: 1rem; }
.tone-device-nav { margin: -0.15rem 0 1rem; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tone-device-nav a {
  padding: 0.42rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--card);
  font-size: 0.78rem;
  font-weight: 700;
}
.tone-device-nav a:hover { color: var(--accent-dark); border-color: var(--accent); text-decoration: none; }
.tone-device-nav a.active { color: white; border-color: var(--night); background: var(--night); }
.tone-device-nav span { margin-left: 0.2rem; opacity: 0.72; font-size: 0.68rem; }
.device-prompt { margin: -0.1rem 0 0.8rem; color: var(--muted); font-size: 0.88rem; }
.tone-device-menu { display: none; }
.tone-order-note { margin: 0 0 1rem; color: var(--muted); font-size: 0.84rem; }
.tone-order-note strong { color: var(--ink); }
.device-results-head { margin-top: 2rem; align-items: end; }
.device-results-head > div { max-width: 42rem; }
.device-results-head .muted { margin: 0.45rem 0 0; font-size: 0.9rem; }
.device-results-head .tone-device-nav { margin: 0; justify-content: flex-end; }
.tone-search { max-width: 36rem; margin: 0 0 1.2rem; display: flex; align-items: center; gap: 0.5rem; }
.tone-search input[type="search"] {
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  flex: 1;
  color: var(--ink);
  background: var(--card);
  font: inherit;
}
.tone-search input[type="submit"] {
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--night);
  border-radius: 9px;
  color: white;
  background: var(--night);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.tone-search > a { font-size: 0.84rem; font-weight: 700; }
.tone-list { margin-bottom: 4rem; display: grid; gap: 0.75rem; }
.search-tone-results { margin-top: 2.5rem; }
.search-tone-results .section-head { margin-bottom: 1rem; }
.search-tone-results .section-head .muted { margin: 0.45rem 0 0; max-width: 44rem; font-size: 0.9rem; }
.search-tone-list { margin-bottom: 3rem; }
.tone-listing {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--card);
}
.tone-listing-copy { min-width: 0; }
.tone-listing h3 { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 1.55rem; line-height: 1.1; }
.tone-listing h3 a { color: var(--ink); }
.tone-listing p:not(.eyebrow) { margin: 0.35rem 0 0; }
.tone-listing .tone-device { color: var(--accent-dark); font-size: 0.92rem; font-weight: 750; }
.tone-listing .tone-description {
  max-width: 44rem;
  overflow: hidden;
  display: -webkit-box;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tone-detail-hero { grid-template-columns: 1fr minmax(15rem, 22rem); padding: 3rem 0; }
.tone-kind { margin-bottom: 0.7rem; }
.tone-notes { max-width: 48rem; overflow-wrap: anywhere; white-space: pre-line; }
.tone-notes a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 0.15em; }
.tone-actions {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}
.tone-action-context { margin: 0; color: var(--accent-dark); font-size: 0.82rem; }
.tone-action-facts {
  margin: 0.1rem 0 0;
  padding: 0.7rem 0;
  border-block: 1px solid var(--line);
  display: grid;
  gap: 0.4rem;
  text-align: left;
}
.tone-action-facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.tone-action-facts dt { color: var(--muted); font-size: 0.75rem; }
.tone-action-facts dd { margin: 0; font-size: 0.78rem; font-weight: 750; text-align: right; }
.button {
  display: inline-block;
  padding: 0.7rem 1rem;
  border: 1px solid var(--night);
  border-radius: 10px;
  color: white;
  background: var(--night);
  font-weight: 750;
  text-align: center;
}
.button:hover { opacity: 0.9; text-decoration: none; }
.button-secondary { color: var(--ink); background: transparent; border-color: var(--line); }
.button-disabled { color: var(--muted); background: var(--line); border-color: var(--line); cursor: not-allowed; }

/* The author's doorway from "indexed elsewhere" to "hosted here": quiet
   until opened, serious once open. */
.host-file {
  margin: -1.5rem 0 3rem;
  padding: 1rem 1.25rem;
  border: 1px dashed #cec3b8;
  border-radius: 12px;
  background: rgba(255, 252, 243, 0.6);
}
.host-file summary { color: var(--accent-dark); font-weight: 700; cursor: pointer; }
.host-file p { max-width: 46rem; color: var(--muted); font-size: 0.92rem; }
.author-check { display: flex; gap: 0.55rem; align-items: baseline; font-size: 0.92rem; font-weight: 650; }
.host-file-row { margin-top: 0.9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.host-file-row input[type="submit"] {
  border: 1px solid var(--night);
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  color: white;
  background: var(--night);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.version-history {
  margin: 0 0 4rem;
  padding: clamp(1.2rem, 2.5vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(58, 38, 22, 0.045);
  scroll-margin-top: 1.5rem;
}
.version-history-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.version-history-head h2 { margin: 0; }
.version-history-head > p { margin: 0 0 0.15rem; color: var(--muted); font-size: 0.86rem; }
.version-history-intro { max-width: 44rem; margin: 0.65rem 0 1.25rem; color: var(--muted); font-size: 0.92rem; }
.version-list { border-top: 1px solid var(--line); }
.version-row {
  min-width: 0;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}
.version-row:last-child { padding-bottom: 0; border-bottom: 0; }
.version-number { display: flex; align-items: center; gap: 0.45rem; }
.version-number strong { font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; }
.version-number span {
  padding: 0.17rem 0.38rem;
  border-radius: 999px;
  color: #526619;
  background: #eef5d9;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}
.version-copy { min-width: 0; display: grid; gap: 0.15rem; }
.version-copy > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version-copy p {
  margin: 0.15rem 0;
  overflow: hidden;
  display: -webkit-box;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.version-copy small { color: var(--muted); }
.version-download { min-width: 7.5rem; padding-block: 0.55rem; font-size: 0.82rem; }

.chain { margin: 0 0 4rem; }
.chain-title { margin: 0 0 0.85rem; font-size: 1.45rem; letter-spacing: -0.025em; }
.chain-board {
  max-width: 100%;
  overflow: hidden;
  padding: clamp(0.75rem, 1.8vw, 1.15rem);
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 0%, rgba(194, 81, 30, 0.08), transparent 18rem),
    linear-gradient(145deg, #fffaf0, #f0e4d2);
  box-shadow: 0 9px 26px rgba(58, 38, 22, 0.06);
}
.chain-board + .chain-board { margin-top: 0.75rem; }
.chain-path {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(8rem, 100%), 1fr));
  align-items: stretch;
  row-gap: 0.9rem;
}
.chain-stage {
  min-width: 0;
  display: grid;
  grid-template-columns: clamp(0.7rem, 1.7vw, 1.35rem) minmax(0, 1fr);
  align-items: center;
}
.chain-stage-first { grid-template-columns: minmax(0, 1fr); }
.chain-block {
  min-width: 0;
  width: 100%;
  min-height: 7.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.65rem 0.55rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--block-accent, var(--muted)) 48%, var(--line));
  border-top: 3px solid var(--block-accent, var(--muted));
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255, 252, 243, 0.88);
  box-shadow: 0 5px 13px rgba(58, 38, 22, 0.055);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}
/* The website owns these category drawings. The model pictures in HX Edit
   belong to Line 6 and are deliberately not copied into published pages. */
.chain-icon { flex: none; display: flex; color: var(--block-accent, var(--muted)); }
.chain-icon svg { width: 2.65rem; height: 2.65rem; display: block; }
.chain-name {
  width: 100%;
  overflow: hidden;
  display: -webkit-box;
  color: var(--ink);
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.chain-category {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-transform: uppercase;
}
.chain-joint {
  width: 100%;
  height: 2px;
  position: relative;
  background: color-mix(in srgb, var(--ink) 34%, var(--line));
}
.chain-joint::after {
  content: "";
  width: 0.32rem;
  height: 0.32rem;
  position: absolute;
  top: 50%;
  right: -0.08rem;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}
.chain-block.bypassed { opacity: 0.5; border-style: dashed; filter: saturate(0.5); }
.chain-endpoint {
  min-width: 0;
  width: 100%;
  min-height: 7.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, var(--line));
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255, 252, 243, 0.58);
  font-size: 0.76rem;
  font-weight: 750;
}
.chain-endpoint-mark {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 2px solid color-mix(in srgb, var(--ink) 42%, var(--line));
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.chain-output .chain-endpoint-mark { border: 0; color: var(--accent-dark); font-size: 2.8rem; font-weight: 400; line-height: 1; }
.chain-endpoint-name { color: var(--muted); }

.detail-columns { margin-bottom: 4rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.55rem 1.5rem; font-size: 0.9rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
dl.facts code { font-size: 0.72rem; }
.technical-details { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.technical-details summary { color: var(--muted); font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.technical-details dl.facts { margin-bottom: 0; }
.dependency-list { margin: 1rem 0; padding: 0; list-style: none; }
.dependency-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; }
.dependency-list li span { display: flex; flex-direction: column; }
.dependency-list small { color: var(--muted); }
.requirement-warning {
  padding: 0.9rem 1rem;
  border: 1px solid #e1c88e;
  border-radius: 10px;
  color: #6b4b13;
  background: #fff7df;
  font-size: 0.9rem;
}

.audio-section, .lineage-section { margin: 0 0 4rem; }
.audio-preview { padding: 1rem 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 1rem; }
.audio-preview audio { width: min(28rem, 100%); }
.audio-preview div { display: flex; flex-direction: column; }
.audio-preview small { color: var(--muted); }

.empty-state, .legal-note {
  padding: 1.25rem;
  border: 1px dashed #cec3b8;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 253, 249, 0.55);
}
.empty-state h2, .empty-state p { margin: 0; }
.empty-state h2 + p { margin-top: 0.35rem; }
.search-empty { padding: clamp(1.25rem, 3vw, 1.75rem); }
.search-empty h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.search-empty > p { max-width: 44rem; }
.empty-actions { margin-top: 1.1rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem 1rem; }
.empty-actions .button { min-height: 2.55rem; padding-block: 0.55rem; }
.empty-actions > a:not(.button) { font-size: 0.86rem; font-weight: 700; }
.search-recovery { margin-top: 2.75rem; }
.device-note { margin: -0.75rem 0 2rem; padding: 0.9rem 1rem; border-left: 3px solid var(--accent); color: var(--muted); background: rgba(255, 252, 243, 0.55); font-size: 0.9rem; }
.device-note strong { color: var(--ink); }

.part-grid, .feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.part-card, .feature-grid article {
  min-height: 10rem;
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--card);
}
.part-card:hover { border-color: var(--accent); text-decoration: none; }
.part-card strong { margin-top: auto; font-size: 1.2rem; }
.part-card small { margin-top: 0.35rem; color: var(--muted); }

.download-hero { max-width: 62rem; padding: clamp(2.25rem, 4.5vw, 4rem) 0 2.75rem; }
.download-hero .lede { max-width: 46rem; }
.download-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.7rem; }
.download-device-note { max-width: 42rem; margin: 1rem 0 0; color: var(--muted); font-size: 0.9rem; }
.download-next { margin: 0 0 3.5rem; padding: 1.6rem 0; border-block: 1px solid var(--line); }
.download-next-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.download-next-head h2 { margin: 0; font-family: "Fraunces", Georgia, "Times New Roman", serif; font-size: clamp(1.65rem, 3vw, 2.3rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.015em; }
.download-next-head > p { max-width: 27rem; margin: 0; color: var(--muted); font-size: 0.9rem; }
.download-steps { margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; }
.download-steps li { min-width: 0; padding: 0 1.5rem; display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: start; gap: 0.75rem; }
.download-steps li:first-child { padding-left: 0; }
.download-steps li:last-child { padding-right: 0; }
.download-steps li + li { border-left: 1px solid var(--line); }
.download-steps li > span { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; color: var(--card); background: var(--accent-dark); font-size: 0.8rem; font-weight: 800; }
.download-steps strong { display: block; line-height: 1.25; }
.download-steps p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.download-setup { margin: 0 0 3.5rem; }
.download-setup .section-head h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.3rem); }
.release-version { margin: 0; color: var(--muted); font-size: 0.86rem; white-space: nowrap; }
.release-version strong { color: var(--ink); }
.platform-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.platform-grid article { min-width: 0; min-height: 14rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; background: var(--card); }
.platform-grid h3 { margin: 0; font-size: 1.08rem; }
.platform-grid article > p:last-of-type { margin: 0.4rem 0 1rem; color: var(--muted); font-size: 0.86rem; }
.platform-actions { margin-top: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 0.65rem; }
.platform-actions .button { width: 100%; font-size: 0.88rem; }
.platform-alternative { font-size: 0.78rem; font-weight: 700; }
.release-help { margin: 0.85rem 0 0; color: var(--muted); font-size: 0.82rem; }
.setup-note { margin: 1rem 0 0; padding: 0.9rem 1rem; border-left: 3px solid var(--accent); color: var(--muted); background: rgba(255, 252, 243, 0.55); }
.feature-grid { margin-bottom: 3rem; }
.feature-grid article h2 { margin: auto 0 0.4rem; line-height: 1.05; letter-spacing: -0.035em; }
.feature-grid article p:last-child { margin: 0; color: var(--muted); }

.tone-form { max-width: 58rem; }
.tone-form fieldset { margin: 0 0 2rem; padding: 1.4rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.tone-form legend { padding: 0 0.35rem; font-size: 1.1rem; font-weight: 800; }
.fieldset-help { max-width: 44rem; margin: 0 0 1.25rem; color: var(--muted); font-size: 0.9rem; }
.tone-form label { display: block; flex: 1; margin: 0 0 1.1rem; }
.tone-form label > span { display: block; margin-bottom: 0.35rem; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.tone-form label small { font-weight: 500; }
.tone-form label > span small { margin-left: 0.2rem; color: var(--accent-dark); font-size: 0.65rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; }
.fixed-field { min-height: 2.7rem; padding: 0.55rem 0; display: block; }
.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row > label { min-width: 10rem; }
.tone-form input[type="text"], .tone-form input[type="email"], .tone-form input[type="number"],
.tone-form select, .tone-form textarea, .auth-form input[type="email"], .auth-form input[type="text"] {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: white;
  font: inherit;
}
.tone-form textarea { resize: vertical; }
.tone-form select[multiple] { min-height: 7rem; }
.tone-form input[type="file"] { max-width: 100%; }
.tone-form small.muted { display: block; margin-top: 0.4rem; }
.publish-choices { margin: 0 0 1.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.tone-form .publish-choices label {
  min-width: 0;
  margin: 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: #fffdf8;
  cursor: pointer;
}
.tone-form .publish-choices label:has(input:checked) { border-color: var(--accent); background: #fff7ee; }
.publish-choices input { margin-top: 0.25rem; accent-color: var(--accent); }
.publish-choices label > span { margin: 0; display: flex; flex-direction: column; color: var(--ink); font-size: 0.9rem; }
.publish-choices small { margin-top: 0.2rem; color: var(--muted); line-height: 1.35; }
.preset-upload {
  padding: 1rem;
  border: 1px dashed #cec3b8;
  border-radius: 11px;
  background: rgba(245, 239, 226, 0.48);
}
.preset-upload input[type="file"] { width: 100%; color: var(--muted); font: inherit; font-size: 0.86rem; }
.preset-upload input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--card);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.preset-selection { display: block; margin-top: 0.4rem; color: #426b3a; font-size: 0.84rem; font-weight: 750; }
.preset-selection.is-error { color: #9c321b; }
.form-details { margin: -0.5rem 0 1.5rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 252, 243, 0.55); }
.form-details summary { padding: 0.9rem 1rem; color: var(--accent-dark); font-weight: 750; cursor: pointer; }
.form-details summary span { margin-left: 0.3rem; color: var(--muted); font-size: 0.76rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; }
.form-details-body { padding: 1rem 1rem 0; border-top: 1px solid var(--line); }
.upload-rights { margin: 0 0 1rem; color: var(--muted); font-size: 0.82rem; }
.form-actions { margin-top: 1rem; display: flex; align-items: center; gap: 1rem; }
.form-errors { margin-bottom: 1.5rem; padding: 1rem; border: 1px solid #e3b9ad; border-radius: 10px; color: #7b2714; background: #fff2ed; }
.form-errors p { margin: 0; }
.form-errors ul { margin-bottom: 0; }
.form-errors .form-error-hint { margin-top: 0.75rem; font-size: 0.85rem; }
.tone-form .legal-note { margin: 0 0 1.5rem; font-size: 0.82rem; }

.auth-form { max-width: 32rem; display: flex; gap: 0.5rem; }
.sent-dialog h1 { margin: 0 0 0.75rem; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.05; }
.sent-dialog .lede { margin: 0 0 1rem; font-size: 1.05rem; }
.sent-dialog p:last-child { margin-bottom: 0; }
.dialog { max-width: 34rem; margin: 3rem auto; padding: 2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.pairing-head { margin-top: 3rem; }
.pairing-confirmation { max-width: 34rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); text-align: center; }
.pairing-code { margin: 0.35rem 0 0.65rem; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: clamp(1.8rem, 7vw, 3rem); font-weight: 800; letter-spacing: 0.08em; }
.pairing-confirmation .muted { margin: 0 auto 1.25rem; max-width: 28rem; }
.pairing-confirmation form { margin: 0; }
.owner-actions { margin-top: 2rem; display: flex; align-items: center; gap: 1rem; }

.profile-hero {
  margin: 0.5rem 0 3rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  background: var(--card);
  box-shadow: var(--shadow);
}
.profile-mark {
  width: clamp(5rem, 8vw, 7rem);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff8ed;
  background: linear-gradient(145deg, var(--accent), var(--night));
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 650;
}
.profile-hero h1 { margin: 0; font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 1.02; }
.profile-hero .lede { margin: 0.5rem 0 0; font-size: 1rem; }
.profile-stats { margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.profile-stats div { display: flex; flex-direction: column; }
.profile-stats dt { font-size: 1.15rem; font-weight: 800; }
.profile-stats dd { margin: 0; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.profile-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.profile-section { margin: 0 0 4rem; }
.gear-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.gear-card { min-width: 0; min-height: 9rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.gear-card h3 { margin: 0 0 1rem; font-size: 1.15rem; }
.profile-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.profile-chips a, .profile-chips span { padding: 0.28rem 0.55rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #faf7f2; font-size: 0.74rem; font-weight: 700; }
.profile-chips a:hover { color: var(--accent-dark); border-color: var(--accent); text-decoration: none; }
.profile-tone-list { margin-bottom: 0; }

.flash { margin: 0 0 1.25rem; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: 9px; }
.flash-notice { border-color: #cad9a3; background: #f4f9e8; }
.flash-alert { border-color: #e3b9ad; color: #7b2714; background: #fff2ed; }

@media (max-width: 900px) {
  .primary-nav { display: none; }
  .mobile-nav { display: block; margin-left: auto; }
  .account { margin-left: 0; }
  .tone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tone-hero { grid-template-columns: minmax(11rem, 17rem) 1fr; }
  .detail-columns { gap: 2rem; }
  .profile-hero { grid-template-columns: auto 1fr; }
  .profile-actions { grid-column: 1 / -1; flex-direction: row; }
  .gear-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-fields { grid-template-columns: repeat(2, minmax(8rem, 1fr)); }
}

@media (max-width: 640px) {
  main { padding: 1.5rem 1rem 4rem; }
  header.site .bar { padding-inline: 1rem; gap: 0.75rem; }
  .account .who { display: none; }
  .account { gap: 0.6rem; }
  .discovery-hero { min-height: 28rem; padding-top: 3rem; }
  .hero-search { display: grid; }
  .discovery-steps { grid-template-columns: 1fr; }
  .discovery-steps li + li { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .catalog-search { display: grid; }
  .catalog-search-compact { grid-template-columns: minmax(0, 1fr) auto; }
  .catalog-search-compact .search-clear { grid-column: 1 / -1; justify-self: start; }
  .search-more-head { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
  .search-best-card { grid-template-columns: 4.5rem minmax(0, 1fr); align-items: start; gap: 1rem; }
  .search-best-card .tone-art { width: 4.5rem; }
  .search-best-card .tone-art span { font-size: 1.35rem; }
  .search-best-card > .button { grid-column: 1 / -1; }
  .search-same-title > summary span { margin: 0.25rem 0 0 1.25rem; display: block; }
  .filter-fields { grid-template-columns: 1fr; }
  .pagination { gap: 0.5rem; font-size: 0.78rem; }
  .split-sections, .tone-hero, .tone-detail-hero, .detail-columns, .part-grid, .feature-grid, .profile-hero, .gear-grid { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: 1fr; }
  .download-hero { padding-bottom: 2.25rem; }
  .download-actions .button { width: auto; }
  .download-next { margin-bottom: 2.75rem; padding-block: 1.4rem; }
  .download-next-head { align-items: flex-start; flex-direction: column; gap: 0.65rem; }
  .download-steps { grid-template-columns: 1fr; gap: 0; }
  .download-steps li { padding: 1rem 0; }
  .download-steps li:first-child { padding-top: 0; }
  .download-steps li:last-child { padding-bottom: 0; }
  .download-steps li + li { border-top: 1px solid var(--line); border-left: 0; }
  .tone-grid { grid-template-columns: 1fr; }
  .tone-art-large { width: min(15rem, 100%); aspect-ratio: 1; }
  .tone-hero { margin-bottom: 3rem; }
  .song-hero {
    margin: 0 0 2rem;
    grid-template-columns: 4.75rem minmax(0, 1fr);
    gap: 1rem;
  }
  .song-hero .tone-art-large { width: 4.75rem; border-radius: 14px; }
  .song-hero .tone-art-large span { font-size: 1.5rem; }
  .song-hero h1 { margin-bottom: 0.35rem; font-size: clamp(2rem, 10vw, 3rem); }
  .song-hero .song-summary { font-size: 0.84rem; line-height: 1.4; }
  .song-hero .tag-row { grid-column: 1 / -1; }
  .tone-listing, .editor-cta { align-items: stretch; flex-direction: column; }
  .tones-head { align-items: stretch; flex-direction: column; }
  .tones-head .section-actions { width: 100%; justify-content: flex-start; }
  .tone-device-nav-wide.has-selection { display: none; }
  .tone-device-nav-wide.compact-on-mobile { display: none; }
  .tone-device-menu { margin: 0 0 1rem; display: block; }
  .tone-device-menu summary {
    width: fit-content;
    padding: 0.42rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--accent-dark);
    background: var(--card);
    font-size: 0.78rem;
    font-weight: 750;
    cursor: pointer;
    list-style: none;
  }
  .tone-device-menu summary::-webkit-details-marker { display: none; }
  .tone-device-menu summary::after { content: " +"; color: var(--muted); }
  .tone-device-menu[open] summary::after { content: " −"; }
  .tone-device-menu .tone-device-nav { margin: 0.65rem 0 0; }
  .device-results-head { align-items: stretch; flex-direction: column; }
  .device-results-head .tone-device-nav { justify-content: flex-start; }
  .tone-search { display: grid; grid-template-columns: 1fr auto; }
  .tone-search input[type="search"] { grid-column: 1 / -1; }
  .editor-cta .button { white-space: normal; }
  .footer-inner { padding-inline: 1rem; flex-direction: column; }
  .auth-form { flex-direction: column; }
  .profile-hero {
    margin: 0 0 2.25rem;
    padding: 1.25rem;
    grid-template-columns: 4.25rem minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
    border-radius: 16px;
  }
  .profile-mark { width: 4.25rem; font-size: 1.5rem; }
  .profile-hero h1 { font-size: clamp(2rem, 10vw, 2.5rem); }
  .profile-hero .lede { font-size: 0.92rem; line-height: 1.4; }
  .profile-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem 0.9rem; }
  .profile-stats dt { font-size: 1rem; }
  .profile-stats dd { font-size: 0.64rem; }
  .profile-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .profile-actions .button { padding: 0.65rem 0.5rem; font-size: 0.8rem; }
  .publish-choices { grid-template-columns: 1fr; }
  .version-history-head { align-items: start; flex-direction: column; gap: 0.3rem; }
  .version-row { grid-template-columns: 3.7rem minmax(0, 1fr); gap: 0.65rem; }
  .version-number { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
  .version-download { grid-column: 2; width: 100%; }
}
