@import url("/penn-theme.css");

/* Adapted from Nam’s PAPI Final Deliverable template, retrieved 2026-11-13. */

/* Layout: one long module page. Header block with module metadata, then six numbered sections, each a left rail plus a grid of fill-in boxes. Content is driven by one MODULE object so each new AI project swaps data, not markup. */
/* Penn palette: Penn Blue #011F5B, Penn Red #990000; neutrals and accents from the Penn Libraries design system */
:root {
  --bg: var(--penn-bg);
  --surface: var(--penn-surface);
  --ink: var(--penn-ink);
  --muted: var(--penn-muted);
  --line: var(--penn-line);
  --navy: var(--penn-blue);
  --red: var(--penn-red);
  --slot: #eeeef4;
  --chip: #d4e4f2;
  --chipInk: #0e5696;
  --hero: var(--penn-hero);
  --onHero: #ffffff;
  --onHeroMuted: #d4e4f2;
  --heroLine: rgba(212, 228, 242, 0.28);
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08132e;
    --surface: #0f1e44;
    --ink: #eeeef4;
    --muted: #a9b2c6;
    --line: #22335e;
    --navy: #d4e4f2;
    --red: #e2696b;
    --slot: #15275a;
    --chip: #173468;
    --chipInk: #d4e4f2;
    --hero: var(--penn-hero);
    --onHero: #ffffff;
    --onHeroMuted: #d4e4f2;
    --heroLine: rgba(212, 228, 242, 0.24);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #08132e;
  --surface: #0f1e44;
  --ink: #eeeef4;
  --muted: #a9b2c6;
  --line: #22335e;
  --navy: #d4e4f2;
  --red: #e2696b;
  --slot: #15275a;
  --chip: #173468;
  --chipInk: #d4e4f2;
  --hero: var(--penn-hero);
  --onHero: #ffffff;
  --onHeroMuted: #d4e4f2;
  --heroLine: rgba(212, 228, 242, 0.24);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--hero);
}
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  text-wrap: balance;
  margin: 0;
  line-height: 1.15;
}
p,
ul,
dl {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

header.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 9;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
header.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand b {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--surface);
  background: var(--navy);
  padding: 2px 7px;
}
.brand span {
  font-family: var(--display);
  font-size: 18px;
}
nav.links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
nav.links a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
nav.links a:hover {
  color: var(--ink);
}

