/* Supply Chain Innovation Research Lab (thesis archive)
   Colours: Infineon design tokens (ocean, engineering, red) only, plus the
   two plaque metals. Type: Source Sans 3, self-hosted. See DESIGN.md. */

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-ext.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --black: #1d1d1d;
  --white: #ffffff;
  --eng-100: #f7f7f7;
  --eng-200: #eeeded;
  --eng-300: #bfbbbb;
  --eng-400: #8d8786;
  --eng-500: #575352;
  --eng-600: #3c3a39;
  --ocean-100: #dff4f3;
  --ocean-200: #b8deda;
  --ocean-300: #6cb4ad;
  --ocean-500: #0a8276;
  --ocean-600: #08665c;
  --ocean-700: #06534b;
  --red-500: #cd002f;
  --red-600: #a2001e;
  --red-100: #fbe9ed;
  --green-500: #4ca460;
  --orange-500: #e16b25;

  /* plaque metals: gold from the palette's sand, silver from engineering */
  --gold-hi: #fdeeb0;
  --gold: #ecc95c;
  --gold-lo: #c9a034;
  --gold-edge: #9a7620;
  --gold-ink: #3d2c05;
  --silver-hi: #f8f7f7;
  --silver: #d6d3d3;
  --silver-lo: #aeaaa9;
  --silver-edge: #85807f;
  --silver-ink: #2b2a29;

  --wall: var(--eng-200);
  --text: var(--black);
  --muted: var(--eng-500);
  --line: #d9d6d6;
  --link: var(--ocean-600);

  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --wrap: 82rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 2px;
  --hang: 0 1px 2px rgba(29, 29, 29, .2), 0 16px 26px -14px rgba(29, 29, 29, .5);
  --hang-lift: 0 2px 3px rgba(29, 29, 29, .18), 0 28px 38px -18px rgba(29, 29, 29, .55);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scrollbar-color: var(--eng-300) var(--eng-100);
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--wall);
  color: var(--text);
  font: 400 1rem/1.55 var(--font);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--ocean-500);
  caret-color: var(--ocean-500);
}
main { flex: 1; }

::selection { background: var(--ocean-200); color: var(--black); }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ocean-700); }

:focus-visible { outline: 2px solid var(--ocean-500); outline-offset: 2px; border-radius: var(--radius); }

