@font-face {
  font-family: 'Sora';
  src: url('/fonts/sora.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans.woff2') format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --bg: #000;
  --text: #fff;
  --text-2: #b4b4b4;
  --line: #242424;
  --line-2: #3d3d3d;
  --accent: #ff6600;
  --danger: #ff8a80;
  --radius: 2px;
  --head: 'Sora', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration-color: #666; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--head); font-weight: 500; line-height: 1.1; letter-spacing: -0.035em; margin: 0 0 0.5em; }
h1 { font-size: clamp(32px, 4.6vw, 56px); }
h2 { font-size: clamp(21px, 2.4vw, 26px); letter-spacing: -0.03em; }
h3 { font-size: 18px; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; padding: 0 24px; }
.section { padding-top: 80px; padding-bottom: 8px; }
main { min-height: 60vh; padding-bottom: 96px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--text); color: #000; padding: 8px 14px; z-index: 30; }
.skip:focus { left: 8px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 44px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 500 18px var(--head); letter-spacing: -0.03em; }
.brand img { width: 28px; height: 28px; }
.site-header nav { display: flex; align-items: center; gap: 30px; flex: 1; flex-wrap: wrap; font-size: 15px; }
.site-header nav a, .menu summary { color: var(--text-2); text-decoration: none; cursor: pointer; }
.site-header nav a:hover, .menu summary:hover, .menu[open] summary { color: var(--text); }
.cart-link { color: var(--text); text-decoration: none; font-size: 15px; margin-left: auto; }
.cart-link .count { margin-left: 6px; color: var(--text-2); }
.cart-link .count::before { content: '('; }
.cart-link .count::after { content: ')'; }

.menu { position: relative; }
.menu summary { display: flex; align-items: center; gap: 7px; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ''; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.15s; }
.menu[open] summary::after { transform: translateY(1px) rotate(225deg); }
.menu-panel { position: absolute; top: calc(100% + 16px); left: -14px; z-index: 20; min-width: 188px; padding: 6px; display: flex; flex-direction: column; background: #0b0b0b; border: 1px solid var(--line-2); }
.site-header .menu-panel a { padding: 10px 12px; color: var(--text); }
.site-header .menu-panel a:hover { background: #1a1a1a; }

/* buttons and inputs */
.button {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font: 600 15px var(--body);
  padding: 14px 26px;
  border: 0;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--text); color: #000; }
.button.light { background: var(--text); }
.button.light:hover { background: #d4d4d4; }
.button.outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px #5a5a5a; }
@media (hover: hover) {
  .button.outline:hover { background: var(--text); color: #000; box-shadow: none; }
}
.button:disabled { opacity: 0.5; cursor: default; }
.button.wide { width: 100%; text-align: center; }
button.link { background: none; border: 0; padding: 0; color: var(--text-2); font: inherit; font-size: 14px; text-decoration: underline; text-decoration-color: #555; text-underline-offset: 3px; cursor: pointer; }
button.link:hover { color: var(--text); }

select, input[type='email'], input[type='text'], .track-form input {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 12px 14px;
}
select { cursor: pointer; }
label { display: block; font-size: 14px; color: var(--text-2); }
label select, label input { display: block; width: 100%; margin-top: 8px; font-size: 16px; color: var(--text); }

/* home */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: center; padding-top: 88px; padding-bottom: 24px; }
.hero h1 { font-size: clamp(34px, 4.8vw, 58px); margin-bottom: 28px; }
.hero h1 em { font-style: normal; }
.hero-text p { font-size: 18px; color: var(--text-2); max-width: 31em; }
.hero-text .button { margin-top: 12px; }
.hero-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px 24px; }
.card { display: block; color: var(--text); text-decoration: none; }
.card-image { display: block; overflow: hidden; margin-bottom: 16px; background: #111; }
.card-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-image img { transform: scale(1.03); }
.card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.card-name { font: 500 17px var(--head); letter-spacing: -0.02em; }
.card .status { display: block; margin-top: 2px; }
.price { font: 500 17px var(--head); letter-spacing: -0.02em; }
.currency { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--text-2); }
.status { color: var(--text-2); font-size: 15px; }

.post-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.post-list li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.post-list a { color: var(--text); text-decoration: none; }
.post-list a:hover { text-decoration: underline; }
.post-list time { color: var(--text-2); font-size: 15px; }
.post-list.big li { display: block; padding: 28px 0; }
.post-list.big a { font: 500 22px var(--head); letter-spacing: -0.03em; }
.post-list.big time { display: block; margin: 6px 0 10px; font-size: 14px; }
.post-list.big p { margin: 0; color: var(--text-2); }

/* app (products that come with one) */
.app-hero { padding-top: 88px; }
.app-hero-text { max-width: 660px; }
.app-id { display: flex; align-items: center; gap: 12px; margin: 0 0 32px; color: var(--text-2); font-size: 15px; }
.app-icon { width: 44px; height: 44px; border-radius: 22%; }
.app-hero h1 { font-size: clamp(34px, 4.8vw, 58px); margin-bottom: 24px; }
.app-hero-text p { font-size: 18px; color: var(--text-2); }
.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 12px; }
.app-actions .view-cart { margin-left: 8px; }
.shots { display: flex; gap: 16px; list-style: none; padding: 0; margin: 64px 0 0; overflow-x: auto; scroll-snap-type: x mandatory; }
.shots li { flex: 1 0 190px; scroll-snap-align: start; }
.shots img { width: 100%; height: auto; }
.app-hero + .product { margin-top: 96px; }

/* product */
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; padding-top: 64px; align-items: start; }
.gallery-main { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #111; }
.thumbs { display: flex; gap: 8px; list-style: none; padding: 0; margin: 12px 0 0; flex-wrap: wrap; }
.thumbs button { padding: 0; border: 1px solid transparent; background: none; cursor: pointer; overflow: hidden; width: 56px; height: 56px; opacity: 0.55; }
.thumbs button:hover { opacity: 0.9; }
.thumbs button[aria-current='true'] { border-color: var(--text); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.summary h1, .summary h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 16px; }
.price-row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.price-row .price { font-size: 28px; }
.points { list-style: none; padding: 0; margin: 0 0 32px; border-bottom: 1px solid var(--line); }
.points li { padding: 11px 0; border-top: 1px solid var(--line); color: var(--text-2); }
.buy { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.qty select { width: auto; min-width: 84px; margin-top: 6px; }
.view-cart { align-self: center; font-size: 15px; }
.note { font-size: 14px; color: var(--text-2); }

.facts { margin-top: 36px; border-top: 1px solid var(--line); }
.facts details { border-bottom: 1px solid var(--line); }
.facts summary { display: flex; justify-content: space-between; padding: 16px 0; font-size: 15px; cursor: pointer; list-style: none; }
.facts summary::-webkit-details-marker { display: none; }
.facts summary::after { content: '+'; color: var(--text-2); }
.facts details[open] summary::after { content: '−'; }
.facts p { margin: 0 0 18px; color: var(--text-2); font-size: 15px; }

.notify { max-width: 420px; }
.notify .button { margin-top: 14px; }
.notify-msg { margin: 12px 0 0; min-height: 1.6em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.long { margin-top: 112px; }
.long-rich, .long.prose { max-width: 1120px; }
.long.prose > * { max-width: 760px; }

/* long-form text */
.prose { color: var(--text-2); }
.prose h1 { font-size: clamp(28px, 3.6vw, 40px); }
.prose h2 { margin-top: 2.2em; color: var(--text); }
.prose h3 { margin-top: 1.8em; color: var(--text); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.5em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; margin: 1.8em 0; max-width: 100%; font-size: 15px; }
.prose th, .prose td { border: 0; border-bottom: 1px solid var(--line); padding: 11px 20px 11px 0; text-align: left; vertical-align: top; }
.prose th { background: none; color: var(--text); font-weight: 500; }
.prose td p, .prose th p { margin: 0; }
.byline, .crumb { margin-bottom: 8px; color: var(--text-2); font-size: 15px; }
.crumb a { text-decoration: none; }
.post-cta { margin-top: 48px; }
article.wrap h1, article.narrow h1, section.narrow h1 { margin-top: 56px; margin-bottom: 24px; }

/* cart */
.cart h1 { margin-top: 56px; margin-bottom: 40px; }
.cart-grid { display: grid; grid-template-columns: 1fr 360px; gap: 80px; align-items: start; }
.lines { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 80px 1fr auto; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line img { width: 80px; height: 80px; object-fit: cover; background: #111; }
.line-name { color: var(--text); font: 500 17px var(--head); letter-spacing: -0.02em; text-decoration: none; }
.line .status { margin: 2px 0 14px; }
.line-total { font: 500 17px var(--head); margin: 0; }
.qty-controls { display: flex; align-items: center; gap: 4px; }
.qty-controls button:not(.link) { width: 30px; height: 30px; border-radius: var(--radius); border: 1px solid var(--line-2); background: none; color: var(--text); font-size: 16px; cursor: pointer; }
.qty-controls button:not(.link):hover:not(:disabled) { border-color: var(--text); }
.qty-controls button:not(.link):disabled { opacity: 0.35; cursor: default; }
.qty-controls span { min-width: 28px; text-align: center; }
.qty-controls .link { margin-left: 16px; }
.totals { border-top: 1px solid var(--line); padding-top: 24px; }
.totals dl { margin: 22px 0 16px; }
.totals dl div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.totals dt, .totals dd { margin: 0; }
.totals dt .sub { display: block; font-size: 13px; color: var(--text-2); }
.totals .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 18px; font: 500 20px var(--head); letter-spacing: -0.02em; }
.totals .note { font-size: 13px; margin: 0 0 12px; }
.totals .button { margin: 8px 0 16px; }
.error { color: var(--danger); font-weight: 500; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 32px; margin-bottom: 48px; }
.site-footer h2 { font: 500 15px var(--body); letter-spacing: 0; color: var(--text); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.site-footer a:hover { color: var(--text); }
.legal { margin: 0; color: var(--text-2); font-size: 14px; }

/* admin */
.admin h1, .admin h2 { margin-top: 40px; }
.count-badge { font-size: 0.6em; background: var(--line); padding: 2px 12px; vertical-align: middle; }
.table-scroll { overflow-x: auto; }
.admin table { border-collapse: collapse; width: 100%; font-size: 15px; }
.admin th, .admin td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.admin .void td { background: #2a1513; }
.admin .void .order-status { color: var(--danger); font-weight: 700; }

@media (max-width: 860px) {
  .hero, .product, .cart-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero, .app-hero { padding-top: 40px; }
  .product { padding-top: 40px; }
  .app-hero + .product { margin-top: 64px; }
  .long { margin-top: 72px; }
  .site-header .bar { gap: 14px 24px; }
  .site-header nav { order: 3; flex-basis: 100%; gap: 22px; }
  .line { grid-template-columns: 64px 1fr; }
  .line img { width: 64px; height: 64px; }
  .line-total { grid-column: 2; }
  .totals { border-top: 0; padding-top: 0; }
}

@media (max-width: 480px) {
  .site-header nav { gap: 14px; font-size: 15px; }
  .menu-panel { left: auto; right: -14px; }
  .shots li { flex-basis: 160px; }
  .app-actions .button { flex: 1 1 100%; text-align: center; }
  .app-actions .view-cart { margin-left: 0; }
}

.track-form { max-width: 420px; display: grid; gap: 16px; }
.track-form input { display: block; width: 100%; margin-top: 6px; }
.form-error { color: var(--danger); }
.track-status { font: 500 22px/1.3 var(--head); margin: 24px 0 8px; }

/* owner pages under /admin */
.admin-nav { display: flex; gap: 20px; align-items: center; padding-top: 24px; font-size: 15px; }
.admin-nav a { color: var(--text-2); text-decoration: none; padding-bottom: 2px; }
.admin-nav a:hover, .admin-nav a[aria-current] { color: var(--text); }
.admin-nav a[aria-current] { border-bottom: 2px solid var(--accent); }
.admin-nav form { margin-left: auto; }
.admin .crumb { margin: 24px 0 0; }
.admin .muted, .admin .muted td { color: var(--text-2); font-size: 14px; }
.admin .bad, .admin td.bad { color: var(--danger); }
.admin .num { text-align: right; white-space: nowrap; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 24px; }
.admin .panel { border: 1px solid var(--line); padding: 4px 20px 20px; }
.admin .panel h2 { margin: 20px 0 8px; font-size: 18px; }
.admin table.plain td { border-bottom: 1px solid var(--line); padding: 8px 0; }
.admin code { font-size: 13px; word-break: break-all; color: var(--text-2); }
.admin .facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 12px; }
.admin .facts dt { color: var(--text-2); }
.admin .facts dd { margin: 0; }
.pill { display: inline-block; padding: 2px 10px; font-size: 13px; font-weight: 600; border: 1px solid var(--line-2); vertical-align: middle; }
.pill-to-ship { color: var(--accent); border-color: var(--accent); }
.pill-shipped { color: #7fd1ff; border-color: #7fd1ff; }
.pill-delivered { color: #8ee6a0; border-color: #8ee6a0; }
.pill-refunded, .pill-disputed { color: var(--danger); border-color: var(--danger); }
.admin .state-refunded td, .admin .state-disputed td { background: #2a1513; }
.timeline { list-style: none; margin: 0 0 12px; padding: 0 0 0 14px; border-left: 2px solid var(--line-2); }
.timeline li { margin: 0 0 10px; padding-left: 8px; }
.timeline li.missing { color: var(--danger); }
.timeline time { display: block; font-size: 13px; color: var(--text-2); }
.admin .flash { padding: 12px 16px; border-left: 4px solid var(--accent); background: var(--line); }
.admin .flash-ok { border-left-color: #8ee6a0; }
.admin .flash-bad { border-left-color: var(--danger); }
.admin form.stack { display: grid; gap: 12px; max-width: 360px; margin-bottom: 16px; }
.admin form.stack input, .admin form.stack select { display: block; width: 100%; margin-top: 4px; }
.admin .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 20px; flex-wrap: wrap; margin: 0 0 8px; }
.tabs a { color: var(--text-2); text-decoration: none; }
.tabs a[aria-current] { color: var(--text); border-bottom: 2px solid var(--accent); }

