/* Northwestern Apple Developer Programs – TDX Knowledge Base */
:root {
  --nu-purple: #4e2a84;
  --nu-purple-light: #836eaa;
  --nu-purple-dark: #401f68;
  --nu-purple-bg: #f5f2f9;
  --text: #1d1d1f;
  --text-secondary: #515154;
  --bg: #ffffff;
  --bg-alt: #f9f9fb;
  --border: #d2d2d7;
  --link: #4e2a84;
  --link-hover: #836eaa;
  --warning-bg: #fff8e1;
  --warning-border: #f5a623;
  --info-bg: #e8f0fe;
  --info-border: #4285f4;
  --code-bg: #f4f4f8;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --max-width: 900px;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Header / Nav Bar */
.site-header {
  background: var(--nu-purple);
  color: #fff;
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-header .brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.site-header .brand a {
  color: #fff;
  text-decoration: none;
}
.site-header .brand a:hover { opacity: 0.85; }
.site-header nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-header nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: 0.825rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: background .15s, color .15s;
}
.site-header nav a:hover,
.site-header nav a.active {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* Main Content */
.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--nu-purple-dark);
  line-height: 1.2;
}
h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--nu-purple-bg);
  color: var(--nu-purple);
}
h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  color: var(--text);
}
h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.4rem;
  color: var(--text-secondary);
}

p { margin: 0 0 1rem; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

strong { font-weight: 600; }

code {
  font-family: "SF Mono", Menlo, Consolas, "Courier New", monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 1rem 0;
}
pre code { background: none; padding: 0; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.925rem;
}
th, td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  vertical-align: top;
}
th {
  background: var(--nu-purple-bg);
  font-weight: 600;
  color: var(--nu-purple-dark);
  white-space: nowrap;
}
tr:nth-child(even) td { background: var(--bg-alt); }

/* Blockquotes (notes/callouts) */
blockquote {
  margin: 1rem 0;
  padding: 0.85rem 1.25rem;
  border-left: 4px solid var(--nu-purple-light);
  background: var(--nu-purple-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
}
blockquote p { margin: 0 0 0.5rem; }
blockquote p:last-child { margin-bottom: 0; }

/* Warning callout */
.callout-warning {
  border-left-color: var(--warning-border);
  background: var(--warning-bg);
}
/* Info callout */
.callout-info {
  border-left-color: var(--info-border);
  background: var(--info-bg);
}

/* Lists */
ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; }
li > ul, li > ol { margin-top: 0.35rem; margin-bottom: 0; }

/* Checkbox lists */
ul.checklist { list-style: none; padding-left: 0.25rem; }
ul.checklist li { position: relative; padding-left: 1.75rem; }
ul.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border);
  border-radius: 3px;
  background: #fff;
}

/* Process flow */
.process-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 1.25rem 0;
  align-items: stretch;
}
.process-step {
  flex: 1 1 120px;
  background: var(--nu-purple-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  position: relative;
  min-width: 100px;
}
.process-arrow {
  display: flex;
  align-items: center;
  padding: 0 0.25rem;
  color: var(--nu-purple);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Footer nav */
.page-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.page-footer a { margin-right: 1rem; }

/* Intro / subtitle */
.subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 700px) {
  .content { padding: 1.25rem 1rem 3rem; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }
  table { font-size: 0.825rem; }
  th, td { padding: 0.45rem 0.55rem; }
  .site-header-inner { gap: 0.5rem; }
  .process-flow { flex-direction: column; }
  .process-arrow { justify-content: center; transform: rotate(90deg); padding: 0.15rem 0; }
}