.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: .75rem; top: -4rem; z-index: 50;
  padding: .6rem 1rem; background: var(--black); color: var(--white); text-decoration: none;
}
.skip:focus { top: .75rem; color: var(--white); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.icon { flex: none; }
.code { font-family: var(--mono); font-size: .9em; letter-spacing: .04em; white-space: nowrap; }
.code--long { white-space: normal; overflow-wrap: anywhere; }
.nb { white-space: nowrap; }

/* ---- top bar ----------------------------------------------------------- */

.top { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.top__in {
  max-width: var(--wrap); margin-inline: auto; min-height: 4.25rem;
  padding: .5rem max(var(--gutter), env(safe-area-inset-right)) .5rem max(var(--gutter), env(safe-area-inset-left));
  display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap;
}
/* the name is long: it may take two lines, so that the account stays on the first row */
.brand {
  display: flex; align-items: center; gap: .9rem; color: var(--text); text-decoration: none;
  flex: 1 1 12rem; min-width: 0; max-width: max-content; margin-right: auto;
}
.brand:hover { color: var(--text); }
.brand__logo { flex: none; width: 5.5rem; height: auto; }
.brand__text { display: grid; min-width: 0; padding-left: .9rem; border-left: 1px solid var(--line); line-height: 1.15; }
.brand__name { font-size: 1.2rem; font-weight: 600; letter-spacing: -.005em; text-wrap: balance; }

.search { position: relative; flex: 0 1 22rem; }
/* tablets: a narrower search leaves the name two lines instead of three */
@media (min-width: 46rem) and (max-width: 63.99rem) { .search { flex-basis: 16rem; } }
.search .icon { position: absolute; left: .75rem; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 2.6rem; padding: 0 .9rem 0 2.4rem;
  border: 1px solid var(--eng-300); border-radius: var(--radius);
  background: var(--eng-100); color: var(--text); font: inherit; font-size: 1rem;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; background: var(--white); border-color: var(--ocean-500); box-shadow: 0 0 0 3px var(--ocean-100); }
.search--inline { flex: 0 1 20rem; }
.search--inline input { background: var(--white); }

.top__nav { display: flex; align-items: center; gap: .5rem; }
.top__link {
  padding: .55rem .8rem; color: var(--text); text-decoration: none; font-weight: 600;
  border-bottom: 2px solid transparent;
}
.top__link[aria-current] { border-bottom-color: var(--ocean-500); }

.account { position: relative; }
.account summary { list-style: none; cursor: pointer; border-radius: 50%; touch-action: manipulation; }
.account summary::-webkit-details-marker { display: none; }
.account__badge {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--ocean-700); color: var(--white); font-weight: 600;
  transition: background-color .15s ease;
}
.account[open] .account__badge { background: var(--black); }
.account__menu {
  position: absolute; right: 0; top: calc(100% + .5rem); min-width: 16rem; z-index: 30;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 28px -10px rgba(29, 29, 29, .35); padding: .4rem;
  transform-origin: top right;
  animation: pop .16s var(--ease-out);
}
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
.account__who { padding: .6rem .7rem .7rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; font-weight: 600; }
.account__who span { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; }
.account__item { display: flex; align-items: center; gap: .6rem; padding: .7rem; margin-top: .3rem; color: var(--text); text-decoration: none; border-radius: var(--radius); }

/* ---- notes (after saving) ---------------------------------------------- */

.notes { background: var(--ocean-100); border-bottom: 1px solid var(--ocean-200); }
.note { display: flex; gap: .6rem; align-items: flex-start; max-width: var(--wrap); margin-inline: auto; padding: .75rem var(--gutter); color: var(--ocean-700); font-weight: 600; }
.note .icon { margin-top: .2rem; }
.note--warn { color: #8a3d0c; }

/* ---- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.6rem; padding: .5rem 1.05rem;
  border: 1px solid transparent; border-radius: var(--radius);
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .14s var(--ease-out);
}
.btn:active { transform: scale(.975); }
.btn--lg { min-height: 3rem; padding-inline: 1.4rem; font-size: 1.05rem; }
.btn--primary { background: var(--ocean-500); color: var(--white); }
.btn--secondary { background: var(--white); color: var(--ocean-600); border-color: var(--ocean-500); }
.btn--quiet { background: transparent; color: var(--ocean-600); }
.btn--danger { background: var(--red-500); color: var(--white); }
.btn--danger-quiet { background: transparent; color: var(--red-500); border-color: transparent; }
.btn--icon { min-height: 2.4rem; width: 2.4rem; padding: 0; }
.btn[disabled], .btn[aria-busy="true"] { cursor: progress; background: var(--eng-300); border-color: var(--eng-300); color: var(--eng-600); }

/* ---- chips, status ------------------------------------------------------ */

.chip {
  display: inline-flex; align-items: center; padding: .14rem .6rem; border-radius: var(--radius);
  font-size: .82rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
  border: 1px solid; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.chip--gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); border-color: var(--gold-edge); color: var(--gold-ink); }
.chip--silver { background: linear-gradient(180deg, var(--silver-hi), var(--silver) 55%, var(--silver-lo)); border-color: var(--silver-edge); color: var(--silver-ink); }

.status { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.status::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.status--published { color: var(--ocean-600); }
.status--draft { color: var(--eng-500); }
.status--draft::before { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.status--removed { color: var(--red-600); }

/* ---- the pieces on the wall --------------------------------------------- */

.piece { --frame-w: clamp(6px, .85vw, 10px); --mat-w: clamp(7px, 1.25vw, 16px); min-width: 0; }
.piece--master { --m-hi: var(--gold-hi); --m: var(--gold); --m-lo: var(--gold-lo); --m-edge: var(--gold-edge); --m-ink: var(--gold-ink); }
.piece--bachelor { --frame-w: clamp(4px, .5vw, 6px); --m-hi: var(--silver-hi); --m: var(--silver); --m-lo: var(--silver-lo); --m-edge: var(--silver-edge); --m-ink: var(--silver-ink); }

.piece__link { display: grid; justify-items: center; color: var(--text); text-decoration: none; touch-action: manipulation; }
.piece__link:hover { color: var(--text); }
.piece__link:focus-visible { outline-offset: 6px; }

.frame {
  position: relative; display: block; width: 100%; padding: var(--frame-w);
  background: var(--black);
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px rgba(255, 255, 255, .09), var(--hang);
  transition: transform .26s var(--ease-out);
}
/* the deeper shadow of a lifted frame is faded in on top, so that lifting a
   frame moves two layers and repaints nothing */
.frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: var(--hang-lift); opacity: 0; transition: opacity .26s var(--ease-out);
}
.piece--bachelor .frame {
  background: linear-gradient(135deg, #e9e7e7 0%, #b4b0af 28%, #d9d6d6 52%, #a19d9c 78%, #cfcccc 100%);
  box-shadow: inset 0 0 0 1px rgba(29, 29, 29, .28), var(--hang);
}
.mat { display: block; padding: var(--mat-w); background: var(--white); }
/* the gold fillet between frame and mat */
.piece--master .mat { box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 0 3px var(--gold-edge); }
.piece--bachelor .mat { box-shadow: inset 0 0 0 1px rgba(29, 29, 29, .18); }

.cover {
  display: block; width: 100%; aspect-ratio: 210 / 297;
  object-fit: cover; object-position: top center;
  background: var(--eng-100);
  outline: 1px solid rgba(29, 29, 29, .16); outline-offset: -1px;
}
/* a thesis without a PDF: a set title page */
.cover--blank {
  display: flex; flex-direction: column; gap: .5em; padding: 12% 10% 10%;
  container-type: inline-size;
  background: var(--ocean-700); color: var(--white); text-align: left; overflow: hidden;
}
.cover__kind { font-size: clamp(.6rem, 5cqi, .95rem); letter-spacing: .1em; text-transform: uppercase; color: var(--ocean-200); }
.cover__title { font-size: clamp(.8rem, 8.4cqi, 1.9rem); font-weight: 300; line-height: 1.15; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; overflow: hidden; }
.cover__author { margin-top: auto; font-size: clamp(.65rem, 5.4cqi, 1.05rem); font-weight: 600; }
.cover--empty { background: var(--eng-100); }

.plate {
  position: relative; display: block; margin-top: clamp(.6rem, 1.4vw, .95rem);
  min-width: 68%; max-width: 100%; padding: .42rem 1.45rem .46rem;
  text-align: center; color: var(--m-ink);
  border: 1px solid var(--m-edge); border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, var(--m-hi), var(--m) 50%, var(--m-lo));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 rgba(29, 29, 29, .12), 0 1px 2px rgba(29, 29, 29, .3);
}
/* light passing over the metal: a band that slides across under the engraving */
.plate__shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .7) 50%, transparent 58%);
  transform: translateX(-78%); transition: transform .9s var(--ease-out);
}
/* the two screws */
.plate::before, .plate::after {
  content: ""; position: absolute; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--m-hi), var(--m-edge) 75%);
  box-shadow: 0 0 0 .5px var(--m-edge), inset 0 -1px 0 rgba(29, 29, 29, .25);
}
.plate::before { left: .5rem; }
.plate::after { right: .5rem; }
.plate__name, .plate__line { position: relative; }
.plate__name {
  display: block; font-size: clamp(.72rem, 1.9vw, .86rem); font-weight: 650; line-height: 1.22;
  letter-spacing: .09em; text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}
