/*
  JMagazine — page styles (navy & blue on white)
  Covers every page that previously had little or no CSS:
  sign in / create account, auth modal, writers, leaderboard,
  publications, write, plus shared bits.
  Loaded after styles.css so these rules take precedence.
*/

/* ---------- shared layout ---------- */
.layout {
  padding: 40px 0 72px;
}

.primary-content {
  width: 100%;
}

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

.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.page-hero {
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}

.page-heading {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1.15;
  font-weight: 500;
  color: var(--navy);
}

.page-subtext {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--muted);
}

.dateline-left,
.dateline-right {
  font-size: 14px;
}

.user-name strong {
  color: var(--navy);
}

.entry-time,
.featured-time,
.featured-date {
  color: var(--muted);
}

.btn-follow {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--navy);
  background: #FFFFFF;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-follow:hover {
  background: var(--navy);
  color: #FFFFFF;
  text-decoration: none;
}

.btn-follow.following {
  background: var(--navy);
  color: #FFFFFF;
}

/* ---------- writers directory ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 0 18px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--rule);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dropdown summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.dropdown summary::-webkit-details-marker {
  display: none;
}

.dropdown[open] summary {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFFFFF;
}

.caret {
  font-size: 10px;
  margin-left: 4px;
}

.writer-search input {
  width: 240px;
  max-width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--rule-dark);
  background: #FFFFFF;
  font-size: 13px;
  color: var(--ink);
  border-radius: 0;
  outline: none;
}

.writer-search input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px rgba(31, 61, 123, 0.12);
}

.writers-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.writer-card {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: box-shadow 0.15s ease;
}

.writer-card:hover {
  box-shadow: 0 6px 18px rgba(18, 37, 75, 0.08);
}

.writer-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule-dark);
  background: var(--tint);
  flex-shrink: 0;
}

.writer-card-content {
  flex: 1;
  min-width: 0;
}

.writer-card-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-bottom: 6px;
}

.writer-card-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  margin: 0;
}

.writer-card-name a {
  color: var(--navy);
}

.writer-card-name a:hover {
  color: var(--blue);
}

.writer-badge {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--blue-soft);
  border: 1px solid var(--blue);
  padding: 2px 7px;
}

.writer-card-bio {
  font-size: 13px;
  line-height: 1.55;
  color: var(--body-text);
  margin: 0 0 12px;
}

.writer-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 11.5px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

.writer-empty {
  grid-column: 1 / -1;
  padding: 40px 0;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--muted);
}

/* ---------- leaderboard ---------- */
.leaderboard-intro {
  max-width: 680px;
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--body-text);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  background: #FFFFFF;
}

.leaderboard-table {
  margin: 0;
  border: 0;
  min-width: 620px;
}

.leaderboard-table th {
  background: #FFFFFF;
  color: var(--muted);
  border-bottom: 1px solid var(--rule-dark);
  letter-spacing: 0.06em;
}

.leaderboard-table tbody tr:hover {
  background: var(--tint);
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.leaderboard-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rank-cell {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--light-muted);
  width: 56px;
}

.top-rank .rank-cell {
  color: var(--blue);
}

.leaderboard-writer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.leaderboard-writer img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule-dark);
  background: var(--tint);
}

.leaderboard-writer a {
  font-weight: 700;
  color: var(--ink);
}

.leaderboard-writer a:hover {
  color: var(--navy);
}

.leaderboard-table .score {
  font-weight: 700;
  color: var(--navy);
}

/* ---------- publications ---------- */
.featured-issue {
  border-top: 1px solid var(--rule);
  margin-top: 0;
  background: var(--tint);
}

.featured-issue-cover,
.issue-card-cover {
  background: var(--rule);
}

.featured-issue-info p {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--body-text);
}

.featured-issue-title {
  color: var(--navy);
}

.archive-heading {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.issue-card {
  border-top: 1px solid var(--rule);
  transition: box-shadow 0.15s ease;
}

.issue-card:hover {
  box-shadow: 0 6px 18px rgba(18, 37, 75, 0.08);
}

.issue-number {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 4px;
}

.issue-card-title a {
  color: var(--navy);
}

.issue-card-title a:hover {
  color: var(--blue);
}

.issue-card-meta {
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- profile ---------- */
.profile-bio-card {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  padding: 28px 32px 32px;
}

.profile-bio-avatar {
  border: 1px solid var(--rule-dark);
  background: var(--tint);
}

.profile-bio-name {
  color: var(--navy);
}

.profile-follow-btn {
  background: var(--navy);
  border: 1px solid var(--navy);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 12px;
  padding: 7px 16px;
  border-radius: 0;
  cursor: pointer;
}

.profile-follow-btn:hover {
  background: var(--navy-dark);
}

.profile-follow-btn.following {
  background: #FFFFFF;
  color: var(--navy);
}

.stat-pill {
  background: var(--tint);
  border: 1px solid var(--rule);
  border-radius: 0;
}

.stat-pill strong {
  color: var(--navy);
}

.profile-joined-tag {
  color: var(--muted);
}

.section-main-heading {
  color: var(--navy);
}

/* ---------- write / submit manuscript ---------- */
.writer-main-page {
  padding: 40px 0 72px;
}

.writer-top-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}

.writer-page-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 500;
  color: var(--navy);
}

.editor-state {
  font-size: 12px;
  color: var(--muted);
}

.editor-state.error {
  color: #B42318;
  font-weight: 600;
}

.writer-btn-group {
  display: flex;
  gap: 10px;
}

.btn-draft-simple,
.btn-publish-simple {
  height: 38px;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0;
  transition: all 0.15s ease;
}

.btn-draft-simple {
  background: #FFFFFF;
  border: 1px solid var(--navy);
  color: var(--navy);
}

