/* ===== Brand Page Specific Styles ===== */

/* --- Hero --- */
.brand-hero {
  background: linear-gradient(180deg, var(--beige-lighter) 0%, var(--white) 100%);
  padding: 140px 24px 80px;
  text-align: center;
}

.brand-hero-inner {
  max-width: 700px;
  margin: 0 auto;
}

.brand-hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--orange);
  margin-bottom: 20px;
}

.brand-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 20px;
}

.brand-hero-subtitle {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Table of Contents --- */
.brand-toc {
  position: sticky;
  top: 56px;
  z-index: 90;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.brand-toc-inner {
  display: flex;
  gap: 4px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
}

.brand-toc-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: all 0.2s;
}

.brand-toc-link:hover {
  color: var(--text-main);
  background: var(--beige-lighter);
}

/* --- Main --- */
.brand-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* --- Section --- */
.brand-section {
  padding-top: 80px;
}

.brand-section-last {
  padding-bottom: 40px;
}

.section-label {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--beige);
  margin-bottom: 8px;
}

.brand-section-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.2;
}

.brand-section-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 32px;
}

.brand-section-desc code {
  font-size: 13px;
  background: var(--beige-lighter);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--text-main);
}

.brand-section-desc a {
  color: var(--orange);
  transition: opacity 0.2s;
}

.brand-section-desc a:hover {
  opacity: 0.8;
}

.brand-subsection-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 40px;
  margin-bottom: 16px;
}

/* --- Color Swatches (override for wider page) --- */
.brand-section .color-swatches {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.color-swatch-usage {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* --- Text Color Samples --- */
.brand-text-samples {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.brand-text-sample {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--beige-lighter);
  border-radius: var(--radius-sm);
}

.brand-text-preview {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  width: 56px;
  text-align: center;
  flex-shrink: 0;
}

.brand-text-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.brand-text-hex {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: monospace;
}

.brand-text-note {
  font-size: 12px;
  color: var(--text-secondary);
}

/* --- Logo Showcase --- */
.brand-logo-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.brand-logo-card {
  padding: 40px 32px 24px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.brand-logo-light {
  background: var(--white);
  border: 1px solid var(--border-light);
}

.brand-logo-dark {
  background: var(--text-main);
}

.brand-logo-warm {
  background: var(--beige);
}

.brand-logo-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-text {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-main);
}

.brand-logo-label {
  font-size: 12px;
  color: var(--text-tertiary);
}

.brand-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.brand-download-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-main);
}

.brand-download-btn-dark {
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.brand-download-btn-dark:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* --- Animated Logo Showcase --- */
.brand-animated-logo-showcase {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  margin: 32px 0;
  align-items: start;
}

.brand-animated-logo-preview {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-animated-logo-svg {
  width: 160px;
  height: auto;
  color: var(--text-main);
}

.brand-animated-logo-svg .logo-dot {
  animation: dotBounce 1.8s ease-in-out infinite;
}

.brand-animated-logo-svg .logo-dot-1 { animation-delay: 0s; }
.brand-animated-logo-svg .logo-dot-2 { animation-delay: 0.15s; }
.brand-animated-logo-svg .logo-dot-3 { animation-delay: 0.3s; }
.brand-animated-logo-svg .logo-dot-4 { animation-delay: 0.45s; }

@keyframes dotBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-60px); }
}

.brand-animated-logo-heading {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

.brand-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 8px;
}

.brand-spec-table td {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: top;
}

.brand-spec-table-label {
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  padding-right: 24px !important;
  width: 130px;
}

.brand-spec-table code {
  font-size: 12px;
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.brand-code-block {
  background: var(--text-main);
  color: #e0e0e0;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.7;
  overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.brand-code-block code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

@media (max-width: 700px) {
  .brand-animated-logo-showcase {
    grid-template-columns: 1fr;
  }
}

/* --- Rules Grid (Do / Don't) --- */
.brand-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.brand-rule {
  padding: 20px;
  border-radius: var(--radius-sm);
}

.brand-rule p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.brand-rule-do {
  background: #F0FAF2;
}

.brand-rule-dont {
  background: #FEF2F2;
}

.brand-rule-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.brand-rule-badge-do {
  background: #28A745;
  color: white;
}

.brand-rule-badge-dont {
  background: #DC3545;
  color: white;
}

/* --- Spec Row --- */
.brand-spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 32px 0;
}

.brand-spec {
  flex: 1;
  min-width: 140px;
  padding: 24px;
  background: var(--beige-lighter);
  border-radius: var(--radius-sm);
  text-align: center;
}

.brand-spec-value {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.brand-spec-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* --- Typography --- */
.brand-type-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0;
}

.brand-type-card {
  padding: 32px;
  background: var(--beige-lighter);
  border-radius: var(--radius-lg);
}

.brand-type-family-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--orange);
  margin-bottom: 8px;
}

