/* Teams Knowledge - main stylesheet */
:root {
  --navy: #14243a;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --teal: #0f766e;
  --teal-soft: #e6f4f2;
  --white: #ffffff;
  --gray: #f5f7fa;
  --line: #dde3ec;
  --text: #202938;
  --muted: #687386;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 36, 58, .06), 0 6px 20px rgba(20, 36, 58, .07);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --maxw: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-top: 2.2em; }
h3 { font-size: 1.25rem; margin-top: 1.8em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: .4em; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 3px; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 1000;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 6px; text-decoration: none;
}
.skip-link:focus { top: 8px; color: #fff; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.section { padding: 64px 0; }
.section-alt { background: var(--gray); }
.page-hero + .section { padding-top: 40px; }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head h2 { margin-top: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--teal); margin-bottom: .6em; display: block; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; flex-shrink: 0; }
.logo:hover { color: var(--navy); }
.logo-mark { width: 34px; height: 34px; flex-shrink: 0; }
.logo span em { font-style: normal; color: var(--blue); }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav li { margin: 0; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: .95rem; font-weight: 500; }
.main-nav a:hover { background: var(--blue-soft); color: var(--navy); }
.main-nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue-dark); font-weight: 700; box-shadow: inset 0 -2px 0 var(--blue); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--navy); padding: 8px 12px; border-radius: 8px; cursor: pointer; font: inherit; font-size: .92rem; font-weight: 500; text-decoration: none; }
.icon-btn:hover { background: var(--blue-soft); border-color: #bcd1fb; color: var(--navy); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }

/* Hero */
.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 72px 20px; }
.hero h1 { color: #fff; margin-bottom: .45em; }
.hero p.lead { font-size: 1.2rem; color: #d3dcea; max-width: 34em; margin-bottom: 1.6em; }
.hero-img { border-radius: 14px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.hero-img img { width: 100%; aspect-ratio: 8/5; object-fit: cover; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 2px solid transparent; font-size: 1rem; cursor: pointer; font-family: inherit; line-height: 1.4; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-secondary { background: transparent; color: #fff; border-color: #8fa6c8; }
.btn-secondary:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn-outline { background: #fff; color: var(--blue-dark); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-soft); }

/* Page header (inner pages) */
.page-hero { background: var(--blue-soft); border-bottom: 1px solid var(--line); padding: 44px 0 36px; }
.page-hero h1 { margin-bottom: .3em; font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.page-hero p.lead { font-size: 1.15rem; color: #3b475c; max-width: 44em; margin: 0; }

/* Breadcrumbs */
.breadcrumbs { font-size: .9rem; margin-bottom: 16px; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li { margin: 0; display: flex; gap: 6px; align-items: center; }
.breadcrumbs li + li::before { content: "/"; color: #98a2b3; }
.breadcrumbs a { color: var(--blue-dark); }
.breadcrumbs [aria-current="page"] { color: var(--muted); }

/* Cards */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(20,36,58,.04); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-img img { width: 100%; aspect-ratio: 8/5; object-fit: cover; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card-body h2, .card-body h3 { font-size: 1.15rem; margin: .25em 0 .5em; }
.card-body h2 a, .card-body h3 a { color: var(--navy); text-decoration: none; }
.card-body h2 a:hover, .card-body h3 a:hover { color: var(--blue-dark); text-decoration: underline; }
.card-body p { color: #46536a; font-size: .97rem; margin-bottom: 1em; }
.card-meta { font-size: .85rem; color: var(--muted); margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--teal); background: var(--teal-soft); padding: 3px 9px; border-radius: 99px; align-self: flex-start; text-decoration: none; }
a.tag:hover { background: #cde9e5; color: var(--teal); }
.read-more { font-weight: 600; font-size: .95rem; margin-top: auto; }

.cat-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 6px; transition: box-shadow .2s, border-color .2s; }
.cat-card:hover { border-color: var(--blue); box-shadow: var(--shadow); color: var(--text); }
.cat-card h3 { margin: 0; font-size: 1.15rem; }
.cat-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.cat-card .cat-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--blue-soft); color: var(--blue-dark); display: grid; place-items: center; margin-bottom: 8px; }
.cat-card .cat-icon svg { width: 24px; height: 24px; }
.cat-card .go { color: var(--blue-dark); font-weight: 600; font-size: .92rem; margin-top: 6px; }

/* Feature layout for horizontal list items */
.list-item { display: grid; grid-template-columns: 220px 1fr; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: start; }
.list-item:first-child { padding-top: 0; }
.list-item img { border-radius: 8px; aspect-ratio: 8/5; object-fit: cover; width: 100%; }
.list-item h2, .list-item h3 { margin: .3em 0 .4em; font-size: 1.2rem; }
.list-item h2 a, .list-item h3 a { color: var(--navy); text-decoration: none; }
.list-item h2 a:hover, .list-item h3 a:hover { text-decoration: underline; color: var(--blue-dark); }
.list-item p { margin-bottom: .5em; color: #46536a; }

/* About split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: 14px; aspect-ratio: 8/5; object-fit: cover; width: 100%; }
.notice { background: var(--blue-soft); border-left: 4px solid var(--blue); padding: 16px 20px; border-radius: 6px; margin: 1.5em 0; font-size: .98rem; }
.notice p:last-child { margin-bottom: 0; }
.notice.warn { background: #fff8e6; border-color: #b7791f; }

/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-btn { border: 1px solid var(--line); background: #fff; color: var(--text); padding: 8px 14px; border-radius: 99px; cursor: pointer; font: inherit; font-size: .92rem; font-weight: 500; }
.filter-btn:hover { border-color: var(--blue); }
.filter-btn[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.filter-status { color: var(--muted); font-size: .92rem; margin-bottom: 16px; }

/* Article layout */
.article-hero { background: var(--blue-soft); border-bottom: 1px solid var(--line); padding: 36px 0 32px; }
.article-hero h1 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); max-width: 22em; }
.article-meta { color: var(--muted); font-size: .93rem; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding: 40px 0 64px; align-items: start; }
.article-figure { margin: 0 0 32px; }
.article-figure img { width: 100%; border-radius: 12px; aspect-ratio: 8/5; object-fit: cover; }
.article-figure figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.article-body h2 { margin-top: 1.9em; padding-top: .2em; scroll-margin-top: 90px; }
.article-body h3 { scroll-margin-top: 90px; }
.article-body .lead-in { font-size: 1.2rem; color: #364258; }
.toc { background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 32px; }
.toc h2 { font-size: 1rem; margin: 0 0 .6em; padding: 0; text-transform: uppercase; letter-spacing: .06em; color: var(--navy); }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: .25em; }
.callout { border-radius: 8px; padding: 18px 22px; margin: 1.6em 0; }
.callout h3, .callout-title { margin: 0 0 .4em; font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-tip { background: var(--teal-soft); border-left: 4px solid var(--teal); }
.callout-note { background: var(--blue-soft); border-left: 4px solid var(--blue); }
.callout-warn { background: #fff8e6; border-left: 4px solid #b7791f; }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 1.5em 0; }
.proscons > div { border: 1px solid var(--line); border-radius: 8px; padding: 18px 22px; }
.proscons h3 { margin: 0 0 .5em; font-size: 1.05rem; }
.proscons ul { margin: 0; }
.pros h3::before { content: "+ "; color: var(--teal); }
.cons h3::before { content: "\2212  "; color: #b42318; }
.sidebar { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 24px; }
.side-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: #fff; }
.side-box h2 { font-size: 1rem; margin: 0 0 .7em; text-transform: uppercase; letter-spacing: .06em; padding: 0; }
.side-box ul { list-style: none; padding: 0; margin: 0; }
.side-box li { margin-bottom: .7em; font-size: .97rem; line-height: 1.45; }
.related { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 48px; }
.related h2 { margin-top: 0; }
.table-wrap { overflow-x: auto; margin: 1.5em 0; }
table { border-collapse: collapse; width: 100%; font-size: .96rem; }
th, td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
th { background: var(--gray); color: var(--navy); }
caption { text-align: left; font-weight: 600; padding-bottom: 8px; color: var(--navy); }

/* Accordion */
.accordion { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.5em 0; }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion details:last-child { border-bottom: 0; }
.accordion summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--blue); flex-shrink: 0; }
.accordion details[open] summary::after { content: "\2212"; }
.accordion details[open] summary { background: var(--blue-soft); }
.accordion .acc-body { padding: 14px 20px 6px; }

/* Prose pages */
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose { padding: 44px 0 72px; }
.updated { color: var(--muted); font-size: .93rem; }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: #fff; box-shadow: var(--shadow); }
.contact-card address { font-style: normal; line-height: 1.8; }
.contact-card dt { font-weight: 700; color: var(--navy); margin-top: 1em; }
.contact-card dd { margin: 0; }

/* Search dialog */
.search-dialog { border: 0; border-radius: 14px; padding: 0; width: min(680px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.35); margin-top: 8vh; }
.search-dialog::backdrop { background: rgba(20,36,58,.6); }
.search-head { display: flex; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); align-items: center; }
.search-head input { flex: 1; font: inherit; font-size: 1.1rem; padding: 12px 14px; border: 2px solid var(--line); border-radius: 8px; min-width: 0; }
.search-head input:focus { border-color: var(--blue); outline: none; }
.search-results { max-height: 55vh; overflow-y: auto; padding: 8px 16px 16px; }
.search-results ul { list-style: none; margin: 0; padding: 0; }
.search-results li { margin: 0; border-bottom: 1px solid var(--line); }
.search-results li:last-child { border: 0; }
.search-results a { display: block; padding: 12px 4px; text-decoration: none; color: var(--text); }
.search-results a:hover, .search-results a:focus { background: var(--blue-soft); }
.search-results .r-title { font-weight: 700; color: var(--navy); display: block; }
.search-results .r-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--teal); font-weight: 700; }
.search-results .r-desc { font-size: .92rem; color: var(--muted); display: block; }
.search-msg { padding: 14px 4px; color: var(--muted); }
.search-form-page { display: flex; gap: 10px; max-width: 560px; margin-top: 18px; }
.search-form-page input { flex: 1; font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: 8px; min-width: 0; }
.search-form-page input:focus { border-color: var(--blue); outline: none; }

/* Back to top */
.to-top { position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff; border: 0; cursor: pointer; display: none; place-items: center; box-shadow: var(--shadow); z-index: 90; }
.to-top.show { display: grid; }
.to-top:hover { background: var(--blue-dark); }
.to-top svg { width: 22px; height: 22px; }

/* Footer */
.site-footer { background: var(--navy); color: #cbd5e4; padding: 56px 0 0; font-size: .96rem; }
.site-footer a { color: #e6edf8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h2 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .09em; margin: 0 0 1em; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .55em; line-height: 1.5; }
.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand .logo span em { color: #7fb0ff; }
.footer-brand p { margin-bottom: .8em; }
.footer-contact address { font-style: normal; line-height: 1.7; margin-bottom: .8em; }
.footer-bottom { border-top: 1px solid #2c4062; padding: 22px 0 28px; font-size: .88rem; color: #a9b8cf; }
.footer-bottom p { margin: 0 0 .6em; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 14px; list-style: none; padding: 0; }
.footer-legal li { margin: 0; }

.js .no-js-only { display: none !important; }
[hidden] { display: none !important; }
.to-top.show { display: grid !important; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.center { text-align: center; }
.mt-0, .prose .mt-0, .article-body .mt-0 { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover { transform: none; }
}
@media print {
  .site-header, .site-footer, .to-top, .sidebar, .search-dialog { display: none !important; }
  body { font-size: 11pt; }
}
