:root {
  --red: #b3122b;
  --red-deep: #860d20;
  --ink: #1c2329;
  --slate: #57606a;
  --mist: #f3f4f5;
  --white: #ffffff;
  --line: #d5d9dd;
  --brass: #8a6a1f;
  --display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 68ch;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
}

a { color: var(--red-deep); text-underline-offset: 0.15em; }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

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

/* Masthead */
.masthead { background: var(--red); color: var(--white); border-bottom: 6px solid var(--ink); }
.masthead .wrap { padding-top: 2.25rem; padding-bottom: 2rem; }
.masthead a { color: inherit; text-decoration: none; }
.masthead h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0.005em;
  margin: 0 0 0.75rem;
  max-width: 18ch;
}
.masthead p { margin: 0; max-width: 60ch; font-size: 1.0625rem; }
.masthead .byline { margin-top: 0.9rem; font-family: var(--display); font-weight: 500; font-size: 1.125rem; letter-spacing: 0.02em; }
.masthead.compact .wrap { padding-top: 1.1rem; padding-bottom: 1rem; }
.masthead .site-title { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.2; margin: 0; max-width: none; }

main.wrap { padding-top: 2rem; padding-bottom: 3rem; }

.status { color: var(--slate); font-style: italic; }
.error { color: var(--red-deep); font-weight: 600; }

/* Case list: a calendar column on the left, the case on the right */
.cases { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.case {
  display: grid;
  grid-template-columns: 11rem 1fr;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 6px solid var(--red);
}
.case-date {
  padding: 1.4rem 1rem 1.25rem 1.25rem;
  border-right: 1px solid var(--line);
  font-family: var(--display);
  color: var(--ink);
}
.case-date .argued { display: block; font-size: 0.9375rem; font-weight: 500; color: var(--slate); }
.case-date .day { display: block; font-size: 1.7rem; font-weight: 600; line-height: 1.15; margin-top: 0.15rem; white-space: nowrap; }
.case-date .year { display: block; font-size: 1.25rem; font-weight: 500; color: var(--slate); }
.case-body { padding: 1.3rem 1.5rem 1.4rem; min-width: 0; }
.case-body h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0;
}
.case-body h3 a { color: var(--ink); text-decoration: none; }
.case-body h3 a:hover { color: var(--red); text-decoration: underline; }
.docket { margin: 0.3rem 0 0; font-size: 1rem; color: var(--slate); }
.summary { margin: 0.85rem 0 1.1rem; max-width: var(--measure); }

.links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem; margin: 0; padding: 0; list-style: none; font-size: 1rem; }
.button {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
  padding: 0.5rem 1rem;
  border: 0;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--red-deep); color: var(--white); }
.button.quiet { background: var(--white); color: var(--ink); border: 1px solid var(--ink); }
.button.quiet:hover { background: var(--mist); color: var(--ink); }
.pending { color: var(--slate); }
.issued { font-weight: 600; }

/* Case page */
.case-head { background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--red); padding: 1.5rem 1.6rem; }
.case-head h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.15; margin: 0; }
.case-head .meta { margin: 0.4rem 0 1rem; color: var(--slate); }
.back { display: inline-block; margin-bottom: 1rem; font-size: 1rem; }

.analysis { background: var(--white); border: 1px solid var(--line); padding: 0.5rem 1.6rem 2rem; margin-top: 1.25rem; }
.analysis h2, .analysis h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; }
.analysis h2 { font-size: 1.55rem; margin: 2rem 0 0.6rem; padding-top: 1.1rem; border-top: 2px solid var(--ink); }
.analysis h2:first-child { border-top: 0; padding-top: 0; }
.analysis h3 { font-size: 1.25rem; margin: 1.5rem 0 0.4rem; }
.analysis p, .analysis ul, .analysis ol { max-width: var(--measure); }
.analysis li { margin-bottom: 0.45rem; }
.table-scroll { overflow-x: auto; margin: 1rem 0 1.25rem; border: 1px solid var(--line); }
.analysis table { border-collapse: collapse; width: 100%; min-width: 44rem; font-size: 0.9375rem; line-height: 1.45; }
.analysis th, .analysis td { text-align: left; vertical-align: top; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); }
.analysis th { font-family: var(--display); font-weight: 500; font-size: 1rem; background: var(--ink); color: var(--white); white-space: nowrap; }
.analysis tbody tr:nth-child(even) { background: var(--mist); }

