/* Vinyl Speed and Size Cheat Sheet — Styles */

:root {
  --color-bg: #1a1410;
  --color-bg-card: #241d17;
  --color-bg-elevated: #2e241d;
  --color-surface: #382c23;
  --color-border: #4a3c30;
  --color-border-light: #5c4a3a;
  --color-text: #f0e8df;
  --color-text-muted: #b8a99a;
  --color-text-dim: #8a7c6e;
  --color-accent: #e8a020;
  --color-accent-hover: #f0b830;
  --color-accent-dim: #c08018;
  --color-success: #4caf50;
  --color-warning: #ff9800;
  --color-danger: #f44336;
  --color-focus: #e8a020;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --max-width: 960px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 8px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--color-accent);
}

.logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.site-nav a:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-muted);
  border-radius: 1px;
  transition: all var(--transition);
}

.nav-menu {
  display: none;
  flex-direction: column;
  padding: 8px 20px;
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
}

.nav-menu a {
  color: var(--color-text-muted);
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.nav-menu a:last-child {
  border-bottom: none;
}

/* Hero */
.hero {
  padding: 60px 0 40px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-bg-card) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
}

.hero h1 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 17px;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.ad-banner {
  margin-top: 24px;
  min-height: 60px;
  background: var(--color-bg-elevated);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dim);
  font-size: 12px;
}

/* Lookup Section */
.lookup-section {
  padding: 40px 0;
}

.lookup-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.lookup-fieldset {
  border: none;
  margin-bottom: 20px;
}

.lookup-fieldset:last-of-type {
  margin-bottom: 24px;
}

.lookup-fieldset legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  cursor: pointer;
}

.chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chip-label {
  display: inline-block;
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: all var(--transition);
  user-select: none;
}

.chip:hover .chip-label {
  border-color: var(--color-accent-dim);
  color: var(--color-text);
}

.chip input:checked + .chip-label {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
}

.chip input:focus-visible + .chip-label {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.lookup-result {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
}

.result-empty {
  color: var(--color-text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.result-empty .result-icon {
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

.result-answer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.result-speed {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-accent);
  line-height: 1;
}

.result-speed .rpm {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-muted);
  vertical-align: super;
}

.result-detail {
  font-size: 15px;
  color: var(--color-text-muted);
  max-width: 400px;
}

.result-warning {
  font-size: 13px;
  color: var(--color-warning);
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.2);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

.lookup-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
  color: var(--color-text);
  transition: all var(--transition);
}

.btn:hover:not(:disabled) {
  background: var(--color-border);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--color-bg-elevated);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--color-surface);
  border-color: var(--color-border);
}

/* Section styles */
section {
  padding: 48px 0;
}

section h2 {
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.section-intro {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  max-width: 600px;
}

.reference-section {
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.reference-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 500px;
}

.reference-table th {
  background: var(--color-bg-elevated);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--color-border);
}

.reference-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.reference-table tr:last-child td {
  border-bottom: none;
}

.reference-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.reference-table strong {
  color: var(--color-accent);
  font-weight: 700;
}

.table-note {
  font-size: 12px;
  color: var(--color-text-dim);
  margin-top: 10px;
}

/* Clues Section */
.clues-section {
  background: var(--color-bg);
}

.clue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.clue-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color var(--transition);
}

.clue-card:hover {
  border-color: var(--color-border-light);
}

.clue-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--color-accent);
}

.clue-icon svg {
  width: 100%;
  height: 100%;
}

.clue-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.clue-card p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Mistakes Section */
.mistakes-section {
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.mistake-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mistake-item {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mistake-item summary {
  padding: 14px 18px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text);
  user-select: none;
  transition: background var(--transition);
}

.mistake-item summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.mistake-item[open] summary {
  border-bottom: 1px solid var(--color-border);
}

.mistake-item p {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Edge Cases */
.edge-section {
  background: var(--color-bg);
}

.edge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.edge-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent-dim);
  border-radius: var(--radius-md);
  padding: 20px;
}

.edge-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.edge-card p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* FAQ Section */
.faq-section {
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 20px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item dt {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.faq-item dd {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Tips Section */
.tips-section {
  background: var(--color-bg);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.tip-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
}

.tip-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--color-accent-dim);
  border-radius: 1px;
}

.tip-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  padding-top: 4px;
}

.tip-card p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.footer-brand {
  font-size: 14px;
  color: var(--color-text-muted);
}

.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  font-size: 13px;
  color: var(--color-text-dim);
}

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

.footer-meta {
  font-size: 12px;
  color: var(--color-text-dim);
}

/* Responsive */
@media (max-width: 768px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu:not([hidden]) {
    display: flex;
  }

  .hero {
    padding: 40px 0 28px;
  }

  .lookup-card {
    padding: 20px;
  }

  .chip-label {
    padding: 7px 13px;
    font-size: 13px;
  }

  .result-speed {
    font-size: 36px;
  }

  .lookup-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lookup-actions .btn {
    justify-content: center;
  }

  section {
    padding: 36px 0;
  }

  .clue-grid,
  .edge-grid,
  .tips-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .site-header,
  .site-footer,
  .lookup-section,
  .ad-banner,
  .tips-section {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }

  .reference-table th,
  .reference-table td {
    border-color: #ccc;
  }

  .reference-table strong {
    color: #000;
  }

  section {
    padding: 16px 0;
    break-inside: avoid;
  }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
