/* Mil Org Chart - documentation styles.
   Self-contained: no build step, no CDN, no external fonts, so these pages can
   be dropped onto any static host and will render offline. */

:root {
  --navy: #1B3A6B;
  --navy-dark: #12253C;
  --teal: #0F7A6B;
  --gold: #B7791F;
  --crimson: #8C1D2C;
  --ink: #14202E;
  --ink-2: #2A3A4F;
  --ink-3: #5A6B80;
  --rule: #D7DEE6;
  --paper: #FFFFFF;
  --wash: #F4F7FA;
  --code-bg: #F2F5F9;
  --max: 60rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

/* ---------------------------------------------------------------- header */

.site-header {
  background: var(--navy-dark);
  color: #fff;
  border-bottom: 3px solid var(--gold);
}
.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem 1.25rem;
}
.site-title {
  font-size: 1.15rem; font-weight: 700; letter-spacing: .01em;
  margin: 0; color: #fff; text-decoration: none;
}
.site-tagline { color: #A9BBD0; font-size: .88rem; margin: 0; }

.site-nav {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.site-nav ul {
  max-width: var(--max); margin: 0 auto; padding: 0 1.25rem;
  list-style: none; display: flex; flex-wrap: wrap; gap: .25rem;
}
.site-nav a {
  display: block; padding: .6rem .85rem;
  color: #D5E0EE; text-decoration: none; font-size: .92rem;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.site-nav a[aria-current="page"] {
  color: #fff; border-bottom-color: var(--gold); font-weight: 600;
}

/* ------------------------------------------------------------------ page */

main { max-width: var(--max); margin: 0 auto; padding: 2rem 1.25rem 4rem; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 .4rem; color: var(--navy-dark); }
h2 {
  font-size: 1.3rem; margin: 2.4rem 0 .6rem; color: var(--navy-dark);
  padding-bottom: .3rem; border-bottom: 1px solid var(--rule);
}
h3 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; color: var(--ink-2); }
p, li { color: var(--ink-2); }
.lede { font-size: 1.06rem; color: var(--ink-3); margin-top: 0; }

a { color: var(--navy); }
a:hover { color: var(--teal); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em; background: var(--code-bg);
  padding: .1em .35em; border-radius: 3px;
}
pre {
  background: var(--code-bg); border: 1px solid var(--rule);
  border-radius: 5px; padding: .9rem 1rem; overflow-x: auto;
  font-size: .84rem; line-height: 1.5;
}
pre code { background: none; padding: 0; }

table {
  width: 100%; border-collapse: collapse; margin: 1rem 0;
  font-size: .93rem;
}
th, td {
  text-align: left; padding: .5rem .65rem;
  border-bottom: 1px solid var(--rule); vertical-align: top;
}
th { background: var(--wash); color: var(--navy-dark); font-weight: 600; }
tbody tr:hover { background: var(--wash); }

/* --------------------------------------------------------------- callout */

.note, .warn, .tip {
  border-left: 4px solid var(--navy);
  background: var(--wash);
  padding: .8rem 1rem; margin: 1.2rem 0; border-radius: 0 4px 4px 0;
}
.warn { border-left-color: var(--crimson); background: #FBF2F3; }
.tip  { border-left-color: var(--teal);    background: #F0F8F6; }
.note p:first-child, .warn p:first-child, .tip p:first-child { margin-top: 0; }
.note p:last-child,  .warn p:last-child,  .tip p:last-child  { margin-bottom: 0; }
.note strong, .warn strong, .tip strong { color: var(--navy-dark); }

/* ------------------------------------------------------------ card grid */

.cards {
  display: grid; gap: 1rem; margin: 1.5rem 0;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.card {
  border: 1px solid var(--rule); border-radius: 6px;
  padding: 1rem 1.1rem; background: var(--paper);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--navy); box-shadow: 0 2px 10px rgba(27,58,107,.09); }
.card h3 { margin-top: 0; }
.card p { margin-bottom: 0; font-size: .93rem; }
.card a { text-decoration: none; }

/* --------------------------------------------------------------- pieces */

.field-badge {
  display: inline-block; font-family: ui-monospace, monospace;
  font-size: .78rem; background: var(--navy); color: #fff;
  padding: .1rem .4rem; border-radius: 3px; margin-right: .35rem;
}
.req { background: var(--crimson); }
.opt { background: var(--ink-3); }

.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps > li {
  counter-increment: step; position: relative;
  padding-left: 2.4rem; margin-bottom: 1rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: .05rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: .85rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.toc {
  background: var(--wash); border: 1px solid var(--rule);
  border-radius: 5px; padding: .9rem 1.1rem; margin: 1.5rem 0;
}
.toc h2 { margin: 0 0 .4rem; font-size: .95rem; border: none; padding: 0; }
.toc ul { margin: 0; padding-left: 1.1rem; }
.toc li { margin: .18rem 0; font-size: .93rem; }

figure { margin: 1.4rem 0; }
figure svg { max-width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 5px; background: #fff; }
figure img { max-width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 5px; background: #fff; display: block; }
figcaption { font-size: .86rem; color: var(--ink-3); margin-top: .45rem; }

.figscreenshot { max-width: 90%; height: auto; border: 1px solid var(--rule); border-radius: 5px; background: #fff; }

.site-footer {
  border-top: 1px solid var(--rule); background: var(--wash);
  margin-top: 3rem;
}
.site-footer .inner {
  max-width: var(--max); margin: 0 auto; padding: 1.4rem 1.25rem;
  font-size: .87rem; color: var(--ink-3);
}

@media (max-width: 40rem) {
  body { font-size: 15px; }
  h1 { font-size: 1.5rem; }
  .site-nav ul { padding: 0 .6rem; }
  main { padding: 1.4rem .9rem 3rem; }
}

/* ------------------------------------------------------------- nav groups */
/* Dropdown groups in the top nav (Guides / Data Model / Chart Updates).
   Hover-driven on pointer devices, but the group's own link is a real,
   navigable page (the first child), so keyboard/touch users who can't
   hover still reach a sensible landing page by just clicking the group
   label - the submenu is progressive enhancement, not the only way in. */
.site-nav li.has-sub { position: relative; }
.site-nav li.has-sub > a::after {
  content: "▾"; font-size: .7em; margin-left: .3em; opacity: .7;
}
.site-nav .submenu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 20;
  background: var(--navy-dark); border: 1px solid rgba(255,255,255,.12);
  border-radius: 0 0 5px 5px; min-width: 13rem; padding: .3rem 0;
  list-style: none; margin: 0; box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.site-nav li.has-sub:hover .submenu,
.site-nav li.has-sub:focus-within .submenu { display: block; }
.site-nav .submenu a {
  padding: .55rem .9rem; border-bottom: none; white-space: nowrap;
}
.site-nav .submenu a[aria-current="page"] {
  border-bottom: none; background: rgba(255,255,255,.08);
}
/* The current page's TOP-LEVEL group also gets the gold underline, even
   though the actual link that's aria-current is inside its submenu -
   otherwise landing on, say, Edit Mode would leave every top-level tab
   looking unselected. */
.site-nav li.has-sub.on-this-group > a {
  color: #fff; border-bottom-color: var(--gold); font-weight: 600;
}

/* ----------------------------------------------------------------- pills */
/* Small, deliberately understated - not a warning, just a heads-up that a
   feature has a licensing gate, placed right next to the page's own link
   in the nav so it's visible before someone clicks through. */
.pill-license {
  display: inline-block; font-size: .68rem; font-weight: 600;
  letter-spacing: .02em; text-transform: uppercase;
  background: rgba(183,121,31,.16); color: #E4B667;
  border: 1px solid rgba(183,121,31,.4);
  padding: .05rem .4rem; border-radius: 999px; margin-left: .4rem;
  vertical-align: 1px;
}

/* --------------------------------------------------------------- version */
.version-tag {
  display: inline-block; font-size: .82rem; font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--teal); background: #F0F8F6;
  border: 1px solid rgba(15,122,107,.3);
  padding: .1rem .5rem; border-radius: 999px; margin-left: .6rem;
  vertical-align: 2px;
}

/* ------------------------------------------------------- parent site strip */
/* A thin bar above the docs site's own header, linking back up to
   customputing.com/products - styled to read as coming from that site
   rather than this one: its own logo mark, its own grid-paper texture,
   and a button matching its own outline-button style, not this site's
   navy/gold palette. Colors are a close approximation from a screenshot of
   the live site, not pulled from its actual stylesheet - worth a pixel
   check against the real site if exact brand-color matching ever matters
   more than "clearly the same family". */
.parent-strip {
  background-color: #FAF9F5;
  background-image:
    linear-gradient(to right, rgba(20,20,20,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20,20,20,.05) 1px, transparent 1px);
  background-size: 15px 15px;
  border-bottom: 1px solid rgba(20,20,20,.10);
}
.parent-strip .inner {
  max-width: 900px; margin: 0 auto; padding: .55rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.parent-strip-brand {
  display: flex; align-items: center; gap: .5rem;
  text-decoration: none; color: inherit;
}
.parent-strip-mark {
  display: block; height: 24px; width: auto;
}
.parent-strip-word { font-size: .92rem; letter-spacing: -.01em; }
.parent-strip-word b { font-weight: 700; color: #14181F; }
.parent-strip-word span { font-weight: 400; color: #14181F; }
.parent-strip-back {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 600; text-decoration: none;
  color: #1B3A6B; background: #fff;
  border: 1.5px solid rgba(27,58,107,.35); border-radius: 6px;
  padding: .32rem .75rem;
}
.parent-strip-back:hover { border-color: #1B3A6B; background: #F3F6FA; }
.parent-strip-back .arrow { font-family: ui-monospace, monospace; }