.brand-type-family-name {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 16px;
}

.brand-type-family-sample {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.8;
  word-break: break-all;
}

.brand-type-scale {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 24px 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.brand-type-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.brand-type-row:last-child {
  border-bottom: none;
}

.brand-type-demo {
  flex: 1;
  color: var(--text-main);
  min-width: 0;
}

.brand-type-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  text-align: right;
  max-width: 340px;
}

.brand-type-meta code {
  font-size: 12px;
  background: var(--beige-lighter);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--orange);
  display: inline-block;
  align-self: flex-end;
}

.brand-type-meta span {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* --- Spacing Scale --- */
.brand-spacing-scale {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.brand-spacing-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-spacing-bar {
  height: 24px;
  min-width: 4px;
  background: var(--orange);
  border-radius: 4px;
  flex-shrink: 0;
}

.brand-spacing-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-spacing-info code {
  font-size: 13px;
  background: var(--beige-lighter);
  padding: 3px 10px;
  border-radius: 6px;
  color: var(--text-main);
  font-weight: 600;
}

.brand-spacing-info span {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* --- Token Table --- */
.brand-token-table {
  margin: 24px 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.brand-token-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
}

.brand-token-row:last-child {
  border-bottom: none;
}

.brand-token-header {
  background: var(--beige-lighter);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
}

.brand-token-row code {
  font-size: 13px;
  color: var(--orange);
  font-weight: 500;
}

.brand-token-row span {
  font-size: 13px;
  color: var(--text-secondary);
}

.brand-file-table .brand-token-row {
  grid-template-columns: 140px 1fr;
}

/* --- Border Radius --- */
.brand-radius-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.brand-radius-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.brand-radius-demo {
  width: 80px;
  height: 80px;
  background: var(--orange);
  opacity: 0.15;
}

.brand-radius-item code {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.brand-radius-item span {
  font-size: 12px;
  color: var(--text-tertiary);
}

.brand-radius-usage {
  font-size: 11px !important;
  color: var(--text-secondary) !important;
}

/* --- Shadows --- */
.brand-shadow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.brand-shadow-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.brand-shadow-demo {
  width: 100%;
  height: 80px;
  background: var(--white);
  border-radius: var(--radius-sm);
}

.brand-shadow-info {
  text-align: center;
}

.brand-shadow-info code {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  display: block;
  margin-bottom: 4px;
}

.brand-shadow-info span {
  font-size: 12px;
  color: var(--text-tertiary);
  display: block;
}

.brand-shadow-usage {
  color: var(--text-secondary) !important;
  margin-top: 2px;
}

/* --- Component Grid --- */
.brand-component-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.brand-component-card {
  padding: 24px;
  background: var(--beige-lighter);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.brand-component-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.brand-component-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.brand-component-file {
  font-size: 11px;
  color: var(--orange);
  background: rgba(235, 76, 28, 0.08);
  padding: 3px 10px;
  border-radius: 4px;
}

/* --- Button Showcase --- */
.brand-button-showcase {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.brand-button-demo-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: var(--beige-lighter);
  border-radius: var(--radius-sm);
}

.brand-demo-btn {
  height: 44px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: default;
  border: none;
  flex-shrink: 0;
}

.brand-demo-btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(235, 76, 28, 0.25);
}

.brand-demo-btn-secondary {
  background: var(--white);
  color: var(--text-primary);
  border: 1.5px solid var(--border-medium);
}

.brand-demo-btn-text {
  background: transparent;
  color: var(--orange);
  padding: 0 12px;
}

.brand-demo-btn-link {
  background: transparent;
  color: var(--orange);
  text-decoration: underline;
  padding: 0 4px;
}

.brand-button-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-button-meta strong {
  font-size: 13px;
  color: var(--text-main);
}

.brand-button-meta span {
  font-size: 12px;
  color: var(--text-secondary);
}

/* --- Card Anatomy --- */
.brand-card-anatomy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  margin: 24px 0;
  padding: 32px;
  background: var(--beige-lighter);
  border-radius: var(--radius-lg);
}

.brand-anatomy-card {
  background: #F8F2F5;
  border-radius: 24px;
  padding: 16px;
  width: 220px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.brand-anatomy-icon {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  margin-bottom: 16px;
}

.brand-anatomy-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 4px;
}

.brand-anatomy-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.brand-anatomy-labels {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand-anatomy-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.brand-anatomy-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- Chips Demo --- */
.brand-chip-demo {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.brand-chip-active {
  background: var(--text-main);
  color: white;
}

.brand-chip-dot {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.brand-chip-inactive {
  background: white;
  color: var(--text-primary);
  border: 1.5px solid var(--border-medium);
}

.brand-chip-select-active {
  background: #E4EFE9;
  color: #2D523E;
  border: 1.5px solid #4CAF50;
  border-radius: 50px;
}

.brand-chip-select-inactive {
  background: #F9F9F9;
  color: var(--text-secondary);
  border: 1.5px solid transparent;
  border-radius: 50px;
}

/* --- Feedback Demos --- */
.brand-feedback-demos {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.brand-feedback-demo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.5;
}

.brand-feedback-icon {
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.brand-feedback-correct {
  background: #E4EFE9;
  color: #2D523E;
}

.brand-feedback-incorrect {
  background: #F8F2F5;
  color: #8B2252;
}

.brand-feedback-info {
  background: #F9F9F9;
  color: var(--text-secondary);
}

.brand-feedback-warning {
  background: #FFF8E1;
  color: #7B6B2D;
}

/* --- Option Button States --- */
.brand-option-states {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0;
}

.brand-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 2px solid transparent;
}

.brand-option-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.brand-option-normal {
  background: white;
  border-color: var(--border-light);
  color: var(--text-primary);
}

.brand-option-normal .brand-option-badge {
  background: var(--beige-lighter);
  color: var(--text-secondary);
}

.brand-option-selected {
  background: white;
  border-color: var(--orange);
  color: var(--text-primary);
}

.brand-option-badge-selected {
  background: var(--orange);
  color: white;
}

.brand-option-correct {
  background: #E4EFE9;
  border-color: #4CAF50;
  color: #2D523E;
}

.brand-option-badge-correct {
  background: #4CAF50;
  color: white;
}

.brand-option-correct svg {
  margin-left: auto;
}

.brand-option-wrong {
  background: #F8F2F5;
  border-color: #DC3545;
  color: #8B2252;
}

.brand-option-badge-wrong {
  background: #DC3545;
  color: white;
}

.brand-option-wrong svg {
  margin-left: auto;
}

.brand-option-dimmed {
  background: white;
  border-color: var(--border-light);
  color: var(--text-primary);
  opacity: 0.5;
}

.brand-option-dimmed .brand-option-badge {
  background: var(--beige-lighter);
  color: var(--text-secondary);
}

/* --- Voice Grid --- */
.brand-voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.brand-voice-card {
  padding: 24px;
  border-radius: var(--radius-sm);
}

.brand-voice-do {
  background: #F0FAF2;
  border: 1px solid #D0E8D5;
}

.brand-voice-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}

.brand-voice-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* --- Icon Grid --- */
.brand-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 24px 0;
}

.brand-icon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--beige-lighter);
  border-radius: var(--radius-xs);
}

.brand-icon-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.brand-icon-lucide {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: monospace;
}

/* --- Code Blocks --- */
.brand-code-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  margin-top: 12px;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  cursor: pointer;
  transition: all 0.2s;
}

.brand-code-toggle:hover {
  background: rgba(235, 76, 28, 0.05);
  border-color: var(--orange);
}

.brand-code-toggle svg {
  transition: transform 0.2s;
}

.brand-code-toggle.open svg {
  transform: rotate(90deg);
}

.brand-code-block {
  display: none;
  margin-top: 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.brand-code-block.open {
  display: block;
}

.brand-code-block pre {
  margin: 0;
  padding: 20px;
  background: #1A1A1A;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.brand-code-block code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: #E8E8E8;
  background: none;
  padding: 0;
  border-radius: 0;
  white-space: pre;
  tab-size: 2;
}

.brand-component-card .brand-code-toggle {
  width: 100%;
  justify-content: center;
}

/* Token code in tables and inline */
.brand-section code:not(.brand-code-block code) {
  font-size: 13px;
  background: var(--beige-lighter);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--text-main);
}

/* File reference section specific */
.brand-section-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.brand-section-title-row .brand-section-title {
  margin-bottom: 0;
}

/* --- Gradient Previews --- */
.brand-gradient-preview {
  border-radius: var(--radius-lg);
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.brand-gradient-hero {
  height: 180px;
  background: linear-gradient(160deg, var(--beige-lighter), var(--white), var(--orange-soft), var(--purple-soft), var(--blue-soft));
  background-size: 400% 400%;
  animation: heroGradient 20s ease-in-out infinite;
}

@keyframes heroGradient {
  0%, 100% { background-position: 0% 0%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
}

.brand-gradient-accent {
  height: 120px;
  background: var(--beige-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-gradient-accent-text {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--orange), var(--purple), var(--blue), var(--green), var(--orange));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: accentShift 12s ease-in-out infinite;
}

@keyframes accentShift {
  0%, 100% { background-position: 0% 50%; }
  25% { background-position: 50% 0%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 100%; }
}

.brand-gradient-btn-wrap {
  height: 100px;
  background: var(--beige-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-gradient-btn-demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 32px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--purple), var(--blue), var(--orange));
  background-size: 300% 300%;
  animation: btnGradient 8s ease-in-out infinite;
  box-shadow: 0 4px 16px rgba(235, 76, 28, 0.25);
}

@keyframes btnGradient {
  0%, 100% { background-position: 0% 50%; }
  33% { background-position: 50% 100%; }
  66% { background-position: 100% 0%; }
}

.brand-gradient-eyebrow-wrap {
  height: 80px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-gradient-eyebrow-demo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--orange-soft), var(--purple-soft), var(--blue-soft), var(--green-soft), var(--orange-soft));
  background-size: 400% 400%;
  animation: eyebrowShift 16s ease-in-out infinite;
}

