/* ==========================================================================
   Manuscript Templates
   A self-contained gallery: nothing here depends on the main site's styles,
   so the folder can move to its own domain as it is.
   ========================================================================== */

:root {
  --canvas: #ffffff;
  --desk: #f5f5f7;
  --desk-hover: #efeff2;
  --ink: #1d1d1f;
  --ink-secondary: #6e6e73;
  --hairline: #d2d2d7;
  --hairline-soft: #e8e8ed;
  --accent: #d11840; /* Manuscript pink, darkened to 5.36:1 on white */
  --accent-hover: #b5113a;
  --focus: #0071e3;

  --docx: #0974e0;
  --xlsx: #1f8638;
  --pptx: #d63a31;

  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Geist",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Geist",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* New York on Apple devices, Newsreader elsewhere. */
  --font-serif: ui-serif, "New York", "Newsreader", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bar-height: 44px;
  --page: min(1180px, 100% - 44px);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-padding-top: calc(var(--bar-height) + 72px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  letter-spacing: -0.022em;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
  letter-spacing: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 8px 16px;
  border-radius: 980px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  translate: 0 -200%;
}

.skip-link:focus-visible {
  translate: 0 0;
}

.noscript {
  width: var(--page);
  margin: 0 auto 48px;
  color: var(--ink-secondary);
}

/* --------------------------------------------------------------------------
   Bar
   -------------------------------------------------------------------------- */

.bar {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.bar__inner {
  display: flex;
  width: min(95%, 105rem);
  height: var(--bar-height);
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-inline: auto;
}

.bar__brand {
  display: inline-flex;
  height: var(--bar-height);
  flex: none;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 20px;
  text-decoration: none;
}

.bar__brand img {
  width: 1rem;
  height: 1rem;
}

.bar__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.bar__links a {
  display: block;
  padding-block: 12px;
  color: var(--ink);
  font-size: 0.8125rem;
  letter-spacing: -0.005em;
  line-height: 20px;
  opacity: 0.8;
  text-decoration: none;
}

.bar__links a:hover,
.bar__links a[aria-current] {
  opacity: 1;
}

.bar__links .bar__get {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding-block: 0;
  padding-inline: 12px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  opacity: 1;
}

.bar__links .bar__get:hover {
  background: var(--accent-hover);
}

/* --------------------------------------------------------------------------
   Intro and mode switch
   -------------------------------------------------------------------------- */

.intro {
  display: grid;
  justify-items: center;
  width: var(--page);
  margin-inline: auto;
  padding-block: 72px 40px;
  text-align: center;
}

.intro h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.intro__lead {
  max-width: 34em;
  margin-block-start: 16px;
  color: var(--ink-secondary);
  font-size: clamp(19px, 1.8vw, 21px);
  letter-spacing: 0.011em;
  line-height: 1.38;
}

/* A segmented control. The thumb slides under whichever tab is selected. */
.modes {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-block-start: 36px;
  padding: 3px;
  border-radius: 980px;
  background: #ececf0;
}

.modes__thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 980px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.12),
    0 3px 8px rgba(0, 0, 0, 0.06);
  transition: translate 0.35s var(--ease);
}

.modes[data-active="discover"] .modes__thumb {
  translate: 100% 0;
}

.modes__tab {
  position: relative;
  min-width: 132px;
  min-height: 40px;
  padding: 0 28px;
  border: 0;
  border-radius: 980px;
  background: none;
  color: var(--ink-secondary);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.modes__tab[aria-selected="true"] {
  color: var(--ink);
}

.panel {
  padding-block-end: 112px;
}

.panel[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   Browse
   -------------------------------------------------------------------------- */

.toolbar {
  position: sticky;
  z-index: 20;
  top: var(--bar-height);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.toolbar__inner {
  display: flex;
  width: var(--page);
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-inline: auto;
  padding-block: 12px;
}

.search {
  position: relative;
  display: block;
  width: min(320px, 100%);
}

.search__icon {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--ink-secondary);
  translate: 0 -50%;
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--desk);
  color: var(--ink);
  font-size: 15px;
}

.search input::placeholder {
  color: var(--ink-secondary);
}

.search input:focus-visible {
  outline-offset: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  border-radius: 980px;
  background: var(--desk);
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.filter:hover {
  background: var(--desk-hover);
}

.filter[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

.dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
}

.dot--docx {
  background: var(--docx);
}

.dot--xlsx {
  background: var(--xlsx);
}

.dot--pptx {
  background: var(--pptx);
}

.shelves {
  width: var(--page);
  margin-inline: auto;
}

.shelf {
  margin-block-start: 48px;
}

.shelf__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-block-end: 20px;
}

.shelf__head h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.007em;
}