.plate__line { display: block; margin-top: .08rem; font-size: clamp(.69rem, 1.7vw, .78rem); letter-spacing: .03em; }

.piece__title {
  margin-top: .75rem; max-width: 26ch; text-align: center; font-size: .98rem; line-height: 1.32;
  text-wrap: balance; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.piece__meta { margin-top: .25rem; text-align: center; font-size: .86rem; color: var(--muted); }

@media (hover: hover) and (pointer: fine) {
  .piece__link:hover .frame { transform: translateY(-6px); }
  .piece__link:hover .frame::after { opacity: 1; }
  .piece__link:hover .plate__shine { transform: translateX(78%); }
  .piece__link:hover .piece__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
  .btn--primary:hover { background: var(--ocean-600); color: var(--white); }
  .btn--secondary:hover { background: var(--ocean-100); color: var(--ocean-700); }
  .btn--quiet:hover { background: var(--ocean-100); color: var(--ocean-700); }
  .btn--danger:hover { background: var(--red-600); color: var(--white); }
  .btn--danger-quiet:hover { background: var(--red-100); color: var(--red-600); }
  .account__item:hover { background: var(--eng-100); color: var(--text); }
  .top__link:hover { color: var(--ocean-600); }
  .seg a:hover { background: var(--eng-100); color: var(--text); }
  .seg a[aria-current]:hover { background: var(--black); color: var(--white); }
  .table tbody tr:hover { background: var(--eng-100); }
  .subnav a:hover { color: var(--text); }
}
.piece__link:active .frame { transform: scale(.985); }

/* ---- wall --------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; isolation: isolate; background: var(--ocean-700); color: var(--white); padding: clamp(1.75rem, 4.5vw, 3.25rem) 0 clamp(1.5rem, 4vw, 2.75rem); }
/* the picture (js/visual.js): streams along the bottom edge that build a sprig of leaves on the right */
.hero__canvas { position: absolute; inset: 0; z-index: -1; display: none; width: 100%; height: 100%; }
.hero ::selection { background: var(--white); color: var(--ocean-700); }
@media (min-width: 46rem) {
  .hero { padding-bottom: clamp(3.25rem, 6vw, 4.5rem); }
  .hero__canvas { display: block; }
  /* the right part of the band belongs to the leaves */
  .hero__title { max-width: min(58%, 20ch); }
  .hero__lead { max-width: min(58%, 44ch); }
  .hero__more { max-width: 58%; text-wrap: balance; }
}
.hero__title { max-width: 20ch; font-size: clamp(2.1rem, 6.2vw, 4.4rem); font-weight: 250; line-height: 1.02; letter-spacing: -.026em; text-wrap: balance; }
.hero__lead { margin-top: clamp(.75rem, 2vw, 1.15rem); max-width: 44ch; font-size: clamp(1.05rem, 2.2vw, 1.3rem); line-height: 1.4; color: var(--ocean-100); }
/* the lab's other publications, outside this site */
.hero__more { margin-top: clamp(1rem, 2.6vw, 1.5rem); min-width: 0; line-height: 1.55; }
.hero__out {
  padding-block: .6rem; color: var(--white); font-weight: 600;
  text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .45); text-decoration-thickness: 1px; text-underline-offset: .24em;
}
/* the arrow stays with the last word when the line breaks */
.hero__last { white-space: nowrap; }
.hero__out .icon { display: inline-block; vertical-align: -.1em; margin-left: .45rem; }
.hero__out:hover { color: var(--white); text-decoration-color: var(--white); }
.hero__out:focus-visible { outline-color: var(--white); }

