/* ============================================================
   HORIZON / 08 — reading room + sunrise check
   Scoped entirely to #horizon. Loaded after styles.css.
   ============================================================ */

@property --h-font {
  syntax: '<number>';
  inherits: true;
  initial-value: 1;
}
@property --h-rise {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

#horizon.horizon-concept {
  --h-font: 1;
  --h-rise: 0;
  --h-ink: #1d2a25;
  --h-ink-soft: #3c4c45;
  --h-muted: #5b6b63;
  --h-faint: #78867f;
  --h-paper: #f6f3e9;
  --h-paper-hi: #fbf8ef;
  --h-line: rgba(56, 76, 66, .24);
  --h-line-strong: rgba(56, 76, 66, .46);
  --h-green: #3f6857;
  --h-green-ink: #2c5343;
  --h-green-soft: #e2ebe3;
  --h-rust: #9f5b4c;
  --h-rust-soft: #f2e1db;
  --h-sun: #c99d62;
  --h-sun-light: #e6ca97;
  position: relative;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  font-family: var(--mono);
  color: var(--h-ink);
  background:
    radial-gradient(120% 80% at 78% -12%, #dbe7e9 0%, rgba(219, 231, 233, 0) 56%),
    radial-gradient(80% 62% at 6% 104%, rgba(202, 214, 197, .62) 0%, rgba(202, 214, 197, 0) 62%),
    linear-gradient(180deg, #e9ece5 0%, #eff0e8 48%, #e4e7df 100%);
  isolation: isolate;
  transition: --h-font .18s ease;
}

#horizon.horizon-concept::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='h'%3E%3CfeTurbulence baseFrequency='.78' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23h)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ---------- sky / depth ---------- */
#horizon .horizon-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

#horizon .horizon-sky i {
  position: absolute;
  border-radius: 50%;
  opacity: .62;
  will-change: transform;
}

#horizon .horizon-sky i:nth-child(1) {
  width: 70vw;
  height: 48vw;
  right: -24vw;
  top: -28vw;
  background: radial-gradient(circle at 45% 55%, rgba(191, 217, 222, .85) 0%, rgba(191, 217, 222, 0) 68%);
}

#horizon .horizon-sky i:nth-child(2) {
  width: 46vw;
  height: 46vw;
  left: 17vw;
  bottom: -37vw;
  border: 1px solid rgba(112, 137, 129, .34);
  box-shadow:
    0 0 0 64px rgba(220, 228, 219, .28),
    0 0 0 65px rgba(112, 137, 129, .18),
    0 0 0 128px rgba(220, 228, 219, .14);
}

#horizon .horizon-sky i:nth-child(3) {
  width: 20vw;
  height: 20vw;
  right: 23vw;
  top: 25vh;
  background: rgba(214, 215, 239, .6);
  filter: blur(34px);
  animation: horizonBreathe 10s ease-in-out infinite;
}

#horizon .horizon-sky i:nth-child(4) {
  width: 38vw;
  height: 8vw;
  right: 4vw;
  top: 47vh;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(199, 217, 210, .55), rgba(222, 214, 232, .55));
  filter: blur(32px);
  opacity: .42;
}

@keyframes horizonBreathe {
  50% { transform: scale(1.18); opacity: .45; }
}

/* ---------- masthead ---------- */
#horizon .horizon-head {
  position: relative;
  z-index: 7;
  height: 64px;
  padding: 0 clamp(18px, 3vw, 44px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--h-line);
  background: rgba(238, 241, 233, .32);
  backdrop-filter: blur(8px);
}

#horizon .horizon-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 400 19px/1 var(--serif);
  letter-spacing: -.035em;
}

#horizon .horizon-logo-sun {
  position: relative;
  width: 14px;
  height: 8px;
  margin-top: 4px;
  border: 1px solid var(--h-ink);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}

#horizon .horizon-logo-sun::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 21px;
  height: 1px;
  transform: translateX(-50%);
  background: var(--h-ink);
}

#horizon .horizon-logo span {
  width: 24px;
  height: 24px;
  margin-left: 2px;
  display: grid;
  place-items: center;
  border: 1px solid var(--h-ink);
  border-radius: 50%;
  font: 500 7px var(--mono);
  letter-spacing: .02em;
}

#horizon .horizon-path {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 7px;
  letter-spacing: .13em;
  color: var(--h-muted);
  white-space: nowrap;
}

#horizon .horizon-path i {
  width: 30px;
  height: 1px;
  background: var(--h-line-strong);
}

#horizon .horizon-path b {
  font-weight: 500;
  color: var(--h-ink-soft);
}

#horizon .horizon-path em {
  padding: 4px 7px;
  border: 1px solid var(--h-line);
  border-radius: 20px;
  font-style: normal;
  color: var(--h-muted);
  font-variant-numeric: tabular-nums;
}

#horizon .horizon-head-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 20px);
}

#horizon .horizon-session {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 6.5px;
  letter-spacing: .14em;
  color: var(--h-muted);
}

#horizon .horizon-session i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--h-green);
  box-shadow: 0 0 0 4px rgba(63, 104, 87, .12);
  animation: horizonPulse 3.4s ease-in-out infinite;
}

@keyframes horizonPulse {
  50% { box-shadow: 0 0 0 7px rgba(63, 104, 87, 0); }
}

#horizon .horizon-head-mobile {
  display: none;
  font-size: 7px;
  letter-spacing: .1em;
  color: var(--h-muted);
  border: 1px solid var(--h-line);
  border-radius: 20px;
  padding: 5px 8px;
}

#horizon .horizon-profile {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--h-ink-soft);
  font: 500 7px var(--mono);
  letter-spacing: .08em;
  cursor: pointer;
}

#horizon .horizon-profile i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--h-ink);
  color: var(--h-paper);
  font: 500 8px var(--mono);
  font-style: normal;
  transition: transform .3s ease;
}

#horizon .horizon-profile:hover i {
  transform: rotate(-6deg) scale(1.04);
}

/* ---------- chapter rail ---------- */
#horizon .horizon-progress {
  position: relative;
  z-index: 6;
  top: auto;
  left: auto;
  right: auto;
  height: 54px;
  padding: 0 clamp(18px, 3vw, 44px);
  display: flex;
  align-items: center;
  gap: clamp(6px, .9vw, 14px);
  border-bottom: 1px solid rgba(56, 76, 66, .12);
}