@keyframes eyebrowShift {
  0%, 100% { background-position: 0% 50%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
}

.brand-gradient-blobs {
  height: 200px;
  background: var(--beige-lighter);
  position: relative;
  overflow: hidden;
}

.brand-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
}

.brand-blob-1 {
  width: 200px;
  height: 200px;
  background: var(--orange-soft);
  top: -30px;
  right: 20%;
  animation: glowDrift1 10s ease-in-out infinite;
}

.brand-blob-2 {
  width: 160px;
  height: 160px;
  background: var(--green-soft);
  bottom: -20px;
  left: 10%;
  animation: glowDrift2 13s ease-in-out infinite;
}

.brand-blob-3 {
  width: 140px;
  height: 140px;
  background: var(--purple-soft);
  top: 30%;
  right: 5%;
  animation: glowDrift3 16s ease-in-out infinite;
}

.brand-blob-4 {
  width: 170px;
  height: 170px;
  background: var(--blue-soft);
  bottom: 10%;
  right: 40%;
  animation: glowDrift4 14s ease-in-out infinite;
}

@keyframes glowDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; background: var(--orange-soft); }
  33% { transform: translate(20px, -15px) scale(1.08); opacity: 0.7; background: var(--pink-soft); }
  66% { transform: translate(-15px, 10px) scale(1.12); opacity: 0.6; background: var(--purple-soft); }
}

