/* Patent: the site is a patent filing for an umbrella. Drawings carry numbered parts; the numbers are the links. */
:root {
  --paper: #f6f2e9;
  --ink: #1c1b19;
  --soft: #5c5850;
  --faint: #9a958a;
  --rule: #1c1b19;
  --hair: rgba(28, 27, 25, .16);
  --pencil: #2f5fd0;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --pad: clamp(18px, 4vw, 56px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.62 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--pencil); color: var(--paper); }
:focus-visible { outline: 2px solid var(--pencil); outline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the sheet: a drawing border inset from the window */
.sheet {
  position: relative;
  max-width: 1240px;
  margin: clamp(10px, 2vw, 28px) auto;
  padding: 0 var(--pad) var(--pad);
  border: 1.5px solid var(--rule);
  min-height: calc(100svh - 2 * clamp(10px, 2vw, 28px));
}
@media (max-width: 1290px) { .sheet { margin-left: clamp(10px, 2vw, 28px); margin-right: clamp(10px, 2vw, 28px); } }

.head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--rule);
  font: 400 13px/1.4 var(--mono); letter-spacing: .02em;
}
.head .no a { text-decoration: none; }
.sheets { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--hair); }
.sheets a {
  display: block; padding: 10px 18px 10px 0; margin-right: 18px;
  font: 400 13px/1.3 var(--mono); color: var(--soft); text-decoration: none;
}
.sheets a b { font-weight: 500; color: var(--ink); margin-right: 6px; }
.sheets a:hover { color: var(--ink); }
.sheets a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

/* bibliographic data with INID codes */
.code { font: 400 12px/1 var(--mono); color: var(--faint); margin-right: 10px; letter-spacing: 0; }
.biblio { list-style: none; margin: 0; padding: 0; }
.biblio li { display: grid; grid-template-columns: 44px 1fr; gap: 0 4px; padding: 7px 0; border-bottom: 1px solid var(--hair); }
.biblio .code { padding-top: 6px; }
.biblio dt, .biblio .k { font: 400 12px/1.4 var(--mono); color: var(--soft); text-transform: uppercase; letter-spacing: .06em; }
.biblio .v { margin: 0; }

h1, h2, h3 { font-weight: 400; margin: 0; }
.title {
  font: 500 clamp(13px, 1.2vw, 15px)/1.5 var(--mono);
  text-transform: uppercase; letter-spacing: .12em;
}
.name { font-size: clamp(46px, 6.4vw, 92px); line-height: .98; letter-spacing: -.02em; font-weight: 400; margin: 2px 0 6px; }
.name i { font-style: italic; font-weight: 300; }
.abstract { max-width: 46ch; }
.abstract p { margin: 0; }

.front {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px clamp(24px, 4vw, 64px);
  padding-top: clamp(22px, 4vw, 44px);
}
.front-left { display: flex; flex-direction: column; gap: 26px; }

/* figures */
figure { margin: 0; }
.fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.fig figcaption { font: 500 14px/1 var(--mono); letter-spacing: .14em; text-align: center; margin-top: 6px; }
.ln { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ln.thin { stroke-width: .9; }
.ln.hid { stroke-dasharray: 5 4; stroke-width: 1; }
.ln.ctr { stroke-dasharray: 14 4 2 4; stroke-width: .8; }
.fill-ink { fill: var(--ink); }
.fill-paper { fill: var(--paper); }
.lead { fill: none; stroke: var(--ink); stroke-width: .8; vector-effect: non-scaling-stroke; }
.num { font: 400 15px var(--mono); fill: var(--ink); }
.num-a { cursor: pointer; }
.num-a:hover .num, .num-a:focus-visible .num { fill: var(--pencil); text-decoration: underline; }
.label { font: 400 11px var(--mono); fill: var(--soft); letter-spacing: .04em; }
.hatch line { stroke: var(--ink); stroke-width: .7; vector-effect: non-scaling-stroke; }

/* part highlighting: a numeral in the text lights its part in the drawing, and back */
[data-part] { transition: stroke .2s, fill .2s; }
.lit .ln, .lit .lead, .lit.ln, .lit.lead { stroke: var(--pencil); }
.lit .num, .lit.num { fill: var(--pencil); }
.lit .fill-ink { fill: var(--pencil); }
.ref {
  font: 400 .82em var(--mono); text-decoration: none; color: var(--ink);
  padding: 0 1px; border-bottom: 1px dotted var(--faint); cursor: default;
}
.ref.lit, .ref:hover, .ref:focus-visible { color: var(--pencil); border-bottom-color: var(--pencil); }

/* drawing in, once */
.drawn .ln, .drawn .lead { stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); }
.drawn.go .ln, .drawn.go .lead { transition: stroke-dashoffset 1.6s cubic-bezier(.4, .1, .2, 1); stroke-dashoffset: 0; }
.drawn.go .ln.hid { stroke-dasharray: 5 4; stroke-dashoffset: 0; }
.drawn.go .ln.ctr { stroke-dasharray: 14 4 2 4; stroke-dashoffset: 0; }
.drawn.done .ln, .drawn.done .lead { stroke-dasharray: none; transition: none; }
.drawn.done .ln.hid { stroke-dasharray: 5 4; }
.drawn.done .ln.ctr { stroke-dasharray: 14 4 2 4; }
.drawn .num, .drawn .label { opacity: 0; transition: opacity .6s .9s; }
.drawn.go .num, .drawn.go .label { opacity: 1; }