.btn-draft-simple:hover {
  background: var(--tint);
}

.btn-publish-simple {
  background: var(--navy);
  border: 1px solid var(--navy);
  color: #FFFFFF;
}

.btn-publish-simple:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #FFFFFF;
}

.writer-composer-card {
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  align-items: start;
}

.composer-main {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  padding: 28px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.field-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field-hint {
  margin-left: 8px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--light-muted);
}

.field-title-input,
.field-select,
.field-textarea-small {
  width: 100%;
  border: 1px solid var(--rule-dark);
  background: #FFFFFF;
  color: var(--ink);
  border-radius: 0;
  outline: none;
  font-size: 14px;
}

.field-title-input {
  height: 52px;
  padding: 0 14px;
  font-family: var(--font-serif);
  font-size: 24px;
}

.field-select {
  height: 40px;
  padding: 0 10px;
}

.field-textarea-small {
  min-height: 76px;
  padding: 10px 14px;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}

.field-title-input:focus,
.field-select:focus,
.field-textarea-small:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px rgba(31, 61, 123, 0.12);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
}

.cover-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px dashed var(--rule-dark);
  background: var(--tint);
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
}

.cover-upload:hover,
.cover-upload:focus {
  background: #EAF0FA;
  outline: none;
}

.cover-upload-placeholder {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
}

.cover-upload-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.cover-upload-preview {
  width: 100%;
  aspect-ratio: var(--cover-ratio);
  object-fit: cover;
}

.editor-shell {
  border: 1px solid var(--rule-dark);
  background: #FFFFFF;
}

.editor-toolbar {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--tint);
  border-bottom: 1px solid var(--rule);
}

.editor-btn {
  width: 32px;
  height: 30px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--navy);
  font-size: 15px;
  border-radius: 0;
}

.editor-btn:hover {
  background: #FFFFFF;
  border-color: var(--rule-dark);
}

.editor-body {
  min-height: 340px;
  padding: 18px 20px;
  outline: none;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink);
}

.editor-body:empty::before {
  content: attr(data-placeholder);
  color: var(--light-muted);
}

.editor-body blockquote {
  margin: 14px 0;
  padding-left: 18px;
  border-left: 3px solid var(--blue);
  font-style: italic;
  color: var(--body-text);
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.editor-notes {
  background: var(--tint);
  border: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  padding: 22px 22px 18px;
  position: sticky;
  top: 20px;
}

.editor-notes h3 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}

.editor-notes ul {
  margin: 0 0 18px;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--body-text);
}

.editor-notes p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--body-text);
}

.editor-notes-subheading {
  padding-top: 14px;
  border-top: 1px solid var(--rule-dark);
}

/* ---------- sign in / create account ---------- */
.auth-unified-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px 16px 28px;
  background: #FFFFFF;
}

.auth-compact-card {
  width: 100%;
  max-width: 400px;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  padding: 34px 34px 28px;
  box-shadow: 0 10px 34px rgba(18, 37, 75, 0.12);
}

.auth-card-register {
  max-width: 540px;
}

.auth-compact-header {
  text-align: center;
  margin-bottom: 22px;
}

.auth-compact-logo {
  display: inline-block;
  line-height: 0;
}

.auth-compact-logo img {
  height: 54px;
  width: auto;
}

.auth-compact-title {
  margin: 14px 0 4px;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--navy);
}

.auth-compact-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.auth-compact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-compact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.auth-compact-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.auth-compact-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.auth-opt-tag {
  font-weight: 400;
  color: var(--light-muted);
}

.auth-compact-field input[type="text"],
.auth-compact-field input[type="email"],
.auth-compact-field input[type="password"] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--rule-dark);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 14px;
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-compact-field input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(31, 61, 123, 0.12);
}

.auth-compact-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-compact-input-wrap {
  position: relative;
  display: flex;
}

.auth-compact-input-wrap input {
  padding-right: 58px;
}

.auth-compact-row .auth-compact-input-wrap input {
  padding-right: 12px;
}

.auth-compact-pwd-toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

.auth-compact-pwd-toggle:hover {
  color: var(--blue);
}

.auth-compact-link-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
}

.auth-compact-link-btn:hover {
  color: var(--blue);
  text-decoration: underline;
}

.auth-compact-options-row {
  display: flex;
  align-items: center;
}

.auth-compact-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--body-text);
  cursor: pointer;
}

.auth-compact-checkbox input {
  margin-top: 3px;
  accent-color: var(--navy);
}

.auth-compact-legal-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: var(--tint);
  border: 1px solid var(--rule);
}

.auth-compact-btn-primary {
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 0;
  transition: background 0.15s ease;
}

.auth-compact-btn-primary:hover:not(:disabled) {
  background: var(--navy-dark);
}

.auth-compact-btn-primary:disabled {
  opacity: 0.65;
  cursor: default;
}

.auth-compact-btn-subtle {
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--rule-dark);
  background: #FFFFFF;
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 0;
}

.auth-compact-btn-subtle:hover {
  background: var(--tint);
}

.auth-compact-demo-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  margin-top: 2px;
  border-top: 1px solid var(--rule);
  text-align: center;
}

.auth-compact-demo-label {
  font-size: 11.5px;
  color: var(--muted);
}

.auth-compact-btn-demo {
  height: 38px;
  border: 1px solid var(--blue);
  background: var(--blue-soft);
  color: var(--navy-dark);
  font-size: 12.5px;
  border-radius: 0;
}

.auth-compact-btn-demo:hover {
  background: var(--blue);
  color: #FFFFFF;
}