.shelf__count {
  color: var(--ink-secondary);
  font-size: 15px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 32px 20px;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding-block: 80px;
  color: var(--ink-secondary);
  text-align: center;
}

.empty strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: #0066cc;
  cursor: pointer;
  font-size: 17px;
}

.link-button:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */

.card {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.card:focus-visible {
  outline: none;
}

.card:focus-visible .desk {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.card .desk {
  margin-block-end: 10px;
}

.card__name {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.24;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-secondary);
  font-size: 14px;
}

.card__reasons {
  display: block;
  margin-block-start: 4px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.card__reasons::before {
  margin-inline-end: 6px;
  color: var(--accent);
  content: "✓";
  font-weight: 600;
}

.badge {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  padding: 3px 10px;
  border-radius: 980px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   The desk and the paper on it
   Every miniature is drawn from the catalogue. Measurements inside a page
   use cqi, a percentage of the page's own width, so one drawing serves the
   card and the large preview.
   -------------------------------------------------------------------------- */

.desk {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  place-items: center;
  border-radius: 18px;
  background: var(--desk);
  transition: background-color 0.3s var(--ease);
}

.card:hover .desk {
  background: var(--desk-hover);
}

.paper {
  --accent: #1d1d1f;
  --tint: color-mix(in srgb, var(--accent) 14%, white);
  --line: #e3e3e8;
  position: relative;
  display: block;
  container-type: inline-size;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 10px 28px -6px rgba(0, 0, 0, 0.14);
  transition:
    translate 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.card:hover .paper {
  translate: 0 -4px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.08),
    0 18px 36px -8px rgba(0, 0, 0, 0.2);
}

.paper--doc {
  height: 84%;
  aspect-ratio: 1 / 1.414;
  border-radius: 2px;
}

.paper--sheet {
  width: 82%;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
}

/* A deck shows the next slide resting beneath the first. The wrapper lifts
   both together and isolates them, so the slide underneath never paints
   over the one on top. */
.deck {
  position: relative;
  width: 80%;
  aspect-ratio: 16 / 9;
  container-type: inline-size;
  isolation: isolate;
  transition: translate 0.4s var(--ease);
}

.deck::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: 4px;
  background: #e3e3e8;
  content: "";
  scale: 0.9;
  translate: 0 7cqi;
}

.paper--slide {
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

.card:hover .deck {
  translate: 0 -4px;
}

.card:hover .deck .paper {
  translate: none;
}

.pp {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 3cqi;
  overflow: hidden;
  padding: 10cqi 11cqi;
  border-radius: inherit;
}

.paper--serif .pp {
  gap: 4.2cqi;
  padding-inline: 13cqi;
}

.pp i,
.pp b {
  display: block;
  flex: none;
  font-style: normal;
}

.pp-title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 7.5cqi;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.paper--serif .pp-title,
.paper--serif .pp-chapter {
  font-family: var(--font-serif);
  font-weight: 500;
}

.pp-title--center {
  margin-block: 14cqi 2cqi;
  text-align: center;
}

.pp-line {
  height: 1.6cqi;
  border-radius: 1cqi;
  background: var(--line);
}

.pp-line--end {
  width: 62%;
}

.pp-heading {
  width: 40%;
  height: 2.4cqi;
  margin-block-start: 2cqi;
  border-radius: 1cqi;
  background: var(--ink);
  opacity: 0.85;
}

.pp-rule {
  height: 0.7cqi;
  background: var(--accent);
}

.pp-gap {
  height: 6cqi;
}

.pp-cover {
  display: flex;
  height: 50cqi;
  flex: none;
  align-items: flex-end;
  margin: -10cqi -11cqi 3cqi;
  padding: 10cqi 11cqi;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, 0.22), transparent 60%),
    var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 9cqi;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.pp-meta {
  display: flex;
  gap: 3cqi;
}

.pp-meta i {
  width: 18%;
  height: 1.4cqi;
  border-radius: 1cqi;
  background: #c7c7cc;
}

.pp-meta i:nth-child(2) {
  width: 26%;
}

.pp-list {
  display: flex;
  align-items: center;
  gap: 2.4cqi;
}

.pp-list b {
  width: 1.8cqi;
  height: 1.8cqi;
  border-radius: 50%;
  background: var(--accent);
}

.pp-list i {
  flex: 1;
  height: 1.6cqi;
  border-radius: 1cqi;
  background: var(--line);
}

.pp-list:nth-of-type(even) i {
  flex: 0 0 58%;
}

.pp-table {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 0.8cqi;
  margin-block: 2cqi;
}

.pp-table i {
  height: 4cqi;
  border-radius: 0.6cqi;
  background: #f2f2f5;
}

.pp-table i:nth-child(-n + 4) {
  background: var(--tint);
}

.pp-chart {
  display: flex;
  height: 26cqi;
  align-items: flex-end;
  gap: 3cqi;
  margin-block: 2cqi;
  padding-block-end: 1cqi;
  border-bottom: 0.4cqi solid var(--line);
}

.pp-chart i {
  flex: 1;
  height: var(--h);
  border-radius: 0.8cqi 0.8cqi 0 0;
  background: var(--accent);
}

.pp-chart i:nth-child(odd) {
  background: var(--tint);
}

.pp-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.6cqi 6cqi;
}

.pp-totals {
  display: grid;
  width: 46%;
  gap: 2cqi;
  margin-block-start: auto;
  margin-inline-start: auto;
}

.pp-totals i {
  height: 1.6cqi;
  border-radius: 1cqi;
  background: var(--line);
}

.pp-totals i:last-child {
  height: 3.4cqi;
  background: var(--ink);
}

.pp-byline {
  width: 30%;
  height: 1.4cqi;
  margin: 0 auto 10cqi;
  border-radius: 1cqi;
  background: #c7c7cc;
}

.pp-chapter {
  margin-block: 26cqi 6cqi;
  color: var(--ink);
  font-size: 5.6cqi;
  letter-spacing: 0.02em;
  text-align: center;
}

.pp-dropcap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4.2cqi 3cqi;
  margin-block-start: 6cqi;
}

