/* Unoque help site. Phone first; no web fonts (fast), warm minimal palette like the theme. */
:root {
  --ink: #17181b;
  --muted: #565961;
  --accent: #a33b22;
  --accent-ink: #ffffff;
  --bg: #ffffff;
  --soft: #f6f2ec;
  --line: #e6e0d7;
  --error: #b42318;
  --ring: 0 0 0 2px #fff, 0 0 0 4px var(--ink);
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 10px 16px; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "logo links" "search search"; gap: 10px 16px; align-items: center; }
.logo { grid-area: logo; display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; min-height: 44px; }
.logo-mark { width: 30px; height: 30px; color: var(--ink); }
.logo-sub { color: var(--muted); font-weight: 500; }
.top-links { grid-area: links; justify-self: end; display: flex; gap: 6px; align-items: center; }
.top-links > a:not(.button) { color: var(--ink); text-decoration: none; font-weight: 600; padding: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.search { grid-area: search; position: relative; }
.search input { width: 100%; height: 44px; padding: 0 14px 0 40px; font: inherit; color: var(--ink); background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23565961' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 13px center; border: 1px solid transparent; border-radius: 999px; }
.search input:focus-visible { outline: none; box-shadow: var(--ring); background-color: #fff; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px -16px rgba(23, 24, 27, 0.35); padding: 6px; }
.search-results a, .search-page a.result { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.search-results a[aria-selected="true"], .search-results a:hover { background: var(--soft); }
.result-title { display: block; font-weight: 650; }
.result-meta { display: block; font-size: 13px; color: var(--muted); }
.search-empty { padding: 12px; color: var(--muted); margin: 0; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer; }
.button:hover { background: #2c2e33; }
.button:focus-visible { outline: none; box-shadow: var(--ring); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.button-small { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* Layout */
.page { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.side-nav { display: none; }
.nav-drawer { margin: 16px 0 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.nav-drawer > summary { list-style: none; cursor: pointer; padding: 0 16px; min-height: 48px; display: flex; align-items: center; justify-content: space-between; font-weight: 650; }
.nav-drawer > summary::-webkit-details-marker { display: none; }
.nav-drawer > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform 0.2s; }
.nav-drawer[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.nav-drawer > nav { padding: 0 8px 12px; }
.nav-group { margin-top: 14px; }
.nav-title { margin: 0 0 4px; padding: 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group a { display: flex; align-items: center; min-height: 40px; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.35; }
.nav-group a:hover { background: rgba(23, 24, 27, 0.05); }
.nav-group a[aria-current="page"] { background: var(--ink); color: #fff; font-weight: 600; }
main { min-width: 0; padding: 8px 0 48px; }
.toc, .toc-spacer { display: none; }

/* Article */
.prose { max-width: 760px; font-size: 17px; line-height: 1.7; }
.prose h1 { font-size: clamp(30px, 6vw, 42px); line-height: 1.12; letter-spacing: -0.02em; margin: 12px 0 18px; }
.prose h2 { font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; margin: 44px 0 12px; padding-top: 4px; }
.prose h3 { font-size: 19px; line-height: 1.3; margin: 30px 0 8px; }
.prose h4 { font-size: 17px; margin: 24px 0 6px; }
.prose .anchor { display: none; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose li { margin: 4px 0; }
.prose li > p { margin: 0; }
.prose strong { font-weight: 650; }
.prose code { font: 0.88em var(--mono); background: var(--soft); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: #1d1f23; color: #f2f2f2; padding: 16px; border-radius: var(--radius); overflow-x: auto; font-size: 14px; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose blockquote { margin: 20px 0; padding: 14px 18px; background: var(--soft); border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap:focus-visible { box-shadow: var(--ring); }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--soft); font-weight: 650; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.eyebrow { margin: 20px 0 0; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.updated { margin-top: 40px; font-size: 14px; color: var(--muted); }
.pager { max-width: 760px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.pager a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.35; }
.pager a:hover { border-color: var(--ink); }
.pager span { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.pager-next { text-align: right; grid-column: 2; }

/* Support form */
.support-form { margin-top: 36px; padding: 20px; background: var(--soft); border-radius: 16px; }
.support-form h2 { margin-top: 0; }
.field { margin: 0 0 18px; }
.field label { display: block; font-weight: 650; margin-bottom: 6px; font-size: 16px; }
.optional { font-weight: 400; color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid #c9c2b8; border-radius: 8px; padding: 12px 14px; min-height: 48px; }
.field textarea { resize: vertical; min-height: 160px; line-height: 1.5; }
.field input[type="file"] { width: 100%; font: inherit; font-size: 15px; padding: 10px; background: #fff; border: 1px dashed #b9b1a6; border-radius: 8px; min-height: 48px; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field [aria-invalid="true"] { border-color: var(--error) !important; box-shadow: 0 0 0 1px var(--error); }
.field-hint { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.field-error, .form-error { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--error); }
.form-error { margin: 0 0 14px; padding: 12px 14px; background: #fff; border: 1px solid var(--error); border-radius: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-done { padding: 8px 0; }
.form-done h2 { margin-top: 0; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--soft); }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 24px 16px; font-size: 14px; color: var(--muted); }
.footer-inner p { margin: 4px 0; }
.footer a { color: var(--ink); }

/* Tablet and desktop */
@media (min-width: 720px) {
  .topbar-inner { grid-template-columns: auto minmax(220px, 440px) 1fr; grid-template-areas: "logo search links"; padding: 12px 24px; }
  .page { padding: 0 24px; }
  .support-form { padding: 28px 32px; }
}
@media (min-width: 960px) {
  .page { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; }
  .nav-drawer { display: none; }
  .side-nav { display: block; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; padding: 8px 0 32px; }
  main { padding-top: 16px; }
  .prose h2 .anchor, .prose h3 .anchor { display: inline; position: absolute; margin-left: -1.1em; color: var(--line); text-decoration: none; font-weight: 400; }
  .prose h2:hover .anchor, .prose h3:hover .anchor { color: var(--muted); }
}
@media (min-width: 1240px) {
  .page { grid-template-columns: 250px minmax(0, 1fr) 210px; }
  .toc, .toc-spacer { display: block; }
  .toc { position: sticky; top: 76px; align-self: start; padding-top: 24px; font-size: 14px; }
  .toc-title { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
  .toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
  .toc a { display: block; padding: 5px 0 5px 12px; color: var(--muted); text-decoration: none; line-height: 1.4; }
  .toc a:hover { color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Front page */
.home { padding-bottom: 24px; }
.hero { margin: 16px 0 8px; padding: 28px 20px; background: var(--soft); border-radius: 16px; }
.hero h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 10px; }
.hero-intro { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 0 18px; }
.hero-search { display: flex; gap: 8px; max-width: 640px; }
.hero-search input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; font: inherit; font-size: 16px; border: 1px solid #c9c2b8; border-radius: 999px; background: #fff; color: var(--ink); }
.hero-search input:focus-visible { outline: none; box-shadow: var(--ring); }
.hero-search .button { min-height: 52px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.button-light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.button-light:hover { background: #fff; border-color: var(--ink); }
.home-group h2 { font-size: 22px; margin: 36px 0 12px; letter-spacing: -0.01em; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
.card { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
.card:hover { border-color: var(--ink); box-shadow: 0 8px 24px -18px rgba(23, 24, 27, 0.5); }
.card-title { display: block; font-weight: 650; font-size: 17px; margin-bottom: 4px; }
.card-text { display: block; font-size: 15px; line-height: 1.45; color: var(--muted); }
.home-support { margin-top: 40px; padding: 24px 20px; border: 1px solid var(--line); border-radius: 16px; }
.home-support h2 { margin: 0 0 6px; font-size: 22px; }
.home-support p { margin: 0 0 16px; color: var(--muted); }
@media (min-width: 720px) {
  .hero { padding: 44px 40px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .home-support { padding: 28px 32px; }
}
@media (min-width: 1240px) { .cards { grid-template-columns: repeat(3, 1fr); } }

@media (min-width: 1240px) { .page--wide { grid-template-columns: 250px minmax(0, 1fr); } .page--wide .prose { max-width: 820px; } }