.auth-compact-switch {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.auth-compact-switch a {
  font-weight: 700;
}

.auth-compact-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #FEF3F2;
  border: 1px solid #FDA29B;
  border-left: 4px solid #D92D20;
  color: #912018;
  font-size: 12.5px;
}

.auth-compact-strength-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-compact-strength-bg {
  flex: 1;
  height: 5px;
  background: var(--rule);
}

.auth-compact-strength-fill {
  height: 100%;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.auth-compact-strength-label {
  font-size: 11.5px;
  font-weight: 700;
  min-width: 70px;
  text-align: right;
}

.auth-compact-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(18, 37, 75, 0.55);
}

.auth-compact-modal {
  width: 100%;
  max-width: 400px;
  background: #FFFFFF;
  border-top: 1px solid var(--rule);
  padding: 28px;
  box-shadow: 0 20px 50px rgba(18, 37, 75, 0.35);
}

.auth-compact-modal-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--navy);
}

.auth-compact-modal-text {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.auth-compact-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.auth-compact-modal-success {
  padding: 12px 14px;
  background: var(--blue-soft);
  border: 1px solid var(--blue);
  font-size: 13px;
  color: var(--navy-dark);
}

/* ---------- auth modal (pop-up) ---------- */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 37, 75, 0.55);
}

.auth-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #FFFFFF;
  border-top: 1px solid var(--rule);
  padding: 32px 30px 26px;
  box-shadow: 0 20px 50px rgba(18, 37, 75, 0.35);
}

.auth-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
}

.auth-modal-close:hover {
  color: var(--navy);
}

.auth-modal-title {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--navy);
}

.auth-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-modal-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.auth-modal-field input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--rule-dark);
  font-size: 14px;
  border-radius: 0;
  outline: none;
}

.auth-modal-field input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(31, 61, 123, 0.12);
}

.auth-modal-optional,
.auth-modal-hint {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--light-muted);
}

.auth-modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.auth-modal-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--body-text);
}

.auth-modal-checkbox input {
  accent-color: var(--navy);
}

.auth-modal-submit {
  height: 42px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 0;
}

.auth-modal-submit:hover {
  background: var(--navy-dark);
}

.auth-modal-message {
  margin: 0;
  font-size: 12.5px;
  color: var(--navy);
}

.auth-modal-switch {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- article extras ---------- */
.article-byline {
  justify-content: flex-start;
  gap: 12px;
}

.article-byline .btn-follow {
  margin-left: 28px;
}

.article-byline .menu {
  margin-left: auto;
}

.article-byline-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  flex: 0 1 auto;
  min-width: 0;
}

.article-byline-name a {
  color: var(--ink);
}

.article-byline-name a:hover {
  color: var(--navy);
}

.article-byline-avatar {
  border-radius: 50%;
  border: 1px solid var(--rule-dark);
  flex-shrink: 0;
}

.comment-avatar {
  border-radius: 50%;
  flex-shrink: 0;
}

.article-footer .stats {
  display: flex;
  gap: 16px;
  color: var(--muted);
}

.article-footer .stats .liked {
  color: var(--blue);
  font-weight: 700;
}

.article-title {
  color: #000000;
}

.article-body p:first-of-type::first-letter {
  color: var(--blue);
}

.article-byline-avatar,
.comment-avatar {
  background: var(--tint);
}

.article-cover {
  background: var(--tint);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .writers-list,
  .issue-grid {
    grid-template-columns: 1fr;
  }

  .writer-composer-card {
    grid-template-columns: 1fr;
  }

  .editor-notes {
    position: static;
  }
}

@media (max-width: 600px) {
  .layout,
  .writer-main-page {
    padding: 28px 0 56px;
  }

  .page-heading,
  .support-story h1 {
    font-size: 28px;
  }

  .field-row,
  .auth-compact-row {
    grid-template-columns: 1fr;
  }

  .auth-compact-card {
    padding: 28px 22px 24px;
  }

  

  .composer-main {
    padding: 20px;
  }

  .writer-search input {
    width: 100%;
  }

  .toolbar-right {
    width: 100%;
  }

  .writer-search {
    width: 100%;
  }
}


/* ---------- lighter look: fewer boxes, thin gray lines ---------- */
.profile-bio-card,
.composer-main,
.featured-issue,
.editor-notes,
.auth-compact-legal-box,
.stat-pill {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.profile-bio-card {
  padding: 0 0 8px;
}

.composer-main {
  padding: 0;
}

.featured-issue {
  padding: 0 0 28px;
  margin: 0 0 32px;
}

.editor-notes {
  padding: 0 0 0 28px;
  border-left: 1px solid var(--rule);
}

.auth-compact-legal-box {
  padding: 0;
}

.stat-pill {
  padding: 0 14px 0 0;
  margin-right: 4px;
}

.home-leaderboard {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--rule);
  padding: 0 0 0 28px;
}

.home-leaderboard-item:first-child {
  border-top: 0;
}


.writer-card:hover,
.issue-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.auth-compact-card {
  box-shadow: none;
}

@media (max-width: 960px) {
  .home-leaderboard {
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding: 24px 0 0;
  }
}

/* leaderboard stretches to the hero story's height so no blank space is left */
.home-leaderboard {
  display: flex;
  flex-direction: column;
}

.home-leaderboard-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.home-leaderboard-item {
  flex: 1;
  min-height: 56px;
}

.home-leaderboard-link {
  margin-top: auto;
}

/* Home: the cover story sits alone in the lead block */
.home-lead {
  grid-template-columns: 1fr;
}

/* Home: remaining stories as a calm two-column grid of story cards.
   Order: image, kicker, title, two-line excerpt, one quiet footer line.
   Image first so every row lines up even when titles wrap differently. */
.story-section-label {
  margin: 0 0 28px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 40px;
}

