/* 23CSE311 course website. Design per project/Style_Brief.md.
   Two families only, light theme only, colors only from the brief tables. */

@font-face { font-family: 'Newsreader'; src: url('/fonts/Newsreader-normal-400-600.woff2') format('woff2'); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/fonts/Newsreader-italic-400-600.woff2') format('woff2'); font-weight: 400 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/IBMPlexMono-normal-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/IBMPlexMono-normal-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --serif: 'Newsreader','Iowan Old Style','Palatino Linotype',Georgia,serif;
  --mono: 'IBM Plex Mono',ui-monospace,Menlo,Consolas,monospace;
  --bg: #FBFBF9;
  --surface: #FFFFFF;
  --ink: #16161A;
  --ink2: #4F4F57;
  --ink3: #74747C;
  --rule: #D6D6CF;
  --struct: #D9D7CF;
  --structbd: #4A4A4F;
  --focus: #185FA5;
  /* Accents, all from the tone tables. Used sparingly. */
  --navy: #0C447C;
  --blue-bd: #185FA5;
  --blue-soft: #E6F1FB;
  --coral-bd: #993C1D;
}

/* Tone ramps: fill, soft, border, text. Components read only the --c-* variables. */
.t-blue, .tone-blue { --c-fill: #B5D4F4; --c-soft: #E6F1FB; --c-bd: #185FA5; --c-fg: #0C447C; }
.t-red, .tone-red { --c-fill: #F7C1C1; --c-soft: #FCEBEB; --c-bd: #A32D2D; --c-fg: #791F1F; }
.t-amber, .tone-amber { --c-fill: #FAC775; --c-soft: #FAEEDA; --c-bd: #854F0B; --c-fg: #412402; }
.t-green, .tone-green { --c-fill: #C0DD97; --c-soft: #EAF3DE; --c-bd: #3B6D11; --c-fg: #173404; }
.t-teal, .tone-teal { --c-fill: #9FE1CB; --c-soft: #E1F5EE; --c-bd: #0F6E56; --c-fg: #04342C; }
.t-coral, .tone-coral { --c-fill: #F5C4B3; --c-soft: #FAECE7; --c-bd: #993C1D; --c-fg: #712B13; }
.t-gray, .tone-gray { --c-fill: #D3D1C7; --c-soft: #F1EFE8; --c-bd: #5F5E5A; --c-fg: #2C2C2A; }
.t-purple, .tone-purple { --c-fill: #CECBF6; --c-soft: #EEEDFE; --c-bd: #534AB7; --c-fg: #26215C; }
.t-navy, .tone-navy { --c-fill: #0C447C; --c-soft: #0C447C; --c-bd: #042C53; --c-fg: #FFFFFF; }
.t-blue-s, .tone-blue-s { --c-fill: #E6F1FB; --c-soft: #E6F1FB; --c-bd: #185FA5; --c-fg: #0C447C; }
.t-gray-s, .tone-gray-s { --c-fill: #F1EFE8; --c-soft: #F1EFE8; --c-bd: #5F5E5A; --c-fg: #2C2C2A; }
.t-red-s, .tone-red-s { --c-fill: #FCEBEB; --c-soft: #FCEBEB; --c-bd: #A32D2D; --c-fg: #791F1F; }
.t-green-s, .tone-green-s { --c-fill: #EAF3DE; --c-soft: #EAF3DE; --c-bd: #3B6D11; --c-fg: #173404; }
.t-purple-s, .tone-purple-s { --c-fill: #EEEDFE; --c-soft: #EEEDFE; --c-bd: #534AB7; --c-fg: #26215C; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--serif); font-size: 17px; line-height: 1.6; font-weight: 400;
  hyphens: manual; overflow-wrap: break-word;
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 520px) { .wrap { padding: 0 16px; } }

a { color: var(--ink); text-decoration-color: var(--blue-bd); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 8px 12px; border: 1px solid var(--ink); z-index: 10; }
.skip:focus { left: 16px; top: 8px; }

/* Masthead */
.masthead { border-top: 3px solid var(--navy); border-bottom: 1px solid var(--ink); background: var(--bg); }
.mast-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; text-decoration: none; padding: 4px 0; }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0 -8px; }
.site-nav a { font-size: 14px; color: var(--ink2); text-decoration: none; padding: 3px 8px; border: 1px solid transparent; border-radius: 2px; white-space: nowrap; }
.site-nav a:hover { border-color: var(--ink2); color: var(--ink); }
.site-nav a[aria-current] { border-color: var(--blue-bd); color: var(--navy); background: var(--blue-soft); }
.site-nav .acct { color: var(--ink); border-color: var(--ink2); margin-left: 6px; }
.site-nav .n { font-family: var(--mono); font-size: 12px; color: var(--ink3); margin-right: 5px; }

/* Headings and text */
main { padding-top: 44px; padding-bottom: 56px; }
.kicker { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink2); margin: 0 0 14px; }
.kicker .sep { color: var(--ink3); margin: 0 6px; }
h1 { font-size: clamp(36px, 6.4vw, 60px); font-weight: 500; line-height: 1.04; letter-spacing: -0.015em; margin: 0 0 18px; text-wrap: balance; }
h2 { font-size: 24px; font-weight: 500; line-height: 1.2; margin: 52px 0 14px; padding-top: 14px; border-top: 1px solid var(--ink); }
h3 { font-size: 19px; font-weight: 500; line-height: 1.3; margin: 30px 0 8px; }
.deck { font-size: clamp(19px, 2.6vw, 23px); font-style: italic; color: var(--ink2); max-width: 46ch; margin: 0 0 26px; line-height: 1.35; }
.intro p { font-size: 19px; line-height: 1.55; color: var(--ink2); max-width: 62ch; margin: 0 0 16px; }
.intro.warm { border: 1px solid #0F6E56; background: #E1F5EE; border-radius: 3px; padding: 16px 20px 4px; max-width: 70ch; margin: 0 0 22px; }
.intro.warm p { color: #04342C; max-width: none; }
.intro.cap p:first-child::first-letter { font-size: 3.1em; font-weight: 500; float: left; line-height: 0.82; padding: 6px 8px 0 0; color: var(--coral-bd); }
p { margin: 0 0 14px; }
.prose { max-width: 70ch; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.small { font-size: 15px; color: var(--ink2); }
.mono { font-family: var(--mono); font-size: 0.86em; }
.label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink2); }
strong, b { font-weight: 600; }

/* Contents list */
.part-label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink2); margin: 40px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.contents { list-style: none; margin: 0; padding: 0; }
.contents li { border-bottom: 1px solid var(--rule); }
.contents a { display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 14px; align-items: baseline; padding: 14px 0; text-decoration: none; }
.contents .num { font-family: var(--mono); font-size: 13px; color: var(--ink3); }
.contents .ttl { font-size: 22px; line-height: 1.25; font-weight: 500; }
.contents .desc { grid-column: 2; font-size: 16px; color: var(--ink2); line-height: 1.45; }
.contents .go { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink2); grid-row: 1; grid-column: 3; }
.contents a:hover .ttl { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.contents.compact .ttl { font-size: 19px; }
.contents.compact a { padding: 11px 0; }

/* Tags and tinted boxes */
.tag { display: inline-block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.5; padding: 0 6px; border: 1px solid var(--c-bd); background: var(--c-soft); color: var(--c-fg); border-radius: 2px; white-space: nowrap; vertical-align: 2px; }
.box { border: 1px solid var(--c-bd); background: var(--c-soft); color: var(--c-fg); border-radius: 3px; padding: 12px 16px; margin: 0 0 18px; max-width: 70ch; }
.box p:last-child { margin-bottom: 0; }
.now { border-left: 4px solid var(--c-bd); background: var(--c-soft); color: var(--c-fg); padding: 12px 16px; margin: 0 0 30px; max-width: 70ch; }
.now p { margin: 0 0 4px; }
.now p:last-child { margin: 0; }

/* Tables */
.tbl-wrap { overflow-x: auto; margin: 0 0 22px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--surface); }
.tbl-wrap:focus-visible { outline-offset: 3px; }
table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--rule); }
tr:last-child > td, tr:last-child > th { border-bottom: 0; }
thead th { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; color: var(--ink2); background: #F1EFE8; border-bottom: 1px solid var(--structbd); white-space: nowrap; }
tbody th { font-weight: 500; }
td.num, th.num { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
td.r, th.r { text-align: right; }
td.nw { white-space: nowrap; }
tr.total > * { border-top: 1px solid var(--structbd); font-weight: 600; }
tr.event > td { background: var(--c-fill); color: var(--c-fg); border-bottom-color: var(--c-bd); }
tr.event .ev-name { font-weight: 600; letter-spacing: 0.02em; }
tr.current > * { background: var(--c-soft); }
tr.current > *:first-child { box-shadow: inset 4px 0 0 var(--c-bd); }
.matrix td, .matrix th { text-align: center; padding: 8px 6px; font-family: var(--mono); font-size: 14px; min-width: 46px; }
.matrix tbody th { font-family: var(--mono); }

/* Definition grid on session pages */
.meta { display: grid; grid-template-columns: 190px 1fr; gap: 0; margin: 0 0 8px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); max-width: 820px; }
.meta dt, .meta dd { padding: 10px 0; margin: 0; border-bottom: 1px solid var(--rule); }
.meta dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink2); padding-top: 14px; padding-right: 16px; }
.meta dt:last-of-type, .meta dd:last-of-type { border-bottom: 0; }
.meta ul { margin: 0; padding: 0; list-style: none; }
.meta li + li { margin-top: 6px; }
@media (max-width: 600px) {
  .meta { grid-template-columns: 1fr; }
  .meta dt { border-bottom: 0; padding-bottom: 0; }
  .meta dd { padding-top: 2px; }
}

/* Reference lists */
.refs { list-style: none; padding: 0; margin: 0 0 18px; max-width: 76ch; }
.refs li { display: grid; grid-template-columns: 52px 1fr; gap: 0 8px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.refs .k { font-family: var(--mono); font-size: 13px; color: var(--ink3); padding-top: 3px; }
cite { font-style: italic; }

/* Sprint calendar */
.sprint { margin: 0 0 20px; }
.sprint-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 640px; margin-bottom: 6px; }
.day { border: 1px solid var(--rule); background: var(--surface); border-radius: 2px; padding: 6px 4px 7px; text-align: center; line-height: 1.25; }
.day .n { display: block; font-family: var(--mono); font-size: 14px; font-weight: 500; }
.day .d { display: block; font-size: 12px; color: var(--ink2); }
.day.off { background: var(--c-soft); border-color: var(--c-bd); color: var(--c-fg); }
.day.off .d { color: var(--c-fg); }
.day.pad { border: 0; background: none; }
.sprint-label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink2); margin: 16px 0 8px; }
.pause { max-width: 640px; border-top: 1px dashed var(--structbd); border-bottom: 1px dashed var(--structbd); color: var(--ink2); font-size: 15px; font-style: italic; padding: 8px 0; margin: 14px 0; text-align: center; }
@media (max-width: 420px) { .day .d { font-size: 11px; } .sprint-row { gap: 4px; } }

/* Forms */
.form { max-width: 440px; margin: 0 0 8px; }
.field { margin: 0 0 18px; }
.field label { display: block; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink2); margin-bottom: 6px; }
.field input { display: block; width: 100%; height: 34px; padding: 0 10px; font-family: var(--mono); font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--structbd); border-radius: 2px; }
.field .hint { font-size: 14px; color: var(--ink2); margin: 6px 0 0; min-height: 1px; }
.btn { font-family: var(--serif); font-size: 15px; letter-spacing: 0.04em; color: var(--ink); background: var(--surface); border: 1px solid var(--ink); border-radius: 2px; padding: 7px 18px; margin: 6px 4px; cursor: pointer; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.8; cursor: default; }
.msg { border: 1px solid var(--c-bd); background: var(--c-soft); color: var(--c-fg); border-radius: 3px; padding: 10px 14px; margin: 0 0 20px; max-width: 560px; }
.form-links { font-size: 15px; color: var(--ink2); margin: 24px 0 0; }
.form-links .sep { color: var(--ink3); margin: 0 8px; }
.form-actions { margin: 22px 0 14px; }
[hidden] { display: none !important; }

/* Signed in screens */
.field select, .field textarea { display: block; width: 100%; font-family: var(--mono); font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--structbd); border-radius: 2px; }
.field select { height: 34px; padding: 0 8px; }
.field textarea { padding: 8px 10px; min-height: 120px; resize: vertical; line-height: 1.5; }
.field input[type=file] { height: auto; padding: 6px 8px; }
.field.narrow { max-width: 260px; }
.form.wide { max-width: 640px; }
.counter { font-family: var(--mono); font-size: 12px; color: var(--ink2); text-align: right; margin: 4px 0 0; }
a.btn { display: inline-block; text-decoration: none; }
.btn.small { font-size: 13px; padding: 2px 10px; margin: 3px 6px 3px 3px; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--ink); }
td select { height: 30px; font-family: var(--mono); font-size: 13px; background: var(--surface); border: 1px solid var(--structbd); border-radius: 2px; margin-right: 4px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.tab { font-family: var(--serif); font-size: 15px; padding: 4px 12px; color: var(--ink2); background: var(--surface); border: 1px solid var(--rule); border-radius: 2px; cursor: pointer; }
.tab[aria-pressed=true] { color: var(--navy); border-color: var(--blue-bd); background: var(--blue-soft); box-shadow: inset 0 -2px 0 var(--blue-bd); }
.ann-list { margin: 0 0 8px; border-top: 1px solid var(--ink); max-width: 70ch; }
.ann { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.ann h3 { margin: 4px 0 6px; }
.ann-meta { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink2); margin: 0; }
.ann-meta .sep { color: var(--ink3); margin: 0 6px; }
.ann-body { white-space: pre-line; overflow-wrap: anywhere; }
.ann-actions { margin: 8px 0 0; }
.secs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 4px; }
.secs label { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; white-space: nowrap; }
.secs .tag { margin-left: 2px; }
.row-actions { margin: 2px 0 0; }
#session-files .tbl-wrap { margin-top: 8px; }

