/* hipobuy – shared stylesheet for the 20 static guides */
:root {
  --font-heading: 'Fraunces', 'Georgia', serif;
  --font-body: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;

  --background-50: 0.9815 0.0115 80;
  --background-100: 0.962 0.017 78;
  --background-200: 0.933 0.021 76;
  --background-300: 0.892 0.024 74;
  --background-400: 0.81 0.026 72;
  --background-500: 0.725 0.028 70;

  --foreground-400: 0.665 0.014 58;
  --foreground-500: 0.565 0.016 56;
  --foreground-600: 0.485 0.018 54;
  --foreground-700: 0.405 0.018 52;
  --foreground-800: 0.335 0.017 50;
  --foreground-900: 0.27 0.016 48;
  --foreground-950: 0.198 0.014 46;

  --primary-100: 0.932 0.03 40;
  --primary-200: 0.862 0.055 40;
  --primary-300: 0.762 0.085 40;
  --primary-400: 0.6 0.1 40;
  --primary-500: 0.455 0.108 40;
  --primary-600: 0.4 0.1 40;
  --primary-700: 0.338 0.085 38;
  --primary-950: 0.155 0.035 38;

  --accent-100: 0.935 0.032 75;
  --accent-200: 0.875 0.055 74;
  --accent-500: 0.635 0.09 70;
  --accent-700: 0.475 0.075 66;
  --accent-900: 0.3 0.045 62;

  --secondary-100: 0.938 0.014 130;
  --secondary-200: 0.885 0.02 130;
  --secondary-500: 0.6 0.03 130;
  --secondary-700: 0.44 0.024 130;
  --secondary-900: 0.28 0.016 130;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: oklch(var(--foreground-950));
  background-color: oklch(var(--background-50));
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: #fff;
  color: oklch(var(--foreground-950));
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
}

.skip:focus {
  top: 12px;
}

/* ---------- navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(12, 17, 25, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.65);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav {
    background: rgba(12, 17, 25, 0.97);
  }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  font-size: 17px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.nav-links button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(247, 243, 238, 0.86);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-links a:hover,
.nav-links button:hover,
.nav-links a:focus-visible,
.nav-links button:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  background: oklch(var(--primary-500));
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav-cta:hover {
  background: oklch(var(--primary-600));
}

.nav-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #fff;
  font-size: 19px;
  cursor: pointer;
}

.dropdown {
  position: relative;
}

.panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 560px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(12, 17, 25, 0.97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.7);
}

.panel[hidden] {
  display: none;
}

.panel-note {
  padding: 0 8px 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.panel-grid a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 8px;
  border-radius: 6px;
  color: rgba(247, 243, 238, 0.88);
  font-size: 13.5px;
  text-decoration: none;
}

.panel-grid a:hover,
.panel-grid a:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ---------- breadcrumb + article shell ---------- */
main {
  padding-top: 64px;
}

.breadcrumb {
  padding-top: 20px;
  font-size: 12px;
  color: oklch(var(--foreground-500));
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumb a {
  color: oklch(var(--foreground-600));
  text-decoration: none;
}

.breadcrumb a:hover {
  color: oklch(var(--primary-700));
  text-decoration: underline;
}

.article-head {
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 0 0;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(var(--primary-600));
}

.eyebrow span.sep {
  color: oklch(var(--background-500));
}

h1 {
  margin-top: 10px;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.12;
  color: oklch(var(--foreground-950));
}

.lede {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.65;
  color: oklch(var(--foreground-700));
  max-width: 68ch;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: oklch(var(--foreground-500));
}

.meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: oklch(var(--background-400));
}

.cover {
  margin: 18px 0 0;
  width: 100%;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 12px;
  overflow: hidden;
  background: oklch(var(--background-200));
  aspect-ratio: 16 / 9;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

figcaption {
  max-width: 980px;
  margin: 8px auto 0;
  font-size: 11.5px;
  color: oklch(var(--foreground-500));
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: 26px 0 10px;
}

.article-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 15.5px;
  line-height: 1.75;
  color: oklch(var(--foreground-800));
}

.article-body > * + * {
  margin-top: 14px;
}

