
:root {
  --bg: #171717;
  --bg-elevated: #1d1d1d;
  --bg-hover: #222;
  --text: #f2f2f2;
  --text-soft: #d2d2d2;
  --muted: #a1a1a1;
  --muted-strong: #b8b8b8;
  --line: #353535;
  --line-soft: #2a2a2a;
  --yellow: #ffc21a;
  --yellow-ink: #171717;
  --accent: #7ac47a;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --content: 1280px;
  --reading: 720px;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open::before {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgb(0 0 0 / 44%);
  content: "";
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* Site chrome */

.app-promo {
  height: 72px;
  display: grid;
  place-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  color: #bdbdbd;
  background: var(--bg);
  font-size: 16px;
}

.app-promo a {
  color: inherit;
}

.app-promo a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 102px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 26px;
  padding: 0 max(42px, calc((100vw - var(--content)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgb(23 23 23 / 95%);
  backdrop-filter: blur(14px);
}

.menu-toggle-wrap {
  display: block;
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #cdcdcd;
  cursor: pointer;
}

.menu-toggle:hover {
  color: #fff;
}

.menu-toggle svg {
  width: 31px;
  height: 31px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  color: var(--text);
}

.brand-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--serif);
  font-size: 50px;
  line-height: .9;
  font-weight: 700;
  letter-spacing: -2.8px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: var(--muted-strong);
}

.search-box {
  width: 290px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 28px;
  background: #2a2a2a;
  color: #bcbcbc;
}

.search-box:focus-within {
  border-color: #555;
  background: #2f2f2f;
}

.search-box > svg {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
}

.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 17px;
}

.search-box input::placeholder {
  color: #8f8f8f;
}

.search-toggle,
.search-clear {
  display: none;
}

.text-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #bdbdbd;
  cursor: pointer;
}

.get-started {
  padding: 12px 18px;
  border: 1px solid #4a4a4a;
  border-radius: 24px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.get-started:hover {
  background: #252525;
}

.avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e83d8c;
  color: #fff;
  font-size: 21px;
  font-weight: 750;
}

/* Offer bar */

.membership-banner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 12px 28px;
  background: var(--yellow);
  color: var(--yellow-ink);
  font-size: 20px;
  line-height: 1.2;
}

.membership-banner .badge {
  display: none;
}

.membership-banner a {
  color: var(--yellow-ink);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.membership-banner a:hover {
  opacity: .8;
}

/* Three-column desktop shell */

.layout {
  width: min(var(--content), calc(100% - 84px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 190px minmax(0, var(--reading)) 280px;
  gap: 52px;
  align-items: start;
}

.left-rail {
  position: sticky;
  top: 103px;
  min-height: calc(100vh - 103px);
  padding: 36px 18px 30px 0;
  border-right: 1px solid var(--line);
}

.rail-list {
  display: grid;
  gap: 5px;
}

.rail-link {
  width: 100%;
  min-height: 49px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #b0b0b0;
  text-align: left;
  font-size: 15px;
  cursor: pointer;
}

.rail-link:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.rail-link.active {
  background: #202020;
  color: var(--text);
  font-weight: 650;
}

.rail-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  color: currentColor;
}

.rail-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-divider {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.rail-label {
  margin: 0 0 8px 12px;
  color: #7f7f7f;
  font-size: 10px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.rail-link-with-badge {
  justify-content: space-between;
}

.rail-link-with-badge > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 15px;
}

.beta {
  padding: 5px 9px;
  border-radius: 14px;
  background: var(--yellow);
  color: var(--yellow-ink);
  font-size: 10px;
  font-weight: 800;
}

.rail-following {
  display: grid;
  gap: 3px;
  margin-top: 4px;
}

.follow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: #b9b9b9;
  font-size: 13px;
  border-radius: 6px;
}

.follow-row:hover {
  background: var(--bg-hover);
}

.follow-empty {
  padding: 8px 10px;
  color: #6f6f6f;
  font-size: 11px;
}

.follow-avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e8ddcb;
  color: #574c3c;
  font-size: 9px;
  font-weight: 800;
}

.follow-avatar.cyan {
  background: #20a9d8;
  color: #fff;
}

.follow-dot {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: #78c777;
}

.rail-bottom {
  position: absolute;
  left: 12px;
  bottom: 26px;
  max-width: 155px;
  color: #777;
  font-size: 11px;
  line-height: 1.9;
}

.rail-bottom a {
  margin-right: 9px;
}

.rail-bottom a:hover {
  color: var(--text);
}

.mobile-drawer-close,
.rail-mobile-head {
  display: none;
}

/* Feed */

main {
  min-width: 0;
  padding: 42px 0 110px;
}

.welcome {
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #777;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.welcome h1,
.stats-heading h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -1.1px;
}

.welcome p:last-child,
.stats-heading p,
.stats-scope-note,
.stats-footnote {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.welcome p:last-child {
  margin: 8px 0 0;
}

.tabs {
  height: 64px;
  display: flex;
  align-items: end;
  gap: 34px;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  height: 64px;
  padding: 0 0 17px;
  display: inline-flex;
  align-items: end;
  border: 0;
  background: transparent;
  color: #929292;
  font-size: 16px;
  cursor: pointer;
}

.tab:hover {
  color: #d6d6d6;
}

.tab.selected {
  color: var(--text);
  font-weight: 650;
}

.tab.selected::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--text);
  content: "";
}

.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 24px;
  padding: 34px 0 31px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.story-copy {
  min-width: 0;
}

.byline {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  margin: 0 0 13px;
  color: #aaa;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
}

.byline strong {
  color: #dedede;
  font-weight: 650;
}

.mini-avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 4px;
  background: #7b2733;
  color: #fff1f4;
  font-size: 7px;
  font-weight: 800;
}

.mini-avatar.blue {
  background: #1c7c9e;
  color: #e8f9ff;
}

.mini-avatar.pink {
  background: #823763;
  color: #ffeaf6;
}

.mini-avatar.green {
  background: #2b633b;
  color: #e8ffed;
}

.mini-avatar.gold {
  background: #745c29;
  color: #fff4d3;
}

.story h2 {
  max-width: 650px;
  margin: 0 0 10px;
  color: #f3f3f3;
  font-family: var(--sans);
  font-size: 28px;
  line-height: 1.16;
  font-weight: 760;
  letter-spacing: -.7px;
}

