/* ISOM 472 — shared stylesheet. No frameworks, no external requests. */

:root {
  color-scheme: light;
  --navy: #0d2b4e;
  --navy-deep: #081d36;
  --navy-soft: #1c4b7d;
  --gold: #b0862c;
  --gold-soft: #f2e4c4;
  --ink: #1b2430;
  --muted: #57626f;
  --rule: #dde2e8;
  --tint: #f5f7fa;
  --page: #ffffff;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

/* ---------- Layout ---------- */

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  background: var(--navy);
  border-bottom: 4px solid var(--gold);
  color: #fff;
  padding-block: 1.75rem 1.5rem;
}

.site-header a {
  color: #fff;
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.site-header h1 {
  margin: 0.35rem 0 0.25rem;
  font-size: 1.85rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-header p.tagline {
  margin: 0;
  color: #cfdaea;
  font-size: 1rem;
}

main {
  padding-block: 2.25rem 1rem;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--rule);
  padding-block: 1.5rem 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
}

/* ---------- Typography ---------- */

h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.4rem;
  line-height: 1.3;
  color: var(--navy);
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--rule);
}

h3 {
  margin: 1.9rem 0 0.5rem;
  font-size: 1.08rem;
  line-height: 1.4;
  color: var(--navy-deep);
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--ink);
}

strong {
  font-weight: 600;
}

a {
  color: var(--navy-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--gold);
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.5rem;
}

li > ul,
li > ol {
  margin-top: 0.5rem;
}

code,
kbd {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  font-size: 0.9em;
  background: var(--tint);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.05em 0.32em;
}

.small {
  font-size: 0.9rem;
  color: var(--muted);
}

pre {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  background: var(--tint);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--navy-soft);
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.55;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

blockquote {
  margin: 1.25rem 0;
  padding: 0.15rem 0 0.15rem 1.1rem;
  border-left: 4px solid var(--rule);
  color: var(--muted);
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* ---------- Components ---------- */

.cta {
  display: inline-block;
  margin: 0.5rem 0 1rem;
  padding: 0.85rem 1.5rem;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  border-bottom: 3px solid var(--gold);
}

.cta:hover,
.cta:focus {
  background: var(--navy-deep);
  color: #fff;
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  background: var(--tint);
  border-left: 4px solid var(--gold);
}

.callout p:last-child,
.callout ul:last-child,
.callout ol:last-child {
  margin-bottom: 0;
}

.callout h2,
.callout h3 {
  margin-top: 0;
  border: 0;
}

.callout.good {
  border-left-color: #2f7a4d;
}

.callout.bad {
  border-left-color: #a8402f;
}

.outcome {
  display: block;
  margin-top: 0.35rem;
  color: var(--navy-deep);
}

/* "Not yet published" marker in the topics table */
.pending {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  white-space: nowrap;
}

/* Stacked links inside a table cell */
ul.links {
  margin: 0;
  padding: 0;
  list-style: none;
}

ul.links li {
  margin: 0 0 0.35rem;
}

ul.links li:last-child {
  margin-bottom: 0;
}

.breadcrumb {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.verified {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 30rem;
  font-size: 0.96rem;
}

caption {
  text-align: left;
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--rule);
}

thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  border-bottom: 0;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) {
  background: var(--tint);
}

/* Phase strip — the six deliveries at a glance */
.phases {
  list-style: none;
  margin: 1.25rem 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.phases li {
  margin: 0;
  padding: 0.7rem 0.85rem;
  background: var(--tint);
  border-left: 3px solid var(--gold);
  border-radius: 3px;
}

.phase-no {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.phase-what {
  display: block;
  font-weight: 600;
  color: var(--navy-deep);
  line-height: 1.4;
}

.phase-weight {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Compact week list */
.weeks {
  list-style: none;
  margin: 1.25rem 0 1rem;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.weeks li {
  margin: 0;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.75rem;
}

.weeks .wk {
  flex: 0 0 4.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.weeks .topic {
  flex: 1 1 13rem;
  min-width: 0;
}

/* "Being written" marker on placeholder pages */
.wip {
  margin: 1.25rem 0 1.5rem;
  padding: 0.85rem 1.1rem;
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  font-size: 0.95rem;
  color: var(--navy-deep);
}

.wip p {
  margin: 0;
}

.wip p + p {
  margin-top: 0.5rem;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 46rem) {
  .phases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 30rem) {
  body {
    font-size: 16px;
  }
  .phases {
    grid-template-columns: 1fr;
  }
  .weeks .wk {
    flex-basis: 100%;
  }
  .site-header h1 {
    font-size: 1.5rem;
  }
  h2 {
    font-size: 1.25rem;
  }
  .cta {
    display: block;
    text-align: center;
  }
}

/* ---------- Print ---------- */

@media print {
  body {
    font-size: 11pt;
    line-height: 1.5;
    color: #000;
  }
  .site-header {
    background: #fff;
    color: #000;
    border-bottom: 2px solid #000;
    padding-block: 0 0.5rem;
  }
  .site-header h1,
  .site-header p.tagline,
  .eyebrow {
    color: #000;
  }
  .wrap {
    max-width: none;
    padding: 0;
  }
  .cta,
  .breadcrumb {
    display: none;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
  .callout {
    border-left: 3px solid #000;
    background: #fff;
  }
  .table-wrap {
    overflow: visible;
    border: 1px solid #000;
  }
  table {
    min-width: 0;
  }
  thead th {
    background: #fff;
    color: #000;
    border-bottom: 1px solid #000;
  }
  tbody tr:nth-child(even) {
    background: #fff;
  }
  h2,
  h3 {
    page-break-after: avoid;
    color: #000;
  }
  tr,
  .callout {
    page-break-inside: avoid;
  }
}

/* ---- Screenshots -------------------------------------------------------- */
/* Used in the reference guides. Full width of the column, never wider, so the
   page still works at phone width. */

figure {
  margin: 1.4rem 0;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #d0d7de;
  border-radius: 6px;
}

figcaption {
  margin-top: 0.45rem;
  font-size: 0.88rem;
  color: #57606a;
}