.filters { position: sticky; top: 0; z-index: 10; background: var(--white); border-bottom: 1px solid var(--line); }
.filters__in { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem; padding-block: .7rem; }
.filters__form { display: flex; flex-wrap: wrap; gap: .6rem; margin-left: auto; }
.js .filters__apply { display: none; }

.seg { display: inline-flex; border: 1px solid var(--eng-300); border-radius: var(--radius); background: var(--white); max-width: 100%; overflow-x: auto; }
.seg a { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.5rem; padding: .35rem .95rem; color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; touch-action: manipulation; }
.seg a + a { border-left: 1px solid var(--eng-300); }
.seg a span { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg a[aria-current] { background: var(--black); color: var(--white); }
.seg a[aria-current] span { color: var(--eng-300); }

.sel select, .field select, .rolebox select {
  appearance: none; -webkit-appearance: none;
  height: 2.6rem; padding: 0 2.3rem 0 .85rem; max-width: 100%;
  border: 1px solid var(--eng-400); border-radius: var(--radius);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231d1d1d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .7rem center;
  color: var(--text); font: inherit; font-size: 1rem; cursor: pointer;
}
.sel select:focus, .field select:focus, .rolebox select:focus { outline: none; border-color: var(--ocean-500); box-shadow: 0 0 0 3px var(--ocean-100); }

.wall { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(3rem, 8vw, 6rem); }
.result { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.25rem; margin-bottom: 1.5rem; font-size: 1.05rem; }
.result__clear { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }

.year + .year { margin-top: clamp(3rem, 8vw, 5.5rem); }
.year__head { display: flex; align-items: flex-end; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: clamp(1.5rem, 4vw, 2.75rem); }
.year__head::after { content: ""; flex: 1 1 3rem; height: 1px; background: var(--eng-300); margin-bottom: .55rem; order: 2; }
.year__num { font-size: clamp(3.2rem, 10vw, 6.25rem); font-weight: 200; line-height: .8; letter-spacing: -.035em; font-variant-numeric: lining-nums; }
.year__tally { display: flex; gap: .5rem; order: 3; margin-bottom: .1rem; }

.hang { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.25rem, 6vw, 4rem) clamp(1.1rem, 4.5vw, 3.75rem); align-items: start; }
@media (min-width: 46rem) { .hang { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 68rem) { .hang { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* the wall settles as it loads: one moment, top rows only */
@media (prefers-reduced-motion: no-preference) {
  .page-wall .year:first-of-type .piece { animation: settle .7s var(--ease-out) both; }
  .page-wall .year:first-of-type .piece:nth-child(2) { animation-delay: .05s; }
  .page-wall .year:first-of-type .piece:nth-child(3) { animation-delay: .1s; }
  .page-wall .year:first-of-type .piece:nth-child(4) { animation-delay: .15s; }
  .page-wall .year:first-of-type .piece:nth-child(n+5) { animation-delay: .2s; }
  @keyframes settle { from { opacity: 0; transform: translateY(14px); } }
}

.empty { max-width: 34rem; margin: clamp(2rem, 8vw, 5rem) auto; text-align: center; }
.empty h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 300; line-height: 1.2; text-wrap: balance; }
.empty p { margin: .75rem 0 1.5rem; color: var(--muted); font-size: 1.05rem; }
.empty--plain { margin-block: 3rem; }

/* ---- thesis page -------------------------------------------------------- */

.back { display: inline-flex; align-items: center; gap: .45rem; margin: clamp(1rem, 3vw, 1.75rem) 0; font-weight: 600; text-decoration: none; }
.banner, .notice, .alert { display: flex; gap: .6rem; align-items: flex-start; }
.banner .icon, .notice .icon, .alert .icon { margin-top: .22rem; }
.banner { margin-top: 1.25rem; padding: .7rem .9rem; background: var(--white); border: 1px solid var(--eng-300); border-radius: var(--radius); }
.notice { margin-top: 1rem; color: var(--eng-600); max-width: 60ch; }
.notice--warn { color: #8a3d0c; font-size: .92rem; }
.alert { margin-bottom: 1.5rem; padding: .85rem 1rem; background: var(--red-100); border: 1px solid #efb9c5; border-radius: var(--radius); color: var(--red-600); font-weight: 600; }

.detail { padding-bottom: clamp(3rem, 8vw, 6rem); }
.detail__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.detail__text { min-width: 0; }
.detail__piece { --frame-w: clamp(9px, 1.2vw, 15px); --mat-w: clamp(14px, 2.2vw, 30px); display: grid; justify-items: center; width: min(100%, 21rem); margin-inline: auto; }
.detail__piece .frame { view-transition-name: piece; }
.detail__piece .plate { min-width: 72%; padding: .6rem 1.9rem .65rem; }
.detail__piece .plate__name { font-size: 1rem; }
.detail__piece .plate__line { font-size: .86rem; }
.detail__piece .plate::before, .detail__piece .plate::after { width: 7px; height: 7px; margin-top: -3.5px; }
@media (min-width: 56rem) {
  .detail__grid { grid-template-columns: minmax(17rem, 25rem) minmax(0, 1fr); }
  .detail__piece { width: 100%; position: sticky; top: 1.5rem; }
}

.detail__title { font-size: clamp(1.75rem, 4.2vw, 2.85rem); font-weight: 300; line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; overflow-wrap: anywhere; max-width: 24ch; }
.detail__author { margin-top: .8rem; font-size: clamp(1.15rem, 2.4vw, 1.4rem); font-weight: 600; }
.detail__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: 1.6rem; }
.detail__file { color: var(--muted); font-variant-numeric: tabular-nums; }

.facts { margin-top: 2.25rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 1.1rem 2rem; padding-top: 1.5rem; border-top: 1px solid var(--eng-300); max-width: 46rem; }
.facts dt { font-size: .86rem; color: var(--muted); }
.facts dd { font-weight: 600; overflow-wrap: anywhere; }

.abstract { margin-top: 2.5rem; max-width: 68ch; }
.abstract h2, .more__title { font-size: 1.35rem; font-weight: 600; margin-bottom: .75rem; }
.abstract p { font-size: 1.08rem; line-height: 1.65; hyphens: auto; }
.abstract p + p { margin-top: 1em; }
.detail__seen { margin-top: 2.5rem; font-size: .92rem; color: var(--muted); }

.more { background: var(--white); border-top: 1px solid var(--line); padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem); }
.more__title { margin-bottom: 2rem; }
.more .hang { background: none; }

/* ---- message pages (not found, removed, signed out) ---------------------- */

.message { display: grid; gap: clamp(1.75rem, 5vw, 4rem); align-items: center; padding-block: clamp(2.5rem, 9vw, 7rem); }
.message__mark { --frame-w: 9px; --mat-w: 16px; width: min(46vw, 12.5rem); margin-inline: auto; rotate: -2.2deg; }
.message__mark .frame { background: var(--black); }
.message__mark .cover--empty { background: var(--eng-200); outline: none; box-shadow: inset 0 2px 6px rgba(29, 29, 29, .18); }
.message__text h1 { font-size: clamp(1.9rem, 5vw, 3.1rem); font-weight: 300; line-height: 1.1; letter-spacing: -.015em; text-wrap: balance; max-width: 20ch; }
.message__text p { margin-top: 1rem; max-width: 52ch; font-size: 1.1rem; color: var(--eng-600); }
.message__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem !important; }
@media (min-width: 46rem) { .message { grid-template-columns: auto minmax(0, 1fr); } .message__mark { margin: 0; } }

.prose { max-width: 46rem; padding-block: clamp(2rem, 6vw, 4rem) clamp(3rem, 8vw, 6rem); }
.prose h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 300; letter-spacing: -.015em; }
.prose__lead { margin-top: .75rem; font-size: 1.15rem; color: var(--eng-600); }
.prose h2 { margin-top: 2.25rem; font-size: 1.3rem; font-weight: 600; }
.prose p, .prose ul { margin-top: .6rem; max-width: 68ch; }
.prose ul { padding-left: 1.2rem; list-style: disc; }
.prose li + li { margin-top: .4rem; }