.story-title-button {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.story-title-button:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.story-summary {
  max-width: 630px;
  margin: 0;
  color: #a8a8a8;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.4;
}

.story-image {
  width: 150px;
  height: 102px;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 2px;
  background: #252525;
}

.story-meta.story-engagement {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 25px;
  color: #8f8f8f;
  font-size: 13px;
}

.engagement-list {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.engagement-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.engagement-icon {
  color: #9b9b9b;
  font-size: 15px;
  line-height: 1;
}

.engagement-item:first-child .engagement-icon {
  color: var(--yellow);
}

.story-engagement .topic-pill {
  display: none;
}

.story-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.bookmark,
.more {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9b9b9b;
  cursor: pointer;
}

.bookmark:hover,
.more:hover {
  background: #242424;
  color: #f0f0f0;
}

.bookmark {
  position: relative;
  font-size: 0;
}

.bookmark::before {
  width: 13px;
  height: 17px;
  border: 1.6px solid currentColor;
  border-radius: 1px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 75%, 0 100%);
  content: "";
}

.bookmark[aria-pressed="true"] {
  color: var(--accent);
}

.bookmark[aria-pressed="true"]::before {
  background: var(--accent);
}

.more {
  font-size: 17px;
  letter-spacing: 2px;
}

.story-state {
  display: none;
}

/* Right rail */

.right-rail {
  position: sticky;
  top: 103px;
  padding-top: 47px;
}

.side-section {
  margin-bottom: 37px;
}

.side-section h2 {
  margin: 0 0 15px;
  color: #dcdcdc;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
}

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

.topic-button {
  padding: 9px 13px;
  border: 1px solid #383838;
  border-radius: 20px;
  background: #202020;
  color: #c8c8c8;
  font-size: 12px;
  cursor: pointer;
}

.topic-button:hover,
.topic-button[aria-pressed="true"] {
  background: #292929;
  color: #fff;
}

.pick {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  margin: 0 0 19px;
}

.pick-number {
  color: #777;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1;
}

.pick-byline {
  margin: 0 0 5px;
  color: #7e7e7e;
  font-size: 10px;
}

.pick h3 {
  margin: 0;
  color: #e1e1e1;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.32;
  font-weight: 650;
}

.see-more {
  color: var(--accent);
  font-size: 12px;
}

.membership-card {
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.membership-card h2 {
  margin: 0 0 9px;
  color: #e8e8e8;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.2;
}

.membership-card p {
  margin: 0 0 16px;
  color: #858585;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
}

.membership-card button {
  padding: 10px 15px;
  border: 1px solid #555;
  border-radius: 21px;
  background: transparent;
  color: #f0f0f0;
  font-size: 12px;
  cursor: pointer;
}

/* Stats */

.stats-view {
  padding-top: 5px;
}

.stats-heading {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0;
}

.stats-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #1c1c1c;
}

.stats-card dt {
  color: #8f8f8f;
  font-size: 12px;
}

.stats-card dd {
  margin: 10px 0 4px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
}

.stats-card p {
  margin: 0;
  color: #707070;
  font-size: 11px;
  line-height: 1.4;
}

/* Empty + toast */

.empty-state {
  display: none;
  margin: 0;
  padding: 52px 0;
  color: #929292;
  font-family: var(--serif);
  font-size: 18px;
}

.empty-state.show {
  display: block;
}

.story.hidden {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: min(560px, calc(100vw - 36px));
  padding: 12px 18px;
  transform: translate(-50%, 18px);
  border-radius: 24px;
  background: #f1f1f1;
  color: #171717;
  box-shadow: 0 10px 34px rgb(0 0 0 / 48%);
  opacity: 0;
  pointer-events: none;
  font-size: 13px;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* Reader */

.reader {
  width: min(880px, calc(100vw - 46px));
  max-width: none;
  max-height: min(900px, calc(100dvh - 34px));
  padding: 0;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  background: #181818;
  color: var(--text);
  box-shadow: 0 28px 90px rgb(0 0 0 / 64%);
  overflow: hidden;
}

.reader::backdrop {
  background: rgb(0 0 0 / 66%);
  backdrop-filter: blur(5px);
}

.reader-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 66px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: #181818;
}

.reader-toolbar::before {
  color: #ededed;
  content: "ink.gs";
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -1.2px;
}

#reader-label {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  margin-right: 38px;
  color: #8d8d8d;
  font-size: 11px;
}

.reader-close {
  grid-column: 2;
  grid-row: 1;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #b7b7b7;
  font-size: 27px;
  cursor: pointer;
}

.reader-close:hover {
  background: #252525;
  color: #fff;
}

.reader-progress {
  height: 2px;
  background: #262626;
}

.reader-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--yellow);
  transition: width .12s linear;
}

.reader-scroll {
  max-height: calc(100dvh - 158px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(45px, 6vw, 76px) clamp(28px, 9vw, 100px) 54px;
}

.reader-article {
  max-width: 720px;
  margin: 0 auto;
}

.reader-kicker {
  margin: 0 0 20px;
  color: #bdbdbd;
  font-size: 15px;
  line-height: 1.4;
}

.reader-title {
  margin: 0 0 18px;
  color: #fafafa;
  font-family: var(--sans);
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1.04;
  font-weight: 760;
  letter-spacing: -2.1px;
}

.reader-summary {
  margin: 0 0 22px;
  color: #b8b8b8;
  font-size: 20px;
  line-height: 1.4;
}

.reader-byline {
  margin: 0 0 36px;
  color: #939393;
  font-size: 13px;
}

.reader-cover {
  display: block;
  width: 100%;
  max-height: 390px;
  margin: 0 0 34px;
  object-fit: cover;
  border-radius: 3px;
}

.reader-body {
  color: #e9e9e9;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.82;
}

.reader-body p {
  margin: 0 0 27px;
}

.reader-body p:first-child::first-letter {
  float: left;
  margin: .11em .14em 0 0;
  color: #f4f4f4;
  font-family: var(--serif);
  font-size: 4.2em;
  line-height: .72;
}

.reader-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #181818;
}

.reader-actions-group {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.reader-action {
  padding: 10px 14px;
  border: 1px solid #444;
  border-radius: 22px;
  background: #1d1d1d;
  color: #d2d2d2;
  font-size: 12px;
  cursor: pointer;
}

.reader-action:hover {
  background: #252525;
  color: #fff;
}

.reader-action.primary {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--yellow-ink);
}

.reader-action[aria-pressed="true"] {
  color: var(--accent);
  border-color: #4f7b4f;
}

/* Composer and login */

.composer,
.login-dialog {
  color: var(--text);
  background: #1b1b1b;
  border: 1px solid #3c3c3c;
  box-shadow: 0 28px 90px rgb(0 0 0 / 70%);
}

.composer {
  width: min(1120px, calc(100vw - 40px));
  max-width: none;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
}

.composer::backdrop,
.login-dialog::backdrop {
  background: rgb(0 0 0 / 70%);
  backdrop-filter: blur(4px);
}

.composer-toolbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.composer-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.composer-status {
  color: #999;
  font-size: 11px;
}

.composer-button,
.composer-close,
.login-actions button {
  border: 1px solid #444;
  border-radius: 20px;
  background: #1f1f1f;
  color: #d3d3d3;
  cursor: pointer;
}

.composer-button {
  padding: 8px 12px;
  font-size: 11px;
}

.composer-button.primary,
.login-actions .primary {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #171717;
}

.composer-close {
  width: 34px;
  height: 34px;
  font-size: 22px;
}