/* legend: list of reference numerals, which doubles as navigation */
.legend { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.legend li { border-bottom: 1px solid var(--hair); }
.legend a {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: baseline; gap: 4px 10px;
  padding: 11px 0; text-decoration: none;
}
.legend .n { font: 400 15px/1 var(--mono); }
.legend .what { font-size: 18px; }
.legend .what em { color: var(--soft); font-style: italic; }
.legend .to { font: 400 12px/1 var(--mono); color: var(--faint); }
.legend a:hover .n, .legend a:hover .what, .legend a:focus-visible .n, .legend a.lit .n { color: var(--pencil); }
.legend a:hover .to, .legend a.lit .to { color: var(--pencil); }

/* section headings in the specification */
.sec { padding-top: clamp(34px, 6vw, 70px); }
.sec-h { display: flex; align-items: baseline; gap: 14px; padding-bottom: 12px; margin-bottom: 22px; border-bottom: 1px solid var(--rule); }
.sec-h h2 { font: 500 14px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .14em; }
.sec-h .aside { margin-left: auto; font: 400 12px/1.3 var(--mono); color: var(--faint); }

/* claims: numbered paragraphs with the patent's own hanging indent */
.claims { list-style: none; margin: 0; padding: 0; columns: 2 380px; column-gap: clamp(28px, 5vw, 72px); }
.claims li { break-inside: avoid; margin: 0 0 18px; padding-left: 2.2em; text-indent: -2.2em; }
.claims li::before { content: counter(list-item) ".\2003"; font: 400 .85em var(--mono); }
.claims .sub { display: block; padding-left: 1.2em; text-indent: 0; }

/* the drawings sheet: figure beside its description, alternating */
.emb { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 20px clamp(28px, 5vw, 72px); align-items: start; padding: clamp(30px, 5vw, 56px) 0; border-bottom: 1px solid var(--hair); }
.emb:nth-of-type(even) .fig { order: 2; }
.emb h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -.01em; margin: 2px 0 14px; }
.emb .kicker { font: 400 12px/1 var(--mono); color: var(--soft); text-transform: uppercase; letter-spacing: .1em; }
.emb p { margin: 0 0 14px; max-width: 54ch; }
.facts { list-style: none; margin: 16px 0 0; padding: 0; font: 400 13px/1.5 var(--mono); color: var(--soft); }
.facts li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 5px 0; border-top: 1px solid var(--hair); }
.facts b { font-weight: 400; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; padding-top: 2px; }
.out { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 18px; }
.out a { font: 400 14px/1.4 var(--mono); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 1px; }
.out a::after { content: " \2197"; }
.out a:hover { color: var(--pencil); border-color: var(--pencil); }

/* plain prose sheets */
.prose { max-width: 62ch; }
.prose p { margin: 0 0 16px; }
.para-n { font: 400 12px/1 var(--mono); color: var(--faint); margin-right: 10px; }
.two { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 24px clamp(28px, 5vw, 80px); align-items: start; }
.cites { list-style: none; margin: 0; padding: 0; font: 400 14px/1.5 var(--mono); }
.cites li { display: grid; grid-template-columns: 44px 1fr; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.cites li span:first-child { color: var(--faint); }

/* correspondence */
.address { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.45; margin: 0; font-style: normal; }
.address a { text-decoration: none; border-bottom: 1px solid var(--hair); }
.address a:hover { color: var(--pencil); border-color: var(--pencil); }
.address .k { display: inline-block; width: 6.5em; font: 400 12px/1 var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .08em; vertical-align: middle; }
.copy { font: 400 12px/1 var(--mono); margin-left: 10px; padding: 6px 9px; border: 1px solid var(--ink); background: none; color: var(--ink); cursor: pointer; vertical-align: middle; }
.copy:hover { background: var(--ink); color: var(--paper); }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: clamp(40px, 7vw, 80px); padding-top: 12px; border-top: 1px solid var(--rule);
  font: 400 12px/1.5 var(--mono); color: var(--soft);
}
.foot a { color: var(--soft); }
.foot a:hover { color: var(--ink); }
.next { display: inline-flex; gap: 8px; text-decoration: none; }

@media (max-width: 900px) {
  .front, .emb, .two { grid-template-columns: 1fr; }
  .emb:nth-of-type(even) .fig { order: 0; }
  .front .fig { order: -1; }
  body { font-size: 17px; }
  .sheets a { padding-right: 0; margin-right: 16px; }
}
@media (max-width: 520px) {
  .sheets a { padding: 9px 0; margin-right: 14px; font-size: 12px; }
  .front .num { font-size: 24px; }
  .legend a { grid-template-columns: 36px 1fr; }
  .legend .to { grid-column: 2; }
  .address .k { display: block; width: auto; margin-top: 10px; }
  .facts li { grid-template-columns: 76px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .drawn .ln, .drawn .lead { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; transition: none !important; }
  .drawn .ln.hid { stroke-dasharray: 5 4 !important; }
  .drawn .ln.ctr { stroke-dasharray: 14 4 2 4 !important; }
  .drawn .num, .drawn .label { opacity: 1; transition: none; }
}
