/* DISPATCH Global — Faithful 1:1 Stylesheet */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  color: #151515;
  background: #fff;
  font-family: Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

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

/* Shell */
.site-shell {
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Masthead Header */
.masthead {
  border-bottom: 1px solid #e7e7e7;
  justify-content: space-between;
  align-items: center;
  height: 94px;
  padding: 0 max(5vw, 24px);
  display: flex;
  position: relative;
  gap: 28px;
  background: #fff;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  object-fit: contain;
  object-position: left;
  width: 180px;
  max-height: 47px;
}

.mast-date {
  letter-spacing: .25em;
  color: #666;
  font-size: 11px;
  font-weight: 800;
}

.editor-link {
  letter-spacing: .14em;
  border: 1px solid #d7d7d7;
  border-radius: 30px;
  padding: 11px 17px;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition: all 0.15s;
}

.editor-link:hover {
  border-color: #171717;
  color: #171717;
}

/* Masthead Tools */
.mast-tools {
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-width: 0;
  display: flex;
}

.search-field {
  width: min(31vw, 330px);
}

.search-field input {
  color: #171717;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  outline: none;
  width: 100%;
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
  box-sizing: border-box;
}

.search-field input:focus {
  border-color: #555;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.language-field select {
  color: #171717;
  letter-spacing: .06em;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  height: 40px;
  padding: 0 28px 0 13px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  outline: none;
}

.mast-tools button {
  color: #fff;
  cursor: pointer;
  background: #171717;
  border: 0;
  border-radius: 999px;
  height: 40px;
  padding: 0 16px;
  font-size: 11px;
  font-weight: 800;
  transition: background 0.15s;
}

.mast-tools button:hover {
  background: #b6252f;
}

/* Section Navigation (Centered, exact 11px, 0.13em tracking) */
.section-nav {
  letter-spacing: .13em;
  white-space: nowrap;
  border-bottom: 1px solid #ebebeb;
  justify-content: center;
  align-items: center;
  gap: clamp(14px, 4vw, 56px);
  height: 48px;
  font-size: 11px;
  font-weight: 750;
  display: flex;
  overflow-x: auto;
  background: #fff;
}

.section-nav a {
  color: #171717;
  cursor: pointer;
  text-decoration: none;
  padding: 6px 4px;
  transition: color 0.15s;
}

.section-nav a:hover {
  color: #b6252f;
}

.section-nav a.active {
  color: #b6252f;
}

/* Main Container Width */
.page-width {
  max-width: 1190px;
  margin: 0 auto;
  padding: 56px 24px 110px;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
}

/* Kicker */
.page-kicker, .article-meta {
  color: #c92730;
  letter-spacing: .17em;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

/* Home Heading */
.home-heading {
  border-bottom: 2px solid #171717;
  justify-content: space-between;
  align-items: end;
  margin: 16px 0 36px;
  padding-bottom: 24px;
  display: flex;
}

.home-heading h1 {
  letter-spacing: -.07em;
  font-size: clamp(36px, 5vw, 66px);
  font-weight: 830;
  line-height: 1.1;
}

.home-heading p {
  color: #737373;
  font-size: 14px;
  margin-top: 6px;
}

/* Stories Grid */
.stories-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 38px 24px;
  display: grid;
}

.story-card {
  border-bottom: 1px solid #e5e5e5;
  min-width: 0;
  padding-bottom: 22px;
  display: block;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.story-card:hover h2 {
  text-underline-offset: 4px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.story-image {
  aspect-ratio: 1.55;
  object-fit: cover;
  background: #f0f0f0;
  width: 100%;
}

.story-copy {
  padding-top: 17px;
}

.story-meta {
  color: #b6252f;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 800;
}

.story-meta span {
  color: #aaa;
  margin: 0 5px;
}

.story-copy h2 {
  letter-spacing: -.04em;
  margin: 12px 0 9px;
  font-size: 22px;
  font-weight: 760;
  line-height: 1.34;
}

.story-copy p {
  color: #737373;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
}

.story-foot {
  color: #676767;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 12px;
  font-weight: 650;
  display: flex;
}

/* Lead Story inside Grid (Spans 2 cols, 2 rows) */
.lead-story {
  grid-area: span 2 / span 2;
}

.lead-story .story-image {
  aspect-ratio: 1.58;
}

.lead-story h2 {
  font-size: clamp(28px, 3.3vw, 45px);
}

/* Empty State */
.empty-state {
  text-align: center;
  background: #f8f8f8;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 420px;
  padding: 35px;
  display: flex;
}

.empty-label {
  letter-spacing: .2em;
  color: #c42731;
  font-size: 11px;
  font-weight: 850;
}

.empty-state h2 {
  margin: 20px 0 8px;
  font-size: 28px;
  font-weight: 700;
}

.empty-state p {
  color: #6e6e6e;
  font-size: 14px;
  line-height: 1.7;
}

/* Site Footer */
.site-footer {
  letter-spacing: .16em;
  color: #777;
  border-top: 1px solid #eee;
  justify-content: space-between;
  align-items: center;
  padding: 34px 5vw;
  font-size: 11px;
  display: flex;
  background: #fff;
}

/* Article Layout */
.article-layout {
  width: min(760px, 100% - 40px);
  margin: 0 auto;
  padding: 45px 0 110px;
}

.back-link {
  color: #666;
  margin-bottom: 62px;
  font-size: 13px;
  display: inline-block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.back-link:hover {
  color: #171717;
  text-decoration: underline;
}

.article-header {
  margin-bottom: 24px;
}

.article-meta span {
  color: #aaa;
  margin: 0 4px;
}

.article-layout h1 {
  letter-spacing: -.06em;
  margin: 17px 0 18px;
  font-size: clamp(35px, 5.2vw, 60px);
  line-height: 1.24;
  font-weight: 800;
}

.article-deck {
  color: #686868;
  margin-bottom: 34px;
  font-size: 19px;
  line-height: 1.6;
}

.article-image {
  object-fit: cover;
  width: 100%;
  max-height: 600px;
  margin-bottom: 35px;
}

.article-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.95;
}

.article-body p {
  margin: 0 0 28px;
}

.article-source {
  color: #777;
  margin: 55px 0;
  font-size: 13px;
}

.article-source a {
  text-decoration: underline;
}

/* Comments */
.comments {
  border-top: 2px solid #171717;
  margin-top: 70px;
  padding-top: 26px;
}

.comments h2 {
  font-size: 25px;
  font-weight: 780;
  margin-bottom: 20px;
}

.comments h2 span {
  color: #b6252f;
}

.comment-form {
  margin: 28px 0 32px;
}

.comment-form textarea {
  resize: vertical;
  border: 1px solid #ddd;
  border-radius: 5px;
  width: 100%;
  min-height: 108px;
  padding: 16px;
  font-size: 14px;
  box-sizing: border-box;
}

.comment-actions {
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
  display: flex;
}

.comment-actions small {
  color: #777;
}

.comment-actions button, .primary-button {
  color: #fff;
  cursor: pointer;
  background: #191919;
  border: 0;
  border-radius: 3px;
  padding: 12px 19px;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.15s;
}

.comment-actions button:hover, .primary-button:hover {
  background: #b6252f;
}

.comment-thread {
  border-top: 1px solid #eee;
}

.comment-row {
  padding: 21px 4px;
  border-bottom: 1px solid #f5f5f5;
}

.comment-byline {
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  display: flex;
}

.comment-byline strong {
  font-size: 13px;
}

.comment-byline time {
  color: #888;
  font-size: 11px;
}

.comment-row p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.7;
}

/* Editor View */
.editor-layout {
  width: min(760px, 100% - 40px);
  margin: 0 auto;
  padding: 55px 0 100px;
}

.editor-layout > h1 {
  margin: 12px 0 40px;
  font-size: 45px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.editor-form {
  border: 1px solid #e4e4e4;
  border-radius: 6px;
  padding: clamp(22px, 4vw, 40px);
}

.editor-form h2 {
  font-size: 25px;
  margin-bottom: 6px;
}

.editor-form > p {
  color: #777;
  margin: 11px 0 25px;
  font-size: 14px;
  line-height: 1.6;
}

.editor-form label {
  margin: 22px 0;
  font-size: 13px;
  font-weight: 750;
  display: block;
}

.editor-form input, .editor-form textarea, .editor-form select {
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  width: 100%;
  margin-top: 9px;
  padding: 13px;
  font-size: 15px;
  font-weight: 400;
  display: block;
  box-sizing: border-box;
  background: #fff;
}

.editor-form textarea {
  resize: vertical;
}

.editor-fields {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  display: grid;
}

.editor-buttons {
  justify-content: flex-end;
  gap: 12px;
  display: flex;
  margin-top: 24px;
}

.editor-buttons button {
  cursor: pointer;
  border: 1px solid #aaa;
  border-radius: 3px;
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 750;
  background: #fff;
}

.editor-buttons .primary-button {
  border-color: #191919;
  background: #191919;
  color: #fff;
}

.editor-stories {
  margin-top: 60px;
}

.editor-stories h2 {
  margin-bottom: 15px;
  font-size: 23px;
}

.editor-stories h2 span {
  color: #999;
  font-weight: 400;
}

.editor-story {
  border-top: 1px solid #eee;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  display: flex;
}

.editor-story strong, .editor-story span {
  display: block;
}

.editor-story strong {
  font-size: 15px;
}

.editor-story span {
  color: #777;
  margin-top: 8px;
  font-size: 12px;
}

.editor-story-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.editor-story-actions button {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #fff;
}

.editor-story-actions .btn-danger {
  color: #b6252f;
  border-color: #e2b8ba;
}

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

/* DevTools & status overlay hidden to keep visual purity */
#vjDevtoolsRoot, .vj-status-badge {
  display: none !important;
}

/* Mobile Media Queries (Matching Original 1:1) */
@media (max-width: 750px) {
  .masthead {
    flex-wrap: wrap;
    gap: 13px;
    height: auto;
    min-height: 70px;
    padding: 16px 18px 14px;
  }
  .brand {
    flex: 1;
    min-width: 140px;
  }
  .brand img {
    width: 135px;
  }
  .mast-date {
    display: none;
  }
  .mast-tools {
    order: 2;
    justify-content: stretch;
    width: 100%;
  }
  .search-field {
    flex: 1;
    width: auto;
  }
  .language-field select {
    width: 64px;
    padding-left: 11px;
    padding-right: 22px;
  }
  .mast-tools button {
    padding: 0 14px;
  }
  .section-nav {
    justify-content: flex-start;
    padding: 0 20px;
    scrollbar-width: none;
  }
  .section-nav::-webkit-scrollbar {
    display: none;
  }
  .page-width {
    padding: 42px 18px 80px;
  }
  .home-heading {
    display: block;
  }
  .home-heading p {
    margin-top: 12px;
  }
  .stories-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .lead-story {
    grid-area: auto;
  }
  .lead-story h2 {
    font-size: 27px;
  }
  .story-image, .lead-story .story-image {
    aspect-ratio: 1.65;
  }
  .article-layout {
    padding-top: 25px;
  }
  .back-link {
    margin-bottom: 47px;
  }
  .article-deck, .article-body {
    font-size: 16px;
  }
  .editor-layout > h1 {
    font-size: 35px;
  }
  .editor-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