.composer-content {
  max-height: min(78dvh, 780px);
  overflow: auto;
  padding: 24px 28px 30px;
}

.composer-title {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.1;
}

.composer-title::placeholder,
.composer-body::placeholder {
  color: #686868;
}

.composer-body {
  width: 100%;
  min-height: 320px;
  margin-top: 20px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ddd;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.75;
}

.composer-note {
  margin: 20px 0 0;
  color: #6f6f6f;
  font-size: 11px;
}

.draft-library-heading,
.online-library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.draft-library-heading h3,
.online-library-heading h3 {
  margin: 0;
  color: #efefef;
  font-family: var(--serif);
  font-size: 20px;
}

.draft-library-heading p {
  margin: 5px 0 0;
  color: #707070;
  font-size: 11px;
}

.draft-list,
.online-story-list {
  display: grid;
  gap: 8px;
}

.draft-row {
  padding: 12px;
  border: 1px solid #343434;
  border-radius: 8px;
  background: #202020;
}

.draft-row-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.draft-open,
.draft-row-actions button,
.draft-rename-form button {
  border: 0;
  background: transparent;
  color: #c8c8c8;
  cursor: pointer;
}

.draft-open {
  min-width: 0;
  display: grid;
  gap: 3px;
  text-align: left;
}

.draft-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #efefef;
  font-size: 13px;
}

.draft-date {
  color: #747474;
  font-size: 10px;
}

.draft-row-actions {
  display: flex;
  gap: 8px;
}

.draft-delete {
  color: #f08d8d !important;
}

.draft-rename-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.draft-rename-form input,
.story-fields input,
.story-fields select,
#editor-password {
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #424242;
  border-radius: 7px;
  background: #171717;
  color: #eee;
}

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

.story-fields label {
  display: grid;
  gap: 6px;
  color: #9b9b9b;
  font-size: 11px;
}

.story-fields .full-width {
  grid-column: 1 / -1;
}

.composer-preview {
  display: none;
  max-width: 720px;
  margin: 30px auto 0;
}

.composer[data-mode="preview"] .composer-title,
.composer[data-mode="preview"] .composer-body,
.composer[data-mode="preview"] .story-fields,
.composer[data-mode="preview"] .composer-note {
  display: none;
}

.composer[data-mode="preview"] .composer-preview {
  display: block;
}

.composer-preview-title {
  margin: 0 0 25px;
  color: #fff;
  font-family: var(--sans);
  font-size: 42px;
  line-height: 1.1;
}

.composer-preview-body {
  color: #e4e4e4;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.8;
}

.composer-preview-body p {
  margin: 0 0 22px;
}

.login-dialog {
  width: min(450px, calc(100vw - 36px));
  padding: 26px;
  border-radius: 10px;
}

.login-dialog h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 26px;
}

.login-dialog p {
  margin: 0 0 18px;
  color: #8f8f8f;
  font-size: 12px;
  line-height: 1.55;
}

.login-dialog label {
  display: grid;
  gap: 7px;
  color: #aaa;
  font-size: 11px;
}

.login-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.login-actions button {
  padding: 9px 14px;
}

.login-error {
  min-height: 18px;
  margin-top: 9px;
  color: #f3a0a0;
  font-size: 11px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  margin: -1px !important;
}

/* Responsive */

@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 174px minmax(0, 1fr);
    width: min(940px, calc(100% - 72px));
  }

  .right-rail {
    display: none;
  }

  .story {
    grid-template-columns: minmax(0, 1fr) 142px;
  }

  .story-image {
    width: 142px;
    height: 98px;
  }
}

@media (max-width: 820px) {
  .app-promo {
    height: 58px;
    font-size: 14px;
  }

  .topbar {
    height: 78px;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    column-gap: 18px;
    padding: 0 28px;
  }

  .brand-name {
    font-size: 39px;
  }

  .search-box {
    width: 220px;
    height: 44px;
  }

  .avatar {
    width: 44px;
    height: 44px;
    font-size: 17px;
  }

  .membership-banner {
    min-height: 58px;
    font-size: 16px;
  }

  .layout {
    grid-template-columns: 58px minmax(0, 1fr);
    width: min(760px, calc(100% - 48px));
    gap: 26px;
  }

  .left-rail {
    padding-right: 5px;
  }

  .rail-link {
    width: 48px;
    justify-content: center;
  }

  .rail-link > span:last-child,
  .rail-label,
  .rail-divider,
  .rail-bottom,
  .rail-link-with-badge .beta,
  .rail-following {
    display: none;
  }

  .rail-icon {
    width: 22px;
    flex-basis: 22px;
  }

  main {
    padding-top: 32px;
  }

  .story {
    grid-template-columns: minmax(0, 1fr) 122px;
    gap: 18px;
  }

  .story-image {
    width: 122px;
    height: 88px;
  }
}

