/* The Automation Desk — flowchart visual (teal accents, square decision nodes,
   CSS-drawn flow arrows, blueprint grid, no rounded corners, sans). */
:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --ink: #164e63;
  --body: #2b3f47;
  --muted: #6a7f87;
  --accent: #0e7490;
  --accent-dk: #0b5768;
  --line: #d8e0e4;
  --grid: #e7edf0;
  --n-ai: #0e7490;
  --n-pol: #155e75;
  --n-use: #0f766e;
  --n-flow: #075985;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--body);
  line-height: 1.65;
  font-size: 16px;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dk); text-decoration: underline; }

/* top bar */
.topbar { background: var(--panel); border-bottom: 2px solid var(--accent); }
.bar-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-node {
  width: 34px; height: 34px; background: var(--accent); transform: rotate(45deg);
  flex: 0 0 auto; border: 2px solid var(--accent-dk);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; letter-spacing: .2px; }
.brand-tag { font-size: 12px; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.topnav { display: flex; gap: 22px; }
.topnav a { color: var(--ink); font-size: 14px; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.topnav a:hover { border-bottom-color: var(--accent); text-decoration: none; }

/* hero */
.hero { background: var(--panel); border-bottom: 1px solid var(--line); padding: 46px 0; }
.hero-grid { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: center; }
.hero-kicker { color: var(--accent); font-size: 12px; letter-spacing: 3px; font-weight: 700; margin-bottom: 12px; }
.hero h1 { font-size: 36px; line-height: 1.14; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.hero-lede { max-width: 620px; color: var(--muted); font-size: 17px; }
.hero-strip { display: flex; align-items: center; list-style: none; justify-content: flex-start; }
.strip-node {
  border: 2px solid var(--accent); color: var(--ink); font-size: 12px; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase; padding: 8px 10px; background: var(--bg);
}
.strip-arrow { width: 24px; height: 2px; background: var(--accent); position: relative; flex: 0 0 auto; }
.strip-arrow::after {
  content: ''; position: absolute; right: -1px; top: -4px;
  border-left: 8px solid var(--accent); border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}

/* sections + legend */
section { padding: 30px 0; }
.section-label { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; font-weight: 700; }
.legend-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.legend-list li { font-size: 14px; color: var(--body); }
.recipe-cat {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  padding: 2px 8px; border: 1px solid currentColor;
}
.n-ai { color: var(--n-ai); }
.n-pol { color: var(--n-pol); }
.n-use { color: var(--n-use); }
.n-flow { color: var(--n-flow); }

/* use case cards */
.usecase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.usecase-card {
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  padding: 16px; display: flex; flex-direction: column; gap: 6px; color: var(--ink);
}
.usecase-card:hover { border-color: var(--accent); text-decoration: none; }
.usecase-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.usecase-name { font-weight: 700; font-size: 17px; }

/* group + recipe cards */
.group-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.group-head h2 { font-size: 22px; font-weight: 700; color: var(--ink); }
.group-more { font-size: 13px; }
.recipe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.recipe-card {
  background: var(--panel); border: 1px solid var(--line); padding: 16px;
  display: flex; flex-direction: column; gap: 10px; color: var(--body);
  border-top: 3px solid var(--accent);
}
.recipe-card:hover { border-color: var(--accent); text-decoration: none; }
.recipe-title { font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--ink); }

/* flow diagram inside cards */
.flow { display: flex; align-items: stretch; gap: 8px; }
.flow .node {
  flex: 1 1 0; min-width: 0; border: 1px solid var(--line); background: var(--bg);
  padding: 7px 9px; font-size: 12px; color: var(--body); overflow-wrap: break-word;
}
.flow .node b { display: block; font-size: 10px; letter-spacing: .5px; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.flow .arrow { align-self: center; width: 22px; height: 2px; background: var(--accent); position: relative; flex: 0 0 auto; }
.flow .arrow::after {
  content: ''; position: absolute; right: -1px; top: -4px;
  border-left: 8px solid var(--accent); border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}
.recipe-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-variant-numeric: tabular-nums; }
.recipe-meta .meta { display: flex; flex-direction: column; font-size: 12px; color: var(--body); }
.recipe-meta .meta b { font-size: 10px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.recipe-desc { font-size: 13px; color: var(--muted); }

/* page head */
.page-head { padding: 36px 0 12px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumb a { color: var(--muted); }
.page-head h1 { font-size: 30px; line-height: 1.2; font-weight: 700; color: var(--ink); }
.lede { color: var(--muted); margin-top: 8px; }

/* recipe sheet layout (item page) */
.layout { display: grid; grid-template-columns: 300px 1fr; gap: 28px; padding-top: 24px; padding-bottom: 40px; }
.recipe-sheet { align-self: start; background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--accent); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sheet-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tag-spec { font-variant-numeric: tabular-nums; }
.spec-row { display: flex; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec-row dt { flex: 0 0 42%; padding: 9px 14px; color: var(--muted); border-right: 1px solid var(--line); }
.spec-row dd { flex: 1; padding: 9px 14px; color: var(--ink); }
.article-body { background: var(--panel); border: 1px solid var(--line); padding: 26px 30px; }
.article-body .sec { margin-bottom: 24px; }
.article-body .sec:last-child { margin-bottom: 0; }
.article-body h2 { font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; }
.sec-num {
  color: var(--panel); background: var(--accent); font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 700; line-height: 1; padding: 5px 8px; flex: 0 0 auto;
}
.article-body p { margin-bottom: 12px; color: var(--body); }
.article-body p:last-child { margin-bottom: 0; }
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }

/* legal prose */
.prose { background: var(--panel); border: 1px solid var(--line); padding: 26px 30px; }
.prose h2 { font-size: 18px; font-weight: 700; color: var(--ink); margin: 18px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-bottom: 12px; color: var(--body); }
.prose a { color: var(--accent); }

/* footer */
.footer { background: var(--panel); border-top: 2px solid var(--accent); margin-top: 20px; padding: 30px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.footer-brand { flex: 1 1 340px; }
.footer-brand .brand-name { color: var(--ink); font-weight: 700; }
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.footer-nav { display: flex; gap: 16px; }
.footer-nav a { color: var(--ink); font-size: 14px; }
.copyright { flex: 1 1 100%; font-size: 12px; color: var(--muted); margin-top: 10px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-strip { justify-content: flex-start; }
  .usecase-grid { grid-template-columns: repeat(2, 1fr); }
  .recipe-grid { grid-template-columns: repeat(2, 1fr); }
  .legend-list { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .usecase-grid, .recipe-grid { grid-template-columns: 1fr; }
  .bar-inner { flex-direction: column; gap: 10px; }
  .topnav { gap: 14px; }
  .flow { flex-direction: column; }
  .flow .arrow { transform: rotate(90deg); }
}