/* brand panel */
.topbar {
  background: var(--hero);
  border-bottom: 1px solid var(--heroLine);
}
.topbar nav.links a {
  color: var(--onHeroMuted);
}
.topbar nav.links a:hover {
  color: var(--onHero);
}
.topbar nav.links a {
  cursor: pointer;
}
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--heroLine);
}
.subnav {
  padding-block: 12px;
}
.tabs a {
  all: unset;
  cursor: pointer;
  padding: 10px 14px 9px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--onHeroMuted);
  border-bottom: 3px solid transparent;
}
.tabs a:hover {
  color: var(--onHero);
}
.tabs a[aria-current="page"] {
  color: var(--onHero);
  border-bottom-color: var(--red);
}
.tabs a:focus-visible {
  outline: 2px solid var(--onHero);
  outline-offset: -2px;
}
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px 24px;
  flex-wrap: wrap;
  padding-block: 14px;
}
.brandset {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.brand {
  display: block;
  line-height: 0;
}
.brand img {
  width: 190px;
  max-width: 100%;
  height: auto;
}
.papi {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 18px;
  border-left: 1px solid var(--heroLine);
  font-family: var(--display);
  font-size: 17px;
  color: var(--onHero);
}
.papi b {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #ffffff;
  background: var(--red);
  padding: 2px 7px;
}

/* module header */
.meta {
  background: var(--hero);
  color: var(--onHero);
  padding-block: 40px 40px;
  border-bottom: 4px solid var(--red);
}
.meta .wrap {
  display: grid;
  gap: 16px;
}
.meta .label {
  color: var(--onHeroMuted);
}
.meta h1 {
  font-size: clamp(34px, 4.8vw, 52px);
  letter-spacing: -0.01em;
}
.meta .summary {
  font-size: 18px;
  color: var(--onHeroMuted);
  max-width: 60ch;
}
.meta .by {
  font-size: 15px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--heroLine);
  margin-top: 8px;
}
.facts > div {
  padding: 12px 14px;
  display: grid;
  gap: 2px;
  border-right: 1px solid var(--heroLine);
  min-width: 0;
}
.facts > div:last-child {
  border-right: 0;
}
.facts .v {
  font-size: 15px;
  color: var(--onHero);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tags span {
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(212, 228, 242, 0.14);
  color: var(--onHero);
  border: 1px solid var(--heroLine);
  padding: 3px 9px;
}

/* placeholder text */
.ph {
  color: var(--muted);
  font-style: italic;
}

/* sections */
section.band {
  border-bottom: 1px solid var(--line);
  padding-block: 44px;
  scroll-margin-top: 64px;
}
section.band > .wrap {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
}
.rail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rail .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--red);
}
.rail h2 {
  font-size: 28px;
  color: var(--navy);
}
.box {
  border-top: 2px solid var(--navy);
}
.boxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}
.box {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
.box.wide {
  grid-column: 1/-1;
}
.box h3 {
  font-size: 20px;
}

/* prompt list */
.prompts {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}
.prompts li {
  display: grid;
  gap: 4px;
}
.prompts .q {
  font-size: 13.5px;
  color: var(--muted);
}
.prompts .ans {
  font-size: 15.5px;
  color: var(--ink);
  border-left: 2px solid var(--red);
  padding-left: 10px;
}
.draft {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chipInk);
  background: var(--chip);
  padding: 1px 6px;
  vertical-align: middle;
}
.pv {
  font-size: 14.5px;
  color: var(--ink);
}
.tbl td span {
  font-size: 14px;
}
.tbl table {
  min-width: 960px;
}
.tbl td.rowh {
  white-space: normal;
  min-width: 150px;
}
.panel {
  align-content: start;
}
.field {
  min-height: 34px;
  border: 1px dashed var(--line);
  background: repeating-linear-gradient(
    135deg,
    var(--slot) 0 8px,
    transparent 8px 16px
  );
}

/* chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips span {
  font-size: 14px;
  border: 1px dashed var(--line);
  padding: 5px 11px;
  color: var(--muted);
}
.chips span.ai {
  border-color: var(--red);
  color: var(--red);
}

/* personas */
.personas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.persona {
  border: 1px dashed var(--line);
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.persona .who {
  display: flex;
  gap: 10px;
  align-items: center;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px dashed var(--line);
  background: var(--slot);
  flex: none;
}
.persona dl {
  display: grid;
  gap: 6px;
}
.persona dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.persona dd {
  margin: 0;
}
.persona .field {
  min-height: 28px;
}

/* tables */
.tbl {
  overflow-x: auto;
  border: 1px solid var(--line);
}
.tbl table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.tbl th,
.tbl td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}
.tbl th:last-child,
.tbl td:last-child {
  border-right: 0;
}
.tbl tr:last-child td {
  border-bottom: 0;
}
.tbl th {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
}
.tbl td.rowh {
  font-weight: 500;
  white-space: nowrap;
}
.tbl .field {
  min-height: 40px;
  min-width: 96px;
}

/* statement */
.stmt {
  font-family: var(--display);
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.4;
}
.blank {
  display: inline-block;
  min-width: 9ch;
  border-bottom: 2px solid var(--red);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.55em;
  vertical-align: middle;
  padding: 0 4px;
}