@media (max-width: 700px) {
  html,
  body {
    background: var(--bg);
  }

  .app-promo {
    position: relative;
    z-index: 20;
    height: 72px;
    min-height: 72px;
    padding: 0 18px;
    font-size: 11px;
  }

  .topbar {
    position: sticky;
    top: 0;
    height: 103px;
    min-height: 103px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    column-gap: 26px;
    padding: 0 max(42px, 6.2vw);
    background: rgb(23 23 23 / 97%);
    border-bottom-color: var(--line);
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
  }

  .menu-toggle svg {
    width: 31px;
    height: 31px;
  }

  .brand-name {
    font-size: 38px;
    letter-spacing: -2.5px;
  }

  .top-actions {
    gap: 15px;
  }

  .search-box {
    position: relative;
    width: 38px;
    height: 42px;
    padding: 0;
    background: transparent;
    border: 0;
    overflow: visible;
  }

  .search-box > svg,
  .search-box input,
  .search-clear,
  .write-action,
  .sync-action,
  #editor-login-button,
  .get-started {
    display: none !important;
  }

  .search-toggle {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #cfcfcf;
    cursor: pointer;
  }

  .search-toggle:hover {
    background: #242424;
    color: #fff;
  }

  .search-toggle svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .search-box.search-open {
    position: absolute;
    left: max(24px, 6vw);
    right: max(24px, 6vw);
    top: 50%;
    z-index: 70;
    width: auto;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    transform: translateY(-50%);
    border: 1px solid #464646;
    border-radius: 26px;
    background: #2a2a2a;
    box-shadow: 0 12px 32px rgb(0 0 0 / 35%);
  }

  .search-box.search-open > svg {
    display: block;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    margin-right: 9px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .search-box.search-open input {
    display: block !important;
    min-width: 0;
    flex: 1 1 auto;
    color: var(--text);
    font-size: 16px;
  }

  .search-box.search-open .search-toggle {
    display: none;
  }

  .search-box.search-open .search-clear {
    width: 34px;
    height: 34px;
    display: grid !important;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #bdbdbd;
    font-size: 25px;
    cursor: pointer;
  }

  .search-box.search-open .search-clear:hover {
    color: #fff;
  }

  .avatar {
    width: 56px;
    height: 56px;
    font-size: 21px;
  }

  .membership-banner {
    position: relative;
    z-index: 10;
    min-height: 71px;
    padding: 10px 18px;
    gap: 10px;
    font-size: 20px;
    white-space: nowrap;
  }

  .feed-status {
    margin: 0;
    padding: 14px 0 0;
    color: #8f8f8f;
    font-size: 13px;
    line-height: 1.35;
  }

  .membership-banner span:not(.badge) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .membership-banner a {
    flex: 0 0 auto;
  }

  .layout {
    width: 100%;
    display: block;
  }

  .left-rail,
  .right-rail {
    display: none;
  }

  .left-rail.mobile-open {
    position: fixed;
    inset: 72px auto 0 0;
    z-index: 60;
    width: min(360px, calc(100vw - 48px));
    height: calc(100dvh - 72px);
    min-height: 0;
    display: block;
    padding: 0 20px max(30px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid #3f3f3f;
    background: #171717;
    box-shadow: 18px 0 48px rgb(0 0 0 / 52%);
  }

  .rail-mobile-head {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 103px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 -20px 18px;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
    background: #171717;
  }

  .rail-mobile-brand {
    color: #f2f2f2;
    font-family: var(--serif);
    font-size: 43px;
    line-height: .9;
    font-weight: 700;
    letter-spacing: -2.4px;
  }

  .mobile-drawer-close {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #cfcfcf;
    font-size: 30px;
    cursor: pointer;
  }

  .mobile-drawer-close:hover {
    background: #242424;
    color: #fff;
  }

  .left-rail.mobile-open .rail-list {
    display: grid;
    gap: 5px;
  }

  .left-rail.mobile-open .rail-link {
    width: 100%;
    min-height: 56px;
    justify-content: flex-start;
    padding: 9px 8px;
    gap: 15px;
    color: #bdbdbd;
    font-size: 17px;
  }

  .left-rail.mobile-open .rail-link > span:last-child,
  .left-rail.mobile-open .rail-label,
  .left-rail.mobile-open .rail-divider,
  .left-rail.mobile-open .rail-following,
  .left-rail.mobile-open .beta {
    display: initial;
  }

  .left-rail.mobile-open .rail-icon {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
  }

  .left-rail.mobile-open .rail-icon svg {
    width: 31px;
    height: 31px;
  }

  .left-rail.mobile-open .rail-link.active {
    color: #f3f3f3;
    background: #1d1d1d;
    border-radius: 10px;
    position: relative;
  }

  .left-rail.mobile-open .rail-link.active::before {
    position: absolute;
    left: -20px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: #f3f3f3;
    content: "";
  }

  .left-rail.mobile-open .rail-link-with-badge {
    justify-content: space-between;
  }

  .left-rail.mobile-open .rail-link-with-badge > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 17px;
  }

  .left-rail.mobile-open .rail-divider {
    margin: 19px 0;
  }

  .left-rail.mobile-open .rail-label {
    margin: 0 0 7px 6px;
    color: #777;
    font-size: 10px;
  }

  .left-rail.mobile-open .rail-following {
    gap: 2px;
    margin: 3px 0 14px;
  }

  .left-rail.mobile-open .follow-row {
    padding: 8px 6px;
    font-size: 15px;
  }

  .left-rail.mobile-open .follow-avatar {
    width: 31px;
    height: 31px;
    font-size: 10px;
  }

  .left-rail.mobile-open .rail-bottom {
    position: static;
    display: block;
    max-width: none;
    margin-top: 20px;
    color: #777;
  }

  main {
    width: 100%;
    padding: 0 max(42px, 6.2vw) 75px;
  }

  .welcome {
    display: none;
  }

  .tabs {
    height: 111px;
    align-items: end;
    gap: 36px;
  }

  .tab {
    height: 111px;
    align-items: end;
    padding: 0 0 27px;
    font-size: 20px;
  }

  .tab.selected::after {
    height: 2px;
  }

  .story {
    grid-template-columns: minmax(0, 1fr) 144px;
    gap: 24px;
    min-height: 0;
    padding: 36px 0 50px;
  }

  .byline {
    gap: 10px;
    margin-bottom: 18px;
    font-size: 16px;
  }

  .mini-avatar {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    font-size: 8px;
  }

  .story h2 {
    max-width: 100%;
    margin-bottom: 15px;
    font-size: 35px;
    line-height: 1.16;
    letter-spacing: -.9px;
  }

  .story-summary {
    max-width: 100%;
    font-size: 20px;
    line-height: 1.4;
    color: #aaa;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .story-image {
    width: 144px;
    height: 96px;
    border-radius: 2px;
  }

  .story-meta.story-engagement {
    margin-top: 24px;
    gap: 15px;
    font-size: 15px;
  }

  .engagement-list {
    gap: 16px;
  }

  .engagement-item {
    gap: 6px;
  }

  .engagement-icon {
    font-size: 18px;
  }

  .story-tools {
    gap: 7px;
  }

  .bookmark,
  .more {
    width: 42px;
    height: 42px;
  }

  .bookmark::before {
    width: 16px;
    height: 21px;
    border-width: 1.8px;
  }

  .more {
    font-size: 21px;
  }

  .toast {
    bottom: 20px;
    font-size: 13px;
  }

  .reader {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .reader::backdrop {
    background: #171717;
  }

  .reader-site-bar {
    min-height: 103px;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) 35px 56px;
    align-items: center;
    column-gap: 22px;
    padding: 0 max(42px, 6.2vw);
    border-bottom: 1px solid var(--line);
    background: #171717;
  }

  .reader-menu-mark {
    color: #c9c9c9;
    font-size: 29px;
    line-height: 1;
  }

  .reader-brand {
    color: #f2f2f2;
    font-family: var(--serif);
    font-size: 43px;
    line-height: .9;
    font-weight: 700;
    letter-spacing: -2.5px;
  }

  .reader-site-search {
    color: #cfcfcf;
    font-size: 31px;
    line-height: 1;
    text-align: center;
  }

  .reader-site-avatar {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e83d8c;
    color: #fff;
    font-size: 21px;
    font-weight: 750;
  }

  .reader-offer {
    min-height: 71px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 18px;
    background: var(--yellow);
    color: var(--yellow-ink);
    font-size: 18px;
    white-space: nowrap;
  }

  .reader-offer a {
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .reader-toolbar {
    min-height: 76px;
    padding: 0 max(22px, 6.2vw);
    background: #171717;
  }

  .reader-toolbar::before {
    font-size: 29px;
  }

  #reader-label {
    margin-right: 39px;
    font-size: 12px;
  }

  .reader-scroll {
    max-height: calc(100dvh - 148px);
    padding: 48px max(28px, 6.2vw) 52px;
  }

  .reader-article {
    max-width: 680px;
  }

  .reader-kicker {
    margin-bottom: 18px;
    color: #d7d7d7;
    font-size: 17px;
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .reader-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 24px;
  }

  .reader-chip {
    padding: 9px 13px;
    border: 1px solid #444;
    border-radius: 19px;
    color: #c5c5c5;
    background: #1e1e1e;
    font-size: 12px;
  }

  .reader-chip-accent::before {
    margin-right: 7px;
    color: var(--yellow);
    content: "✦";
  }

  .reader-title {
    margin-bottom: 18px;
    font-size: clamp(37px, 6.3vw, 57px);
    line-height: 1.04;
    letter-spacing: -1.6px;
  }

  .reader-summary {
    margin-bottom: 28px;
    font-size: 22px;
    line-height: 1.4;
  }

  .reader-byline {
    margin-bottom: 34px;
    font-size: 15px;
  }

  .reader-cover {
    margin-bottom: 33px;
  }

  .reader-body {
    font-size: 22px;
    line-height: 1.72;
  }

  .reader-body p {
    margin-bottom: 29px;
  }

  .reader-actions {
    min-height: 66px;
    padding: 10px max(18px, 6.2vw);
    overflow-x: auto;
  }

  .reader-actions-group {
    flex-wrap: nowrap;
  }

  .reader-action {
    white-space: nowrap;
  }

  .composer,
  .login-dialog {
    width: calc(100vw - 24px);
  }

  .composer-toolbar {
    align-items: flex-start;
    padding: 13px 14px;
  }

  .composer-status {
    max-width: 160px;
    line-height: 1.3;
  }

  .composer-content {
    padding: 20px 18px 26px;
  }

  .composer-title {
    font-size: 29px;
  }

  .composer-body {
    min-height: 260px;
  }

  .story-fields {
    grid-template-columns: 1fr;
  }

  .story-fields .full-width {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .topbar {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    column-gap: 14px;
    padding: 0 18px;
  }

  .menu-toggle {
    width: 34px;
    height: 34px;
  }

  .menu-toggle svg {
    width: 28px;
    height: 28px;
  }

  .brand-name {
    font-size: 31px;
    letter-spacing: -1.8px;
  }

  .avatar {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }

  .membership-banner {
    min-height: 53px;
    padding: 8px 14px;
    gap: 7px;
    font-size: 13px;
  }

  .membership-banner a {
    font-size: 13px;
  }

  .left-rail.mobile-open {
    width: min(340px, calc(100vw - 36px));
  }

  .rail-mobile-head {
    min-height: 80px;
  }

  .rail-mobile-brand {
    font-size: 34px;
  }

  main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .tabs,
  .tab {
    height: 72px;
  }

  .tab {
    padding-bottom: 18px;
    font-size: 14px;
  }

  .story {
    grid-template-columns: minmax(0, 1fr) 102px;
    gap: 13px;
    padding: 34px 0 30px;
  }

  .byline {
    margin-bottom: 12px;
    font-size: 11px;
  }

  .mini-avatar {
    width: 21px;
    height: 21px;
    min-width: 21px;
    font-size: 6px;
  }

  .story h2 {
    margin-bottom: 9px;
    font-size: 19px;
    line-height: 1.18;
    letter-spacing: -.45px;
  }

  .story-summary {
    font-size: 13px;
    line-height: 1.35;
    -webkit-line-clamp: 3;
  }

  .story-image {
    width: 102px;
    height: 70px;
  }

  .story-meta.story-engagement {
    margin-top: 15px;
    font-size: 10px;
  }

  .engagement-list {
    gap: 9px;
  }

  .engagement-icon {
    font-size: 12px;
  }

  .bookmark,
  .more {
    width: 26px;
    height: 26px;
  }

  .bookmark::before {
    width: 11px;
    height: 15px;
  }

  .more {
    font-size: 14px;
  }

  .reader-scroll {
    padding-top: 35px;
  }

  .reader-title {
    font-size: 38px;
  }

  .reader-summary {
    font-size: 18px;
  }

  .reader-body {
    font-size: 19px;
  }
}

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

  .toast {
    transition: none;
  }
}


@media (max-width: 520px) {
  .reader-site-bar {
    min-height: 78px;
    grid-template-columns: 34px minmax(0,1fr) 28px 42px;
    column-gap: 14px;
    padding: 0 18px;
  }

  .reader-menu-mark {
    font-size: 23px;
  }

  .reader-brand {
    font-size: 31px;
  }

  .reader-site-search {
    font-size: 26px;
  }

  .reader-site-avatar {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }

  .reader-offer {
    min-height: 53px;
    gap: 7px;
    padding: 8px 14px;
    font-size: 13px;
  }

  .reader-toolbar {
    min-height: 60px;
    padding: 0 18px;
  }

  .reader-chips {
    gap: 7px;
    margin-bottom: 18px;
  }

  .reader-chip {
    padding: 7px 10px;
    font-size: 10px;
  }
}


/* Utility surfaces */
.feed-status {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.engagement-button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.engagement-button:hover { color: var(--text); }

.utility-dialog,
.login-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(820px, calc(100dvh - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 28px 80px rgb(0 0 0 / 52%);
}
.utility-dialog::backdrop,
.login-dialog::backdrop,
.reader::backdrop {
  background: rgb(0 0 0 / 62%);
}
.utility-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.utility-dialog-head h2 {
  margin: 0 0 7px;
  font-family: var(--serif);
  font-size: 38px;
  letter-spacing: -1.4px;
}
.utility-dialog-head p:last-child {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.utility-dialog-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-strong);
  font-size: 28px;
  cursor: pointer;
}
.utility-dialog-close:hover { background: var(--bg-hover); color: var(--text); }

.profile-form {
  display: grid;
  gap: 18px;
  padding: 24px;
}
.profile-form label,
.writer-search-label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
}
.profile-form input,
.profile-form textarea,
.writer-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #141414;
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}
.profile-form input:focus,
.profile-form textarea:focus,
.writer-search:focus {
  border-color: #666;
}
.profile-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.profile-summary strong { color: var(--text); }
.utility-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.writer-search-label,
.writer-search { margin: 20px 24px 0; }
.writer-search-label { margin-top: 18px; }
.writer-search { width: calc(100% - 48px); }
.writer-list {
  display: grid;
  gap: 8px;
  padding: 20px 24px 28px;
}
.writer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.writer-row-info { min-width: 0; display: grid; gap: 4px; }
.writer-row-info strong { font-size: 16px; }
.writer-row-info span { color: var(--muted); font-size: 12px; }
.game-dialog { width: min(620px, calc(100vw - 32px)); }
.game-stats {
  display: flex;
  justify-content: space-between;
  padding: 20px 24px 0;
  color: var(--muted);
  font-size: 12px;
}
.game-stats strong { color: var(--text); }
.game-prompt {
  margin: 20px 24px 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #141414;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.3;
}
.game-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 24px;
}
.game-option {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.game-option:hover { border-color: #6b6b6b; background: var(--bg-hover); }
.game-feedback {
  min-height: 22px;
  margin: 16px 24px;
  color: var(--muted);
  font-size: 13px;
}
.game-dialog > #game-restart { margin: 0 24px 26px; }

.reader-social {
  width: min(860px, calc(100% - 48px));
  margin: 0 auto 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #1a1a1a;
}
.reader-social-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}
.reader-social-heading strong { color: var(--text); font-size: 14px; }
.reader-response-form { display: grid; gap: 10px; }
.reader-response-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #121212;
  color: var(--text);
  padding: 12px;
  outline: none;
}
.reader-response-form textarea:focus { border-color: #676767; }
.reader-response-actions { display: flex; justify-content: flex-end; gap: 8px; }
.reader-response-list { display: grid; gap: 10px; margin-top: 16px; }
.reader-response {
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.reader-response p { margin: 0 0 7px; color: var(--text-soft); line-height: 1.6; }
.reader-response time { color: var(--muted); font-size: 10px; }


@media (max-width: 700px) {
  .utility-dialog,
  .game-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
  }
  .utility-dialog-head { padding: 19px; }
  .utility-dialog-head h2 { font-size: 30px; }
  .profile-form { padding: 19px; }
  .writer-search-label { margin-left: 19px; margin-right: 19px; }
  .writer-search { width: calc(100% - 38px); margin-left: 19px; margin-right: 19px; }
  .writer-list { padding-left: 19px; padding-right: 19px; }
  .writer-row { align-items: flex-start; }
  .game-stats { padding-left: 19px; padding-right: 19px; }
  .game-prompt { margin-left: 19px; margin-right: 19px; padding: 19px; font-size: 23px; }
  .game-options { grid-template-columns: 1fr; padding-left: 19px; padding-right: 19px; }
  .game-feedback { margin-left: 19px; margin-right: 19px; }
  .game-dialog > #game-restart { margin-left: 19px; margin-right: 19px; }
  .reader-actions { flex-wrap: wrap; }
  .reader-actions-group { flex-wrap: wrap; }
  .reader-social { width: calc(100% - 28px); margin-left: 14px; margin-right: 14px; }
  .reader-social-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}

.story-engagement .engagement-item[data-social-action] {
  cursor: pointer;
  user-select: none;
}
.story-engagement .engagement-item[data-social-action]:focus-visible {
  outline: 1px solid #8a8a8a;
  outline-offset: 3px;
  border-radius: 3px;
}


.reader-action:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.game-option:disabled {
  opacity: .6;
  cursor: default;
}


.site-footer {
  width: min(1120px, calc(100% - 48px));
  margin: 12px auto 56px;
  padding: 28px 0 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  border-top: 1px solid var(--line);
}
.site-footer section {
  min-width: 0;
}
.site-footer h2 {
  margin: 0 0 8px;
  font-size: 20px;
}
.site-footer p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
@media (max-width: 700px) {
  .site-footer {
    width: calc(100% - 28px);
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 32px;
  }
}


/* Editorial reader pass */
.reader {
  width: min(960px, calc(100vw - 34px));
  max-height: min(940px, calc(100dvh - 24px));
  border-color: #3f3f3f;
  border-radius: 10px;
  background: #171717;
}

.reader-site-bar {
  min-height: 72px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px 44px;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: #171717;
}

.reader-menu-mark {
  color: #c8c8c8;
  font-size: 22px;
  line-height: 1;
}

.reader-brand {
  color: #f2f2f2;
  font-family: var(--serif);
  font-size: 31px;
  line-height: .9;
  font-weight: 700;
  letter-spacing: -1.8px;
}

.reader-site-search {
  color: #cfcfcf;
  font-size: 25px;
  line-height: 1;
  text-align: center;
}

.reader-site-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e83d8c;
  color: #fff;
  font-size: 17px;
  font-weight: 750;
}