.article-body h2 {
  margin-top: 30px;
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.25;
  color: oklch(var(--foreground-950));
  scroll-margin-top: 92px;
}

.article-body h3 {
  margin-top: 20px;
  font-size: 16.5px;
  line-height: 1.35;
  color: oklch(var(--foreground-900));
  scroll-margin-top: 92px;
}

.article-body a {
  color: oklch(var(--primary-700));
  text-decoration: underline;
  text-decoration-color: oklch(var(--primary-300));
  text-underline-offset: 2px;
}

.article-body a:hover {
  text-decoration-color: oklch(var(--primary-500));
}

.article-body ul.bullets,
.article-body ol.numbers {
  padding-left: 20px;
  margin-top: 10px;
  list-style: disc;
}

.article-body ol.numbers {
  list-style: decimal;
}

.article-body li + li {
  margin-top: 6px;
}

.article-body strong {
  color: oklch(var(--foreground-950));
  font-weight: 600;
}

/* toc */
.toc {
  max-width: 760px;
  margin: 20px auto 0;
  border: 1px solid oklch(var(--background-300) / 0.9);
  border-radius: 10px;
  background: oklch(var(--background-100) / 0.7);
  padding: 14px 16px;
}

.toc h2 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(var(--foreground-600));
}

.toc ol {
  margin-top: 8px;
  display: grid;
  gap: 4px;
  counter-reset: toc;
}

.toc a {
  display: flex;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: oklch(var(--foreground-800));
  text-decoration: none;
}

.toc a::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-heading);
  font-size: 11px;
  color: oklch(var(--primary-600));
  padding-top: 2px;
}

.toc a:hover {
  color: oklch(var(--primary-700));
  text-decoration: underline;
}

/* callouts, tables, lists */
.callout {
  margin-top: 18px;
  border: 1px solid oklch(var(--accent-200));
  background: oklch(var(--accent-100) / 0.6);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.65;
  color: oklch(var(--foreground-800));
}

.callout strong {
  color: oklch(var(--foreground-950));
}

.note {
  margin-top: 16px;
  border-left: 3px solid oklch(var(--secondary-500));
  padding: 4px 0 4px 12px;
  font-size: 13.5px;
  line-height: 1.65;
  color: oklch(var(--foreground-700));
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid oklch(var(--background-300) / 0.9);
  border-radius: 10px;
  background: oklch(var(--background-50));
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
}

caption {
  caption-side: top;
  padding: 10px 12px;
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: oklch(var(--foreground-500));
  border-bottom: 1px solid oklch(var(--background-200));
}

th,
td {
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid oklch(var(--background-200) / 0.9);
}

th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(var(--foreground-600));
  background: oklch(var(--background-100) / 0.8);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.checklist {
  margin-top: 14px;
  border: 1px solid oklch(var(--background-300) / 0.9);
  border-radius: 10px;
  overflow: hidden;
}

.checklist li {
  display: flex;
  gap: 10px;
  padding: 9px 13px;
  font-size: 13.5px;
  line-height: 1.55;
  border-bottom: 1px solid oklch(var(--background-200) / 0.9);
  background: oklch(var(--background-50));
}

.checklist li:last-child {
  border-bottom: 0;
}

.checklist .box {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 4px;
  border: 1.5px solid oklch(var(--primary-400));
  border-radius: 3px;
}

.steps {
  margin-top: 14px;
  display: grid;
  gap: 8px;
  counter-reset: steps;
}

.steps li {
  position: relative;
  padding: 10px 13px 10px 44px;
  border: 1px solid oklch(var(--background-300) / 0.85);
  border-radius: 9px;
  background: oklch(var(--background-50));
  font-size: 13.5px;
  line-height: 1.6;
}

.steps li::before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  left: 12px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: oklch(var(--primary-100));
  color: oklch(var(--primary-800));
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
}

/* related */
.related {
  max-width: 980px;
  margin: 34px auto 0;
  padding: 0;
}

.related h2 {
  font-size: 20px;
  color: oklch(var(--foreground-950));
}