/* Staff cards */
.people { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 28px 24px; }
.person { border-top: 1px solid var(--ink); padding-top: 14px; }
.portrait { aspect-ratio: 4 / 5; width: 100%; max-width: 240px; background: var(--c-soft, var(--struct)); border: 1px solid var(--c-bd, var(--structbd)); border-radius: 3px; display: grid; place-items: center; overflow: hidden; margin-bottom: 12px; }
.portrait .ini { font-size: 46px; font-weight: 500; letter-spacing: 0.06em; color: var(--c-fg, var(--ink2)); line-height: 1; }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person .name { font-size: 20px; font-weight: 500; line-height: 1.25; margin: 0 0 2px; }
.person .role { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink2); margin: 0 0 6px; }
.person .line { font-size: 15px; margin: 0; }
.person .mail { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 520px) { .people { grid-template-columns: 1fr 1fr; gap: 22px 14px; } .portrait .ini { font-size: 36px; } .person .name { font-size: 18px; } }

/* Policy list */
.policy { list-style: none; counter-reset: p; padding: 0; margin: 0 0 20px; max-width: 76ch; border-top: 1px solid var(--ink); }
.policy li { counter-increment: p; display: grid; grid-template-columns: 44px 1fr; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.policy li::before { content: counter(p, decimal-leading-zero); font-family: var(--mono); font-size: 13px; color: var(--ink3); padding-top: 4px; }
.policy h3 { margin: 0 0 4px; }
.policy p { margin: 0; }

/* Pager and footer */
.pager { border-top: 1px solid var(--ink); margin-top: 8px; }
.pager.in-main { margin-top: 48px; }
.pager.in-main .pager-in { padding-bottom: 0; }
.pager-in { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.pager a { text-decoration: none; display: block; }
.pager .next { text-align: right; grid-column: 2; }
.pager .lbl { display: block; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink2); }
.pager .ttl { font-size: 19px; font-weight: 500; line-height: 1.3; }
.pager a:hover .ttl { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.foot { border-top: 3px solid var(--navy); }
.foot-in { padding-top: 16px; padding-bottom: 40px; font-size: 14px; color: var(--ink2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.foot a { color: var(--ink2); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  main { padding-top: 30px; }
  h2 { margin-top: 40px; }
  .contents a { grid-template-columns: 34px 1fr; }
  .contents .go { display: none; }
  .contents .ttl { font-size: 20px; }
  th, td { padding: 8px 9px; }
  .pager-in { grid-template-columns: 1fr; gap: 12px; }
  .pager .next { text-align: left; grid-column: 1; }
}
@media (max-width: 760px) { .tbl-wrap.wide table { min-width: 700px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .masthead nav, .pager, .skip { display: none; } body { background: #FFFFFF; } }
