:root {
  --ink: #1a1613;
  --bench: #100e0c;
  --paper: #f6f1e7;
  --rule: #e0d5c6;
  --copper: #8a3f1c;
  --copper-hot: #c46a32;
  --mute: #6a6158;
  --bone: #efe8dc;
  --bone-dim: #cfc4b6;
  --measure: 960px;
  --gutter: 1.15rem;
  --serif: Fraunces, "Iowan Old Style", Palatino, Georgia, serif;
  --sans: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bench);
  color: var(--bone);
  font-size: 1.05rem;
  line-height: 1.5;
}

::selection {
  background: #e4c2a8;
  color: var(--ink);
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  background: var(--paper);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  text-decoration: none;
}

.skip:focus {
  top: 0.6rem;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #100e0c;
  border-bottom: 1px solid rgba(239, 232, 220, 0.08);
}

.bar {
  width: min(var(--measure), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  min-height: 3.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  margin-right: auto;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  color: var(--paper);
  text-decoration: none;
}

.brand span {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper-hot);
  margin-left: 0.4rem;
  position: relative;
  top: -0.08em;
}

.clock {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #a89888;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-links a {
  color: var(--bone);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.45rem 0.45rem;
}

.nav-links a:hover {
  color: #fff;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) 2.75rem;
  background:
    radial-gradient(ellipse 68% 52% at 100% 0%, rgba(196, 106, 50, 0.2), transparent 58%),
    radial-gradient(ellipse 42% 36% at 0% 100%, rgba(196, 106, 50, 0.08), transparent 60%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(246, 241, 231, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 241, 231, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 28%, #000 15%, transparent 72%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--measure), 100%);
  margin: 0;
  padding-top: clamp(2.4rem, 7vh, 5rem);
}

.cup {
  position: absolute;
  z-index: 0;
  top: 1.2rem;
  right: 1.5rem;
  width: min(210px, 20vw);
  height: auto;
  color: #fff;
  pointer-events: none;
  user-select: none;
}

.cup .wire,
.cup .steam,
.cup .axis {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cup .wire {
  stroke-width: 1.35;
  stroke-linecap: butt;
}

.cup .steam {
  stroke: #fff;
  stroke-width: 1.45;
}

.cup .axis {
  stroke-width: 0.6;
  stroke-dasharray: 1.4 4.2;
  opacity: 0.28;
}

.kicker,
.sheet-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper-hot);
}

h1 {
  margin: 0.7rem 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.7rem, 7.2vw, 6rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  color: var(--paper);
}

.line {
  display: block;
  text-wrap: balance;
}

.line-b {
  margin-top: 0.14em;
  font-style: italic;
  font-weight: 500;
  color: #eadccb;
}

.deck,
.lede {
  max-width: 38rem;
  margin: 1.25rem 0 0;
  color: var(--bone-dim);
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.96rem;
  line-height: 1.2;
  border: 1px solid transparent;
}

.btn-solid {
  background: var(--paper);
  color: var(--ink);
}

.btn-solid:hover {
  background: #fff;
}

.btn-line {
  color: var(--paper);
  border-color: rgba(246, 241, 231, 0.38);
}

.btn-line:hover {
  border-color: var(--paper);
}

.btn-ink {
  background: var(--ink);
  color: var(--paper);
}

.btn-ink:hover {
  background: var(--copper);
}

.btn-quiet {
  color: var(--ink);
  border-color: #cfc3b4;
  background: transparent;
}

.btn-quiet:hover {
  border-color: var(--ink);
}

.sign {
  margin: 2.4rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a89888;
}

#rates,
#write {
  scroll-margin-top: 4.25rem;
}

