:root {
  color-scheme: light;
  --background: #f4ecd9;
  --surface: #fff;
  --paper-panel: #fffdf7;
  --paper-line: #dfd2b7;
  --ink: #14243b;
  --muted: #455772;
  --navy: #101f38;
  --blue: #174ba5;
  --line: #cfdbea;
  --heading: "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--ink);
  font: 1rem/1.65 "Segoe UI", system-ui, sans-serif;
  overflow-wrap: anywhere;
}
main { flex: 1; }
img { display: block; max-inline-size: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .2em; }
a:focus-visible, summary:focus-visible { outline: 3px solid #a04c00; outline-offset: 4px; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.3; }
h1 { font-size: 1.125rem; font-weight: 600; margin: 0; }
h2 { font-size: 1.0625rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
.frame { width: min(76rem, 100% - 2 * clamp(1rem, 4vw, 3rem)); margin-inline: auto; }
.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead-inner { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-block: .75rem; }
.masthead-inner > a { margin-inline-start: clamp(-1.035rem, -1.88vw, -.565rem); }
.masthead img { width: clamp(6rem, 20vw, 11rem); max-height: 3.4rem; object-fit: contain; object-position: left center; }
.masthead nav { display: flex; flex-wrap: wrap; gap: .5rem clamp(.75rem, 3vw, 2rem); }
.masthead nav a { color: var(--ink); font-weight: 650; text-decoration: none; }
.masthead nav a:hover, .masthead nav a[aria-current] { color: var(--blue); text-decoration: underline; }
.page-banner {
  background-color: var(--navy);
  background-image: linear-gradient(#ffffff0a 1px, transparent 1px), linear-gradient(90deg, #ffffff0a 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--surface);
  padding-block: .6875rem;
  border-bottom: 1px solid #5b91ea;
}
.page-banner h1 { white-space: nowrap; overflow-x: auto; }
main:has(> .invention-grid) .page-banner h1 { font-size: 1.0625rem; font-weight: 400; }
.page-banner a { color: #d0e2ff; }
.page-banner p { max-width: 72ch; margin: .55rem 0 0; }
.patent-number { display: block; font-size: .875rem; font-weight: 650; line-height: 1.4; }
.page-banner .patent-number { margin-top: .65rem; font-size: .8125rem; font-weight: 400; color: #bbd5ff; }
.invention-grid .invention-card {
  background: var(--paper-panel);
  border-color: var(--paper-line);
}
.invention-grid .invention-card:hover { border-color: #9c8356; }

.invention-grid {
  list-style: none;
  margin-block: 0;
  padding: clamp(1.15rem, 2.5vw, 2rem) 0 clamp(2.5rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.invention-card {
  height: 100%;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .55rem;
  overflow: hidden;
}
.invention-card:hover { border-color: var(--blue); }
.invention-card:hover h2, .invention-card:focus-visible h2 { color: var(--blue); text-decoration: underline; }
.invention-card { display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  grid-template-rows: auto 1fr auto;
  align-content: start;
  align-items: center;
  gap: .55rem .85rem;
  padding: 1rem;
}
.drawing-preview { grid-column: 1; grid-row: 1; align-self: start; }
.drawing-preview img { width: 100%; }
.card-copy { display: contents; }
.card-copy .patent-number { grid-column: 1 / -1; grid-row: 3; font-size: .8125rem; font-weight: 400; color: var(--muted); }
.card-copy h2 {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.card-copy p { grid-column: 1 / -1; grid-row: 2; align-self: start; margin: 0; line-height: 1.45; color: var(--muted); }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 17rem);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
  padding-block: clamp(1.15rem, 2.5vw, 2rem) 2.5rem;
}
.article-layout article, .policy, .contact-details {
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--paper-line);
  border-radius: .55rem;
  background: var(--paper-panel);
  min-width: 0;
}
article > :first-child { margin-top: 0; }
article > :last-child { margin-bottom: 0; }
article li + li { margin-top: .35em; }
article ul, article ol, .reading-nav ul { padding-inline-start: 1.35rem; }
article h2[id] { scroll-margin-top: 1rem; }
.policy { max-width: 76ch; margin-block: 1.25rem 2.5rem; }
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 1rem;
  margin-block: 1.25rem 2.5rem;
}
@media (max-width: 44rem) {
  .contact-layout { grid-template-columns: minmax(0, 1fr); }
}
.contact-details img { width: min(100%, 28rem); }
.contact-details p { margin: 0; }
.contact-details p + p { margin-block-start: .5rem; }
.policy table { width: 100%; border-collapse: collapse; }
.reading-nav { display: grid; gap: 1rem; }
.reading-nav nav { padding: 1rem; background: var(--paper-panel); border: 1px solid var(--paper-line); border-radius: .55rem; }
.reading-nav summary, .reading-nav h2 { font: 650 1rem/1.4 "Segoe UI", system-ui, sans-serif; margin: 0; }
.reading-nav summary { cursor: pointer; }
.reading-nav ul { margin: .6rem 0 0; }
.reading-nav li + li { margin-top: .4rem; }
.reading-nav a { font-size: .925rem; }
.reading-nav [aria-current] { color: var(--ink); font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin-block: 1.5rem; }
figure { margin: 0; min-width: 0; }
.gallery figure { display: grid; align-content: center; padding: .75rem; border: 1px solid var(--paper-line); border-radius: .35rem; }
figure img { margin-inline: auto; object-fit: contain; }
.drawing-link { display: block; }
figcaption { margin-top: .65rem; color: var(--muted); }
footer { background: var(--navy); color: #d7e4f8; padding-block: 2.25rem; }
footer p { max-width: 70ch; margin: 0 0 1rem; }
footer nav { display: flex; flex-wrap: wrap; gap: .45rem 1.25rem; margin-bottom: .8rem; }
footer a { color: inherit; font-size: .9rem; }
footer a:focus-visible, .page-banner a:focus-visible { outline-color: #ffbc73; }
footer small { font-size: .875rem; }
@media (max-width: 56rem) {
  .invention-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 44rem) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 34rem) {
  .invention-grid { grid-template-columns: minmax(0, 1fr); }
}