.pp-dropcap b {
  grid-row: span 3;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 17cqi;
  font-weight: 500;
  line-height: 0.82;
}

.pp-dropcap i {
  height: 1.6cqi;
  align-self: center;
  border-radius: 1cqi;
  background: var(--line);
}

.pp-masthead {
  padding-block-end: 2.4cqi;
  border-bottom: 0.7cqi solid var(--accent);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 11cqi;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.pp-image {
  aspect-ratio: 16 / 8;
  border-radius: 1.4cqi;
  background:
    radial-gradient(60% 80% at 25% 100%, color-mix(in srgb, var(--accent) 55%, white), transparent 70%),
    linear-gradient(160deg, var(--tint), color-mix(in srgb, var(--accent) 35%, white));
}

.pp-signature {
  width: 34%;
  height: auto;
  margin-block-start: 4cqi;
  color: var(--ink);
}

/* Screenplay: Courier-style type, a scene heading, action, then centred
   character names over narrow dialogue. */
.paper--mono .pp {
  gap: 2.6cqi;
}

.pp-slug {
  width: 70%;
  height: 1.8cqi;
  border-radius: 1cqi;
  background: var(--ink);
  opacity: 0.85;
}

.pp-character {
  width: 20%;
  height: 1.6cqi;
  margin: 2cqi auto 0;
  border-radius: 1cqi;
  background: #8e8e93;
}

.pp-speech {
  width: 56%;
  height: 1.6cqi;
  margin-inline: auto;
  border-radius: 1cqi;
  background: var(--line);
}

/* Spreadsheet */
.ps {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 5cqi repeat(5, 1fr);
  grid-template-rows: 5cqi;
  grid-auto-rows: 1fr;
  overflow: hidden;
  border-radius: inherit;
}

.ps > i {
  display: flex;
  align-items: center;
  padding: 0 1.4cqi;
  border-right: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  font-style: normal;
}

.ps > i::after {
  display: block;
  width: var(--w, 60%);
  height: 1.3cqi;
  border-radius: 1cqi;
  background: var(--line);
  content: "";
}

.ps > i.ps-axis {
  justify-content: center;
  background: #f5f5f7;
}

.ps > i.ps-axis::after {
  width: 1.6cqi;
  background: #c7c7cc;
}

.ps > i.ps-head {
  background: var(--tint);
}

.ps > i.ps-head::after {
  background: var(--accent);
  opacity: 0.7;
}

.ps > i.ps-num {
  justify-content: flex-end;
}

.ps > i.ps-empty::after {
  display: none;
}

.ps > i.ps-total {
  background: color-mix(in srgb, var(--accent) 8%, white);
}

.ps > i.ps-total::after {
  background: var(--ink);
}

.ps > i.ps-pill::after {
  width: 64%;
  height: 2.6cqi;
  background: var(--pill);
  opacity: 0.85;
}

.ps > i.ps-block {
  padding: 0.6cqi;
}

.ps > i.ps-block::after {
  width: 100%;
  height: 100%;
  border-radius: 0.8cqi;
  background: var(--fill);
  opacity: 0.85;
}

.ps-chart {
  position: absolute;
  right: 5cqi;
  bottom: 5cqi;
  display: flex;
  width: 38%;
  height: 34%;
  align-items: flex-end;
  gap: 2cqi;
  padding: 3cqi;
  border-radius: 1.6cqi;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.1),
    0 6px 16px rgba(0, 0, 0, 0.1);
}

