:root {
  --bg-canvas: #0b0b0d;
  --bg-surface: #19191d;
  --bg-surface-hover: #222228;
  --text-primary: #f5f4f2;
  --text-muted: #b6b8c0;
  --accent-primary: #dc2626;
  --accent-secondary: #c0c4cc;
  --border-subtle: rgba(192, 196, 204, 0.16);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 14px 34px -6px rgba(0, 0, 0, 0.65);
  --glow-accent: 0 0 24px -6px rgba(220, 38, 38, 0.45);
  --font-serif: Charter, Cambria, Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 100%;
  line-height: 1.65;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  overflow-wrap: anywhere;
  hyphens: auto;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

a {
  color: var(--accent-secondary);
  text-decoration: underline;
  text-decoration-color: rgba(220, 38, 38, 0.65);
  text-underline-offset: 0.22em;
  transition: color 0.25s var(--ease-kinetic), text-decoration-color 0.25s var(--ease-kinetic);
}

a:hover, a:focus-visible {
  color: var(--text-primary);
  text-decoration-color: var(--accent-primary);
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-primary);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.prose {
  max-width: 70ch;
}

.prose-centered {
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

.stage-label {
  display: inline-block;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  font-size: 0.88rem;
  color: var(--accent-secondary);
  border-left: 2px solid var(--accent-primary);
  padding-left: 0.65rem;
  margin-bottom: 0.75rem;
}

.grade-tag {
  font-variant: small-caps;
  letter-spacing: 0.1em;
  color: var(--accent-secondary);
  font-weight: 600;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin-top: 0;
}

h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.1rem;
}

h2 {
  font-size: clamp(1.6rem, 2.9vw, 2.35rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
  margin-bottom: 0.65rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.15rem;
  color: var(--text-primary);
}

.muted {
  color: var(--text-muted);
}

/* Header - Document Flow, Left-Aligned Brand, Rounded Inset Shell */
.site-header {
  position: relative;
  padding: 1.1rem 0;
  background: transparent;
  z-index: 30;
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: rgba(25, 25, 29, 0.94);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.7rem 1.4rem 0.7rem 1.25rem;
  box-shadow: var(--shadow-elevation);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-mark {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--accent-secondary);
  background: linear-gradient(135deg, #19191d 55%, var(--accent-primary) 55%);
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--accent-secondary);
  font-variant: small-caps;
  letter-spacing: 0.09em;
  font-size: 0.98rem;
  white-space: nowrap;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text-primary);
  border-bottom-color: var(--accent-primary);
}

.nav-toggle {
  display: none;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  width: 42px;
  height: 42px;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-drawer {
  display: none;
  margin-top: 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-elevation);
  padding: 1rem 1.25rem;
}

.mobile-drawer.is-open {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-drawer a {
  text-decoration: none;
  color: var(--text-primary);
  font-variant: small-caps;
  letter-spacing: 0.1em;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-drawer a:last-child {
  border-bottom: none;
}

/* Square Outlined Buttons */
.btn-outline {
  display: inline-block;
  border-radius: 0;
  border: 1px solid var(--accent-secondary);
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: var(--font-serif);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.9rem 1.65rem;
  cursor: pointer;
  transition: transform 0.35s var(--ease-kinetic), border-color 0.25s, background-color 0.25s, box-shadow 0.35s var(--ease-kinetic);
}

.btn-outline:hover, .btn-outline:focus-visible {
  border-color: var(--accent-primary);
  background: rgba(220, 38, 38, 0.12);
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
  color: var(--text-primary);
}

.btn-accent {
  border-color: var(--accent-primary);
  background: rgba(220, 38, 38, 0.14);
}

/* Hero Full Viewport */
.hero-viewport {
  position: relative;
  min-height: 82vh;
  display: grid;
  place-items: center;
  padding: 4rem 0 5.5rem;
  background: radial-gradient(circle at 50% 35%, #1d1d23 0%, #0b0b0d 72%);
  clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: grayscale(35%) contrast(1.08);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 11, 13, 0.72) 0%, rgba(11, 11, 13, 0.56) 45%, rgba(11, 11, 13, 0.94) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  padding: 0 1.25rem;
}

.hero-content .stage-label {
  border-left: none;
  padding-left: 0;
  border-bottom: 1px solid var(--accent-primary);
  padding-bottom: 0.35rem;
}

.hero-lead {
  font-size: clamp(1.08rem, 1.55vw, 1.28rem);
  color: var(--accent-secondary);
  max-width: 60ch;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Page Header Banner (Subpages) */
.page-banner {
  padding: 3.5rem 0 4.2rem;
  background: linear-gradient(160deg, #151519 0%, #0b0b0d 100%);
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.page-banner .prose {
  max-width: 68ch;
}

/* Alternating Sections with Clip-Path Edges */
.inspection-band {
  padding: 4.5rem 0;
  position: relative;
}

.band-surface {
  background: var(--bg-surface);
  clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%);
  padding: 5.5rem 0;
}

.band-curved {
  background: #121216;
  clip-path: ellipse(135% 96% at 50% 50%);
  padding: 5.5rem 0;
}

/* Alternating Split Grid */
.split-spread {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.split-copy {
  grid-column: span 6;
}

.split-visual {
  grid-column: span 6;
}

.split-reverse .split-copy {
  order: 2;
}

.split-reverse .split-visual {
  order: 1;
}

/* Soft-lit CSS 3D Device Studies */
.device-stage {
  background: radial-gradient(circle at 50% 35%, #232329 0%, #101014 82%);
  padding: 2.4rem 1.8rem;
  box-shadow: var(--shadow-elevation);
  perspective: 900px;
  min-height: 300px;
  display: grid;
  place-items: center;
  position: relative;
}

.device-stage-caption {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-variant: small-caps;
  letter-spacing: 0.08em;
}

.render-slab {
  width: min(320px, 85%);
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #2a2a32 0%, #131317 68%, #09090b 100%);
  box-shadow: 0 26px 40px -12px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(192, 196, 204, 0.35);
  transform: rotateX(12deg) rotateY(-14deg);
  position: relative;
  padding: 14px;
  transition: transform 0.6s var(--ease-kinetic);
}

.device-stage:hover .render-slab {
  transform: rotateX(6deg) rotateY(-6deg) translateY(-4px);
}

.render-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #18181d 0%, #0d0d10 100%);
  box-shadow: inset 0 0 0 1px rgba(192, 196, 204, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.9rem;
}

.render-screen::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 48%;
  height: 100%;
  background: linear-gradient(115deg, transparent 25%, rgba(192, 196, 204, 0.08) 55%, transparent 75%);
  pointer-events: none;
}

.render-port-bar {
  width: min(320px, 85%);
  height: 64px;
  background: linear-gradient(180deg, #34353d 0%, #1d1e24 65%, #111115 100%);
  box-shadow: 0 22px 30px -10px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(245, 244, 242, 0.3);
  transform: rotateX(18deg) rotateY(10deg);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 1.4rem;
  transition: transform 0.5s var(--ease-kinetic);
}

.device-stage:hover .render-port-bar {
  transform: rotateX(8deg) rotateY(4deg) translateY(-4px);
}

.port-slot {
  width: 34px;
  height: 12px;
  background: #070709;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(192, 196, 204, 0.45);
}

.port-slot.is-crimson {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.95), 0 0 0 1px var(--accent-primary);
}

.render-battery-cell {
  width: min(260px, 78%);
  aspect-ratio: 4 / 3;
  background: linear-gradient(155deg, #24252c 0%, #121216 100%);
  box-shadow: 0 24px 36px -12px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(192, 196, 204, 0.28);
  transform: rotateX(14deg) rotateY(-12deg);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.battery-bar-track {
  height: 14px;
  background: #0b0b0d;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.9);
  position: relative;
}

.battery-bar-fill {
  width: 78%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

/* Photographic Aspect Frames */
.media-frame {
  background: var(--bg-surface);
  box-shadow: var(--shadow-elevation);
  overflow: hidden;
}

.media-frame img {
  width: 100%;
  object-fit: cover;
}

.ratio-16-9 img { aspect-ratio: 16 / 9; }
.ratio-4-3 img { aspect-ratio: 4 / 3; }
.ratio-1-1 img { aspect-ratio: 1 / 1; }

/* Borderless Comparison Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.75rem;
}

.inspection-card {
  background: var(--bg-surface);
  border: none;
  border-radius: 0;
  padding: 1.75rem;
  box-shadow: var(--shadow-elevation);
  transition: transform 0.4s var(--ease-kinetic), box-shadow 0.4s var(--ease-kinetic), background-color 0.3s;
}

.band-surface .inspection-card {
  background: #111115;
}

.inspection-card:hover {
  transform: translateY(-6px);
  background: var(--bg-surface-hover);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.8), var(--glow-accent);
}

.card-meta {
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--accent-secondary);
  font-size: 0.86rem;
  margin-bottom: 0.5rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  box-shadow: var(--shadow-elevation);
  background: #111115;
  margin: 1.75rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  text-align: left;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

th {
  font-variant: small-caps;
  letter-spacing: 0.1em;
  color: var(--accent-secondary);
  background: rgba(25, 25, 29, 0.85);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Expandable Seller-Policy Panels & FAQs */
.accordion-list {
  display: grid;
  gap: 1rem;
}

details.inspection-detail {
  background: var(--bg-surface);
  box-shadow: var(--shadow-elevation);
  padding: 1.15rem 1.4rem;
  border-left: 2px solid rgba(192, 196, 204, 0.25);
  transition: border-color 0.25s;
}

details.inspection-detail[open] {
  border-left-color: var(--accent-primary);
}

details.inspection-detail summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

details.inspection-detail summary::after {
  content: "+";
  color: var(--accent-secondary);
  font-size: 1.3rem;
  line-height: 1;
}

details.inspection-detail[open] summary::after {
  content: "−";
  color: var(--accent-primary);
}

.detail-body {
  padding-top: 0.9rem;
  color: var(--text-muted);
  max-width: 68ch;
}

/* Printable Handover Checklist */
.checklist-panel {
  background: #121216;
  padding: 2rem;
  box-shadow: var(--shadow-elevation);
}

.checklist-items {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.75rem;
  display: grid;
  gap: 0.85rem;
}

.checklist-items li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.checklist-items input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.25rem;
  accent-color: var(--accent-primary);
  border-radius: 0;
  flex-shrink: 0;
}

/* Contact Inspection Sheet Form */
.sheet-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
}

.sheet-controls {
  grid-column: span 6;
  background: var(--bg-surface);
  padding: 2rem;
  box-shadow: var(--shadow-elevation);
}

.sheet-preview {
  grid-column: span 6;
  background: #121216;
  padding: 2rem;
  box-shadow: var(--shadow-elevation);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.field-group {
  margin-bottom: 1.25rem;
}

.field-group label {
  display: block;
  font-variant: small-caps;
  letter-spacing: 0.1em;
  color: var(--accent-secondary);
  margin-bottom: 0.45rem;
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  border-radius: 0;
  border: 1px solid var(--border-subtle);
  background: #0b0b0d;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
}

.preview-box {
  background: #0b0b0d;
  border-left: 2px solid var(--accent-primary);
  padding: 1.25rem;
  white-space: pre-wrap;
  font-family: var(--font-serif);
  color: var(--text-primary);
  min-height: 220px;
  margin-bottom: 1.25rem;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.status-note {
  margin-top: 0.75rem;
  min-height: 1.4rem;
  color: var(--accent-secondary);
  font-size: 0.92rem;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-kinetic), transform 0.7s var(--ease-kinetic);
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  background: #08080a;
  border-top: 1px solid var(--border-subtle);
  padding: 3.75rem 0 2.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.25rem;
  margin-bottom: 2.5rem;
}

.footer-col h3 {
  font-variant: small-caps;
  letter-spacing: 0.12em;
  font-size: 1rem;
  color: var(--accent-secondary);
  margin-bottom: 0.95rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .split-copy, .split-visual, .sheet-controls, .sheet-preview {
    grid-column: span 12;
  }
  .split-reverse .split-copy, .split-reverse .split-visual {
    order: initial;
  }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .hero-viewport {
    min-height: 70vh;
    clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%);
  }
  .band-surface, .band-curved, .page-banner {
    clip-path: none;
  }
}

@media (max-width: 480px) {
  .header-shell {
    padding: 0.6rem 0.9rem 0.6rem 1rem;
  }
  .brand-link {
    font-size: 0.98rem;
  }
  .checklist-panel, .sheet-controls, .sheet-preview {
    padding: 1.25rem;
  }
}

@media print {
  .site-header, .site-footer, .btn-outline, .nav-toggle, .mobile-drawer {
    display: none !important;
  }
  body, .checklist-panel {
    background: #ffffff;
    color: #000000;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
