/* UnitConnect Help Center — modeled on the Zendesk "Copenhagen" theme the legacy help center uses. */

:root {
  --brand: #ff7a59;
  --brand-dark: #e5603f;
  --brand-tint: #fff3ef;
  --text: #2f3941;
  --text-muted: #68737d;
  --border: #e9ebed;
  --bg: #ffffff;
  --bg-soft: #f8f9f9;
  --hero-bg: #eaf5fb;
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.6 var(--font); color: var(--text); background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.3; color: var(--text); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 980px; }

/* Header */
.header { border-bottom: 1px solid var(--border); background: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 17px; }
.logo:hover { text-decoration: none; }
.logo img { width: 38px; height: 38px; }
.logo em { font-style: normal; font-weight: 400; color: var(--text-muted); }
.header-nav { display: flex; gap: 24px; font-size: 14px; }
.header-nav a { color: var(--text); }

/* Search */
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 14px; color: var(--text-muted); pointer-events: none; }
.search input { width: 100%; font: inherit; color: var(--text); border: 1px solid #c2c8cc; border-radius: 999px; padding: 10px 16px 10px 42px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 122, 89, .2); }
.search-full { max-width: 640px; margin: 0 auto; }
.search-full input { padding: 14px 20px 14px 46px; font-size: 16px; box-shadow: 0 2px 8px rgba(47, 57, 65, .06); }
.search-small { width: 280px; }

/* Hero */
.hero { position: relative; background: var(--hero-bg); padding: 64px 16px 170px; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-title { margin: 0 0 20px; font-size: 30px; font-weight: 600; }
.hero-art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 150px; }

/* Home category tiles */
.categories { margin: 40px 0 24px; }
/* Flex, not an auto-fill grid: a short last row (or fewer tiles than columns) stays centered. */
.blocks-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.blocks-item { flex: 0 1 calc((100% - 40px) / 3); min-width: 260px; }
.blocks-item-link { display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%; padding: 28px 24px; border: 1px solid var(--brand); border-radius: 4px; color: var(--brand-dark); transition: background .15s, color .15s; }
.blocks-item-link:hover { background: var(--brand); color: #fff; text-decoration: none; }
.blocks-item-link:hover .blocks-item-description { color: #fff; }
.blocks-icon { margin-bottom: 10px; }
.blocks-item-title { font-size: 17px; font-weight: 600; }
.blocks-item-description { margin-top: 6px; font-size: 14px; color: var(--text-muted); }

.promoted { margin: 40px 0 64px; }
.promoted h2 { font-size: 22px; margin: 0 0 16px; }
.promoted-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 32px; }
.promoted-list li { border-bottom: 1px solid var(--border); padding: 14px 0; }
.promoted-list a { color: var(--text); }

/* Sub-nav (breadcrumbs + search) */
.sub-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 12px; }
.breadcrumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; font-size: 13px; }
.breadcrumbs li + li::before { content: "›"; margin: 0 8px; color: var(--text-muted); }
.breadcrumbs a { color: var(--text); }

.page-title { font-size: 30px; margin: 24px 0 6px; }
.page-lead { color: var(--text-muted); margin: 0 0 24px; }

/* Category page */
.section-tree { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); column-gap: 48px; margin-bottom: 56px; }
.section-block h2 { font-size: 17px; margin: 24px 0 8px; }
.section-block h2 a { color: var(--text); }
.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li { padding: 7px 0; }
.article-list a { color: var(--text); }
.article-list a:hover { color: var(--brand-dark); }
.see-all { display: inline-block; margin-top: 6px; font-size: 14px; }
.article-list-full li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.article-list-full p { margin: 4px 0 0; font-size: 14px; color: var(--text-muted); }

