/* =========================================================================
   Sections three to six.

   The rule here is: no two blocks in a row use the same shape. A trio of
   tinted plates, then a wide writing sheet, then an asymmetric world grid,
   then a two-up maker. The engravings carry the character and are always
   large enough to read as engravings.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Tinted plates with an engraving
   ------------------------------------------------------------------------- */

.plates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 0.6rem + 1.2vw, 1.5rem);
  margin-top: clamp(2.5rem, 1.6rem + 2.4vw, 3.75rem);
}

.plate-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: var(--radius-block);
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}

.plate-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.plate-card__art {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: var(--bg-tint);
}

.plate-card[data-tone='sage'] .plate-card__art { background: var(--sage-tint); }
.plate-card[data-tone='olive'] .plate-card__art { background: var(--olive-tint); }
.plate-card[data-tone='crimson'] .plate-card__art { background: var(--crimson-tint); }

.plate-card__art .cut {
  width: 46%;
  height: 72%;
  color: var(--ink);
  opacity: 0.9;
  transition: transform var(--t-slow) var(--ease);
}

.plate-card:hover .plate-card__art .cut {
  transform: scale(1.06) rotate(-1.5deg);
}

.plate-card__title {
  margin: 1.4rem 1.4rem 0;
  font-size: var(--step-h3);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.plate-card__text {
  margin: 0.5rem 1.4rem 1.6rem;
  font-size: var(--step-small);
  line-height: 1.6;
  color: var(--ink-2);
}

/* -------------------------------------------------------------------------
   2. The writing sheet
   ------------------------------------------------------------------------- */

.sheetwrap {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  padding-block: clamp(2.5rem, 1.6rem + 3vw, 4.5rem);
  background: var(--bg-tint);
  border-block: 1px solid var(--line);
}

.sheetwrap__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: clamp(1.5rem, 1rem + 3vw, 4rem);
  align-items: center;
}

.sheetwrap__title {
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.sheetwrap__text {
  margin-top: 0.9rem;
  margin-bottom: 1.5rem;
  color: var(--ink-2);
  font-size: var(--step-small);
  line-height: 1.6;
  max-width: 34ch;
}

.sheet {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-frame);
  box-shadow: var(--shadow-frame);
  overflow: hidden;
}

.sheet__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.sheet__tool {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.4rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.sheet__tool svg {
  width: 1.05rem;
  height: 1.05rem;
}

.sheet__tool--wide {
  padding: 0 0.6rem;
  font-size: 0.78rem;
}

.sheet__tool:hover {
  background: var(--bg);
  border-color: var(--line-2);
}

.sheet__sep {
  width: 1px;
  margin: 0.3rem 0.35rem;
  background: var(--line-2);
}

.sheet__page {
  padding: clamp(1.4rem, 1rem + 1.5vw, 2.4rem);
  min-height: 17rem;
  outline: none;
  line-height: 1.7;
  font-size: var(--step-small);
}

.sheet__page:focus-visible {
  box-shadow: inset 3px 0 0 var(--crimson);
}

.sheet__page h3 {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
}

.sheet__page p {
  margin: 0 0 0.9rem;
}

.sheet__page ul {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
}

.sheet__page li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.35rem;
}

.sheet__page li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.66em;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--crimson);
  border-radius: 1px;
  transform: rotate(45deg);
}

.sheet__page mark {
  background: var(--olive-tint);
  color: inherit;
  padding: 0.05em 0.25em;
  border-radius: 0.25em;
}

.sheet__status {
  padding: 0.6rem 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-3);
  background: var(--bg-soft);
}

.sheet__status[data-typing='true'] {
  color: var(--crimson-deep);
}

/* -------------------------------------------------------------------------
   3. The world grid
   ------------------------------------------------------------------------- */

.world__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 0.6rem + 1.4vw, 2rem);
  margin-top: clamp(2.5rem, 1.6rem + 2.4vw, 3.75rem);
}

/* All three sit on the same line. The earlier version dropped the middle one,
   which read as a broken grid rather than a deliberate stagger. */
.world__cell {
  position: relative;
  padding: 1.6rem 1.5rem 1.7rem;
  border-radius: var(--radius-block);
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}