.reader-offer {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 20px;
  background: var(--yellow);
  color: var(--yellow-ink);
  font-size: 16px;
  white-space: nowrap;
}

.reader-offer a {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reader-toolbar {
  min-height: 68px;
  grid-template-columns: auto auto minmax(0,1fr) auto auto;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: #171717;
}

.reader-toolbar::before {
  content: none;
}

.reader-publication {
  color: #ededed;
  font-size: 16px;
  font-weight: 650;
}

.reader-follow-publication,
.reader-inline-follow {
  border: 0;
  background: transparent;
  color: #d7d7d7;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.reader-follow-publication[aria-pressed="true"] {
  color: var(--accent);
  text-decoration: none;
}

.reader-follow-publication {
  padding: 8px 0;
  font-size: 14px;
}

.reader-toolbar-spacer {
  min-width: 0;
}

.reader-read-label {
  color: #7e7e7e;
  font-size: 11px;
}

.reader-close {
  width: 38px;
  height: 38px;
  font-size: 28px;
}

.reader-scroll {
  max-height: calc(100dvh - 212px);
  padding: clamp(42px, 6vw, 68px) clamp(28px, 7vw, 86px) 46px;
}

.reader-article {
  max-width: 680px;
}

.reader-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 20px;
}

.reader-chip {
  padding: 9px 13px;
  border: 1px solid #3e3e3e;
  border-radius: 19px;
  background: #1e1e1e;
  color: #cfcfcf;
  font-size: 12px;
}