/* compare */
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.compare > div {
  border: 1px dashed var(--line);
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.compare ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

/* storyboard */
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.panel {
  border: 1px solid var(--line);
  display: grid;
  margin: 0;
}
.panel .frame {
  aspect-ratio: 4/3;
  max-width: 100%;
  background: repeating-linear-gradient(
    135deg,
    var(--slot) 0 12px,
    transparent 12px 24px
  );
  border-bottom: 1px solid var(--line);
  position: relative;
}
.panel .pn {
  position: absolute;
  top: 8px;
  left: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red);
}
.panel figcaption {
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  font-size: 14px;
}
.panel figcaption .ph {
  font-size: 13px;
}

/* using */
.using .boxes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
footer {
  padding-block: 24px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  section.band > .wrap {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .rail {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
  }
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .facts > div:nth-child(2) {
    border-right: 0;
  }
  .facts > div:nth-child(n + 3) {
    border-top: 1px solid var(--heroLine);
  }
  .personas,
  .board,
  .using .boxes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .boxes,
  .personas,
  .board,
  .compare,
  .using .boxes,
  .facts {
    grid-template-columns: 1fr;
  }
  .facts > div {
    border-right: 0;
  }
  .facts > div + div {
    border-top: 1px solid var(--heroLine);
  }
  .papi {
    padding-left: 0;
    border-left: 0;
  }
}

/* Course documentation: preserve the supplied Penn layout and improve reading/navigation. */
[hidden] {
  display: none !important;
}
a {
  color: var(--navy);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
button {
  font: inherit;
}
.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  background: white;
  padding: 12px;
  z-index: 30;
}
.skip:focus {
  top: 8px;
}
.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;
}
.utility {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.9375rem;
}
.utility a {
  color: var(--onHeroMuted);
}
.utility button {
  border: 1px solid var(--heroLine);
  background: transparent;
  color: white;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.utility button:hover {
  background: rgba(255, 255, 255, 0.12);
}
.meta {
  padding-block: 36px;
}
.meta h1 {
  font-size: clamp(36px, 4.6vw, 54px);
}
.hero-actions {
  display: flex;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding-top: 6px;
}
.hero-actions a {
  color: white;
  font-size: 1rem;
}
.hero-actions a:first-child {
  font-weight: 600;
}
.section-nav {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 5px #011f5b08;
}
.section-nav .wrap {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-block: 15px;
}
.section-nav a {
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}
.section-nav a:hover {
  color: var(--red);
}
section.band {
  scroll-margin-top: 68px;
}
.box {
  gap: 15px;
  padding: 22px;
}
.box h3 {
  font-size: 23px;
}
h4 {
  font-size: 1rem;
  line-height: 1.4;
  margin: 0 0 7px;
  font-weight: 600;
}
.box p,
.reading-list,
.details {
  font-size: 1rem;
  line-height: 1.65;
}
.reading-list {
  padding-left: 20px;
  display: grid;
  gap: 10px;
}
.details {
  display: grid;
  gap: 17px;
}
.details dt {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.details dd {
  margin: 0;
  border-left: 2px solid var(--red);
  padding-left: 11px;
}
.box .stmt {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.5;
}
.problem-detail {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: grid;
  gap: 10px;
}
.problem-detail h4:not(:first-child) {
  margin-top: 12px;
}
.action-links {
  display: flex;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding-top: 8px;
  font-size: 1rem;
}
.pending {
  font-size: 0.875rem;
  padding: 5px 9px;
  background: #eeeef4;
  color: var(--muted);
}
.box .evidence-note {
  font-size: 0.9375rem;
  color: var(--muted);
  border-left: 2px solid #a6b5cf;
  padding-left: 12px;
}
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.scenario-grid > div + div {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.tbl table {
  min-width: 660px;
  table-layout: fixed;
}
.tbl th,
.tbl td {
  padding: 13px;
  overflow-wrap: break-word;
  font-size: 1rem;
  line-height: 1.55;
}
.tbl .table-two-columns {
  min-width: 0;
}
.tbl tbody th {
  font-family: var(--body);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
}
.tbl thead th {
  font-size: 0.875rem;
}
.compare > div {
  border: 0;
  border-top: 2px solid var(--line);
  padding: 16px 0 0;
}
.compare > div:last-child {
  border-color: var(--red);
}
.compare ol {
  color: var(--ink);
  font-size: 1rem;
  gap: 10px;
  padding-left: 20px;
}
.story-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}
.story-steps li {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.step-number {
  display: block;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.875rem;
  margin-bottom: 9px;
}
.source-links {
  display: grid;
  gap: 12px;
  font-size: 1rem;
}
.using .boxes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
[role="tabpanel"]:focus {
  outline: none;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
@media (max-width: 900px) {
  .scenario-grid {
    grid-template-columns: 1fr;
  }
  .scenario-grid > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 16px 0 0;
  }
  .section-nav .wrap {
    gap: 18px;
  }
  .story-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .bar {
    gap: 18px;
  }
  .brand img {
    width: 160px;
  }
  .brandset {
    gap: 12px;
  }
  .papi {
    font-size: 16px;
  }
  .utility {
    width: 100%;
    justify-content: space-between;
  }
  .tabs {
    flex-wrap: nowrap;
  }
  .tabs a {
    flex: 1;
    font-size: 0.9375rem;
    padding-inline: 10px;
  }
  .meta {
    padding-block: 26px;
  }
  .meta .summary {
    font-size: 17px;
  }
  .facts {
    grid-template-columns: 1fr 1fr;
  }
  .facts > div {
    padding: 10px;
  }
  .facts > div:nth-child(even) {
    border-left: 1px solid var(--heroLine);
  }
  .facts > div:nth-child(2) {
    border-top: 0;
  }
  .facts .v {
    font-size: 0.9375rem;
  }
  .facts .label {
    font-size: 0.8125rem;
  }
  .box {
    padding: 18px;
  }
  .using .boxes,
  .story-steps {
    grid-template-columns: 1fr;
  }
  .band .rail h2 {
    font-size: 27px;
  }
  .tbl .table-two-columns th,
  .tbl .table-two-columns td {
    padding: 10px;
  }
  .hero-actions {
    gap: 14px;
  }
  .box .stmt {
    font-size: 22px;
  }
}
@media print {
  html {
    scroll-behavior: auto;
  }
  .topbar,
  .section-nav,
  .skip,
  footer,
  #print-page {
    display: none !important;
  }
  .meta {
    background: white;
    color: #011f5b;
    border-color: #990000;
    padding: 0 0 18px;
  }
  .meta .label,
  .meta .summary,
  .meta .by,
  .facts .v {
    color: #2d3545;
  }
  .facts,
  .facts > div {
    border-color: #ccc;
  }
  .hero-actions a {
    color: #011f5b;
  }
  body {
    background: white;
    font-size: 11pt;
  }
  .wrap {
    max-width: none;
    padding: 0;
  }
  .band {
    padding: 20px 0 !important;
    scroll-margin: 0;
  }
  .band > .wrap {
    display: block !important;
  }
  .rail {
    margin-bottom: 16px;
  }
  .boxes,
  .using .boxes,
  .compare {
    display: block;
  }
  .box {
    border: 0;
    border-top: 1px solid #ccc;
    padding: 14px 0;
    margin-bottom: 8px;
    break-inside: auto;
  }
  .box h3,
  h2,
  h4 {
    break-after: avoid;
  }
  .tbl {
    overflow: visible;
  }
  .tbl table {
    min-width: 0;
    font-size: 10pt;
  }
  .tbl th,
  .tbl td,
  .tbl thead th {
    font-size: 10pt;
    padding: 6px;
  }
  .scenario-grid,
  .story-steps {
    display: block;
  }
  .story-steps li {
    margin-bottom: 12px;
  }
  .meta h1 {
    font-size: 32pt;
  }
  a {
    color: #011f5b;
  }
  article[hidden] {
    display: none !important;
  }
  @page {
    size: A4;
    margin: 16mm;
  }
}