#horizon .horizon-progress > span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 7px;
  letter-spacing: .1em;
  color: #74837b;
  white-space: nowrap;
}

#horizon .horizon-progress b {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid var(--h-line-strong);
  border-radius: 50%;
  font: 500 7px var(--mono);
  color: var(--h-muted);
  transition: background .3s, color .3s, border-color .3s, box-shadow .3s;
}

#horizon .horizon-progress em {
  font-style: normal;
}

#horizon .horizon-progress > span.done {
  color: #5a7165;
}

#horizon .horizon-progress > span.done b {
  border-color: rgba(63, 104, 87, .45);
  background: #dce7df;
  color: var(--h-green-ink);
}

#horizon .horizon-progress > span.active {
  color: var(--h-ink);
}

#horizon .horizon-progress > span.active b {
  border-color: var(--h-ink);
  background: var(--h-ink);
  color: var(--h-paper);
  box-shadow: 0 0 0 5px rgba(246, 243, 233, .55);
}

#horizon .horizon-progress > i {
  flex: 1;
  min-width: 12px;
  max-width: 74px;
  height: 1px;
  background: var(--h-line);
}

/* ---------- the room ---------- */
#horizon .horizon-workspace {
  position: absolute;
  z-index: 4;
  top: 128px;
  left: clamp(18px, 3vw, 44px);
  right: clamp(18px, 3vw, 44px);
  bottom: 72px;
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--h-line-strong);
  border-radius: 2px;
  background: var(--h-paper);
  box-shadow:
    0 40px 80px -58px rgba(34, 50, 42, .7),
    0 1px 0 rgba(255, 255, 255, .7) inset;
  transition: grid-template-columns .55s cubic-bezier(.22, 1, .36, 1);
}

#horizon .horizon-workspace.layout-split {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, .62fr);
}

#horizon .horizon-workspace.layout-read {
  grid-template-columns: minmax(0, 1fr) 0fr;
}

#horizon .horizon-workspace.layout-task {
  grid-template-columns: 0fr minmax(0, 1fr);
}

#horizon .horizon-reader,
#horizon .horizon-task {
  min-width: 0;
  position: relative;
  transition:
    opacity .38s ease,
    transform .55s cubic-bezier(.22, 1, .36, 1),
    filter .38s ease;
}

#horizon .layout-read .horizon-task {
  opacity: 0;
  transform: translateX(38px);
  pointer-events: none;
}

#horizon .layout-task .horizon-reader {
  opacity: 0;
  transform: translateX(-38px);
  pointer-events: none;
}

@media (min-width: 851px) {
  #horizon .layout-task .horizon-task-inner {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: clamp(28px, 5vh, 52px) clamp(28px, 4vw, 52px);
  }

  #horizon .layout-task .horizon-task h2 {
    font-size: calc(clamp(40px, 4vw, 62px) * var(--h-font));
    margin-top: clamp(28px, 6vh, 58px);
  }

  #horizon .layout-task .horizon-task-prompt {
    font-size: 12px;
  }

  #horizon .layout-task .horizon-answers button {
    min-height: 56px;
    font-size: 13.5px;
  }

  #horizon .layout-task .horizon-feedback {
    font-size: calc(15px * var(--h-font));
  }

  #horizon .layout-task .horizon-task-legend {
    font-size: 7px;
  }
}

/* ---------- reader ---------- */
#horizon .horizon-reader {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(251, 248, 239, .98) 0%, rgba(246, 243, 233, .99) 62%, rgba(242, 239, 229, .99) 100%);
}

#horizon .horizon-reader::after {
  content: '';
  position: absolute;
  z-index: 2;
  left: 0;
  right: 3px;
  bottom: 0;
  height: 56px;
  pointer-events: none;
  opacity: 1;
  background: linear-gradient(to bottom, rgba(243, 240, 230, 0), rgba(243, 240, 230, .94));
  transition: opacity .35s ease;
}

#horizon .horizon-reader.is-read::after {
  opacity: 0;
}

#horizon .horizon-reader-chrome {
  position: relative;
  z-index: 3;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 clamp(18px, 3vw, 44px);
  border-bottom: 1px solid rgba(56, 76, 66, .16);
  background: rgba(250, 247, 237, .66);
  backdrop-filter: blur(8px);
}

#horizon .horizon-chrome-label,
#horizon .horizon-chrome-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 7px;
  letter-spacing: .14em;
  color: var(--h-muted);
  white-space: nowrap;
}

#horizon .horizon-chrome-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--h-green);
}

#horizon .horizon-chrome-label span {
  opacity: .45;
}

#horizon .horizon-chrome-tools em {
  font-style: normal;
  font-size: 7px;
  letter-spacing: .08em;
  color: var(--h-ink-soft);
  font-variant-numeric: tabular-nums;
}

#horizon .horizon-chrome-tools em.low {
  color: var(--h-rust);
}

#horizon .horizon-chrome-rule {
  width: 14px;
  height: 1px;
  background: var(--h-line-strong);
}

#horizon .horizon-read-state {
  font-size: 7px;
  letter-spacing: .11em;
  color: var(--h-faint);
  font-variant-numeric: tabular-nums;
}

#horizon .horizon-read-state b {
  font-weight: 500;
  color: var(--h-green-ink);
}

#horizon .horizon-read-track {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3px;
  pointer-events: none;
  background: rgba(72, 94, 83, .1);
}

#horizon .horizon-read-track > i {
  position: relative;
  display: block;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, rgba(63, 104, 87, .45), var(--h-green));
  transition: height .1s linear;
}

#horizon .horizon-read-track > i::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--h-sun);
  box-shadow: 0 0 0 3px rgba(201, 157, 98, .15);
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity .3s;
}

#horizon .horizon-reader.is-scrolled .horizon-read-track > i::after {
  opacity: 1;
}

#horizon .horizon-reader-scroll {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 clamp(22px, 4vw, 56px);
  scrollbar-width: thin;
  scrollbar-color: rgba(101, 123, 112, .55) transparent;
}

#horizon .horizon-reader-scroll::-webkit-scrollbar {
  width: 4px;
}

#horizon .horizon-reader-scroll::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(101, 123, 112, .45);
}