@keyframes glowDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.45; background: var(--green-soft); }
  33% { transform: translate(-15px, 20px) scale(1.1); opacity: 0.7; background: var(--blue-soft); }
  66% { transform: translate(25px, -10px) scale(1.14); opacity: 0.55; background: var(--green-soft); }
}

@keyframes glowDrift3 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; background: var(--purple-soft); }
  33% { transform: translate(15px, 10px) scale(1.15); opacity: 0.7; background: var(--blue-soft); }
  66% { transform: translate(-10px, -15px) scale(1.05); opacity: 0.5; background: var(--orange-soft); }
}

@keyframes glowDrift4 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; background: var(--blue-soft); }
  33% { transform: translate(-20px, -15px) scale(1.1); opacity: 0.65; background: var(--green-soft); }
  66% { transform: translate(15px, 18px) scale(1.06); opacity: 0.45; background: var(--pink-soft); }
}

/* --- Timing Scale --- */
.brand-timing-scale {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.brand-timing-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-timing-bar {
  height: 24px;
  min-width: 4px;
  background: linear-gradient(135deg, var(--orange), var(--purple), var(--blue));
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0.7;
}

.brand-timing-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-timing-info code {
  font-size: 13px;
  background: var(--beige-lighter);
  padding: 3px 10px;
  border-radius: 6px;
  color: var(--text-main);
  font-weight: 600;
}

.brand-timing-info span {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .brand-type-pair {
    grid-template-columns: 1fr;
  }

  .brand-type-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .brand-type-meta {
    text-align: left;
    align-self: flex-start;
  }

  .brand-type-meta code {
    align-self: flex-start;
  }

  .brand-card-anatomy {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .brand-button-demo-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .brand-token-row {
    grid-template-columns: 1fr 1fr;
    font-size: 12px;
  }

  .brand-token-row span:last-child {
    display: none;
  }

  .brand-token-header span:last-child {
    display: none;
  }

  .brand-logo-showcase {
    grid-template-columns: 1fr;
  }

  .brand-file-table .brand-token-row {
    grid-template-columns: 100px 1fr;
  }

  .brand-file-table .brand-token-row span:last-child,
  .brand-file-table .brand-token-header span:last-child {
    display: block;
  }
}

@media (max-width: 480px) {
  .brand-spec-row {
    flex-direction: column;
  }

  .brand-option-states {
    overflow-x: auto;
  }
}