.story-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.story-card-thumb {
  width: 100%;
  aspect-ratio: var(--cover-ratio);
  overflow: hidden;
  background: var(--rule);
  margin-bottom: 16px;
}

.story-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.story-card:hover .story-card-thumb img {
  opacity: 0.9;
}

.story-card-kicker {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.story-card-title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.story-card-title a {
  color: var(--ink);
  text-decoration: none;
}

.story-card:hover .story-card-title a {
  color: var(--navy);
}

.story-card-excerpt {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: 15.5px;
  line-height: 1.6;
  color: #4B5563;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 12.5px;
  color: var(--muted);
}

.story-card-byline a {
  color: var(--ink);
  font-weight: 600;
}

.story-card-byline a:hover {
  color: var(--navy);
  text-decoration: underline;
}

.story-card-stats {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.story-card-stats .metric-sep {
  color: var(--rule-dark);
}

.story-card-like {
  background: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  color: var(--muted);
  cursor: pointer;
}

.story-card-like:hover {
  color: var(--navy);
}

.story-card-like.active {
  color: #DC2626;
  font-weight: 700;
}

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

@media (max-width: 640px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}

/* Full-width layout (every page).
   The header strip, page body, and footer fill the window, with a side gutter.
   Wide-screen layouts for individual pages are in the "wide screens" block at the end of this file. */
:root {
  --wide-gutter: clamp(20px, 4vw, 56px);
}

main .wrap,
main .stream-container,
.simple-dateline-inner {
  width: calc(100% - 2 * var(--wide-gutter));
  max-width: none;
}

/* Cover story: image on the left, text on the right */
.home-container .featured-story-article {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  column-gap: clamp(32px, 4vw, 72px);
  align-items: center;
}

.home-container .featured-story-article .featured-image-holder {
  margin-bottom: 0;
}

.home-container .featured-cover-img {
  max-height: 72vh;
  object-fit: cover;
}

.home-container .featured-text {
  display: flex;
  flex-direction: column;
}

.home-container .featured-headline {
  font-size: clamp(32px, 3vw, 44px);
  margin-bottom: 20px;
}

.home-container .featured-summary {
  font-size: 18.5px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .home-container .featured-story-article {
    grid-template-columns: 1fr;
    row-gap: 22px;
  }
}

/* Writers: rank number before each row */
.writer-rank {
  flex-shrink: 0;
  width: 34px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 60px;
  color: var(--muted);
}

/* Profile: Follow sits next to the writer's name */
.profile-bio-main .profile-bio-details {
  flex: 1;
  min-width: 0;
}

.profile-bio-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-bottom: 6px;
}

.profile-bio-heading .profile-bio-name {
  margin: 0;
}

.profile-bio-heading .btn-follow {
  flex-shrink: 0;
}


/* Publications: small cards are just cover + text, with no border or inner margin */
.issue-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.issue-card:hover {
  box-shadow: none;
}

/* ---------- wide screens: page layouts that use the full width ---------- */
.article-column {
  display: block; /* a normal block (not flex) so the cover can float and the text can wrap around it */
  max-width: none;
  margin: 0;
}

.leaderboard-intro,
.support-story p {
  max-width: 75ch;
}

@media (min-width: 1000px) {
  /* Writers: two cards per row */
  .writers-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
  }

  /* Profile: published works in two columns */
  .profile-pieces-section .stream-article-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 48px;
  }

  /* Write: wider notes sidebar */
  .writer-composer-card {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 48px;
  }

  /* Article: big title */
  .article-title {
    font-size: clamp(38px, 3.4vw, 56px);
  }
}

/* Article: the cover keeps the site's 3:2 ratio, takes up a bit more than half the page width, and sits on the left
   so the text runs along its right side and then continues underneath it */
.article-cover {
  float: left;
  width: min(52%, 800px);
  margin: 4px 36px 20px 0;
}

@media (max-width: 760px) {
  .article-cover {
    float: none;
    width: 100%;
    margin: 0 0 24px;
  }
}

@media (min-width: 1700px) {
  .writers-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

/* Publications: the latest issue's cover is exactly as wide as each past issue's cover
   (both use the portrait magazine ratio), so past issues never look smaller than the hero */
.primary-content {
  --issue-cols: 1;
  --issue-gap: 20px;
}

@media (min-width: 901px) {
  .primary-content { --issue-cols: 3; }
}

@media (min-width: 1000px) {
  .primary-content { --issue-cols: 5; }
}

@media (min-width: 1500px) {
  .primary-content { --issue-cols: 6; }
}

.issue-grid {
  grid-template-columns: repeat(var(--issue-cols), minmax(0, 1fr));
  gap: var(--issue-gap);
}

.featured-issue-cover,
.issue-card-cover {
  aspect-ratio: var(--magazine-cover-ratio);
  object-fit: cover;
}

@media (min-width: 901px) {
  .featured-issue {
    grid-template-columns: calc((100% - (var(--issue-cols) - 1) * var(--issue-gap)) / var(--issue-cols)) minmax(0, 1fr);
    gap: 48px;
  }
}

/* ---------- cover frame ----------
   Every cover on the site (article, cover story, story cards, profile pieces, publications)
   gets the same thin border with a small inner gap. */
.article-cover,
.featured-image-holder,
.story-card-thumb,
.stream-entry-thumb,
.featured-issue-cover,
.issue-card-cover {
  border: 1px solid var(--rule);
  padding: 3px;
  background: var(--tint);
}

/* =====================================================================
   Profile page — writer card
   Roomy and calm: portrait, name, one line for the role, the bio in the
   same reading type as the articles, one quiet line for handle + join date,
   and the three numbers in a ruled strip underneath.
   ===================================================================== */
.profile-card {
  max-width: 960px;
  margin: 0 auto 44px;
  padding-top: 36px;
}

.profile-intro {
  display: flex;
  align-items: flex-start;
  gap: 44px;
}

.profile-avatar {
  flex: none;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule-dark);
  background: var(--tint);
}