#horizon .horizon-reader-scroll::-webkit-scrollbar-track {
  background: transparent;
}

#horizon .horizon-reader-scroll:focus-visible {
  outline: 2px solid var(--h-green);
  outline-offset: -4px;
}

#horizon .horizon-article {
  width: 100%;
  max-width: 690px;
  margin: 0 auto;
  padding: clamp(28px, 4.6vh, 46px) 0 44px;
}

#horizon .horizon-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(18px, 3.2vh, 30px);
  font-size: 7px;
  letter-spacing: .16em;
  color: var(--h-muted);
}

#horizon .horizon-kicker span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--h-line-strong);
  border-radius: 50%;
  font-size: 6px;
  color: var(--h-ink-soft);
}

#horizon .horizon-article h1 {
  max-width: 13ch;
  margin: 0;
  font: 400 calc(clamp(44px, 4.7vw, 68px) * var(--h-font))/.9 var(--serif);
  letter-spacing: -.06em;
  color: var(--h-ink);
  text-wrap: balance;
}

#horizon .horizon-article h1 em {
  font-style: italic;
  color: #56766a;
}

#horizon .horizon-lead {
  max-width: 48ch;
  margin: clamp(22px, 3.4vh, 34px) 0 0;
  font: 400 calc(clamp(19px, 1.6vw, 23px) * var(--h-font))/1.5 var(--serif);
  letter-spacing: -.012em;
  color: #33443c;
}

#horizon .horizon-lead::first-letter {
  float: left;
  margin: 7px 10px 0 0;
  font: 400 calc(58px * var(--h-font))/.76 var(--serif);
  color: var(--h-green-ink);
}

#horizon .horizon-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: clamp(28px, 4.4vh, 42px) 0 22px;
  color: var(--h-muted);
}

#horizon .horizon-rule span {
  font-size: 7px;
  letter-spacing: .08em;
}

#horizon .horizon-rule i {
  flex: 1;
  height: 1px;
  background: var(--h-line);
}

#horizon .horizon-rule em {
  font-style: normal;
  font-size: 6.5px;
  letter-spacing: .15em;
}

#horizon .horizon-body {
  position: relative;
  max-width: 680px;
  font-family: var(--sans);
  font-size: calc(15.5px * var(--h-font));
  line-height: 1.78;
  color: #304038;
}

@media (min-width: 1051px) {
  #horizon .horizon-body::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: var(--h-line);
    opacity: .7;
    pointer-events: none;
  }
}

#horizon .horizon-body p {
  margin: 0 0 1.1em;
}

#horizon .horizon-body p:last-child {
  margin-bottom: 0;
}

#horizon .horizon-body b {
  font-weight: 600;
  color: var(--h-ink);
  background: linear-gradient(transparent 64%, rgba(201, 157, 98, .24) 64%);
}

#horizon .horizon-figure {
  margin: clamp(30px, 4.6vh, 46px) 0 0;
  padding: 14px 16px 12px;
  border: 1px solid var(--h-line);
  background: rgba(251, 248, 239, .74);
}

#horizon .horizon-figure-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(56, 76, 66, .14);
  font-size: 6px;
  letter-spacing: .13em;
  color: var(--h-faint);
}

#horizon .horizon-figure-head em {
  font-style: normal;
  color: var(--h-muted);
}

#horizon .horizon-figure svg {
  display: block;
  width: 100%;
  height: auto;
  margin: 8px 0 6px;
  overflow: visible;
}

#horizon .horizon-figure-grid path {
  stroke: rgba(86, 109, 97, .16);
  stroke-width: 1;
  fill: none;
}

#horizon .horizon-bars rect {
  fill: rgba(95, 128, 109, .08);
  stroke: rgba(74, 105, 88, .32);
  stroke-width: 1;
}

#horizon .horizon-curve {
  fill: none;
  stroke: var(--h-green);
  stroke-width: 1.8;
}

#horizon .horizon-axis {
  fill: none;
  stroke: var(--h-line-strong);
  stroke-width: 1;
}

#horizon .horizon-figure-labels text {
  fill: var(--h-faint);
  font: 7px var(--mono);
  letter-spacing: .05em;
}

#horizon .horizon-figure figcaption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 9px;
  line-height: 1.45;
  color: var(--h-muted);
}

#horizon .horizon-figure figcaption span {
  flex: 0 0 auto;
  font-size: 7px;
  letter-spacing: .08em;
  color: var(--h-green-ink);
}

#horizon .horizon-formula {
  position: relative;
  display: block;
  margin: clamp(26px, 4vh, 40px) 0 0;
  padding: 22px clamp(18px, 3vw, 28px) 20px;
  overflow: hidden;
  background: #203028;
  color: #f4f0e3;
}

#horizon .horizon-formula::after {
  content: '';
  position: absolute;
  right: -46px;
  bottom: -68px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(230, 202, 151, .22);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(230, 202, 151, .04);
}

#horizon .horizon-formula > span {
  display: block;
  font-size: 6.5px;
  letter-spacing: .15em;
  color: rgba(217, 228, 218, .65);
}

#horizon .horizon-formula-line {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  margin: 10px 0 9px;
}

#horizon .horizon-formula-line b,
#horizon .horizon-formula-line strong {
  font: 400 calc(clamp(23px, 2.45vw, 31px) * var(--h-font))/1.1 var(--serif);
  letter-spacing: -.02em;
}

#horizon .horizon-formula-line i {
  display: inline;
  font-style: normal;
  color: rgba(215, 229, 216, .58);
}

#horizon .horizon-formula-line sub,
#horizon .horizon-formula-line sup {
  font-size: .48em;
}

#horizon .horizon-formula > em {
  position: relative;
  z-index: 1;
  display: block;
  font: italic calc(11px * var(--h-font))/1.4 var(--serif);
  color: rgba(215, 229, 216, .62);
}

#horizon .horizon-note {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  margin-top: clamp(28px, 4vh, 40px);
  padding-top: 20px;
  border-top: 1px solid var(--h-line);
}

#horizon .horizon-note > span {
  padding-top: 4px;
  font-size: 6.5px;
  letter-spacing: .15em;
  color: var(--h-green-ink);
}

#horizon .horizon-note p {
  position: relative;
  margin: 0;
  padding-left: 20px;
  font: italic calc(16px * var(--h-font))/1.6 var(--serif);
  color: #3a4c43;
}