.reader-chip-accent::before {
  margin-right: 7px;
  color: var(--yellow);
  content: "✦";
}

.reader-chip-topic {
  color: #d7d7d7;
}

.reader-chip-topic::after {
  margin-left: 9px;
  color: #777;
  content: "+";
}

.reader-title {
  margin: 0 0 17px;
  color: #f7f7f7;
  font-size: clamp(42px, 5.6vw, 61px);
  line-height: 1.02;
  letter-spacing: -2px;
}

.reader-summary {
  margin: 0 0 23px;
  color: #bdbdbd;
  font-size: 21px;
  line-height: 1.45;
}

.reader-meta {
  margin: 0 0 21px;
  color: #8f8f8f;
  font-size: 14px;
}

.reader-author-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
}

.reader-author-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  border-radius: 50%;
  background: #7b2733;
  color: #fff1f4;
  font-size: 11px;
  font-weight: 800;
}

.reader-author-name {
  color: #e5e5e5;
  font-size: 15px;
  font-weight: 650;
}

.reader-inline-follow {
  margin-left: 3px;
  padding: 8px 12px;
  border: 1px solid #4d4d4d;
  border-radius: 19px;
  text-decoration: none;
  font-size: 13px;
}

.reader-inline-follow:hover,
.reader-follow-publication:hover {
  color: #fff;
}

.reader-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.reader-tool {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 17px;
  border: 1px solid #3e3e3e;
  border-radius: 23px;
  background: #191919;
  color: #cfcfcf;
  font-size: 14px;
  cursor: pointer;
}

.reader-tool:hover {
  background: #222;
  color: #fff;
}