.ps-chart b {
  display: block;
  flex: 1;
  height: var(--h);
  border-radius: 0.6cqi 0.6cqi 0 0;
  background: var(--accent);
}

.ps-chart b:nth-child(even) {
  background: var(--tint);
}

/* Presentation */
.pd {
  position: relative;
  display: grid;
  height: 100%;
  overflow: hidden;
  padding: 7cqi 8cqi;
  border-radius: inherit;
}

.pd i,
.pd b {
  display: block;
  font-style: normal;
}

.pd-title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 5cqi;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.pd-line {
  height: 1.3cqi;
  border-radius: 1cqi;
  background: var(--line);
}

.pd--figure {
  align-content: space-between;
  background: #1d1d1f;
}

.pd--figure .pd-title {
  color: #f5f5f7;
}

.pd-figure {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 24cqi;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.pd--figure .pd-line {
  width: 42%;
  background: rgba(255, 255, 255, 0.28);
}

.pd--bars {
  grid-template-columns: 1fr 1.2fr;
  align-items: end;
  gap: 6cqi;
}

.pd-copy {
  display: grid;
  gap: 2.2cqi;
  align-self: center;
}

.pd-bars {
  display: flex;
  height: 80%;
  align-items: flex-end;
  gap: 2.4cqi;
}

.pd-bars b {
  flex: 1;
  height: var(--h);
  border-radius: 1cqi 1cqi 0 0;
  background: var(--accent);
}

.pd-bars b:not(:last-child) {
  background: var(--tint);
}

.pd--split {
  grid-template-columns: 1fr 1fr;
  gap: 6cqi;
  padding: 0;
}

.pd--split .pd-copy {
  padding-inline-end: 8cqi;
}

.pd-image {
  background:
    radial-gradient(70% 70% at 30% 80%, color-mix(in srgb, var(--accent) 70%, white), transparent 70%),
    linear-gradient(150deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #1d1d1f));
}

/* --------------------------------------------------------------------------
   Discover
   -------------------------------------------------------------------------- */

.composer {
  width: var(--page);
  margin: 24px auto 0;
  text-align: center;
}

.composer__label {
  color: var(--ink-secondary);
  font-size: 15px;
  font-weight: 500;
}

/* The sentence is set in New York so it reads as writing, not as a form.
   Each blank is a native select, so choosing works with any input. */
.sentence {
  max-width: 19em;
  margin: 16px auto 0;
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.35;
  text-wrap: balance;
}

.sentence__hold {
  white-space: nowrap;
}

.blank {
  display: inline-block;
  border-radius: 8px;
}

.blank select {
  max-width: 100%;
  padding: 0 0.75em 0 0.05em;
  border: 0;
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: 0;
  appearance: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23d11840' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    right 0.08em center / 0.42em auto no-repeat;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  line-height: 1.15;
  transition: border-color 0.2s var(--ease);
}

.blank select:hover {
  border-bottom-color: var(--accent);
}

.blank select:focus-visible {
  border-radius: 4px;
  outline-offset: 4px;
}

.results {
  width: var(--page);
  margin: 72px auto 0;
}

.results__title {
  margin-block-end: 20px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.007em;
}

/* --------------------------------------------------------------------------
   Preview sheet
   -------------------------------------------------------------------------- */

.sheet {
  width: min(980px, 100% - 40px);
  max-width: none;
  max-height: min(720px, 100dvh - 40px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  color: var(--ink);
}

.sheet::backdrop {
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sheet[open] {
  animation: sheet-in 0.35s var(--ease);
}

@keyframes sheet-in {
  from {
    opacity: 0;
    scale: 0.96;
  }
}

.sheet__body {
  display: grid;
  max-height: inherit;
  grid-template-columns: 1.1fr 1fr;
}

.sheet__desk {
  display: grid;
  min-height: 560px;
  place-items: center;
  background: var(--desk);
}

.sheet__desk .paper--doc {
  height: 82%;
}

.sheet__desk .paper--sheet,
.sheet__desk .deck {
  width: 84%;
}

.sheet__info {
  overflow-y: auto;
  padding: 56px 44px 40px;
}

.sheet__format {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 600;
}

.sheet__info h2 {
  margin-block-start: 8px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.004em;
  line-height: 1.12;
}

.sheet__description {
  margin-block-start: 12px;
  color: var(--ink-secondary);
  font-size: 17px;
}

.sheet__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-block-start: 28px;
  border-block: 1px solid var(--hairline-soft);
}

.sheet__facts div {
  padding-block: 14px;
}

.sheet__facts div + div {
  padding-inline-start: 20px;
  border-inline-start: 1px solid var(--hairline-soft);
}

.sheet__facts dt {
  color: var(--ink-secondary);
  font-size: 12px;
}

.sheet__facts dd {
  font-size: 17px;
  font-weight: 600;
}

.sheet__subhead {
  margin-block-start: 28px;
  font-size: 15px;
  font-weight: 600;
}

.sheet__includes {
  display: grid;
  gap: 8px;
  margin-block-start: 10px;
  font-size: 15px;
}

.sheet__includes li {
  display: flex;
  gap: 10px;
}

.sheet__includes li::before {
  color: var(--accent);
  content: "✓";
  font-weight: 600;
}

.sheet__actions {
  margin-block-start: 32px;
}

.pill {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 0;
  border-radius: 980px;
  cursor: pointer;
  font-size: 17px;
  transition: background-color 0.2s var(--ease);
}

.pill--filled {
  background: var(--accent);
  color: #fff;
}

.pill--filled:hover {
  background: var(--accent-hover);
}

.sheet__note {
  min-height: 1.4em;
  margin-block-start: 12px;
  color: var(--ink-secondary);
  font-size: 14px;
}

.sheet__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
  cursor: pointer;
}

.sheet__close:hover {
  background: rgba(0, 0, 0, 0.1);
}

.sheet__close svg {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--hairline-soft);
  background: var(--desk);
  color: var(--ink-secondary);
  font-size: 12px;
  letter-spacing: -0.01em;
}

.foot__inner {
  display: flex;
  width: var(--page);
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 28px;
  margin-inline: auto;
  padding-block: 20px 28px;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
}

.foot li + li {
  margin-inline-start: 10px;
  padding-inline-start: 10px;
  border-inline-start: 1px solid var(--hairline);
}

.foot a {
  color: #424245;
  text-decoration: none;
}

.foot a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.foot__locale {
  margin-inline-start: auto;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 834px) {
  .toolbar__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .search {
    width: 100%;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -22px;
    padding-inline: 22px;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .filter {
    flex: none;
  }

  .sheet__body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .sheet__desk {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .sheet__info {
    overflow: visible;
    padding: 28px 24px 32px;
  }
}

@media (max-width: 734px) {
  :root {
    --bar-height: 48px;
    --page: min(1180px, 100% - 32px);
  }

  .bar__inner {
    padding-inline: 16px;
  }

  .bar__links {
    gap: 1.5rem;
  }

  .bar__links a[data-mode-link] {
    display: none;
  }

  .intro {
    padding-block: 48px 32px;
  }

  .modes {
    width: min(100%, 320px);
  }

  .modes__tab {
    min-width: 0;
    padding: 0 16px;
  }

  .filters {
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
  }

  .desk {
    border-radius: 14px;
  }

  .card__name {
    font-size: 15px;
  }

  .card__meta,
  .card__reasons {
    font-size: 13px;
  }

  .shelf__head h2,
  .results__title {
    font-size: 24px;
  }

  .sheet {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 22px;
  }

  .foot__locale {
    flex-basis: 100%;
    margin-inline-start: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .card:hover .paper,
  .card:hover .deck {
    translate: none;
  }
}