.related-grid {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 15px;
  border: 1px solid oklch(var(--background-300) / 0.85);
  border-radius: 10px;
  background: oklch(var(--background-50));
  text-decoration: none;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.related-card:hover {
  border-color: oklch(var(--primary-300));
  background: oklch(var(--background-100) / 0.7);
}

.related-card .kicker {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: oklch(var(--secondary-700));
}

.related-card .title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: oklch(var(--foreground-950));
}

.related-card .more {
  font-size: 12px;
  color: oklch(var(--primary-700));
}

.back-home {
  max-width: 980px;
  margin: 22px auto 0;
  padding: 14px 16px;
  border: 1px solid oklch(var(--background-300) / 0.9);
  border-radius: 10px;
  background: oklch(var(--background-100) / 0.7);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.back-home p {
  font-size: 13px;
  color: oklch(var(--foreground-700));
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  background: oklch(var(--primary-500));
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background: oklch(var(--primary-600));
}

.btn-ghost {
  background: transparent;
  border: 1px solid oklch(var(--background-400));
  color: oklch(var(--foreground-900));
}

.btn-ghost:hover {
  background: oklch(var(--background-100));
}

/* footer */
.footer {
  margin-top: 40px;
  background: oklch(var(--primary-950));
  color: oklch(var(--background-100));
  padding-bottom: 84px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 24px 22px;
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}

.footer .brand {
  font-size: 18px;
}

.footer p {
  max-width: 36ch;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.65;
  color: oklch(var(--background-200) / 0.82);
}

.footer h2 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(var(--background-300) / 0.8);
}

.footer ul {
  margin-top: 10px;
  display: grid;
  gap: 5px;
}

.footer ul.cols {
  grid-template-columns: 1fr 1fr;
  gap: 5px 14px;
}

.footer li a {
  font-size: 12px;
  line-height: 1.5;
  color: oklch(var(--background-200) / 0.85);
  text-decoration: none;
}

.footer li a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: oklch(var(--background-300) / 0.72);
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #fff;
}

/* mobile tab bar */
.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  background: rgba(12, 17, 25, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: env(safe-area-inset-bottom);
}

.tabbar ul {
  display: flex;
  max-width: 1180px;
  margin: 0 auto;
}

.tabbar li {
  flex: 1;
}

.tabbar a,
.tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-height: 56px;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-body);
  font-size: 11px;
  text-decoration: none;
  cursor: pointer;
}

.tabbar i {
  font-size: 19px;
}

/* sheet */
.sheet-root {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
}

.sheet-root[hidden] {
  display: none;
}

.sheet-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(12, 17, 25, 0.55);
  cursor: default;
}

.sheet {
  position: relative;
  width: 100%;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  border-radius: 16px 16px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(12, 17, 25, 0.98);
  color: #fff;
  animation: sheetUp 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sheet-head {
  flex: 0 0 auto;
  padding: 10px 16px 8px;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 auto 8px;
}

.sheet-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-title-row h2 {
  font-size: 17px;
  color: #fff;
}

.sheet-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.sheet-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px 20px;
}

.sheet-note {
  padding-bottom: 10px;
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}

.sheet-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sheet-cats a,
.sheet-arts a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 44px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
}

.sheet-arts a {
  border-color: transparent;
  align-items: flex-start;
}

.sheet-cats a:hover,
.sheet-arts a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sheet-arts {
  display: grid;
  gap: 2px;
}

.sheet-arts .num {
  font-family: var(--font-heading);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  padding-top: 1px;
}

body.locked {
  overflow: hidden;
}

@keyframes sheetUp {
  from {
    transform: translateY(26px);
    opacity: 0.6;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@media (min-width: 640px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }

  .nav-menu {
    display: none;
  }

  .wrap {
    padding: 0 32px;
  }

  .nav-inner {
    padding: 0 32px;
  }

  .footer-inner {
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
  }

  .footer {
    padding-bottom: 0;
  }

  .tabbar {
    display: none;
  }

  .sheet-root {
    display: none;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-body {
    font-size: 16px;
  }
}

@media (max-width: 899px) {
  .nav-cta span.label {
    display: none;
  }

  .panel {
    width: min(92vw, 420px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}