:root {
  --navy: #0f2a44;
  --navy-deep: #0b1f33;
  --blue: #1f6fb2;
  --blue-dark: #17588f;
  --blue-soft: #e8f1fa;
  --ink: #1d2733;
  --muted: #566476;
  --line: #dde3ea;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --ok: #1e7b4a;
  --ok-soft: #e6f4ec;
  --warn-soft: #fff8e1;
  --warn-line: #f0d98a;
  --err: #b42318;
  --err-soft: #fdecea;
  --radius: 8px;
  --max: 1120px;
  --shadow: 0 1px 2px rgba(15, 42, 68, .06), 0 4px 16px rgba(15, 42, 68, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 780px; }
.center { text-align: center; }
.center.actions, .actions.center { justify-content: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -48px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { top: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 1.25rem; color: var(--navy); text-decoration: none; letter-spacing: .01em; }
.logo b { color: var(--blue); }
.nav { display: flex; gap: 6px; }
.nav a { color: var(--ink); text-decoration: none; font-size: .97rem; padding: 8px 12px; border-radius: 6px; }
.nav a:hover { background: var(--bg-alt); color: var(--blue); }
.nav a[aria-current="page"] { color: var(--blue); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; width: 44px; height: 40px; cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 20px; height: 2px; background: var(--navy); margin: 0 auto; position: relative; content: ""; }
.nav-toggle .bars::before { position: absolute; top: -6px; }
.nav-toggle .bars::after { position: absolute; top: 6px; }

/* Buttons */
.btn { display: inline-block; padding: 11px 20px; border-radius: var(--radius); background: var(--blue); color: #fff; text-decoration: none; font-weight: 600; border: 1px solid var(--blue); cursor: pointer; font: inherit; font-weight: 600; line-height: 1.3; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn.secondary { background: transparent; color: var(--blue); }
.btn.secondary:hover { background: var(--blue-soft); color: var(--blue-dark); }
.btn.light { background: #fff; color: var(--blue); border-color: #fff; }
.btn.light:hover { background: var(--blue-soft); }
.btn[disabled] { opacity: .6; cursor: progress; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy) 0%, #163b5f 100%); color: #fff; padding: 72px 0; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: #9cc3e6; font-weight: 600; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.15; margin: 0 0 16px; color: #fff; }
.hero-lede { color: #c9d6e3; font-size: 1.12rem; margin: 0 0 28px; max-width: 34em; }
.hero .btn.secondary { color: #fff; border-color: rgba(255,255,255,.8); }
.hero .btn.secondary:hover { background: rgba(255,255,255,.1); }
.hero-art { margin: 0; }

/* Sections */
section { padding: 64px 0; }
section.alt { background: var(--bg-alt); }
h1, h2, h3 { color: var(--navy); line-height: 1.25; }
h2 { font-size: 1.75rem; margin: 0 0 8px; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }
.lede { color: var(--muted); margin: 0 0 32px; max-width: 680px; font-size: 1.05rem; }

.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); gap: 40px; }
.align-start { align-items: start; }
.align-center { align-items: center; }

.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card p { margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }
.tag { display: inline-block; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); font-weight: 700; margin-bottom: 8px; }
.badge { display: inline-block; margin-left: 8px; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; background: var(--bg-alt); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; vertical-align: middle; }

.badge.new { background: var(--warn-soft); color: #7a5a00; border-color: var(--warn-line); }

.product-card { display: flex; flex-direction: column; }
.product-card h3 a { color: var(--navy); text-decoration: none; }
.product-card h3 a:hover { color: var(--blue); }
.product-card p { color: var(--muted); flex: 1; }
.product-card .more { font-weight: 600; text-decoration: none; }
.product-card.featured { border-top: 4px solid var(--blue); }
.product-group + .product-group { padding-top: 0; }

.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--muted); }
.link-list li:first-child { border-top: 0; padding-top: 0; }
.link-list a { display: block; text-decoration: none; }

.values p { color: var(--muted); }

.industries { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.industries li { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .92rem; }

.cta-band { background: var(--blue); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbe9f6; margin: 0 0 24px; }
.cta-band a:not(.btn) { color: #fff; }

/* Page head */
.page-head { background: var(--navy); color: #fff; padding: 44px 0; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(1.7rem, 3.5vw, 2.2rem); color: #fff; }
.page-head p { margin: 0; color: #c9d6e3; max-width: 46em; }
.page-head .alt-name { margin-top: 8px; font-size: .95rem; }
.breadcrumb { font-size: .9rem; margin-bottom: 10px; color: #9cc3e6; }
.breadcrumb a { color: #c9e0f5; }

/* Product page */
.product-layout, .support-layout, .downloads-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.side .card { margin-bottom: 20px; }
.prose h2 { margin-top: 32px; }
.prose p, .prose li { max-width: 46em; }
.check-list { list-style: none; padding: 0; }
.check-list li { padding: 6px 0 6px 30px; position: relative; }
.check-list li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plain-list { padding-left: 18px; margin: 0; }
.plain-list li { margin: 4px 0; }
.note { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 6px; padding: 10px 14px; }

/* Downloads */
.doc-group { padding: 0 0 28px; }
.doc-group h2 { font-size: 1.3rem; }
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.doc-list.compact li { padding: 8px 0; flex-direction: column; gap: 0; }
.file-meta { color: var(--muted); font-size: .85rem; white-space: nowrap; }

/* Support */
.support-paths { padding: 40px 0; }
.card.path { text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.card.path:hover { border-color: var(--blue); transform: translateY(-2px); }
.card.path h2 { font-size: 1.2rem; color: var(--blue); }
.card.path p { color: var(--muted); }

fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-weight: 700; color: var(--navy); font-size: 1.05rem; margin-bottom: 12px; padding: 0; }
.field { margin-bottom: 18px; }
label, .label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px; }
.req { color: var(--err); }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #aab7c5; border-radius: 6px; font: inherit; background: #fff; color: var(--ink); }
input[type="radio"], input[type="checkbox"] { width: auto; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(31,111,178,.25); outline-offset: 0; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--err); }
textarea { min-height: 150px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: .87rem; color: var(--muted); margin: 6px 0 0; }
.field-error { color: var(--err); font-size: .87rem; margin: 6px 0 0; }
.inline-options { display: flex; gap: 20px; }
.inline-options label { font-weight: 400; display: flex; gap: 8px; align-items: center; margin: 0; }

.severity-options { display: grid; gap: 8px; }
.severity-option { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin: 0; cursor: pointer; }
.severity-option input { margin-top: 5px; }
.severity-option:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.severity-option strong { color: var(--navy); margin-right: 4px; }

.fieldset-details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; }
.fieldset-details summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.fieldset-details[open] summary { margin-bottom: 14px; }

.suggestions { margin-top: 8px; background: var(--blue-soft); border: 1px solid #c4dbf0; border-radius: 6px; padding: 10px 14px; font-size: .93rem; }
.suggestions p { margin: 0 0 4px; font-weight: 600; color: var(--navy); }
.suggestions ul { margin: 0; padding-left: 18px; }

.file-list { list-style: none; padding: 0; margin: 8px 0 0; font-size: .9rem; }
.file-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; background: #fff; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 6px; }
.file-list .bad { color: var(--err); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.alert { border-radius: 6px; padding: 10px 14px; margin: 0 0 16px; }
.alert.error { background: var(--err-soft); color: var(--err); border: 1px solid #f5c2bd; }
.success-panel { scroll-margin-top: 84px; background: var(--ok-soft); border: 1px solid #b5dcc5; border-radius: var(--radius); padding: 28px; }
.success-panel h2 { color: var(--ok); }
.ticket-id { font-family: Consolas, "Courier New", monospace; font-size: 1.1em; letter-spacing: .03em; }

.table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--bg-alt); color: var(--navy); }

/* Ticket status */
.ticket-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin: 32px 0 8px; }
.ticket-header h2 { margin: 0; }
.ticket-header p { margin: 0; }
.status-pill { white-space: nowrap; border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 700; background: var(--bg-alt); border: 1px solid var(--line); }
.status-pill[data-status="new"] { background: var(--blue-soft); color: var(--blue-dark); border-color: #c4dbf0; }
.status-pill[data-status="in_progress"] { background: #eef0ff; color: #3b3ea8; border-color: #ccd0f5; }
.status-pill[data-status="waiting_on_customer"] { background: var(--warn-soft); color: #7a5a00; border-color: var(--warn-line); }
.status-pill[data-status="resolved"], .status-pill[data-status="closed"] { background: var(--ok-soft); color: var(--ok); border-color: #b5dcc5; }
.ticket-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 28px; }
.ticket-meta div { background: var(--bg-alt); border-radius: 6px; padding: 10px 12px; }
.ticket-meta dt { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ticket-meta dd { margin: 0; font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0 0 24px; }
.timeline li { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.timeline li.staff { border-left: 4px solid var(--blue); }
.timeline li.customer { border-left: 4px solid #9aa7b6; }
.timeline .who { font-weight: 700; color: var(--navy); }
.timeline .when { color: var(--muted); font-size: .85rem; margin-left: 8px; }
.timeline .msg { white-space: pre-wrap; margin: 6px 0 0; }
.timeline ul.attachments { list-style: none; padding: 0; margin: 8px 0 0; }
.timeline ul.attachments li { border: 0; padding: 2px 0; margin: 0; }
.timeline ul.attachments a::before { content: "\1F4CE\00a0"; }
#reply-form label { font-weight: 700; }

/* KB */
.kb-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
.kb-toc { position: sticky; top: 84px; }
.kb-toc h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kb-toc ul { list-style: none; padding: 0; margin: 0; }
.kb-toc li { padding: 6px 0; border-top: 1px solid var(--line); font-size: .93rem; }
.kb-article { padding: 0 0 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); scroll-margin-top: 84px; }
.kb-article h2 { font-size: 1.3rem; }
.kb-products { font-size: .85rem; color: var(--blue); font-weight: 600; margin-top: 0; }
.kb-article:target h2 { background: var(--warn-soft); }

address { font-style: normal; }

/* Footer */
.site-footer { background: var(--navy-deep); color: #a9b8c8; padding: 44px 0 20px; font-size: .93rem; }
.site-footer .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.site-footer h2 { color: #fff; margin: 0 0 8px; font-size: .98rem; }
.site-footer a { color: #cfdbe7; }
.site-footer p { margin: 0; }
.site-footer .legal { display: block; border-top: 1px solid #1f3851; margin-top: 32px; padding-top: 16px; font-size: .85rem; }

@media (max-width: 860px) {
  .hero .wrap, .support-layout, .product-layout, .downloads-layout, .kb-layout,
  .grid.cols-3, .grid.cols-2, .site-footer .wrap, .row { grid-template-columns: 1fr; }
  .hero { padding: 48px 0; }
  .hero-art { display: none; }
  section { padding: 48px 0; }
  .kb-toc { position: static; }
  .ticket-meta { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .site-header .wrap { position: relative; }
}