#horizon .horizon-note p::before {
  content: '“';
  position: absolute;
  left: 0;
  top: -3px;
  font: 400 27px/1 var(--serif);
  color: var(--h-sun);
}

/* ---------- end of the article ---------- */
#horizon .horizon-end {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 5px 18px;
  margin-top: clamp(36px, 5vh, 54px);
  padding-top: 26px;
  border-top: 1px solid var(--h-line-strong);
}

#horizon .horizon-end-mark {
  position: relative;
  grid-row: 1 / 3;
  align-self: center;
  width: 54px;
  height: 48px;
}

#horizon .horizon-end-mark b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 1px;
  background: var(--h-line-strong);
}

#horizon .horizon-end-mark i {
  position: absolute;
  left: 50%;
  bottom: 15px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transform: translate(-50%, 15px);
  background: radial-gradient(circle at 38% 34%, var(--h-sun-light), var(--h-sun) 72%);
  opacity: .55;
  transition: transform .9s cubic-bezier(.22, 1, .36, 1), opacity .9s ease;
}

#horizon .horizon-reader.is-read .horizon-end-mark i {
  transform: translate(-50%, -2px);
  opacity: 1;
}

#horizon .horizon-end-kicker {
  grid-column: 2;
  grid-row: 1;
  font-size: 7px;
  letter-spacing: .17em;
  color: var(--h-green-ink);
}

#horizon .horizon-end p {
  grid-column: 2;
  grid-row: 2;
  max-width: 36ch;
  margin: 0;
  font: 400 13.5px/1.5 var(--sans);
  color: var(--h-muted);
}

#horizon .horizon-to-task {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 0 8px 0 16px;
  border: 0;
  background: var(--h-ink);
  color: var(--h-paper);
  font: 500 8px var(--mono);
  letter-spacing: .12em;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}

#horizon .horizon-to-task b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: rgba(246, 243, 233, .12);
  font: 500 13px var(--mono);
  transition: transform .25s ease;
}

#horizon .horizon-to-task:hover {
  background: #14231c;
  transform: translateY(-1px);
}

#horizon .horizon-to-task:hover b {
  transform: translateX(2px);
}

/* ---------- reader ornaments ---------- */
#horizon .horizon-whisper {
  position: absolute;
  z-index: 3;
  right: 20px;
  top: 44%;
  writing-mode: vertical-rl;
  font: italic 13px/1.35 var(--serif);
  color: rgba(83, 108, 96, .62);
  pointer-events: none;
}

#horizon .horizon-read-hint {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--h-line);
  border-radius: 20px;
  background: rgba(248, 245, 235, .92);
  color: var(--h-muted);
  font-size: 6.5px;
  letter-spacing: .1em;
  box-shadow: 0 5px 18px -12px rgba(34, 50, 42, .5);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}

#horizon .horizon-read-hint b {
  animation: horizonHintBob 1.9s ease-in-out infinite;
  font-weight: 500;
}

#horizon .horizon-read-hint.gone {
  opacity: 0;
  transform: translate(-50%, 5px);
}

@keyframes horizonHintBob {
  50% { transform: translateY(3px); }
}

/* ---------- task / sunrise ---------- */
#horizon .horizon-task {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(91, 106, 115, .4) transparent;
  background:
    linear-gradient(158deg, #e6eaf2 0%, #e1e6ee 52%, #ece9df 100%);
}

#horizon .horizon-task::-webkit-scrollbar {
  width: 4px;
}

#horizon .horizon-task::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(91, 106, 115, .35);
}

#horizon .horizon-task::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(231, 195, 135, .38), transparent 48%),
    linear-gradient(160deg, rgba(247, 235, 215, .28), rgba(238, 227, 210, .1));
  transition: opacity 1s ease;
}

#horizon .horizon-task.is-complete::after {
  opacity: 1;
}

#horizon .horizon-dawn {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

#horizon .horizon-dawn-arc {
  position: absolute;
  border: 1px solid rgba(95, 118, 128, .18);
  border-radius: 50%;
}

#horizon .horizon-dawn-arc.arc-a {
  width: 440px;
  height: 440px;
  right: -196px;
  top: -196px;
}

#horizon .horizon-dawn-arc.arc-b {
  width: 310px;
  height: 310px;
  right: -131px;
  top: -131px;
  border-color: rgba(95, 118, 128, .24);
}

#horizon .horizon-dawn-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 76% 27%, rgba(203, 164, 105, calc(.05 + var(--h-rise) * .2)), transparent 53%);
  transition: background .8s ease;
}

#horizon .horizon-dawn-sun {
  position: absolute;
  right: -44px;
  top: calc(37% - 142px);
  width: 172px;
  height: 172px;
  border-radius: 50%;
  background: radial-gradient(circle at 37% 33%, #ecd4a5 0%, #d1a76c 68%, #c39860 100%);
  box-shadow: 0 0 60px rgba(215, 177, 113, .3);
  opacity: calc(.18 + var(--h-rise) * .32);
  transform: translateY(calc((1 - var(--h-rise)) * 132px));
  transition: transform 1.05s cubic-bezier(.22, 1, .36, 1), opacity 1.05s ease;
}

#horizon .horizon-dawn-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 37%;
  height: 1px;
  background: linear-gradient(90deg, rgba(104, 124, 133, 0) 0%, rgba(104, 124, 133, .36) 24%, rgba(104, 124, 133, .36) 100%);
}

#horizon .horizon-task-inner {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.5vw, 32px);
}

#horizon .horizon-task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#horizon .horizon-task-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 7px;
  letter-spacing: .15em;
  color: #596977;
}

#horizon .horizon-task-label::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--h-sun);
}

#horizon .horizon-score {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: #596977;
  font-size: 7px;
  letter-spacing: .08em;
  white-space: nowrap;
}

#horizon .horizon-score b {
  font: 400 26px/1 var(--serif);
  color: var(--h-ink);
  letter-spacing: -.04em;
}

#horizon .horizon-score em {
  font-style: normal;
  color: #71808b;
}

#horizon .horizon-score.is-popped b {
  animation: horizonScorePop .45s cubic-bezier(.2, .8, .2, 1);
}

