:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1d1d1b;
  --muted: #5f5f5a;
  --line: #e3e3de;
  --accent: #d9560b;
  --on-accent: #ffffff;
  --error: #b3261e;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --surface: #1d1d1b;
    --text: #ecebe6;
    --muted: #a9a8a1;
    --line: #34342f;
    --on-accent: #141413;
    --error: #f2b8b5;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 18px; }
.brand img { border-radius: 6px; }
.mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.topnav { display: flex; align-items: center; gap: 16px; }
.topnav a:not(.btn) { color: var(--text); text-decoration: none; }
.topnav a:not(.btn):hover { color: var(--accent); }

.btn {
  display: inline-block; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 8px;
  padding: 8px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.big { padding: 12px 24px; font-size: 17px; }
.form .btn { justify-self: start; }
.btn[disabled] { opacity: .6; cursor: progress; }

main { padding-top: 20px; padding-bottom: 48px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 12px; overflow-wrap: anywhere; }
.crumbs a { color: var(--muted); }
.crumbs .sep { margin: 0 6px; }
.search { margin: 0 0 24px; }
.search input {
  width: 100%; padding: 12px 14px; font: inherit; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
}
.search input:focus, .form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

h1 { font-size: 28px; line-height: 1.25; margin: 8px 0 16px; }
h2 { font-size: 19px; line-height: 1.3; margin: 0 0 10px; }
.hero { margin: 8px 0 24px; }
.hero p { color: var(--muted); margin: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card, .folder, .article, .form, .done, .helpbox {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
}
.card h2 a, .folder h2 a { color: var(--text); text-decoration: none; }
.card h2 a:hover, .folder h2 a:hover { color: var(--accent); }
.card ul { margin: 0 0 8px; padding-left: 18px; }
.card li { margin: 2px 0; }
.more { font-size: 14px; font-weight: 600; }
.folder { margin-bottom: 16px; }
.list { list-style: none; margin: 0 0 8px; padding: 0; }
.list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .snip { display: block; color: var(--muted); font-size: 14px; }

.article { overflow-wrap: anywhere; }
.article .meta { color: var(--muted); font-size: 14px; margin-top: -8px; }
.article .body img, .article .body video, .article .body iframe { max-width: 100%; height: auto; }
.article .body table { display: block; overflow-x: auto; border-collapse: collapse; }
.article .body td, .article .body th { border: 1px solid var(--line); padding: 6px 8px; }
.article .body pre { overflow-x: auto; }
.helpbox { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.helpbox p { margin: 0; font-weight: 600; }

.lead { color: var(--muted); margin-top: -6px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.form .hint { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; padding: 10px 12px; font: inherit; font-weight: 400; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text);
}
.form textarea { resize: vertical; min-height: 160px; }
.form input[type=file] { padding: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--error); margin: 0; font-weight: 600; }
.done h2 { font-size: 22px; }
.done ol { padding-left: 20px; }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 20px 0; }
.foot a { color: var(--muted); }

@media (max-width: 640px) {
  h1 { font-size: 24px; }
  .row2 { grid-template-columns: 1fr; }
  .topnav { gap: 12px; font-size: 15px; }
  .card, .folder, .article, .form, .done, .helpbox { padding: 16px; }
}

/* Articles were written in Freshdesk's editor with inline dark text colours; keep them on a light card
   in dark mode so that text stays readable. */
@media (prefers-color-scheme: dark) {
  .article { background: #ffffff; color: #1d1d1b; color-scheme: light; border-color: #ffffff; }
  .article a { color: #b34708; }
  .article .meta { color: #5f5f5a; }
}