/* Admin */
.panel { background: var(--white); border: 1px solid var(--line); padding: 1.4rem 1.6rem 1.6rem; margin-bottom: 1.25rem; }
.panel h2 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; margin: 0 0 0.8rem; }
.panel h3 { font-family: var(--display); font-weight: 500; font-size: 1.2rem; margin: 1.3rem 0 0.4rem; }
.field { display: block; margin-bottom: 1rem; }
.field > span { display: block; font-weight: 600; font-size: 1rem; margin-bottom: 0.25rem; }
.field small { display: block; color: var(--slate); font-size: 0.9375rem; }
.field input:not([type=file]), .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--slate);
  background: var(--white);
  color: var(--ink);
}
.field textarea { line-height: 1.45; }
.field input[type=file] { display: block; font: inherit; font-size: 1rem; margin: 0.4rem 0 0.5rem; }
.field textarea.code, pre, code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.875rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.existing { list-style: none; margin: 0; padding: 0; }
.existing li { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.existing li:first-child { border-top: 0; }
pre { background: var(--mist); border: 1px solid var(--line); padding: 0.8rem 1rem; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
[hidden] { display: none !important; }

/* Footer */
.foot { border-top: 6px solid var(--red); background: var(--ink); color: #e7e9eb; font-size: 1rem; }
.foot .wrap { padding-top: 1.6rem; padding-bottom: 2rem; }
.foot p { margin: 0 0 0.7rem; max-width: 75ch; }
.foot a { color: var(--white); }
.foot .creator { margin-bottom: 0.15rem; }
.foot .titles { margin-bottom: 1.1rem; }
.foot .creator { font-family: var(--display); font-weight: 500; font-size: 1.2rem; letter-spacing: 0.02em; color: var(--white); }

@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  .case { grid-template-columns: 1fr; }
  .case-date { border-right: 0; border-bottom: 1px solid var(--line); padding: 0.8rem 1.1rem; display: flex; align-items: baseline; gap: 0.5rem; }
  .case-date .argued, .case-date .day, .case-date .year { display: inline; font-size: 1.2rem; margin: 0; }
  .case-date .year::before { content: ", "; margin-left: -0.5rem; }
  .case-date .year { color: var(--ink); font-weight: 600; }
  .case-body, .case-head, .analysis, .panel { padding-left: 1.1rem; padding-right: 1.1rem; }
  .pair { grid-template-columns: 1fr; }
}

/* Accessibility */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 10;
  background: var(--white); color: var(--ink); font-weight: 600;
  padding: 0.6rem 1rem; border: 3px solid var(--ink);
}
.skip:focus { top: 0.75rem; }
main:focus { outline: none; }
/* On the red header and the dark footer the focus ring is white so it stays visible. */
.masthead a:focus-visible, .foot a:focus-visible { outline-color: var(--white); }
.table-scroll:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.links a, .docket a, .back, .toc a { padding-block: 0.2rem; display: inline-block; }
.page-title { font-family: var(--display); font-weight: 600; font-size: 2rem; line-height: 1.2; margin: 0 0 1rem; }
.toc { background: var(--white); border: 1px solid var(--line); padding: 1rem 1.6rem 1.1rem; margin-top: 1.25rem; }
.toc h2 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin: 0 0 0.4rem; }
.toc ol { margin: 0; padding-left: 1.4rem; columns: 2; column-gap: 2.5rem; font-size: 1rem; }
.analysis h2, .analysis h3 { scroll-margin-top: 1rem; }
@media (max-width: 40rem) { .toc ol { columns: 1; } .toc { padding-left: 1.1rem; padding-right: 1.1rem; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (forced-colors: active) {
  .button { border: 1px solid ButtonText; }
  .case, .case-head { border-left-width: 6px; }
}
@media print {
  .skip, .back, .toc, .foot a[href="/admin"] { display: none; }
  body { background: #fff; }
  .table-scroll { overflow: visible; }
  .analysis table { min-width: 0; }
}