.profile-intro-text {
  flex: 1;
  min-width: 0;
}

.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.profile-name {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.12;
  color: var(--navy);
}

.profile-role {
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.profile-handle {
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: #4B5563;
}

.profile-about {
  max-width: 60ch;
  margin-top: 22px;
  font-family: var(--font-serif);
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--body-text);
}


.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 36px;
  border-top: 1px solid var(--rule);      /* one line above the numbers, none below */
}

.profile-stat {
  position: relative;
  display: flex;
  flex-direction: column-reverse;   /* the number sits above its label */
  align-items: center;
  gap: 6px;
  padding: 22px 12px;
}

/* a short, faint divider between the numbers (not a full-height line) */
.profile-stat + .profile-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 38%;
  transform: translateY(-50%);
  background: rgba(31, 61, 123, 0.13);
}

.profile-stat dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  color: var(--navy);
  font-variant-numeric: lining-nums;
}

.profile-stat dt {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-pieces-section {
  padding-top: 0;
}

/* =====================================================================
   Sign in / Create account (redesign)
   Roomy card, thin rules, square corners, serif title, navy accents.
   Labels sit inside the box like a placeholder and slide up onto the
   border when the field is clicked or filled.
   ===================================================================== */
.auth-unified-page {
  gap: 0;
  padding: 64px 20px 56px;
}

.auth-unified-page .auth-compact-card {
  max-width: 460px;
  padding: 52px 52px 44px;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--navy);
  box-shadow: none;
}

.auth-unified-page .auth-card-register {
  max-width: 640px;
}

.auth-unified-page .auth-compact-header {
  margin-bottom: 40px;
}

.auth-unified-page .auth-compact-logo img {
  height: 58px;
}

.auth-unified-page .auth-compact-title {
  margin: 28px 0 0;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--navy);
}

.auth-unified-page .auth-compact-subtitle {
  display: none;
}

.auth-unified-page .auth-compact-form {
  gap: 26px;
}

.auth-unified-page .auth-compact-form > div:empty,
.auth-unified-page #strength-box:empty {
  display: none;
}

.auth-unified-page .auth-compact-row {
  gap: 20px;
}

/* ----- field: input + floating label ----- */
.auth-unified-page .auth-compact-field {
  position: relative;
  display: block;
  gap: 0;
}

.auth-unified-page .auth-compact-input-wrap {
  position: relative;
  display: block;
}

.auth-unified-page .auth-compact-field input[type="text"],
.auth-unified-page .auth-compact-field input[type="email"],
.auth-unified-page .auth-compact-field input[type="password"] {
  display: block;
  width: 100%;
  height: 54px;
  padding: 0 16px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--rule-dark);
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-unified-page .auth-compact-input-wrap input {
  padding-right: 66px;
}

.auth-unified-page .auth-compact-field input:hover {
  border-color: var(--light-muted);
}

.auth-unified-page .auth-compact-field input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}

.auth-unified-page .auth-compact-field > label,
.auth-unified-page .auth-compact-input-wrap > label {
  position: absolute;
  left: 11px;
  top: 27px;
  margin: 0;
  padding: 0 6px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
  background: #FFFFFF;
  pointer-events: none;
  white-space: nowrap;
  transform: translateY(-50%);
  transform-origin: left center;
  transition: top 0.16s ease, transform 0.16s ease, color 0.16s ease;
}

/* clicked or filled: the label rides up onto the top border */
.auth-unified-page .auth-compact-field input:focus ~ label,
.auth-unified-page .auth-compact-field input:not(:placeholder-shown) ~ label,
.auth-unified-page .auth-compact-field input:-webkit-autofill ~ label {
  top: 0;
  transform: translateY(-50%) scale(0.82);
}

.auth-unified-page .auth-compact-field input:focus ~ label {
  color: var(--navy);
}

.auth-unified-page .auth-opt-tag {
  font-weight: 400;
  color: var(--light-muted);
}

.auth-unified-page .auth-compact-pwd-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 6px 8px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  background: none;
  border: 0;
  cursor: pointer;
}

.auth-unified-page .auth-compact-pwd-toggle:hover {
  color: var(--blue);
}

.auth-unified-page .auth-compact-forgot {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.auth-unified-page .auth-compact-link-btn {
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  background: none;
  border: 0;
  cursor: pointer;
}

.auth-unified-page .auth-compact-link-btn:hover {
  color: var(--blue);
  text-decoration: underline;
}

.auth-unified-page .auth-field-hint {
  margin: -12px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ----- checkboxes ----- */
.auth-unified-page .auth-compact-options-row {
  margin: -4px 0 0;
}

.auth-unified-page .auth-compact-legal-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-unified-page .auth-compact-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--body-text);
  cursor: pointer;
}

.auth-unified-page .auth-compact-checkbox input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--navy);
  cursor: pointer;
}

/* ----- buttons ----- */
.auth-unified-page .auth-compact-btn-primary {
  width: 100%;
  height: 52px;
  padding: 0 20px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-unified-page .auth-compact-btn-primary:hover:not(:disabled) {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
}

.auth-unified-page .auth-compact-btn-primary:focus-visible,
.auth-unified-page .auth-compact-btn-demo:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.auth-unified-page .auth-compact-demo-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin-top: 6px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  text-align: center;
}

.auth-unified-page .auth-compact-demo-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-unified-page .auth-compact-btn-demo {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--navy);
  background: #FFFFFF;
  border: 1px solid var(--navy);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}

