:root {
  color-scheme: light dark;
  --bg: #faf7f2;
  --surface: #f2ece3;
  --border: #e2d9cc;
  --text: #1f1a14;
  --muted: #6b6053;
  --accent: #9a4f00;
  --accent-text: #ffffff;
  --ok: #2f6b3a;
  --warn: #8a5a00;
  --danger: #b3261e;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", var(--font);
  --r-ctl: 8px;
  --r-card: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16130f;
    --surface: #211c17;
    --border: #3a3229;
    --text: #f3ede5;
    --muted: #b3a797;
    --accent: #f0a64a;
    --accent-text: #1a1206;
    --ok: #7bc287;
    --warn: #f0c060;
    --danger: #ff8a80;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: 40px; letter-spacing: -0.01em; }
h2 { font-size: 24px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.lead { font-size: 18px; max-width: 65ch; }
.num { font-variant-numeric: tabular-nums; }
.r { text-align: right; }
.boot { padding: 48px 16px; text-align: center; color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 12px; z-index: 10; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { a, button, input, textarea, select { transition: color 150ms, background-color 150ms, border-color 150ms; } }

/* layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.wrap.narrow, .narrow { max-width: 760px; }
.section { padding-top: 48px; padding-bottom: 48px; }
.row { display: flex; align-items: center; }
.row.gap { gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } .section { padding-top: 32px; padding-bottom: 32px; } h1 { font-size: 32px; } }

/* public header and footer */
.site-head { border-bottom: 1px solid var(--border); }
.site-head .row { justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font: 700 18px var(--display); }
.brand .mark { color: var(--accent); }
.site-nav { display: flex; gap: 24px; }
.site-nav a { color: var(--text); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
@media (max-width: 480px) { .site-nav { gap: 16px; font-size: 14px; } }
.site-foot { border-top: 1px solid var(--border); padding: 32px 0 48px; margin-top: 48px; font-size: 14px; }
.site-foot p { margin: 0 0 4px; }

/* home */
.hero { padding-top: 64px; padding-bottom: 16px; }
@media (max-width: 640px) { .hero { padding-top: 40px; } }
.search { max-width: 480px; margin-top: 24px; }
.ws { margin-bottom: 48px; scroll-margin-top: 16px; }
.plist { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--border); }
.plist li { border-bottom: 1px solid var(--border); }
.plist a { display: grid; grid-template-columns: 280px 1fr 120px; gap: 16px; align-items: center; padding: 16px 8px; min-height: 56px; color: var(--text); text-decoration: none; }
.plist a:hover { background: var(--surface); }
.pname { font-weight: 600; }
.pcount { color: var(--accent); font-size: 14px; white-space: nowrap; text-align: right; }
@media (max-width: 640px) { .plist a { grid-template-columns: 1fr auto; gap: 4px 12px; } .pblurb { grid-column: 1; grid-row: 2; font-size: 14px; } .pcount { grid-row: 1 / span 2; grid-column: 2; } }

/* product page */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.two { display: grid; grid-template-columns: 3fr 2fr; gap: 48px; align-items: start; padding-top: 0; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }
.faqs { border-top: 1px solid var(--border); margin-top: 16px; }
.faq { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 20px; color: var(--accent); }
.faq[open] summary::after { content: "−"; }
.faq .answer { padding: 0 0 16px; max-width: 65ch; }
.contact { background: var(--surface); border-radius: var(--r-card); padding: 24px; }
@media (max-width: 640px) { .contact { padding: 16px; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* forms */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.field small { display: block; margin-top: 4px; font-size: 14px; }
.field.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.field.inline > span { margin: 0; font-weight: 400; color: var(--muted); }
input, textarea, select { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-ctl); padding: 8px 12px; min-height: 44px; }
.field.inline select { width: auto; min-height: 40px; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.error { color: var(--danger); font-size: 14px; min-height: 0; margin: 0 0 8px; }
.error:empty { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: transparent; color: var(--text); font: 600 15px var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn:disabled { opacity: .5; cursor: default; }
@media (max-width: 640px) { form .btn.primary { width: 100%; height: 44px; } }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.link.danger { color: var(--danger); }
.notice { background: var(--surface); border-left: 3px solid var(--ok); padding: 12px 16px; border-radius: 4px; }
.notice.warn { border-left-color: var(--warn); }

/* conversation */
.thread { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 12px; }
.msg { border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; }
.msg.team { background: var(--surface); }
.msg .who { margin-bottom: 8px; }
.msg .body p:last-child { margin: 0; }
.tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); }
.tag-open { color: var(--warn); border-color: currentColor; }
.tag-waiting { color: var(--muted); }
.tag-solved { color: var(--ok); border-color: currentColor; }
.reply { margin-top: 24px; }

/* sign-in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.signin .card { width: min(420px, 100%); background: var(--surface); border-radius: var(--r-card); padding: 32px 24px; }
.signin h1 { font-size: 24px; margin-top: 24px; }

/* inbox shell */
.dash { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--border); padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; }
.side nav { display: grid; gap: 4px; }
.side nav a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: var(--r-ctl); }
.side nav a:hover { background: var(--surface); }
.side nav a[aria-current="page"] { background: var(--surface); font-weight: 600; }
.acct { margin-top: auto; display: grid; gap: 4px; font-size: 14px; word-break: break-all; }
.acct .link { justify-self: start; }
.dmain { padding: 32px; max-width: 1400px; width: 100%; }
@media (max-width: 800px) {
  .dash { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .side nav { display: flex; gap: 4px; }
  .acct { margin: 0 0 0 auto; display: flex; gap: 12px; align-items: center; }
  .acct > span { display: none; }
  .dmain { padding: 16px; }
}
.phead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.phead h1 { font-size: 32px; margin: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.meta { color: var(--muted); font-size: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 24px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-ctl); overflow: hidden; }
.seg a { padding: 8px 14px; color: var(--text); text-decoration: none; font-size: 14px; border-right: 1px solid var(--border); white-space: nowrap; }
.seg a:last-child { border-right: 0; }
.seg a[aria-current="page"] { background: var(--surface); font-weight: 600; }
.seg .num { color: var(--muted); margin-left: 4px; }
.tablewrap { overflow-x: auto; margin-bottom: 32px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 14px; font-weight: 500; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--border); }
td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th.r, td.r { text-align: right; }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; }
@media (max-width: 640px) { .tickets th:nth-child(3), .tickets td:nth-child(3) { display: none; } }
.empty { padding: 48px 0; }
.empty h2 { font-size: 24px; }
.others { margin-top: 48px; }
.others ul { padding-left: 20px; }
.faqedit { list-style: none; padding: 0; margin: 0 0 48px; display: grid; gap: 16px; }
.faqedit li { border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; }
.addfaq { max-width: 760px; }