/* ---- manage ------------------------------------------------------------- */

.page-manage { background: var(--eng-100); }
.admin { padding-bottom: clamp(3rem, 8vw, 6rem); }
.admin--narrow { max-width: 44rem; }
.admin h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 300; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
.admin__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem 2rem; margin: 1.25rem 0 1.5rem; }
.admin__lead { margin-top: .5rem; max-width: 64ch; color: var(--eng-600); }
.admin__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.1rem; margin-top: .55rem; color: var(--muted); }
.admin__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1rem; }

.subnav { display: flex; gap: 1.5rem; margin-top: 1rem; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; }
.subnav a { margin-bottom: 0; }
.subnav a { padding: .75rem 0; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav a[aria-current] { color: var(--text); border-bottom-color: var(--ocean-500); }

.tablewrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: .7rem 1rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); font-weight: 400; }
.table thead th { font-size: .84rem; font-weight: 600; color: var(--muted); background: var(--eng-100); white-space: nowrap; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr { transition: background-color .12s ease; }
.table .num { text-align: right; }
.table__thesis { display: flex; align-items: center; gap: .9rem; color: var(--text); text-decoration: none; min-width: 15rem; }
.table__title { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.table__sub { display: block; font-size: .9rem; color: var(--muted); }
.table__when { white-space: nowrap; }
.table__when span { display: block; font-size: .86rem; color: var(--muted); }
.table__flag { display: inline-flex; vertical-align: -3px; margin-left: .35rem; color: var(--muted); }
.table__status { white-space: nowrap; }
.tablewrap + .field__hint { margin-top: .75rem; }
.table__nowrap { white-space: nowrap; }
.table__act { text-align: right; }
.table tr.is-off .table__title { color: var(--muted); }
.thumb { flex: none; width: 2.5rem; height: auto; aspect-ratio: 210 / 297; object-fit: cover; object-position: top; background: var(--eng-200); outline: 1px solid rgba(29, 29, 29, .18); outline-offset: -1px; }
.thumb--blank { display: block; background: var(--ocean-700); }
.rolebox { display: flex; gap: .4rem; align-items: center; }
.rolebox select { height: 2.4rem; min-width: 7.5rem; }
.pausebox { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; margin-top: .3rem; }
.pausebox .table__sub { color: #8a3d0c; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.75rem); }
.panel + .panel { margin-top: 1rem; }
.panel h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: 1.1rem; }
.panel > p + p, .panel > p + form, .panel > form + details { margin-top: 1rem; }

.edit { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 62rem) { .edit { grid-template-columns: minmax(0, 1fr) 19.5rem; gap: 2.5rem; } }
.edit__side { display: grid; gap: 1.25rem; }
.edit__preview { display: grid; justify-items: center; width: min(100%, 13.5rem); margin-inline: auto; --frame-w: 8px; --mat-w: 12px; }
.sidecard { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.sidecard h2 { font-size: 1.02rem; font-weight: 600; margin-bottom: .5rem; }
.sidecard p + p, .sidecard img + p { margin-top: .6rem; }
.sidecard__hint { font-size: .9rem; color: var(--muted); }
.todo { margin-top: .4rem; padding-left: 1.1rem; list-style: disc; }
.todo li + li { margin-top: .25rem; }
.copyline { display: flex; align-items: center; gap: .4rem; justify-content: space-between; }
.qr { width: 9.25rem; height: 9.25rem; border: 1px solid var(--line); image-rendering: pixelated; }
.btnrow { display: flex; gap: .5rem; flex-wrap: wrap; }

.field { display: grid; gap: .35rem; align-content: start; min-width: 0; }
.field + .field, .field-row + .field, .field + .field-row, .field-row + .field-row, .choice + .field, .field + .check, .check + .field { margin-top: 1.1rem; }
.field-row { display: grid; gap: 1.1rem 1.25rem; }
.field-row .field + .field { margin-top: 0; }
@media (min-width: 40rem) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .field-row:has(.input--short) { grid-template-columns: minmax(0, 1fr) 9rem; } }
.field--short { max-width: 16rem; }
.field label, .choice legend { font-weight: 600; }
.field__opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; padding: .6rem .8rem; border: 1px solid var(--eng-400); border-radius: var(--radius);
  background: var(--white); color: var(--text); font: inherit; font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input[type="text"], .field input[type="email"] { height: 2.75rem; }
.field textarea { min-height: 12rem; resize: vertical; line-height: 1.55; }
.field select { width: 100%; height: 2.75rem; }
.field input::placeholder { color: color-mix(in srgb, var(--eng-500) 88%, var(--white)); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ocean-500); box-shadow: 0 0 0 3px var(--ocean-100); }
.field input[type="file"] { font: inherit; width: 100%; min-width: 0; max-width: 100%; }
.field input[type="file"]::file-selector-button {
  margin-right: .8rem; min-height: 2.5rem; padding: .4rem .9rem; border: 1px solid var(--ocean-500); border-radius: var(--radius);
  background: var(--white); color: var(--ocean-600); font: 600 1rem var(--font); cursor: pointer;
}
.field__hint { font-size: .9rem; color: var(--muted); }
.field__error { font-size: .95rem; font-weight: 600; color: var(--red-600); }
.field--error input, .field--error textarea { border-color: var(--red-500); }

.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.choice legend { padding: 0; margin-bottom: .35rem; float: left; width: 100%; }
.choice__item { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; padding: .4rem 1rem .4rem .8rem; border: 1px solid var(--eng-400); border-radius: var(--radius); background: var(--white); cursor: pointer; font-weight: 600; }
.choice__item:has(:checked) { border-color: var(--black); box-shadow: inset 0 0 0 1px var(--black); }
.choice__item--gold:has(:checked) { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); border-color: var(--gold-edge); box-shadow: inset 0 0 0 1px var(--gold-edge); color: var(--gold-ink); }
.choice__item--silver:has(:checked) { background: linear-gradient(180deg, var(--silver-hi), var(--silver)); border-color: var(--silver-edge); box-shadow: inset 0 0 0 1px var(--silver-edge); color: var(--silver-ink); }
.choice input, .check input { width: 1.15rem; height: 1.15rem; margin: 0; flex: none; }