.auth-unified-page .auth-compact-btn-demo:hover {
  background: var(--tint);
}

.auth-unified-page .auth-compact-switch {
  margin-top: 0;
  font-size: 14px;
  text-align: center;
  color: var(--muted);
}

.auth-unified-page .auth-compact-switch a {
  font-weight: 600;
  color: var(--navy);
}

.auth-unified-page .auth-compact-switch a:hover {
  text-decoration: underline;
}

.auth-unified-page .auth-card-register .auth-compact-switch {
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

/* ----- forgot-password dialog ----- */
.auth-unified-page .auth-compact-modal {
  padding: 40px 40px 34px;
  border-top: 3px solid var(--navy);
}

.auth-unified-page .auth-compact-modal-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--navy);
}

.auth-unified-page .auth-compact-modal-text {
  margin-bottom: 26px;
}

.auth-unified-page .auth-compact-modal-actions {
  align-items: stretch;
  gap: 12px;
  margin-top: 26px;
}

.auth-unified-page .auth-compact-modal-actions .auth-compact-btn-primary {
  flex: 1;
  width: auto;
  height: 46px;
}

.auth-unified-page .auth-compact-modal-actions .auth-compact-btn-subtle {
  height: 46px;
  padding: 0 22px;
  font-size: 13px;
  color: var(--navy);
  background: #FFFFFF;
  border: 1px solid var(--rule-dark);
  border-radius: 0;
  cursor: pointer;
}

.auth-unified-page .auth-compact-modal-actions .auth-compact-btn-subtle:hover {
  background: var(--tint);
}

@media (max-width: 520px) {
  .auth-unified-page {
    padding: 28px 14px 36px;
  }

  .auth-unified-page .auth-compact-card {
    padding: 38px 24px 32px;
  }

  .auth-unified-page .auth-compact-header {
    margin-bottom: 32px;
  }

  .auth-unified-page .auth-compact-title {
    font-size: 28px;
  }

  .auth-unified-page .auth-compact-row {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .auth-unified-page .auth-compact-modal {
    padding: 32px 24px 28px;
  }
}

/* =====================================================================
   Dashboard, status notes and messages (platform)
   ===================================================================== */
.dashboard-page .stream-container {
  max-width: 880px;
}

.dash-top {
  padding: 28px 0 8px;
}

.dash-page-title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--navy);
  margin-top: 6px;
}

.dash-section {
  margin: 36px 0 52px;
}

.dash-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 12px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--navy);
  border-bottom: 1px solid var(--rule);
}

.dash-heading span {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
}

.dash-empty {
  padding: 24px 0;
  font-size: 14.5px;
  color: var(--muted);
}

.dash-empty a,
.dash-meta a {
  color: var(--navy);
  text-decoration: underline;
}

.dash-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}

.dash-main {
  flex: 1;
  min-width: 0;
}

.dash-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
}

.dash-title a:hover {
  color: var(--blue);
}

.dash-meta {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

.dash-excerpt {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--body-text);
}

.dash-note {
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--body-text);
  background: var(--tint);
  border-left: 3px solid var(--navy);
}

.status-badge {
  flex: none;
  align-self: flex-start;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--navy);
  border: 1px solid var(--navy);
}

