/* VCSIDE website: a cartridge label on wood, and manual pages on paper. */
:root {
  --ink: #141414;
  --paper: #f4ecdc;
  --paper-2: #fbf6ea;
  --line: #d9ccb2;
  --muted: #6b604f;
  --red: #d8402a;
  --orange: #ee7a22;
  --yellow: #f4b52c;
  --wood: #3b2416;
  --label: #0d0d0d;
  --link: #a8381c;
  --code-bg: #1e1e1e;
  --code-fg: #e6e1d6;
  --radius: 4px;
  --wide: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; color: var(--ink); background-color: var(--wood);
  font: 17px/1.6 "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* wood grain */
  background-image: repeating-linear-gradient(92deg, rgba(255,255,255,.03) 0 3px, transparent 3px 11px),
                    repeating-linear-gradient(88deg, rgba(0,0,0,.12) 0 2px, transparent 2px 23px);
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; }
h1, h2, h3, .display { font-family: "Archivo Black", "Archivo", system-ui, sans-serif; font-weight: 400; line-height: 1.15; }
code, kbd, pre { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { font-size: .88em; background: #00000010; padding: .08em .3em; border-radius: 3px; }
html:not(.mac) .mac, html.mac .pc { display: none; }
kbd { font-size: .8em; display: inline-block; padding: .1em .45em; border: 1px solid #0004; border-bottom-width: 3px; border-radius: 4px; background: #fff; white-space: nowrap; }
pre { background: var(--code-bg); color: var(--code-fg); padding: 16px 18px; border-radius: var(--radius); overflow-x: auto; font-size: 14px; line-height: 1.5; }
pre code { background: none; padding: 0; font-size: inherit; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: #fff; padding: 8px 12px; }

/* ---- the cartridge: the site's header ------------------------------------------------ */
.stripes { height: 14px; background: linear-gradient(to bottom, var(--yellow) 0 33.3%, var(--orange) 33.3% 66.6%, var(--red) 66.6% 100%); }
.site-head { max-width: var(--wide); margin: 24px auto 0; padding: 0 16px; }
.cart { background: #1b1b1b; border-radius: 10px 10px 4px 4px; padding: 14px 14px 0; box-shadow: 0 18px 40px rgba(0,0,0,.45), inset 0 2px 0 #333; }
.cart .label { background: var(--label); color: #fff; border-radius: var(--radius); overflow: hidden; }
.cart .bar { display: flex; align-items: center; gap: 16px; padding: 12px 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; }
.brand b { font: 28px "Archivo Black", sans-serif; letter-spacing: -1px; }
.brand span { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--yellow); display: block; line-height: 1.2; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: #eee; text-decoration: none; font-weight: 600; font-size: 15px; padding: 6px 12px; border-radius: 3px; }
.nav a.lang { color: var(--yellow); border: 1px solid #444; margin-left: 6px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--orange); color: var(--ink); }
.ridges { height: 22px; margin: 14px -14px 0; background: repeating-linear-gradient(to right, #222 0 10px, #161616 10px 20px); border-radius: 0 0 4px 4px; }
.menu-btn { display: none; background: none; border: 2px solid #555; color: #fff; font: 600 14px "Archivo", sans-serif; padding: 4px 10px; border-radius: 3px; cursor: pointer; }

/* the big label on the home page */
.hero .label .top { padding: 34px 32px 12px; display: flex; gap: 24px; align-items: center; }
.hero .label .top img { width: 112px; height: 112px; }
.hero h1 { font-size: clamp(56px, 11vw, 112px); line-height: .9; margin: 0; letter-spacing: -3px; }
.hero .sub { font-weight: 600; text-transform: uppercase; letter-spacing: 3px; color: var(--yellow); margin: 8px 0 0; font-size: 15px; }
.hero .label .bottom { padding: 16px 32px 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: #ccc; }
.hero .stripes { height: 54px; }
.hero .ridges { height: 54px; margin-top: 24px; }

/* ---- buttons ---------------------------------------------------------------------- */
.btn { display: inline-block; background: var(--orange); color: var(--ink); font: 17px "Archivo Black", sans-serif; text-decoration: none; padding: 10px 20px; border-radius: 3px; border: 0; cursor: pointer; }
.btn:hover { background: var(--yellow); color: var(--ink); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: var(--red); color: #fff; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- pages: paper sheets ------------------------------------------------------------ */
main { max-width: var(--wide); margin: 28px auto; padding: 0 16px; }
.sheet { background: var(--paper); border-radius: var(--radius); padding: 36px clamp(18px, 4vw, 48px); box-shadow: 0 18px 40px rgba(0,0,0,.4); margin-bottom: 28px; }
.sheet > :first-child { margin-top: 0; }
.sheet h2 { font-size: 30px; margin: 44px 0 12px; }
.sheet h3 { font-size: 21px; margin: 30px 0 8px; }
.sheet h2:first-child, .sheet h3:first-child { margin-top: 0; }
.lead { font-size: 20px; }
.kicker { font: 600 13px "Archivo", sans-serif; letter-spacing: 3px; text-transform: uppercase; color: var(--red); margin: 0 0 6px; }
.page-title { font-size: clamp(36px, 6vw, 56px); margin: 0 0 12px; letter-spacing: -1px; }

/* manual: index on the side */
.manual { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.toc { position: sticky; top: 16px; background: #1b1b1b; color: #ddd; border-radius: var(--radius); padding: 16px 0; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.toc summary { font: 600 13px "Archivo", sans-serif; letter-spacing: 3px; text-transform: uppercase; color: var(--yellow); margin: 0 18px 8px; list-style: none; cursor: default; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 6px 18px; color: #ddd; text-decoration: none; font-size: 15px; border-left: 4px solid transparent; }
.toc a::before { content: counter(toc) ". "; color: #888; }
.toc a:hover { background: #262626; color: #fff; }
.toc a[aria-current="page"] { border-left-color: var(--orange); background: #262626; color: #fff; font-weight: 600; }
.toc .sub { margin: 4px 0 6px; }
.toc .sub a { padding: 3px 18px 3px 34px; font-size: 13px; color: #aaa; }
.toc .sub a::before { content: none; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 18px; border-top: 2px solid var(--ink); flex-wrap: wrap; }
.pager a { font-weight: 600; text-decoration: none; }

/* ---- content blocks ---------------------------------------------------------------- */
.boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.box { background: #fff; border: 3px solid var(--ink); display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.box h3 { margin: 0; padding: 10px 14px; background: var(--ink); color: #fff; font-size: 19px; border-bottom: 8px solid var(--c, var(--orange)); }
.box p { margin: 12px 14px 16px; }
.box .get { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.box .sum { margin-top: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.box .sum code { background: none; padding: 0; }
a.box:hover { transform: translateY(-2px); box-shadow: 4px 6px 0 var(--ink); color: var(--ink); }
a.box .more { margin: auto 14px 14px; font-weight: 600; color: var(--link); }

figure { margin: 22px 0; }
figure img { display: block; width: 100%; border: 3px solid var(--ink); background: #222; cursor: zoom-in; }
figure.small img { max-width: 560px; }
figure.small { max-width: 566px; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.two figure { margin: 0; }

.note { border: 3px solid var(--ink); background: var(--paper-2); padding: 12px 16px; margin: 20px 0; }
.note b:first-child { color: var(--red); text-transform: uppercase; letter-spacing: 1px; font-size: 14px; margin-right: 6px; }

table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 15px; background: var(--paper-2); }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--ink); color: #fff; font-weight: 600; }
.table-wrap { overflow-x: auto; }
dl.keys { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; }
dl.keys dt { white-space: nowrap; }
dl.keys dd { margin: 0; }
ul.ticks { padding-left: 0; list-style: none; }
ul.ticks li { padding-left: 26px; position: relative; margin: 6px 0; }
ul.ticks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; background: var(--orange); }

/* ---- footer -------------------------------------------------------------------------- */
.site-foot { max-width: var(--wide); margin: 0 auto; padding: 12px 16px 40px; color: #c9b9a3; font-size: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-foot a { color: #f0d8b0; }

/* ---- screenshots, larger ----------------------------------------------------------- */
.zoom { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; cursor: zoom-out; }
.zoom.open { display: flex; }
.zoom img { max-width: 100%; max-height: 100%; border: 3px solid #000; }

/* ---- narrow screens ----------------------------------------------------------------- */
@media (max-width: 860px) {
  .manual { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; padding: 0; }
  .toc summary { margin: 0; padding: 12px 18px; cursor: pointer; }
  .toc summary::after { content: " ▾"; }
  .toc details[open] summary::after { content: " ▴"; }
  .toc details[open] { padding-bottom: 12px; }
  .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .menu-btn { display: inline-block; }
  .nav { display: none; width: 100%; flex-direction: column; }
  .nav.open { display: flex; }
  .hero .label .top { flex-direction: column; align-items: flex-start; padding: 22px 18px 8px; gap: 12px; }
  .hero .label .top img { width: 72px; height: 72px; }
  .hero .label .bottom { padding: 12px 18px 22px; }
  .sheet { padding: 24px 16px; }
  .sheet h2 { font-size: 25px; }
  dl.keys { grid-template-columns: 1fr; gap: 2px 0; }
  dl.keys dd { margin-bottom: 8px; }
}
