[data-station] {
  --station-trim: var(--station-brand-tone,var(--accent));
  --station-rule: color-mix(in srgb,var(--station-trim) 17%,var(--line));
  --station-wash: color-mix(in srgb,var(--station-trim) 5%,var(--paper));
  --station-mast-fill: color-mix(in srgb,var(--station-trim) 10%,var(--paper));
}

[data-station] .mast {
  border-radius: 9px;
  gap: 10px;
}

html:not([data-post-detail=true],[data-header=band],[data-header=compact]) [data-station] .mast {
  margin-block-end: 7px;
  padding: 9px clamp(8px,2vw,16px);
  border: 1px solid var(--station-rule);
  border-block-start: 3px solid var(--accent);
  background: linear-gradient(115deg,var(--station-mast-fill),var(--paper) 74%);
}

[data-header=compact]:not([data-post-detail=true]) [data-station] .mast {
  border-block-end-color: var(--station-rule);
}

[data-header=band]:not([data-post-detail=true]) [data-station] .mast {
  background: linear-gradient(108deg,var(--accent),color-mix(in srgb,var(--accent) 86%,var(--ink)));
}

[data-post-detail=true] [data-station] .mast {
  border-color: var(--station-rule);
  border-inline-start: 3px solid var(--accent);
  background: linear-gradient(108deg,var(--station-mast-fill),var(--paper) 76%);
}

[data-post-detail=true] [data-station] .station-detail-close {
  border-color: var(--station-rule);
}

[data-post-detail=true] [data-station] .station-detail-close:is(:hover,:focus-visible) {
  background: var(--station-mast-fill);
  color: var(--ink);
}

[data-post-detail=true] [data-station] .station-detail-close:focus-visible {
  outline-color: var(--accent);
}

[data-station] #station-name-text {text-wrap: balance}

[data-station] :is(.issue-archive,.station-gallery,#station-links) {border-color: var(--station-rule)}
[data-station] .issue-archive {background: var(--station-wash);border-radius: 8px}
[data-station] .station-gallery-head h2 {color: var(--accent)}

[data-station] .draw-card[data-draw-theme=jade] {
  --draw-panel: var(--station-wash);
  --draw-ink: var(--ink);
  --draw-muted: var(--muted);
  --draw-line: var(--station-rule);
  --draw-control: color-mix(in srgb,var(--accent) 54%,var(--line));
  --draw-active: color-mix(in srgb,var(--accent) 82%,var(--ink));
  --draw-focus: var(--accent);
}

[data-theme=charcoal] [data-station] .draw-card[data-draw-theme=jade] {
  color-scheme: dark;
  --draw-active: #3b5c73;
  --draw-tab-fill: #2c475b;
  --draw-tab-ink: #eef6ff;
  --draw-tab-line: #8faeca;
  --draw-special: #f2c574;
}

@media (min-width:701px) {
  [data-station] .paper {
    border-radius: 12px;
    box-shadow: 0 10px 30px color-mix(in srgb,var(--ink) 7%,transparent);
  }
}

[data-station] #station-links > .links-grid a {
  border-color: var(--station-rule);
}

[data-station] .issue-archive summary {
  list-style: none;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
}

[data-station] .issue-archive summary::-webkit-details-marker {display: none}

[data-station] .issue-archive summary::before {
  content: '';
  align-self: center;
  inline-size: 6px;
  block-size: 6px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
}

[data-station] .issue-archive[open] summary::before {transform: rotate(45deg)}
[data-station] .issue-archive summary strong {white-space: nowrap}
[data-station] .issue-archive .post-archive-hint {margin-inline-start: 0;font-size: 14px}
[data-station] .issue-archive .post-count {float:none;margin-inline-start:auto;white-space:nowrap}

[data-station] .issue-archive-entries {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  max-block-size: min(270px,45svh);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
}

[data-station] .issue-archive a:focus-visible {outline-offset: -3px}
.issue-archive-year h3 {
  margin: 2px 0 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}
.issue-archive-year ul {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(100%,74px),1fr));
  list-style: none;
  gap: 6px;
  padding: 0;
  margin: 0;
}
[data-station] .issue-archive a {
  display: flex;
  padding-inline: 3px;
  font-variant-numeric: tabular-nums;
}
[data-station] .issue-archive summary:is(:hover,:focus-visible) {color: var(--ink)}

@media (pointer:coarse) {
  #station-draw-card .draw-tab {min-block-size: 44px}
}