.status-published { color: #1f6b3a; border-color: #1f6b3a; }
.status-changes_requested { color: #8a5a00; border-color: #8a5a00; }
.status-rejected { color: #9b2c2c; border-color: #9b2c2c; }

.dash-label {
  display: block;
  margin: 16px 0 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.dash-label span {
  font-weight: 400;
  color: var(--muted);
}

.dash-textarea {
  display: block;
  width: 100%;
  min-height: 74px;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid var(--rule-dark);
  border-radius: 0;
  resize: vertical;
}

.dash-textarea:focus {
  outline: 0;
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.dash-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  background: #FFFFFF;
  border: 1px solid var(--navy);
  border-radius: 0;
  cursor: pointer;
}

.dash-btn:hover:not(:disabled) { background: var(--tint); }
.dash-btn.primary { color: #FFFFFF; background: var(--navy); }
.dash-btn.primary:hover:not(:disabled) { background: var(--navy-dark); }
.dash-btn.danger { color: #9b2c2c; border-color: #9b2c2c; }
.dash-btn:disabled { opacity: 0.5; cursor: default; }

.dash-error {
  display: none;
  margin-top: 10px;
  font-size: 13px;
  color: #9b2c2c;
}

.dash-error.show { display: block; }

.article-status-note {
  margin: 0 0 24px;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--body-text);
  background: var(--tint);
  border: 1px solid var(--rule-dark);
  border-left: 3px solid var(--navy);
}

.jm-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1000;
  max-width: calc(100vw - 40px);
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: #FFFFFF;
  background: var(--navy);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

@media (max-width: 640px) {
  .dash-row { flex-direction: column; gap: 12px; }
  .status-badge { order: -1; }
}

/* =====================================================================
   Email confirmation banner and dashboard account section
   ===================================================================== */
.verify-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.4;
  text-align: center;
  color: #5C4A12;
  background: #FFF8E6;
  border-bottom: 1px solid #E8D9A8;
}

.verify-banner button {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  background: #FFFFFF;
  border: 1px solid var(--navy);
  border-radius: 0;
  cursor: pointer;
}

.verify-banner button:hover { background: var(--tint); }

.dash-account {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.dash-block {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

.dash-subheading {
  margin-bottom: 8px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
}

.dash-ok { color: #1f6b3a; }

.dash-input {
  display: block;
  width: 100%;
  max-width: 420px;
  height: 44px;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  border: 1px solid var(--rule-dark);
  border-radius: 0;
}

.dash-input:focus {
  outline: 0;
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}

.dash-block .dash-meta { margin-top: 10px; }

/* =====================================================================
   Phones and tablets
   Everything below sits inside screen-size rules, so the computer layout
   (wider than 960px) is exactly as it was.
   ===================================================================== */

/* ---- tablets ---- */
@media (max-width: 900px) {
  .profile-intro { gap: 32px; }
  .profile-avatar { width: 112px; height: 112px; }
  .profile-name { font-size: 34px; }
}

/* ---- phones and small tablets ---- */
@media (max-width: 640px) {
  /* fields at 16px stop iPhones from zooming in when you tap a box */
  input, select, textarea, .editor-body {
    font-size: 16px !important;
  }

  /* header: roomier tap targets, shorter account line */
  .main-nav { gap: 0 22px; }
  .main-nav a { padding: 9px 0; }
  .user-name-prefix { display: none; }
  .dateline-right { flex-wrap: wrap; justify-content: center; gap: 2px 16px; }
  .dateline-right .bullet-sep { display: none; }        /* no dots to strand at the end of a wrapped line */
  .dateline-right a { padding: 6px 0; }

  /* articles: ragged-right text reads better on a narrow column than justified text with big gaps */
  .article-body { text-align: left; }
  .article-title { font-size: 31px; }

  /* buttons big enough for a thumb */
  .btn-follow { min-height: 40px; }
  .dash-btn { min-height: 44px; }

  /* profile */
  .profile-card { padding-top: 24px; margin-bottom: 28px; }
  .profile-intro { flex-direction: column; align-items: center; gap: 18px; text-align: center; }
  .profile-avatar { width: 104px; height: 104px; }
  .profile-name-row { flex-direction: column; gap: 14px; }
  .profile-name { font-size: 30px; }
  .profile-follow { width: 100%; max-width: 280px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .profile-role { margin-top: 8px; font-size: 13.5px; letter-spacing: 0.1em; }
  .profile-handle { margin-top: 6px; font-size: 13px; }
  .profile-about { margin-top: 16px; font-size: 16.5px; }
  .profile-stats { margin-top: 28px; }
  .profile-stat { padding: 16px 4px; gap: 5px; }
  .profile-stat dd { font-size: 23px; }
  .profile-stat dt { font-size: 9.5px; letter-spacing: 0.06em; text-align: center; }

  .section-header-bar { flex-wrap: wrap; gap: 4px 16px; }
  .section-main-heading { font-size: 20px; }

  /* writers list */
  .writer-card { padding: 16px; gap: 12px; }
  .writer-rank { width: 24px; font-size: 18px; line-height: 48px; }
  .writer-avatar { width: 48px; height: 48px; }

  .writer-card-top { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* leaderboard: keep the columns that matter (rank, writer, pieces, score) */
  .leaderboard-table th, .leaderboard-table td { padding-left: 8px; padding-right: 8px; }
  .leaderboard-writer { gap: 8px; }
  .leaderboard-writer img { width: 24px; height: 24px; }
  .leaderboard-table { min-width: 0; }
  .leaderboard-table th:nth-child(n+4):nth-child(-n+6),
  .leaderboard-table td:nth-child(n+4):nth-child(-n+6) { display: none; }
  .rank-cell { width: 36px; }
}

/* ---- the smallest phones ---- */
@media (max-width: 380px) {
  .article-byline-avatar { display: none; }      /* gives the author's name and date room on one line */
  .article-title { font-size: 28px; }
  .profile-name { font-size: 27px; }
  .profile-stat dt { font-size: 9px; }
  .main-nav { gap: 0 16px; }
}

/* The Show / Hide button on password boxes appears only once something has been typed */
.auth-unified-page .auth-compact-input-wrap input:placeholder-shown ~ .auth-compact-pwd-toggle {
  display: none;
}

.auth-unified-page .auth-compact-input-wrap input:-webkit-autofill ~ .auth-compact-pwd-toggle {
  display: block;
}

/* =====================================================================
   Card bylines: "Author · 6 days ago" (no "By", a little more room around the dot)
   ===================================================================== */
.story-card-byline .byline-dot,
.featured-byline .byline-dot {
  margin: 0 9px;
  color: var(--light-muted);
}

/* =====================================================================
   Profile: "more" link and the details window
   ===================================================================== */
.profile-more {
  color: var(--blue);
  font-family: var(--font-sans);
  font-size: 0.82em;
  font-weight: 600;
  white-space: nowrap;
}

.profile-more:hover { text-decoration: underline; }

.profile-about-empty {
  font-style: italic;
  color: var(--muted);
}

body.jm-modal-open { overflow: hidden; }


@media (max-width: 640px) {
       /* slides up from the bottom like a phone sheet */
  
  
  
  .byline-dot { margin: 0 7px; }
}

/* =====================================================================
   People's pictures: next to the author's name on cards, and the initial letter shown when there is no photo
   ===================================================================== */
.avatar-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1;
  color: var(--navy);
  background: #DCE4F2;
  user-select: none;
}

.byline-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
}

.byline-avatar {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--tint);
}

.byline-avatar.avatar-initial { font-size: 14px; }
.featured-byline .byline-avatar { width: 36px; height: 36px; }
.featured-byline .byline-avatar.avatar-initial { font-size: 16px; }

.profile-avatar.avatar-initial {
  font-size: 54px;
  border: 1px solid var(--rule-dark);
}

.dash-photo {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 8px;
}

.dash-photo-img {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule-dark);
}

.dash-photo-img.avatar-initial { font-size: 34px; }
.dash-photo-actions { flex: 1; min-width: 0; }
.dash-photo-actions .dash-actions { margin-top: 0; }

@media (max-width: 640px) {
  .byline-author { gap: 7px; }
  .profile-avatar.avatar-initial { font-size: 42px; }
}

/* mid-size screens: three narrow cards across, so the author line is spaced a little closer to keep the reads on the same line */
@media (min-width: 641px) and (max-width: 1120px) {
  .story-card-byline .byline-dot { margin: 0 5px; }
  .byline-author { gap: 7px; }
  .story-card-footer { column-gap: 8px; }
}

/* =====================================================================
   Card footers: picture, name, date and read count share one centre line
   ===================================================================== */
.story-card-footer { align-items: center; }
.story-card-stats { align-items: center; }

.story-card-byline {
  display: flex;
  align-items: center;
  min-width: 0;
}

.story-card-byline time,
.featured-byline time,
.byline-author > span:last-child { white-space: nowrap; }

.featured-byline {
  display: flex;
  align-items: center;
}

/* =====================================================================
   The "more" window: light and open, no boxes or rules
   ===================================================================== */
.jm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.45);
}

.jm-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 38px 38px 32px;
  background: #FFFFFF;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  outline: 0;
}

.jm-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  font-size: 26px;
  line-height: 1;
  color: var(--light-muted);
  background: none;
  border: 0;
  cursor: pointer;
}

.jm-modal-close:hover { color: var(--navy); }

.jm-modal-title {
  padding-right: 32px;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
}

.jm-modal-bio {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--body-text);
}