@keyframes horizonScorePop {
  40% { transform: translateY(-3px) scale(1.16); color: var(--h-green); }
}

#horizon .horizon-task h2 {
  margin: clamp(20px, 4.6vh, 46px) 0 12px;
  font: 400 calc(clamp(30px, 2.65vw, 44px) * var(--h-font))/.96 var(--serif);
  letter-spacing: -.052em;
  color: var(--h-ink);
  text-wrap: balance;
  transition: opacity .18s ease, transform .22s ease;
}

#horizon .horizon-task h2 em {
  font-style: italic;
  color: #5b7091;
}

#horizon .horizon-task h2.swap {
  opacity: 0;
  transform: translateY(7px);
}

#horizon .horizon-task h2:focus-visible {
  outline: 2px solid var(--h-green);
  outline-offset: 4px;
}

#horizon .horizon-task-prompt {
  max-width: 34ch;
  margin: 0 0 20px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #5b6a73;
}

#horizon .horizon-answers {
  display: flex;
  flex-direction: column;
}

#horizon .horizon-answers button {
  position: relative;
  width: 100%;
  min-height: 47px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 24px 11px 2px;
  border: 0;
  border-top: 1px solid var(--h-line-strong);
  background: transparent;
  color: #35434c;
  text-align: left;
  font: 500 12.5px/1.38 var(--mono);
  cursor: pointer;
  transition:
    background .22s ease,
    color .22s ease,
    padding .22s ease,
    box-shadow .22s ease;
  animation: horizonAnswerIn .34s both;
}
#horizon .horizon-answers button:nth-child(2) { animation-delay: .04s; }
#horizon .horizon-answers button:nth-child(3) { animation-delay: .08s; }
#horizon .horizon-answers button:nth-child(4) { animation-delay: .12s; }

@keyframes horizonAnswerIn {
  from { opacity: 0; transform: translateY(4px); }
}

#horizon .horizon-answers button:last-child {
  border-bottom: 1px solid var(--h-line-strong);
}

#horizon .horizon-answers button > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--h-line-strong);
  border-radius: 50%;
  font-size: 7px;
  color: #5b6a73;
  transition: background .2s, color .2s, border-color .2s;
}

#horizon .horizon-answers button:hover {
  padding-left: 9px;
  background: rgba(252, 249, 240, .65);
  color: var(--h-ink);
}

#horizon .horizon-answers button:hover > span {
  border-color: var(--h-ink);
  color: var(--h-ink);
}

#horizon .horizon-answers button.selected {
  padding-left: 9px;
  background: rgba(252, 249, 240, .9);
  box-shadow: inset 2px 0 0 var(--h-ink);
}

#horizon .horizon-answers button.correct {
  padding-left: 9px;
  border-color: rgba(63, 104, 87, .38);
  background: #d5e5d9;
  color: var(--h-green-ink);
  box-shadow: inset 2px 0 0 var(--h-green);
}

#horizon .horizon-answers button.correct > span {
  border-color: var(--h-green);
  background: var(--h-green);
  color: #f6f3e9;
}

#horizon .horizon-answers button.wrong {
  padding-left: 9px;
  border-color: rgba(159, 91, 76, .32);
  background: #efd8d1;
  color: #83473b;
  box-shadow: inset 2px 0 0 var(--h-rust);
}

#horizon .horizon-answers button.wrong > span {
  border-color: var(--h-rust);
  background: var(--h-rust);
  color: #fbf6ef;
}

#horizon .horizon-answers button.correct::after,
#horizon .horizon-answers button.wrong::after {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font: 600 12px var(--mono);
}

#horizon .horizon-answers button.correct::after { content: '✓'; }
#horizon .horizon-answers button.wrong::after { content: '×'; }

#horizon .horizon-done-copy {
  margin: 0;
  padding: 16px 2px 18px;
  border-top: 1px solid var(--h-line-strong);
  border-bottom: 1px solid var(--h-line-strong);
  font: 400 11.5px/1.65 var(--mono);
  color: #44535c;
}

#horizon .horizon-done-copy b {
  font: 400 32px var(--serif);
  color: var(--h-green-ink);
  letter-spacing: -.04em;
}

#horizon .horizon-keys {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 6px;
  letter-spacing: .1em;
  color: #73818a;
}

#horizon .horizon-keys kbd {
  margin-right: 3px;
  padding: 1px 4px;
  border: 1px solid rgba(85, 106, 122, .44);
  border-radius: 2px;
  font: 500 7px var(--mono);
  color: #5b6a73;
}

#horizon .horizon-feedback {
  position: relative;
  min-height: 56px;
  margin-top: 10px;
  padding: 11px 12px 11px 38px;
  border-radius: 2px;
  font: italic calc(13px * var(--h-font))/1.45 var(--serif);
  color: #5d6d64;
  transition: background .25s, color .25s;
}

#horizon .horizon-feedback::before {
  position: absolute;
  left: 12px;
  top: 11px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font: 600 9px var(--mono);
  font-style: normal;
  opacity: .55;
}

#horizon .horizon-feedback.ok {
  background: var(--h-green-soft);
  color: var(--h-green-ink);
  animation: horizonFeedbackIn .36s ease both;
}

#horizon .horizon-feedback.ok::before { content: '✓'; opacity: 1; }

#horizon .horizon-feedback.bad {
  background: var(--h-rust-soft);
  color: #83473b;
  animation: horizonFeedbackIn .36s ease both;
}

#horizon .horizon-feedback.bad::before { content: '×'; opacity: 1; }

@keyframes horizonFeedbackIn {
  from { opacity: .35; transform: translateY(3px); }
}

#horizon .horizon-task-fill {
  flex: 1;
  min-height: 18px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

#horizon .horizon-task-legend {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 7px;
  letter-spacing: .06em;
  color: #5f6d74;
  opacity: .95;
}

#horizon .horizon-task-legend i {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 10px;
  border-bottom: 1px solid rgba(90, 111, 120, .5);
}

#horizon .horizon-task-legend i::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--h-sun);
  transform: translateX(-50%);
  opacity: calc(.3 + var(--h-rise) * .7);
}

#horizon .horizon-task-meter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--h-line);
}

#horizon .horizon-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

#horizon .horizon-dots i {
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: rgba(91, 106, 115, .24);
  transition: background .3s ease, width .3s ease;
}