.world__cell:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

/* A large engraving bleeding out of the corner, so each cell has a character
   of its own instead of a row of equal boxes. */
.world__cut {
  position: absolute;
  right: -1.6rem;
  bottom: -1.6rem;
  width: 8.5rem;
  height: 8.5rem;
  color: var(--ink);
  opacity: 0.1;
  transition: transform var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease);
}

.world__cell:hover .world__cut {
  transform: scale(1.08) rotate(-4deg);
  opacity: 0.16;
}

.world__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  margin-bottom: 1.1rem;
}

.world__badge .cut {
  width: 70%;
  height: 70%;
  color: var(--ink);
}

.world__cell:nth-child(1) .world__badge { background: var(--sage-tint); }
.world__cell:nth-child(2) .world__badge { background: var(--olive-tint); }
.world__cell:nth-child(3) .world__badge { background: var(--crimson-tint); }

.world__examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1.1rem;
  position: relative;
}

.world__example {
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-2);
}

.world__title {
  position: relative;
  font-size: var(--step-h3);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.world__text {
  position: relative;
  margin-top: 0.6rem;
  font-size: var(--step-small);
  line-height: 1.6;
  color: var(--ink-2);
}

/* -------------------------------------------------------------------------
   4. The character maker
   ------------------------------------------------------------------------- */

.maker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 1rem + 3vw, 4rem);
  align-items: start;
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  border-radius: var(--radius-block);
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.maker__title {
  font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.maker__text {
  margin-top: 0.75rem;
  font-size: var(--step-small);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 40ch;
}

/* The four template tabs. They had no rule at all, so the browser drew its
   own grey buttons in the middle of the card. */
.maker__kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.maker__kind {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.95rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-3);
  cursor: pointer;
  transition:
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

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

.maker__kind[aria-selected='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.maker__arts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.maker__art {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-chip);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}

.maker__art .cut {
  width: 74%;
  height: 74%;
}

.maker__art[aria-pressed='true'] {
  border-color: var(--crimson);
  background: var(--tint-crimson);
}

.maker__where {
  margin: 0;
  font-size: var(--step-small);
  color: var(--ink-3);
}

.maker__form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

/* The chips above end flush with this row, so without the gap the button
   borders sat straight on the last chip. */
.maker__roll {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.maker__out {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

/* The card being built. */
.npc-card {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-frame);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}

.npc-card__art {
  aspect-ratio: 3 / 2;
  background: var(--sage-tint);
  display: grid;
  place-items: center;
  border-bottom: 1.5px solid var(--ink);
}

.npc-card__art .cut {
  width: 38%;
  height: 80%;
  color: var(--ink);
}

.npc-card__head {
  padding: 1rem 1.1rem 0.4rem;
}

.npc-card__name {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.npc-card__role {
  font-size: 0.84rem;
  font-weight: 700;
  margin-top: 0.2rem;
  color: var(--ink-2);
}

.npc-card__body {
  padding: 0.6rem 1.1rem 0;
  display: grid;
  gap: 0.7rem;
}

.npc-card__row {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.npc-card__key {
  font-size: var(--step-label);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 0.12rem;
}

.npc-card__value[data-empty='true'] {
  color: var(--ink-3);
  font-style: italic;
}

.npc-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 1rem 1.1rem 1.2rem;
}

.npc-card__tag {
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--olive-tint);
  font-size: 0.72rem;
  font-weight: 800;
}

/* -------------------------------------------------------------------------
   5. Narrow
   ------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .plates,
  .world__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .world__cell:nth-child(2) {
    margin-top: 0;
  }

  .sheetwrap__grid,
  .maker {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .plates,
  .world__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------------------------------------------------------
   6. The team row
   One wide card carrying the live poll, two narrower ones beside it.
   ------------------------------------------------------------------------- */

.team__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 0.6rem + 1.2vw, 1.5rem);
  margin-top: clamp(2.5rem, 1.6rem + 2.4vw, 3.75rem);
  align-items: start;
}

.team__card {
  position: relative;
  padding: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  border-radius: var(--radius-block);
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}

.team__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.team__card--wide {
  background: var(--bg-tint);
  border-color: var(--line-2);
}

/* The engraving sits in a tinted plate rather than loose on the card, and a
   second, much larger copy bleeds out of the corner. */
.team__cut {
  width: 3rem;
  height: 3rem;
  padding: 0.65rem;
  box-sizing: content-box;
  border-radius: 0.9rem;
  color: var(--ink);
  margin-bottom: 1.1rem;
  position: relative;
}

.team__card:nth-child(1) .team__cut { background: var(--olive-tint); }
.team__card:nth-child(2) .team__cut { background: var(--sage-tint); }
.team__card:nth-child(3) .team__cut { background: var(--crimson-tint); }

.team__title,
.team__text,
.team__chips,
.poll {
  position: relative;
}

.team__title {
  font-size: var(--step-h3);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.team__text {
  margin-top: 0.55rem;
  font-size: var(--step-small);
  line-height: 1.6;
  color: var(--ink-2);
}

.team__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.1rem;
}

.team__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-2);
  font-size: 0.82rem;
  font-weight: 700;
}