.reader-more-wrap {
  position: relative;
  display: inline-flex;
}

.reader-tool[aria-pressed="true"] {
  border-color: #5c5c5c;
  color: #f0f0f0;
}

.reader-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 185px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid #414141;
  border-radius: 10px;
  background: #202020;
  box-shadow: 0 14px 34px rgb(0 0 0 / 42%);
}

.reader-more-menu[hidden] {
  display: none !important;
}

.reader-more-menu button {
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #d0d0d0;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
}

.reader-more-menu button:hover {
  background: #2a2a2a;
  color: #fff;
}

.reader-cover {
  margin-bottom: 34px;
  filter: grayscale(1) contrast(.94) brightness(.82);
}

.reader-body {
  color: #e6e6e6;
  font-family: serif;
  font-size: 21px;
  line-height: 1.78;
}

.reader-body p {
  margin: 0 0 29px;
}

.reader-body p:first-child::first-letter {
  margin-top: .08em;
  font-size: 4.15em;
}

.reader-body blockquote {
  max-width: 580px;
  margin: 58px auto;
  padding: 0 12px;
  color: #a6a6a6;
  font-family: var(--sans);
  font-size: clamp(30px, 5.1vw, 46px);
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: -1.2px;
}

.reader-body blockquote p {
  margin: 0;
}

.reader-body blockquote cite {
  display: block;
  margin-top: 18px;
  color: #888;
  font-family: var(--sans);
  font-size: 13px;
  font-style: normal;
  letter-spacing: 0;
}

.reader-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  min-height: 68px;
  padding: 9px 22px;
  border-top: 1px solid var(--line);
  background: rgb(24 24 24 / 97%);
  backdrop-filter: blur(12px);
}

.reader-stats-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 24px;
}

.reader-stat {
  min-width: 52px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: #9c9c9c;
  cursor: pointer;
}

.reader-stat:hover {
  color: #e7e7e7;
}

.reader-stat-icon {
  font-size: 22px;
  line-height: 1;
}

.reader-stat-count {
  font-size: 14px;
  line-height: 1;
}

.reader-stat[aria-pressed="true"] {
  color: var(--yellow);
}

.reader-stat-bookmark {
  min-width: 42px;
}

.reader-stat-bookmark .reader-stat-icon {
  font-size: 26px;
}

.reader-finished {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid #454545;
  border-radius: 20px;
  background: #1f1f1f;
  color: #cfcfcf;
  font-size: 12px;
  cursor: pointer;
}

.reader-finished:hover {
  background: #282828;
  color: #fff;
}

.reader-finished:focus-visible,
.reader-stat:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.reader-social {
  position: relative;
  z-index: 5;
}

@media (max-width: 700px) {
  .reader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .reader-site-bar {
    min-height: 78px;
    grid-template-columns: 34px minmax(0,1fr) 34px 46px;
    gap: 11px;
    padding: 0 max(18px, 5.5vw);
  }

  .reader-menu-mark {
    font-size: 22px;
  }

  .reader-brand {
    font-size: 36px;
    letter-spacing: -2.2px;
  }

  .reader-site-search {
    font-size: 27px;
  }

  .reader-site-avatar {
    width: 46px;
    height: 46px;
    font-size: 17px;
  }

  .reader-offer {
    min-height: 58px;
    padding: 9px 14px;
    font-size: 15px;
  }

  .reader-toolbar {
    min-height: 62px;
    grid-template-columns: auto auto minmax(0,1fr) auto auto;
    gap: 7px;
    padding: 0 max(18px, 5.5vw);
  }

  .reader-publication {
    max-width: 48vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }

  .reader-follow-publication {
    padding: 7px 0;
    font-size: 12px;
  }

  .reader-read-label {
    display: none;
  }

  .reader-close {
    width: 36px;
    height: 36px;
  }

  .reader-scroll {
    max-height: calc(100dvh - 198px);
    padding: 38px max(22px, 6.2vw) 38px;
  }

  .reader-article {
    max-width: none;
  }

  .reader-chips {
    gap: 7px;
    margin-bottom: 18px;
  }

  .reader-chip {
    padding: 8px 11px;
    font-size: 11px;
  }

  .reader-title {
    margin-bottom: 14px;
    font-size: clamp(37px, 9.5vw, 54px);
    line-height: 1.04;
    letter-spacing: -1.6px;
  }

  .reader-summary {
    margin-bottom: 19px;
    font-size: 20px;
    line-height: 1.42;
  }

  .reader-meta {
    margin-bottom: 19px;
    font-size: 13px;
  }

  .reader-author-row {
    margin-bottom: 18px;
  }

  .reader-author-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: 10px;
  }

  .reader-author-name {
    font-size: 14px;
  }

  .reader-inline-follow {
    padding: 7px 11px;
    font-size: 12px;
  }

  .reader-tool-row {
    gap: 8px;
    margin-bottom: 28px;
  }

  .reader-tool {
    min-height: 42px;
    padding: 8px 14px;
    font-size: 13px;
  }

  .reader-more-menu {
    position: fixed;
    top: auto;
    right: 18px;
    bottom: 76px;
    min-width: 180px;
  }

  .reader-cover {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: calc(100% - 28px);
    max-height: none;
    margin: 0 auto 30px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 1px;
  }

  .reader-body {
    font-family: serif !important;
    font-size: 20px;
    line-height: 1.76;
  }

  .reader-body blockquote {
    width: calc(100% - 34px);
    margin: 50px auto;
    padding: 0;
    font-size: clamp(30px, 7.1vw, 48px);
    line-height: 1.34;
    letter-spacing: -1px;
  }

  .reader-body p {
    margin-bottom: 27px;
  }

  .reader-actions {
    min-height: 64px;
    padding: 8px max(18px, 5.5vw);
    overflow-x: auto;
  }

  .reader-stats-row {
    flex: 1 0 auto;
    justify-content: space-between;
    gap: 12px;
  }

  .reader-stat {
    min-width: 48px;
    min-height: 42px;
  }

  .reader-stat-icon {
    font-size: 20px;
  }

  .reader-stat-count {
    font-size: 13px;
  }

  .reader-finished {
    padding: 8px 11px;
    font-size: 11px;
  }

  .reader-social {
    width: calc(100% - 28px);
    margin-left: 14px;
    margin-right: 14px;
  }
}


/* UI/UX refinement — production reading room */
:root {
  --bg: #151515;
  --bg-elevated: #1b1b1b;
  --bg-hover: #202020;
  --text: #f5f5f5;
  --text-soft: #d8d8d8;
  --muted: #979797;
  --muted-strong: #b9b9b9;
  --line: #303030;
  --line-soft: #242424;
  --yellow: #f3c64b;
  --yellow-ink: #171717;
  --accent: #79c77b;
  --content: 1240px;
  --reading: 720px;
}

html { scrollbar-gutter: stable; }

body {
  background:
    radial-gradient(circle at top center, rgb(255 255 255 / 2.5%), transparent 38rem),
    var(--bg);
}