/* Article */
.article-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 24px; padding-bottom: 64px; }
.article-sidebar { position: sticky; top: 20px; align-self: start; max-height: calc(100vh - 40px); overflow: auto; }
.sidenav-title { font-size: 14px; font-weight: 600; margin: 0 0 12px; }
.sidenav { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.sidenav li { padding: 6px 0 6px 12px; border-left: 2px solid transparent; }
.sidenav a { color: var(--text); }
.sidenav li.current { border-left-color: var(--brand); font-weight: 600; }
.article { max-width: 780px; }
.article-header h1 { font-size: 32px; margin: 0 0 16px; }
.article-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted); }
.article-meta strong { display: block; color: var(--text); font-weight: 500; }
.avatar { width: 36px; height: 36px; border-radius: 50%; }
.article-summary { font-size: 17px; color: var(--text-muted); margin: 20px 0 0; }
.toc { margin: 24px 0 0; padding: 14px 18px; background: var(--bg-soft); border-radius: var(--radius); font-size: 14px; }
.toc-title { font-weight: 600; margin-bottom: 4px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { padding: 2px 0; }
.article-body { margin-top: 28px; font-size: 16px; line-height: 1.7; }
.article-body h2 { font-size: 22px; margin: 40px 0 12px; padding-top: 8px; }
.article-body h3 { font-size: 18px; margin: 28px 0 8px; }
.article-body ol, .article-body ul { padding-left: 24px; }
.article-body li { margin: 6px 0; }
.article-body li > p { margin: 4px 0; }
.article-body code { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 14px; }
.article-body kbd { display: inline-block; border: 1px solid #c2c8cc; border-bottom-width: 2px; border-radius: 4px; padding: 0 6px; font: 13px/1.6 var(--font); background: #fff; }
.article-body strong { font-weight: 600; }
.article-body blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--border); color: var(--text-muted); }

.shot { margin: 20px 0 28px; }
.shot a { display: block; }
.shot img { display: block; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(47, 57, 65, .08); cursor: zoom-in; }
.shot figcaption { margin-top: 8px; font-size: 13px; color: var(--text-muted); text-align: center; }

.callout { margin: 20px 0; padding: 12px 16px; border-radius: var(--radius); border-left: 4px solid; font-size: 15px; }
.callout p { margin: 4px 0; }
.callout-label { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.callout-tip { background: #edf8f4; border-color: #2e9e6b; }
.callout-tip .callout-label { color: #1f7a51; }
.callout-note, .callout-important { background: #eef5fc; border-color: #1f73b7; }
.callout-note .callout-label, .callout-important .callout-label { color: #1f5f99; }
.callout-warning { background: #fff7e8; border-color: #e0a100; }
.callout-warning .callout-label { color: #9a6b00; }

.table-wrap { overflow-x: auto; margin: 16px 0; }
.article-body table { border-collapse: collapse; width: 100%; font-size: 14px; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; vertical-align: top; }
.article-body th { background: var(--bg-soft); font-weight: 600; }

.article-footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.article-votes { font-size: 14px; color: var(--text-muted); }
.related h2 { font-size: 17px; margin: 32px 0 8px; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { padding: 5px 0; }

/* Search results */
.search-results { list-style: none; margin: 16px 0 64px; padding: 0; }
.search-results li { padding: 18px 0; border-bottom: 1px solid var(--border); }
.search-results a { font-size: 17px; font-weight: 500; }
.search-results .result-path { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.search-results p { margin: 6px 0 0; font-size: 14px; color: var(--text); }
.search-results mark { background: var(--brand-tint); color: inherit; padding: 0 1px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(20, 24, 28, .82); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }

/* Footer */
.footer { border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; }

@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; gap: 24px; }
  .article-sidebar { position: static; max-height: none; order: 2; border-top: 1px solid var(--border); padding-top: 20px; }
  .header-nav a:first-child { display: none; }
}
@media (max-width: 640px) {
  .sub-nav { flex-direction: column; align-items: stretch; }
  .search-small { width: 100%; }
  .hero { padding: 40px 16px 130px; }
  .hero-title { font-size: 24px; }
  .hero-art { height: 110px; }
  .logo em { display: none; }
  .header-nav { gap: 16px; }
  .section-tree { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 26px; }
}