.team__chip .ico {
  width: 1rem;
  height: 1rem;
  color: var(--crimson);
}

/* -------------------------------------------------------------------------
   7. The ecosystem row
   Deliberately the lightest block on the page: the goal is still the app.
   ------------------------------------------------------------------------- */

.around {
  border-top: 1px solid var(--line);
}

.around__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
  margin-top: 2.5rem;
}

.around__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.4rem 1.2rem 1.2rem;
  border-radius: var(--radius-block);
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
  transition:
    transform var(--t-mid) var(--ease),
    box-shadow var(--t-mid) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.around__item:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-lift);
}

/* A wash that only arrives on hover, so the row is calm until it is touched. */
.around__item::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--t-mid) var(--ease);
}

.around__item:nth-child(1)::before { background: var(--sage-tint); }
.around__item:nth-child(2)::before { background: var(--olive-tint); }
.around__item:nth-child(3)::before { background: var(--bg-tint); }
.around__item:nth-child(4)::before { background: var(--crimson-tint); }

.around__item:hover::before {
  opacity: 1;
}

.around__cut {
  position: relative;
  width: 3.2rem;
  height: 3.2rem;
  color: var(--ink);
  opacity: 0.82;
  margin-bottom: 0.5rem;
  transition: transform var(--t-slow) var(--ease), opacity var(--t-fast) var(--ease);
}

.around__item:hover .around__cut {
  opacity: 1;
  transform: scale(1.09) rotate(-3deg);
}

.around__name,
.around__text,
.around__cta {
  display: block;
  position: relative;
}

.around__name {
  display: block;
  font-size: 1.02rem;
  font-weight: 800;
}

.around__text {
  display: block;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-2);
  flex: 1;
}

.around__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 800;
  margin-top: 0.4rem;
}

.around__cta::after {
  content: '→';
  color: var(--crimson);
  transition: transform var(--t-fast) var(--ease);
}

.around__item:hover .around__cta::after {
  transform: translateX(3px);
}

@media (max-width: 960px) {
  .team__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .around__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .around__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------------------------------------------------------
   8. The free access card
   The earlier version was one flat sage slab the size of the section, which
   is the most dated shape on a page like this. Now it is a white card on a
   soft mesh, with the three facts as a row and the brand hues only as tints.
   ------------------------------------------------------------------------- */

.free__card {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 1.3rem + 3vw, 4rem);
  border-radius: var(--radius-block);
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-frame);
  isolation: isolate;
}

/* Two soft washes rather than one flat fill. */
.free__card::before {
  content: '';
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 150%;
  z-index: -1;
  background:
    radial-gradient(42% 46% at 18% 22%, var(--tint-olive-2) 0%, transparent 70%),
    radial-gradient(38% 44% at 86% 70%, var(--tint-crimson-2) 0%, transparent 70%);
}

/* The coins belong at the top of the card, beside the heading, not as a
   7%-opacity smudge in the bottom corner. */
.free__cut {
  position: absolute;
  right: clamp(1.5rem, 0.5rem + 3vw, 4rem);
  top: clamp(1.5rem, 0.5rem + 3vw, 4rem);
  width: clamp(6rem, 4rem + 8vw, 12rem);
  height: clamp(6rem, 4rem + 8vw, 12rem);
  color: var(--ink);
  opacity: 0.16;
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 760px) {
  .free__cut {
    display: none;
  }
}