.jm-details { margin-top: 24px; }

.jm-detail {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 4px 16px;
  align-items: baseline;
  padding: 7px 0;
  font-size: 15px;
}

.jm-detail dt {
  font-size: 13.5px;
  color: var(--muted);
}

.jm-detail dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.jm-profile-url {
  color: var(--navy);
  font-weight: 500;
}

.jm-profile-url:hover { text-decoration: underline; }
.jm-copy { margin-left: 14px; }

.jm-text-btn {
  padding: 0;
  font-size: 14px;
  color: var(--blue);
  background: none;
  border: 0;
  cursor: pointer;
}

.jm-text-btn:hover { text-decoration: underline; }

.jm-modal-note { margin-top: 14px; font-size: 13px; }
.jm-modal-note a { color: var(--navy); text-decoration: underline; }

.jm-modal-actions {
  display: flex;
  gap: 26px;
  margin-top: 26px;
}

.jm-link-btn {
  padding: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  background: none;
  border: 0;
  cursor: pointer;
}

.jm-link-btn:hover { text-decoration: underline; }
.jm-muted { font-weight: 500; color: var(--muted); }

.jm-report { margin-top: 24px; }

.jm-report .dash-input,
.jm-report .dash-textarea {
  max-width: none;
  border-color: var(--rule);
}

.jm-report-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
}

.jm-report-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 16px;
}

.jm-report-done { font-size: 15px; color: #1f6b3a; }

@media (max-width: 640px) {
  .jm-modal-backdrop { align-items: flex-end; padding: 0; }
  .jm-modal { max-width: none; max-height: 92vh; padding: 32px 22px 26px; }
  .jm-detail { grid-template-columns: 1fr; gap: 2px; padding: 8px 0; }
}

/* =====================================================================
   Fixed-width page
   On computer screens the whole site is one white sheet of a fixed width, centred on a very light gray background,
   with a soft shadow beneath it. Narrower screens (tablets, phones) fill the window exactly as before.
   To change the width, change --page-width (the sheet) or --wide-gutter (the space inside it).
   The sign-in and register pages have no header and are left as they were.
   ===================================================================== */
:root {
  --page-width: 1320px;
  --page-backdrop: #FFFFFF;
}

@media (min-width: 1370px) {
  body:has(> #root > #site-header) {
    background-color: var(--page-backdrop);
    padding-bottom: 32px;
  }

  body:has(> #root > #site-header) > #root {
    width: var(--page-width);
    min-height: calc(100vh - 32px);
    margin: 0 auto;
    background-color: var(--canvas);
    box-shadow: 0 16px 24px -16px rgba(15, 23, 42, 0.22);
  }

  /* the extra columns that very wide screens used to get would be cramped inside the fixed width */
  .writers-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-content { --issue-cols: 4; }
}

/* =====================================================================
   A simple, classic look
   White pages, one dark rule under the masthead, thin rules elsewhere, an italic standfirst on articles
   and a quiet footer. To change the page width, change --page-width above.
   ===================================================================== */
:root { --ink-rule: #2A2724; }

.simple-header { border-bottom: 1px solid var(--ink-rule); }

.article-dek {
  font-style: italic;
  font-size: 19.5px;
  line-height: 1.5;
  color: #4B5563;
}

.article-body { font-feature-settings: 'onum' 1, 'liga' 1; }

/* the footer: keeps short pages from ending halfway up the window */
#root:has(#site-header) {
  display: flex;
  flex-direction: column;
}

#root:has(#site-header) > main { flex: 1 0 auto; }

.site-footer {
  margin-top: 72px;
  padding: 30px 0 38px;
  text-align: center;
  border-top: 1px solid var(--rule-dark);
}

.site-footer-inner {
  width: calc(100% - 2 * var(--wide-gutter));
  margin: 0 auto;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.1;
  color: var(--navy);
}

.footer-tagline {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 24px;
  margin-top: 18px;
  font-size: 14px;
}

.footer-nav a { color: var(--navy); }
.footer-nav a:hover { text-decoration: underline; }

.footer-small {
  margin-top: 18px;
  font-size: 12px;
  color: var(--light-muted);
}

@media (max-width: 640px) {
  .site-footer { margin-top: 48px; padding: 26px 0 32px; }
}