.sheet {
  position: relative;
  z-index: 1;
  width: min(var(--measure), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 3.15rem);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.sheet h2 {
  margin: 0.4rem 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.15rem, 4.4vw, 3.35rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.sheet .lede {
  color: #3f3832;
  margin-top: 0.9rem;
  font-size: 1.05rem;
}

.sheet-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-top: 1.55rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
}

.filters legend {
  padding: 0;
  margin-right: 0.35rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}

.filters input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.filters label {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3rem 0.85rem;
  border: 1px solid #d3c8b8;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--ink);
}

.filters input:checked + label {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.filters input:focus-visible + label {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

.filters label:hover {
  border-color: var(--ink);
}

.showing {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.n {
  display: none;
}

.n-all {
  display: inline;
}

body:has(#show-pages:checked) .n-all,
body:has(#show-machines:checked) .n-all,
body:has(#show-networks:checked) .n-all,
body:has(#show-urgent:checked) .n-all {
  display: none;
}

body:has(#show-pages:checked) .n-pages,
body:has(#show-machines:checked) .n-machines,
body:has(#show-networks:checked) .n-networks,
body:has(#show-urgent:checked) .n-urgent {
  display: inline;
}

.rates {
  margin: 1.15rem 0 0;
  padding: 0;
  border-bottom: 1px solid var(--rule);
}

.rate {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  grid-template-areas:
    "idx title price"
    "idx body body";
  column-gap: 0.9rem;
  row-gap: 0.4rem;
  margin: 0 -0.75rem;
  padding: 1.3rem 0.75rem;
  border-top: 1px solid var(--rule);
}

.rate--lead {
  background: linear-gradient(90deg, rgba(138, 63, 28, 0.1), rgba(138, 63, 28, 0.02) 68%, transparent);
}

.idx {
  grid-area: idx;
  align-self: start;
  padding-top: 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--copper);
}

.rate h3 {
  grid-area: title;
  margin: 0;
  font-family: var(--serif);
  font-weight: 650;
  font-size: clamp(1.32rem, 2vw, 1.68rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.price {
  grid-area: price;
  margin: 0;
  text-align: right;
}

.amt {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.unit {
  margin-left: 0.2rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: var(--copper);
}

.what {
  grid-area: body;
  max-width: 40rem;
}

.what p {
  margin: 0.35rem 0 0;
  color: #4a433c;
  font-size: 0.98rem;
  line-height: 1.5;
}

.glance {
  margin: 0.15rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--copper);
}

.write {
  margin-top: 2.6rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--rule);
}

.foot {
  width: min(var(--measure), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: 1.35rem 0 2.4rem;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  flex-wrap: wrap;
  color: #a3988c;
  font-size: 0.88rem;
}

.foot p {
  margin: 0;
}

body:has(#show-pages:checked) .rate:not([data-kind="pages"]),
body:has(#show-machines:checked) .rate:not([data-kind="machines"]),
body:has(#show-networks:checked) .rate:not([data-kind="networks"]),
body:has(#show-urgent:checked) .rate:not([data-kind="urgent"]) {
  display: none;
}

@media (max-width: 1320px) {
  .cup {
    position: relative;
    display: block;
    top: auto;
    right: auto;
    width: 148px;
    margin: 1.75rem auto 0;
  }
}

@media (max-width: 680px) {
  .clock {
    display: none;
  }

  .hero {
    padding-bottom: 1.75rem;
  }

  .hero-inner {
    padding-top: 1.6rem;
  }

  .cup {
    position: relative;
    display: block;
    top: auto;
    right: auto;
    width: 128px;
    margin: 1.6rem auto 0;
  }

  .rate {
    grid-template-columns: 2rem minmax(0, 1fr);
    grid-template-areas:
      "idx title"
      "idx price"
      "idx body";
  }

  .price {
    text-align: left;
  }

  .filters legend {
    width: 100%;
    margin: 0 0 0.15rem;
  }
}

@media (max-width: 380px) {
  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cup .steam path {
    animation: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-inner {
    animation: rise 0.7s ease both;
  }

  .cup .steam path {
    transform-box: fill-box;
    transform-origin: center bottom;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.85));
    animation: steam 4.8s ease-in infinite;
  }

  .cup .steam path:nth-child(2) {
    animation-name: steam-c;
    animation-duration: 5.5s;
    animation-delay: -1.7s;
  }

  .cup .steam path:last-child {
    animation-name: steam-b;
    animation-duration: 6.6s;
    animation-delay: -3.1s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes steam {
  0% {
    transform: translate(0, 6px);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(3px, -28px);
    opacity: 0;
  }
}

@keyframes steam-b {
  0% {
    transform: translate(0, 8px);
    opacity: 0;
  }
  24% {
    opacity: 0.95;
  }
  100% {
    transform: translate(-4px, -24px);
    opacity: 0;
  }
}

@keyframes steam-c {
  0% {
    transform: translate(0, 7px);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translate(-2px, -30px);
    opacity: 0;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .nav,
  .filters,
  .skip,
  .sign,
  .cup,
  .hero::before {
    display: none;
  }

  .hero {
    min-height: 0;
    padding: 0 0 1rem;
    background: #fff;
  }

  h1,
  .line-b,
  .deck {
    color: #000;
  }

  .sheet {
    width: auto;
    margin: 0;
    box-shadow: none;
    background: #fff;
  }

  .rates .rate {
    display: grid !important;
    break-inside: avoid;
  }

  .btn {
    border-color: #000;
    color: #000;
  }
}