.app-promo,
.membership-banner { display: none !important; }

.topbar {
  height: 76px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  column-gap: 16px;
  padding-inline: max(24px, calc((100vw - var(--content)) / 2));
  background: rgb(21 21 21 / 91%);
  border-bottom-color: rgb(255 255 255 / 8%);
  box-shadow: 0 10px 32px rgb(0 0 0 / 12%);
}

.menu-toggle { width: 40px; height: 40px; border-radius: 10px; }
.menu-toggle:hover { background: var(--bg-hover); }
.menu-toggle svg { width: 24px; height: 24px; }
.brand-name { font-size: 34px; letter-spacing: -2px; }

.top-actions { gap: 12px; }

.search-box {
  width: 256px;
  height: 44px;
  padding-inline: 14px;
  border-color: transparent;
  background: #232323;
}

.search-box > svg { width: 19px; height: 19px; }
.search-box input { font-size: 15px; }

.text-action {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 20px;
}

.text-action:hover { background: var(--bg-hover); color: var(--text); }
.write-action { color: #d8d8d8; }

.editor-action {
  border: 1px solid #3b3b3b;
  background: #1b1b1b;
}

.editor-action:hover { border-color: #555; }

.avatar {
  width: 42px;
  height: 42px;
  background: #e43d89;
  font-size: 17px;
}

.layout {
  width: min(var(--content), calc(100% - 48px));
  grid-template-columns: 180px minmax(0, var(--reading)) 260px;
  gap: 44px;
}

.left-rail {
  top: 77px;
  min-height: calc(100vh - 77px);
  padding-top: 26px;
  padding-right: 16px;
  border-right-color: rgb(255 255 255 / 8%);
}

.rail-list { gap: 4px; }

.rail-link {
  min-height: 44px;
  border-radius: 10px;
  color: #a9a9a9;
}

.rail-link.active {
  background: #202020;
  box-shadow: inset 2px 0 0 #f1f1f1;
}

main {
  min-width: 0;
  padding: 34px 0 100px;
}

.welcome { margin-bottom: 4px; }
.eyebrow { margin-bottom: 9px; color: #717171; font-size: 10px; letter-spacing: .16em; }

.welcome h1,
.stats-heading h1 {
  font-size: 44px;
  letter-spacing: -1.7px;
}

.welcome p:last-child {
  max-width: 54ch;
  margin-top: 9px;
  color: #989898;
  font-size: 15px;
}

.tabs { height: 58px; gap: 28px; }
.tab { height: 58px; padding-bottom: 14px; font-size: 14px; }

.story {
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 24px;
  margin-inline: -16px;
  padding: 30px 16px 28px;
  border-bottom-color: var(--line-soft);
  border-radius: 12px;
  transition: background-color .18s ease, transform .18s ease;
}

.story:hover { background: rgb(255 255 255 / 2.8%); }

.byline { margin-bottom: 12px; color: #969696; font-size: 12px; }
.byline strong { color: #dfdfdf; }

.story h2 {
  margin-bottom: 9px;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -.55px;
}

.story-title-button:hover {
  color: #fff;
  text-decoration-thickness: 2px;
}

.story-summary {
  max-width: 60ch;
  color: #a1a1a1;
  font-size: 15.5px;
  line-height: 1.46;
}

.story-image {
  width: 176px;
  height: 118px;
  border-radius: 8px;
  background: #222;
}

.story-meta.story-engagement { margin-top: 18px; font-size: 12px; }
.engagement-list { gap: 15px; }

.engagement-button {
  min-height: 28px;
  padding: 3px 5px;
  margin: -3px -5px;
  border-radius: 14px;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.engagement-button:hover { background: #262626; color: #f3f3f3; }

.bookmark,
.more { width: 34px; height: 34px; }

.bookmark:hover,
.more:hover { background: #282828; }

.feed-status {
  margin: 0 0 2px;
  padding: 10px 12px;
  border: 1px solid #2f2f2f;
  border-radius: 10px;
  background: #1a1a1a;
  color: #8f8f8f;
  font-size: 12px;
}

.right-rail { top: 77px; padding-top: 38px; }
.side-section { margin-bottom: 32px; }
.side-section h2 { margin-bottom: 12px; color: #d8d8d8; }

.topic-button {
  border-color: #343434;
  background: #1c1c1c;
  transition: background-color .16s ease, border-color .16s ease;
}

.topic-button:hover,
.topic-button[aria-pressed="true"] {
  border-color: #4a4a4a;
  background: #252525;
}

.rail-bottom { color: #6f6f6f; }
.reader { border-radius: 18px; }
.reader-actions { box-shadow: 0 -10px 30px rgb(0 0 0 / 10%); }

@media (max-width: 1200px) {
  .layout { width: min(940px, calc(100% - 40px)); gap: 28px; }
  .story { grid-template-columns: minmax(0, 1fr) 148px; }
  .story-image { width: 148px; height: 100px; }
}

@media (max-width: 820px) {
  .topbar {
    height: 72px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    padding-inline: 20px;
  }

  .brand-name { font-size: 31px; }
  .search-box { width: 210px; height: 42px; }
  .avatar { width: 40px; height: 40px; }
  .layout { width: min(760px, calc(100% - 32px)); gap: 20px; }
  .left-rail { top: 73px; min-height: calc(100vh - 73px); }
  main { padding-top: 28px; }
}

@media (max-width: 700px) {
  .topbar {
    height: 68px;
    min-height: 68px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    column-gap: 10px;
    padding: 0 16px;
  }

  .menu-toggle,
  .search-toggle { width: 38px; height: 38px; }

  .brand-name { font-size: 29px; letter-spacing: -1.7px; }
  .avatar { width: 40px; height: 40px; font-size: 16px; }
  .layout { width: 100%; }
  main { padding: 24px 16px 96px; }

  .welcome h1,
  .stats-heading h1 {
    font-size: 36px;
    letter-spacing: -1.3px;
  }

  .welcome p:last-child { font-size: 14px; }
  .tabs,
  .tab { height: 54px; }
  .tab { padding-bottom: 13px; }

  .story {
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 14px;
    margin-inline: 0;
    padding: 24px 0;
    border-radius: 0;
  }

  .story h2 { font-size: 19px; line-height: 1.2; letter-spacing: -.35px; }
  .story-summary { font-size: 13.5px; line-height: 1.45; -webkit-line-clamp: 2; }
  .story-image { width: 96px; height: 68px; border-radius: 8px; }
  .story-meta.story-engagement { margin-top: 12px; gap: 8px; }
  .engagement-list { gap: 8px; }
  .story-tools { gap: 3px; }
  .bookmark,
  .more { width: 30px; height: 30px; }

  .left-rail.mobile-open {
    inset: 68px auto 0 0;
    width: min(340px, calc(100vw - 32px));
    height: calc(100dvh - 68px);
  }

  .rail-mobile-head { min-height: 70px; }
}