#horizon .horizon-dots i.now { width: 30px; background: var(--h-ink); }
#horizon .horizon-dots i.done { background: var(--h-green); }
#horizon .horizon-dots i.bad { background: #b98a7f; }

#horizon .horizon-task-counter {
  font-size: 7px;
  letter-spacing: .12em;
  color: #6d7b82;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#horizon .horizon-next {
  flex: 0 0 auto;
  width: 100%;
  height: 46px;
  margin-top: 12px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: var(--h-ink);
  color: var(--h-paper);
  font: 500 7px var(--mono);
  letter-spacing: .12em;
  cursor: pointer;
  transition: background .24s ease, opacity .24s ease, transform .24s ease;
}

#horizon .horizon-next b {
  font: 500 13px var(--mono);
  transition: transform .24s ease;
}

#horizon .horizon-next:hover:not(:disabled) {
  background: #14241c;
}

#horizon .horizon-next:hover:not(:disabled) b {
  transform: translateX(3px);
}

#horizon .horizon-next:disabled {
  opacity: .34;
  cursor: not-allowed;
}

#horizon .horizon-task.is-complete .horizon-next {
  background: var(--h-green);
}

#horizon .horizon-task.is-complete .horizon-task-prompt,
#horizon .horizon-task.is-complete .horizon-keys {
  display: none;
}

#horizon .horizon-task.is-complete .horizon-task-label {
  color: var(--h-green-ink);
}

#horizon .horizon-task.is-complete .horizon-answers {
  animation: horizonFeedbackIn .4s ease both;
}

#horizon .horizon-sheet-handle {
  display: none;
  flex: 0 0 auto;
  width: 100%;
  height: 32px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--h-line);
  background: rgba(246, 243, 233, .55);
  color: var(--h-muted);
  font: 500 6.5px var(--mono);
  letter-spacing: .13em;
  cursor: pointer;
}

#horizon .horizon-sheet-handle i {
  width: 30px;
  height: 3px;
  border-radius: 3px;
  background: rgba(56, 76, 66, .32);
}

#horizon .horizon-sheet-handle b {
  font-weight: 500;
}

#horizon .horizon-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- mobile task dock ---------- */
#horizon .horizon-dock {
  display: none;
}

/* ---------- control dock ---------- */
#horizon .horizon-controls {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px;
  border: 1px solid var(--h-line-strong);
  background: rgba(247, 244, 234, .9);
  box-shadow: 0 18px 38px -28px rgba(33, 49, 41, .8);
  backdrop-filter: blur(14px);
}

#horizon .horizon-controls-label {
  padding: 0 2px 0 8px;
  font-size: 7px;
  letter-spacing: .14em;
  color: var(--h-muted);
  white-space: nowrap;
}

#horizon .horizon-layouts {
  flex: 0 1 auto;
  width: auto;
  margin: 0;
  border: 0;
  display: flex;
  align-items: stretch;
  gap: 1px;
}

#horizon .horizon-layouts button {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  border: 0;
  background: transparent;
  color: var(--h-muted);
  font: 500 7px var(--mono);
  letter-spacing: .1em;
  cursor: pointer;
  transition: background .22s ease, color .22s ease;
}

#horizon .horizon-layouts button i {
  font-style: normal;
  font-size: 6px;
  opacity: .5;
  transition: opacity .22s ease;
}

#horizon .horizon-layouts button:hover {
  background: rgba(56, 76, 66, .07);
  color: var(--h-ink);
}

#horizon .horizon-layouts button.active {
  background: var(--h-ink);
  color: var(--h-paper);
}

#horizon .horizon-layouts button.active i {
  opacity: .62;
}

#horizon .horizon-controls-rule {
  width: 1px;
  height: 18px;
  background: var(--h-line);
}

#horizon .horizon-font {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  border: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

#horizon .horizon-font-label {
  padding: 0 4px 0 4px;
  font-size: 7px;
  letter-spacing: .13em;
  color: var(--h-muted);
}

#horizon .horizon-font button {
  flex: 0 0 25px;
  width: 25px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--h-ink-soft);
  font: 400 13px var(--mono);
  cursor: pointer;
  transition: background .2s, border-color .2s, opacity .2s;
}

#horizon .horizon-font button:hover:not(:disabled) {
  border-color: var(--h-line-strong);
  background: rgba(255, 255, 255, .5);
}

#horizon .horizon-font button:disabled {
  opacity: .28;
  cursor: not-allowed;
}

#horizon .horizon-font b {
  width: 34px;
  text-align: center;
  font: 500 7.5px var(--mono);
  letter-spacing: .03em;
  color: var(--h-ink);
  font-variant-numeric: tabular-nums;
}

#horizon .horizon-controls-shortcut {
  padding-right: 8px;
  font-size: 7px;
  letter-spacing: .1em;
  color: var(--h-faint);
  white-space: nowrap;
}

/* ---------- focus ---------- */
#horizon button:focus-visible,
#horizon [tabindex]:focus-visible {
  outline: 2px solid var(--h-ink);
  outline-offset: 3px;
}

#horizon .horizon-next:focus-visible,
#horizon .horizon-dock:focus-visible,
#horizon .horizon-to-task:focus-visible {
  outline-color: var(--h-paper);
  outline-offset: 2px;
}

#horizon .horizon-reader-scroll:focus-visible {
  outline-color: var(--h-green);
}

/* ---------- responsive: narrow desktop ---------- */
@media (max-width: 1180px) and (min-width: 851px) {
  #horizon .horizon-progress > span em {
    display: none;
  }  #horizon .horizon-progress > span.active em {
    display: inline;
  }
  #horizon .horizon-workspace.layout-split {
    grid-template-columns: minmax(0, 1.22fr) minmax(0, .82fr);
  }
  #horizon .horizon-whisper {
    display: none;
  }
  #horizon .horizon-article {
    max-width: 610px;
  }
  #horizon .horizon-task-inner {
    padding: 22px;
  }
}

@media (max-width: 1000px) {
  #horizon .horizon-session {
    display: none;
  }
}