.free__head {
  max-width: 34ch;
}

/* The heading has its own, wider measure: at the section width it was
   breaking onto four lines. */
.free__title {
  max-width: 22ch;
}

.free__title {
  text-wrap: balance;
}

.free__lead {
  max-width: 46ch;
}

.free__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: clamp(2rem, 1.4rem + 2vw, 3rem);
}

.free__fact {
  padding: 1.1rem 1.2rem 1.2rem;
  border-radius: var(--radius-card);
  background: var(--bg);
  border: 1px solid var(--line-2);
}

.free__fact[data-tone='olive'] { background: var(--tint-olive); }
.free__fact[data-tone='sage'] { background: var(--tint-sage); }
.free__fact[data-tone='crimson'] { background: var(--tint-crimson); }

.free__fact b {
  display: block;
  font-size: var(--step-label);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.5rem;
}

.free__fact span {
  font-size: var(--step-small);
  line-height: 1.55;
}

.free__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
}

@media (max-width: 860px) {
  .free__facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------------------------------------------------------
   9. Films
   Four recordings from the channel. The player is only fetched when someone
   asks for it: until then the card is a poster, so the page does not pull in
   YouTube's scripts for every visitor.
   ------------------------------------------------------------------------- */

/* A dark band, because a row of pale rectangles does not read as video. The
   posters are cream engravings on near-black until the real thumbnails from
   the channel replace them. */
.films {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  padding-block: clamp(2.5rem, 1.6rem + 3vw, 4rem) clamp(2.5rem, 1.6rem + 2.4vw, 3.5rem);
  background: var(--night);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.films::before {
  content: '';
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 160%;
  background:
    radial-gradient(40% 50% at 12% 20%, rgba(185, 76, 76, 0.22) 0%, transparent 70%),
    radial-gradient(36% 46% at 88% 80%, rgba(180, 185, 76, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

.films__head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(1rem, 0.5rem + 2vw, 2.5rem);
  flex-wrap: wrap;
}

.films__intro {
  min-width: 0;
  flex: 1 1 28rem;
}

/* The channel, named as a channel: the red play button says it faster than
   a sentence can. */
.films__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem 0.3rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
}

.films__badge svg {
  width: 1.15rem;
  height: 1.15rem;
  color: #e5342a;
}

.films__title {
  margin-top: 0.85rem;
  max-width: 24ch;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.films__lead {
  margin: 0.7rem 0 0;
  max-width: 54ch;
  font-size: var(--step-small);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.films__cta {
  flex: none;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.films__cta:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.films .link-arrow {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.films .link-arrow::after {
  background: var(--olive);
}

.films__row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.4rem);
  margin-top: 2rem;
}

.film {
  position: relative;
  display: block;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--night-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform var(--t-mid) var(--ease), border-color var(--t-fast) var(--ease);
}

.film:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.26);
}

.film__poster {
  /* A span is inline, and an inline box ignores aspect-ratio, inset and
     overflow. Every wrapper on this page that holds a ratio has to say so. */
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: radial-gradient(78% 100% at 72% 18%, #2c2822 0%, #14120d 100%);
}

/* ---- the designed cover ---- */

.poster {
  position: absolute;
  inset: 0;
  display: block;
}

/* A woven hatch, the texture an engraving would be printed on. */
.poster__weave {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(68deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-22deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 11px);
}

.poster__art {
  position: absolute;
  right: -6%;
  bottom: -12%;
  width: 62%;
  height: 118%;
  color: #efeadf;
  opacity: 0.3;
  transition: transform var(--t-slow) var(--ease), opacity var(--t-fast) var(--ease);
}

.film:hover .poster__art {
  transform: scale(1.06) rotate(-3deg);
  opacity: 0.42;
}

.poster__mark {
  position: absolute;
  left: 0.9rem;
  top: 0.7rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.5);
}

.poster__kind {
  position: absolute;
  left: 0.9rem;
  bottom: 0.95rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #14120d;
}

/* A rule in the card's own accent, so the four read as a set with a tell. */
.poster__rule {
  position: absolute;
  left: 0.9rem;
  bottom: 0.55rem;
  width: 2.6rem;
  height: 2px;
  border-radius: 2px;
}

.film__poster[data-tone='olive'] .poster__kind { background: var(--olive); }
.film__poster[data-tone='olive'] .poster__rule { background: var(--olive); }
.film__poster[data-tone='crimson'] .poster__kind { background: #d98a8a; }
.film__poster[data-tone='crimson'] .poster__rule { background: var(--crimson); }
.film__poster[data-tone='sage'] .poster__kind { background: var(--sage); }
.film__poster[data-tone='sage'] .poster__rule { background: var(--sage); }

.film__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3.3rem;
  height: 3.3rem;
  border-radius: 50%;
  background: var(--crimson);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.film:hover .film__play {
  transform: translate(-50%, -50%) scale(1.12);
  background: #cc5757;
}

.film__play svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 2px;
  color: #fff;
}

.film__body {
  display: block;
  padding: 0.95rem 1rem 1.1rem;
  min-height: 5.2rem;
}

.film__name {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
}

.film__meta {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.film__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 960px) {
  .films__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .films__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------------------------------------------------------
   The editor.
   The application writes with TipTap, so the demo shows what that actually
   gives you: a menu that appears on a selection, slash commands, callouts,
   tables and quotes, a word count and the autosave line.
   ------------------------------------------------------------------------- */

.sheet {
  position: relative;
}

.sheet__page blockquote {
  margin: 0 0 0.9rem;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 3px solid var(--crimson);
  font-style: italic;
  color: var(--ink-2);
}

.doc-callout {
  display: block;
  margin: 0 0 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 0.6rem;
  background: var(--tint-olive);
  border: 1px solid var(--line-2);
  font-size: 0.95em;
}

.doc-callout b {
  font-weight: 800;
  margin-right: 0.35rem;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 0.92em;
}

.doc-table th,
.doc-table td {
  border: 1px solid var(--line-2);
  padding: 0.45rem 0.6rem;
  text-align: left;
}

.doc-table th {
  background: var(--bg-soft);
  font-weight: 800;
  font-size: 0.9em;
}

.doc-term {
  border-bottom: 2px dotted var(--crimson);
  cursor: help;
}

/* The menu that appears over a selection. */
.bubble {
  position: absolute;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem;
  border-radius: 0.6rem;
  background: var(--ink);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -115%) scale(0.96);
  transition: opacity 140ms var(--ease), transform 140ms var(--ease);
}

.bubble[data-on='true'] {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -125%) scale(1);
}

.bubble button {
  min-width: 1.9rem;
  height: 1.9rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bubble button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.bubble button svg {
  width: 0.95rem;
  height: 0.95rem;
}

.bubble__sep {
  width: 1px;
  height: 1.1rem;
  margin: 0 0.2rem;
  background: rgba(255, 255, 255, 0.22);
}

/* The slash command palette. */
.slash {
  position: absolute;
  z-index: 20;
  width: 15rem;
  padding: 0.35rem;
  border-radius: 0.6rem;
  background: var(--bg);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lift);
  display: none;
}

.slash[data-on='true'] {
  display: block;
}

.slash__head {
  padding: 0.35rem 0.5rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.slash button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.45rem 0.5rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.slash button:hover,
.slash button[data-active='true'] {
  background: var(--tint-crimson);
}

.slash button small {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-3);
}

.sheet__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sheet__words {
  font-weight: 700;
  color: var(--ink-3);
}

/* A short confirmation, the way the application acknowledges a saved term. */
.toast {
  position: absolute;
  left: 50%;
  bottom: 3.2rem;
  z-index: 25;
  transform: translate(-50%, 8px);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.toast[data-on='true'] {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Blocks the toolbar can insert. */
.sheet__page code {
  padding: 0.1em 0.35em;
  border-radius: 0.3em;
  background: var(--tint-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

.sheet__page hr {
  border: 0;
  border-top: 1px solid var(--line-2);
  margin: 1.2rem 0;
}

.sheet__page ol {
  margin: 0 0 0.9rem;
  padding-left: 1.4rem;
}

.sheet__page ol li {
  padding-left: 0.2rem;
  margin-bottom: 0.35rem;
}

.sheet__page ol li::before {
  content: none;
}

.doc-task {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
}

.doc-task li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding-left: 0;
  margin-bottom: 0.35rem;
}

.doc-task li::before {
  content: none;
}

.doc-task input {
  margin-top: 0.3em;
  accent-color: var(--crimson);
}

.doc-figure {
  margin: 0 0 1rem;
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid var(--line-2);
}

.doc-figure .cut {
  width: 100%;
  height: 9rem;
  color: var(--ink);
  opacity: 0.9;
  background-color: var(--ink);
  -webkit-mask-size: 42%;
  mask-size: 42%;
}

.doc-figure {
  background: var(--tint-sage);
}

.doc-figure figcaption {
  padding: 0.5rem 0.7rem;
  font-size: 0.8rem;
  color: var(--ink-3);
  background: var(--bg-soft);
}

.doc-link {
  color: var(--crimson-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* -------------------------------------------------------------------------
   12. The storage plans
   The free account is a plan, not a footnote, so it gets the first card and
   the same shape as the paid ones. The toggle swaps the numbers in place.
   ------------------------------------------------------------------------- */

.plans {
  margin-top: clamp(2rem, 1.4rem + 2vw, 3.25rem);
  padding: clamp(1.75rem, 1.2rem + 2.4vw, 3rem);
  border-radius: var(--radius-block);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.plans__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(1rem, 0.6rem + 1.4vw, 1.8rem);
  align-items: center;
}

/* The coins carry this block, so they stand at full strength here instead of
   fading into the corner of the card above. */
.plans__coins {
  width: clamp(4.5rem, 3rem + 5vw, 7.5rem);
  height: clamp(4.5rem, 3rem + 5vw, 7.5rem);
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-card);
  color: var(--ink);
}

.plans__coins .cut {
  width: 70%;
  height: 70%;
}

.plans__title {
  font-size: var(--step-h3);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0.35rem 0 0;
  text-wrap: balance;
}

.plans__sub {
  margin: 0.5rem 0 0;
  max-width: 52ch;
  font-size: var(--step-small);
  color: var(--ink-2);
  line-height: 1.55;
}

.plans__switch {
  display: flex;
  flex: none;
  gap: 0.2rem;
  padding: 0.25rem;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--line-2);
}

.plans__switch button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-3);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.plans__switch button[aria-selected='true'] {
  background: var(--ink);
  color: #fff;
}

.plans__switch i {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-pill);
  background: var(--tint-olive);
  color: var(--ink);
}

.plans__switch button[aria-selected='true'] i {
  background: var(--olive);
}

.plans__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.3rem 1.3rem 1.4rem;
  border-radius: var(--radius-card);
  background: var(--bg);
  border: 1px solid var(--line-2);
}

.plan--free {
  background: var(--tint-olive);
  border-color: rgba(180, 185, 76, 0.5);
}

.plan[data-best='true'] {
  border-color: var(--ink);
  box-shadow: var(--shadow-card);
}

.plan__flag {
  position: absolute;
  top: -0.7rem;
  left: 1.3rem;
  margin: 0;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plan__size {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.plan__name {
  margin: 0.2rem 0 0;
  font-size: var(--step-label);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.plan__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1rem 0 0;
}

.plan__price b {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.plan__price span {
  font-size: 0.78rem;
  color: var(--ink-3);
  font-weight: 600;
}

.plan__note {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-3);
}

.plan__list {
  margin: 1.1rem 0 1.4rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.plan__list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.plan__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--crimson);
}

.plan--free .plan__list li::before {
  background: var(--olive-deep, #7b8033);
}

.plan__cta {
  margin-top: auto;
  justify-content: center;
}

.plans__foot {
  margin: clamp(1.25rem, 1rem + 1vw, 1.75rem) 0 0;
  font-size: 0.82rem;
  color: var(--ink-3);
  max-width: 66ch;
}

@media (max-width: 1100px) {
  .plans__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .plans__top {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .plans__switch {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .plans__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .plans__coins {
    display: none;
  }
}