.check { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; max-width: 62ch; }
.check input { margin-top: .22rem; }
.check strong { display: block; }
.filecard { display: flex; gap: .75rem; align-items: center; padding: .75rem .9rem; margin-bottom: 1.1rem; background: var(--eng-100); border: 1px solid var(--line); border-radius: var(--radius); }
.filecard a { font-weight: 600; overflow-wrap: anywhere; }
.filecard span span { display: block; font-size: .9rem; color: var(--muted); }

.savebar {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .75rem;
  margin-top: 1rem; padding: .85rem clamp(1.1rem, 3vw, 1.75rem) max(.85rem, env(safe-area-inset-bottom));
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 -10px 22px -16px rgba(29, 29, 29, .4);
}

.confirm { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.confirm summary { padding: .8rem 1.1rem; cursor: pointer; color: var(--red-600); font-weight: 600; }
.confirm__body { padding: 0 1.1rem 1.1rem; }
.confirm__body p { margin-bottom: .9rem; color: var(--eng-600); }
.inline-form { display: inline-block; }

.drop { display: grid; gap: 1rem; margin-top: 1.75rem; }
.drop__zone {
  position: relative; display: grid; justify-items: center; gap: .4rem; padding: clamp(2rem, 7vw, 3.5rem) 1.25rem;
  background: var(--white); border: 2px dashed var(--eng-400); border-radius: var(--radius);
  text-align: center; cursor: pointer; color: var(--ocean-600);
  transition: border-color .15s ease, background-color .15s ease;
}
.drop__zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop__zone:has(input:focus-visible) { outline: 2px solid var(--ocean-500); outline-offset: 3px; }
.drop__zone.is-over, .drop__zone.has-file { border-color: var(--ocean-500); background: var(--ocean-100); }
.drop__zone--error { border-color: var(--red-500); }
.drop__title { font-size: 1.25rem; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.drop__hint { color: var(--muted); }
.drop .btn { justify-self: start; }
.alt { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; color: var(--eng-600); }

.addrow { display: grid; gap: 1rem; align-items: end; margin-bottom: .9rem; }
.addrow .field + .field { margin-top: 0; }
@media (min-width: 60rem) { .addrow { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 9rem auto; } }
.addrow .btn { min-height: 2.75rem; }

/* ---- footer ------------------------------------------------------------- */

/* the same green ground as the picture, painted with gradients: still, no leaves */
.foot {
  color: var(--ocean-100); font-size: .94rem;
  background:
    radial-gradient(70% 180% at 80% 120%, rgba(30, 164, 138, .5), rgba(30, 164, 138, 0)),
    radial-gradient(120% 220% at 50% 50%, rgba(3, 44, 40, 0) 40%, rgba(3, 44, 40, .34)),
    linear-gradient(98deg, #075b51, #086a5f 52%, #064c45);
}
.foot__in { max-width: var(--wrap); margin-inline: auto; padding: 1.75rem var(--gutter) max(1.75rem, env(safe-area-inset-bottom)); display: grid; gap: .5rem 2.5rem; }
.foot__name { color: var(--white); font-weight: 600; }
.foot__name span { font-weight: 400; color: var(--ocean-100); margin-left: .5rem; }
.foot ::selection { background: var(--white); color: var(--ocean-700); }
.foot__text { max-width: 60ch; }
.foot__links { display: flex; gap: 1.5rem; }
.foot a { color: var(--white); }
@media (min-width: 56rem) { .foot__in { grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; } }

/* ---- small screens ------------------------------------------------------ */

@media (max-width: 45.99rem) {
  .top__in { gap: .5rem .75rem; }
  .brand__logo { width: 4.4rem; }
  .brand__text { padding-left: .7rem; }
  .brand__name { font-size: 1.05rem; }
  .search { order: 3; flex: 1 1 100%; }
  /* on a narrow phone the menu takes its own row: keep it on the right, where its dropdown fits */
  .top__nav { margin-left: auto; }
  .filters { position: static; }
  .filters__form { margin-left: 0; width: 100%; }
  .filters__form .sel { flex: 1 1 8rem; }
  .filters__form select { width: 100%; }
  .seg { width: 100%; }
  .seg a { flex: 1 1 auto; justify-content: center; padding-inline: .5rem; }
  .plate { min-width: 82%; padding-inline: 1.1rem; }
  .plate::before { left: .35rem; } .plate::after { right: .35rem; }
  .piece__title { font-size: .9rem; }
  .table thead { display: none; }
  .table tr { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table th, .table td { padding: 0; border: 0; }
  .table th { flex: 1 1 100%; }
  .table--log td:last-child { flex: 1 1 100%; }
  .table__thesis { min-width: 0; }
  .table__when span { display: inline; margin-left: .4rem; }
  .tablewrap { overflow-x: visible; }
  .table__act { text-align: left; }
  .admin__head .btnrow, .admin__head .btn { width: 100%; }
  .savebar .btn { flex: 1 1 auto; }
}

/* the thesis you pick moves from the wall to its page */
@view-transition { navigation: auto; }
::view-transition-group(piece) { animation-duration: .38s; animation-timing-function: var(--ease-out); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  @view-transition { navigation: none; }
}

@media print {
  .top, .foot, .filters, .back, .detail__actions, .more, .notes { display: none; }
  body { background: #fff; }
}