/* short desktop viewports: keep the whole check inside the frame */
@media (min-width: 851px) and (max-height: 840px) {
  #horizon .horizon-workspace {
    top: 120px;
    bottom: 66px;
  }

  #horizon .horizon-reader-chrome {
    flex-basis: 38px;
  }

  #horizon .horizon-article {
    padding-top: 28px;
  }

  #horizon .horizon-task-inner {
    padding: 18px 20px;
  }

  #horizon .horizon-task-label,
  #horizon .horizon-score {
    font-size: 6.5px;
  }

  #horizon .horizon-score b {
    font-size: 22px;
  }

  #horizon .horizon-task h2 {
    margin: 16px 0 8px;
    font-size: calc(clamp(32px, 2.25vw, 36px) * var(--h-font));
  }

  #horizon .horizon-task-prompt {
    margin-bottom: 12px;
    font-size: 10.5px;
  }

  #horizon .horizon-answers button {
    min-height: 41px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 11.5px;
  }

  #horizon .horizon-keys {
    margin-top: 6px;
  }

  #horizon .horizon-feedback {
    min-height: 44px;
    margin-top: 7px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 12.5px;
  }

  #horizon .horizon-task-fill {
    min-height: 8px;
  }

  #horizon .horizon-task-legend {
    font-size: 6.5px;
  }

  #horizon .horizon-task-meter {
    margin-top: 7px;
    padding-top: 8px;
  }

  #horizon .horizon-next {
    height: 40px;
    margin-top: 8px;
  }
}

/* ============================================================
   MOBILE / TABLET — two full views + a question dock
   ============================================================ */
@media (max-width: 850px) {
  #horizon.horizon-concept {
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    min-height: 560px;
  }

  #horizon .horizon-head {
    height: 58px;
    padding: 0 14px;
    grid-template-columns: 1fr auto;
  }

  #horizon .horizon-logo {
    font-size: 17px;
  }

  #horizon .horizon-logo span {
    width: 22px;
    height: 22px;
  }

  #horizon .horizon-path,
  #horizon .horizon-session {
    display: none;
  }

  #horizon .horizon-head-mobile {
    display: inline-block;
  }

  #horizon .horizon-head-right {
    gap: 10px;
  }

  #horizon .horizon-profile {
    font-size: 0;
    gap: 0;
  }

  #horizon .horizon-profile i {
    width: 28px;
    height: 28px;
  }

  #horizon .horizon-progress {
    display: none;
  }

  #horizon .horizon-workspace {
    top: 58px;
    left: 10px;
    right: 10px;
    bottom: 68px;
    display: block;
    grid-template-columns: none;
    border-radius: 2px;
    box-shadow: 0 28px 60px -46px rgba(34, 50, 42, .7);
  }

  #horizon .horizon-reader {
    position: absolute;
    inset: 0;
    transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
  }

  #horizon .horizon-task {
    position: absolute;
    inset: 0;
    z-index: 9;
    border: 0;
    transform: translateY(102%);
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .32s ease;
  }

  #horizon.is-task-open .horizon-task,
  #horizon .layout-task .horizon-task {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  #horizon.is-task-open .horizon-task::before {
    content: '';
  }

  #horizon .layout-read .horizon-task {
    display: none;
  }

  #horizon .layout-read .horizon-reader {
    transform: none;
    opacity: 1;
  }

  #horizon .layout-task .horizon-reader {
    transform: translateX(-24px);
    opacity: 0;
    pointer-events: none;
  }

  #horizon .horizon-sheet-handle {
    display: flex;
    height: 38px;
    position: sticky;
    top: 0;
    z-index: 4;
    backdrop-filter: blur(10px);
  }

  #horizon .layout-task .horizon-sheet-handle {
    display: none;
  }

  #horizon .horizon-task-inner {
    flex: 1 0 auto;
    min-height: calc(100% - 38px);
    padding: 16px 18px 18px;
  }

  #horizon .horizon-reader-chrome {
    flex-basis: 38px;
    padding: 0 14px;
  }

  #horizon .horizon-chrome-label,
  #horizon .horizon-chrome-tools {
    font-size: 6.5px;
    gap: 6px;
  }

  #horizon .horizon-reader-scroll {
    padding: 0 18px;
  }

  #horizon .horizon-article {
    max-width: 640px;
    padding: 24px 0 120px;
  }

  #horizon .horizon-workspace.layout-read .horizon-article {
    padding-bottom: 48px;
  }

  #horizon .horizon-workspace.layout-task .horizon-task-inner {
    min-height: 100%;
  }

  #horizon .horizon-article h1 {
    font-size: calc(clamp(44px, 6.3vw, 56px) * var(--h-font));
  }

  #horizon .horizon-lead {
    font-size: calc(clamp(19px, 2.3vw, 21px) * var(--h-font));
  }

  #horizon .horizon-body {
    max-width: 60ch;
    font-size: calc(16px * var(--h-font));
    line-height: 1.74;
  }

  #horizon .horizon-figure {
    margin-top: 28px;
  }

  #horizon .horizon-whisper {
    display: none;
  }

  #horizon .horizon-read-hint {
    bottom: 12px;
  }

  #horizon .layout-split .horizon-read-hint {
    bottom: 74px;
  }

  #horizon .horizon-task h2 {
    margin: 18px 0 10px;
    font-size: calc(clamp(31px, 5.6vw, 42px) * var(--h-font));
  }

  #horizon .horizon-task-prompt {
    font-size: 12px;
  }

  #horizon .horizon-answers button {
    min-height: 52px;
    font-size: 13.5px;
  }

  #horizon .horizon-feedback {
    min-height: 54px;
    font-size: calc(13.5px * var(--h-font));
  }

  #horizon .horizon-next {
    font-size: 8px;
  }

  #horizon .horizon-task-fill {
    min-height: 14px;
  }

  #horizon .horizon-dock {
    position: absolute;
    z-index: 8;
    left: 12px;
    right: 12px;
    bottom: 70px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 13px;
    border: 0;
    border-radius: 2px;
    background: rgba(24, 37, 30, .94);
    color: var(--h-paper);
    text-align: left;
    box-shadow: 0 24px 40px -24px rgba(17, 29, 22, .9);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: transform .22s ease, opacity .22s ease, background .22s ease;
  }

  #horizon .horizon-dock:hover {
    transform: translateY(-2px);
    background: #12211a;
  }

  #horizon .layout-read .horizon-dock,
  #horizon .horizon-workspace.layout-read ~ .horizon-dock,
  #horizon .horizon-workspace.layout-task ~ .horizon-dock,
  #horizon.is-task-open .horizon-dock {
    display: none;
  }

  #horizon .horizon-dock-sun {
    position: relative;
    flex: 0 0 26px;
    width: 26px;
    height: 15px;
    border-bottom: 1px solid rgba(246, 243, 233, .55);
  }

  #horizon .horizon-dock-sun i {
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--h-sun);
    transform: translateX(-50%);
  }

  #horizon .horizon-dock-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  #horizon .horizon-dock-copy em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: 500 6.5px var(--mono);
    letter-spacing: .13em;
    font-style: normal;
    color: rgba(246, 243, 233, .55);
  }

  #horizon .horizon-dock-copy b {
    font: 400 13px var(--serif);
    letter-spacing: -.01em;
    color: var(--h-paper);
  }

  #horizon .horizon-dock-score {
    display: flex;
    align-items: baseline;
    gap: 2px;
    white-space: nowrap;
  }

  #horizon .horizon-dock-score b {
    font: 400 20px var(--serif);
    color: var(--h-paper);
  }

  #horizon .horizon-dock-score em {
    font: 500 6.5px var(--mono);
    font-style: normal;
    color: rgba(246, 243, 233, .55);
  }

  #horizon .horizon-dock-arrow {
    flex: 0 0 auto;
    font-style: normal;
    color: var(--h-sun-light);
    font-size: 12px;
  }

  #horizon .horizon-controls {
    left: 10px;
    right: 10px;
    bottom: 8px;
    width: auto;
    height: 50px;
    transform: none;
    gap: 6px;
    padding: 5px;
    background: rgba(247, 244, 234, .94);
  }

  #horizon .horizon-controls-label,
  #horizon .horizon-controls-shortcut,
  #horizon .horizon-font-label {
    display: none;
  }

  #horizon .horizon-layouts {
    flex: 1;
    width: auto;
    gap: 1px;
  }

  #horizon .horizon-layouts button {
    flex: 1;
    height: 40px;
    padding: 0 6px;
    font-size: 7.5px;
    letter-spacing: .05em;
  }

  #horizon .horizon-layouts button i {
    display: none;
  }

  #horizon .horizon-controls-rule {
    height: 22px;
  }

  #horizon .horizon-font {
    gap: 0;
  }

  #horizon .horizon-font button {
    flex: 0 0 28px;
    width: 28px;
    height: 40px;
    font-size: 14px;
  }

  #horizon .horizon-font b {
    width: 32px;
    font-size: 7px;
  }
}

@media (min-width: 600px) and (max-width: 850px) {
  #horizon .horizon-controls {
    left: 50%;
    right: auto;
    width: min(520px, calc(100% - 20px));
    transform: translateX(-50%);
  }
}

@media (max-width: 520px) {
  #horizon .horizon-workspace {
    left: 8px;
    right: 8px;
  }

  #horizon .horizon-article h1 {
    font-size: calc(clamp(39px, 11.4vw, 50px) * var(--h-font));
  }

  #horizon .horizon-lead {
    font-size: calc(18px * var(--h-font));
  }

  #horizon .horizon-body {
    font-size: calc(15.5px * var(--h-font));
  }

  #horizon .horizon-kicker {
    margin-bottom: 18px;
  }

  #horizon .horizon-chrome-rule {
    display: none;
  }

  #horizon .horizon-chrome-tools {
    gap: 8px;
  }

  #horizon .horizon-read-state {
    font-size: 6.5px;
  }

  #horizon .horizon-figure {
    padding: 12px 11px 10px;
  }

  #horizon .horizon-figure-head em {
    display: none;
  }

  #horizon .horizon-figure figcaption {
    font-size: 8px;
  }

  #horizon .horizon-formula {
    padding: 18px 16px 16px;
  }

  #horizon .horizon-formula-line {
    gap: 4px 10px;
  }

  #horizon .horizon-formula-line b,
  #horizon .horizon-formula-line strong {
    font-size: calc(clamp(21px, 6.2vw, 27px) * var(--h-font));
  }

  #horizon .horizon-note {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #horizon .horizon-note > span {
    padding-top: 0;
  }

  #horizon .horizon-note p {
    padding-left: 18px;
    font-size: calc(15.5px * var(--h-font));
  }

  #horizon .horizon-end {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 4px 12px;
  }

  #horizon .horizon-end-mark {
    width: 46px;
  }

  #horizon .horizon-to-task {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: space-between;
    width: 100%;
    margin-top: 12px;
  }

  #horizon .horizon-task h2 {
    font-size: calc(clamp(31px, 8.4vw, 36px) * var(--h-font));
  }

  #horizon .horizon-task-prompt {
    font-size: 12px;
    margin-bottom: 16px;
  }

  #horizon .horizon-answers button {
    font-size: 13.5px;
    min-height: 51px;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
  }

  #horizon .horizon-keys {
    display: none;
  }

  #horizon .horizon-feedback {
    font-size: calc(13.5px * var(--h-font));
    padding-left: 36px;
  }

  #horizon .horizon-task-fill {
    display: flex;
    min-height: 10px;
  }

  #horizon .horizon-task-legend {
    font-size: 7px;
  }

  #horizon .horizon-done-copy {
    font-size: 12.5px;
  }

  #horizon .horizon-task-meter {
    margin-top: auto;
    padding-top: 8px;
  }

  #horizon .horizon-dots i {
    width: 16px;
  }

  #horizon .horizon-dots i.now {
    width: 24px;
  }

  #horizon .horizon-next {
    height: 48px;
  }

  #horizon .horizon-dock {
    left: 10px;
    right: 10px;
    height: 58px;
    gap: 10px;
  }

  #horizon .horizon-controls {
    left: 8px;
    right: 8px;
  }

  #horizon .horizon-layouts button {
    font-size: 6.5px;
    letter-spacing: .04em;
    padding: 0 3px;
  }

  #horizon .horizon-font button {
    flex: 0 0 26px;
    width: 26px;
  }

  #horizon .horizon-font b {
    width: 28px;
    font-size: 6px;
  }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  #horizon *,
  #horizon *::before,
  #horizon *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  #horizon .horizon-dawn-sun,
  #horizon .horizon-end-mark i {
    transition: none !important;
  }
}
