:root {
  --paper: #f1eee5;
  --paper-deep: #e6e0d2;
  --paper-light: #faf8f2;
  --ink: #1d211e;
  --ink-soft: #4e554f;
  --muted: #777b73;
  --line: #cdc7b9;
  --line-dark: #96998f;
  --forest: #17231e;
  --forest-soft: #283a31;
  --signal: #cf4f3b;
  --signal-dark: #a83a2c;
  --green: #3f765d;
  --green-light: #dce8df;
  --amber: #a56e1a;
  --amber-light: #f0e3c7;
  --blue: #446c7a;
  --blue-light: #dce8eb;
  --danger: #a94035;
  --shadow: 0 22px 70px rgba(31, 37, 32, 0.13);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --sans: "Avenir Next", "Hiragino Sans GB", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Roboto Mono", "Liberation Mono", monospace;
  --radius: 2px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.78), transparent 31rem),
    linear-gradient(116deg, rgba(88, 103, 86, 0.04), transparent 42%),
    var(--paper);
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  border: 10px solid var(--forest);
  content: "";
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:not(:disabled),
select:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--signal);
  color: #fff;
}

:focus-visible {
  outline: 3px solid rgba(207, 79, 59, 0.38);
  outline-offset: 3px;
}

.paper-grain {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.29;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(31, 36, 32, 0.017) 4px),
    radial-gradient(circle, rgba(29, 33, 30, 0.15) 0.5px, transparent 0.7px);
  background-size: 100% 4px, 7px 7px;
  mix-blend-mode: multiply;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 20px;
  left: 20px;
  padding: 10px 14px;
  transform: translateY(-180%);
  background: var(--forest);
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow,
.issue-line,
.stat-caption,
.login-edition,
.login-footnote {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.primary-button,
.utility-button,
.text-button,
.icon-button,
.load-more,
.download-button {
  border: 0;
  border-radius: var(--radius);
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.primary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 15px;
  background: var(--forest);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--signal);
}

.utility-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line-dark);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 700;
}

.utility-button:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.text-button {
  padding: 5px 2px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--line-dark);
  text-underline-offset: 4px;
}

.text-button:hover:not(:disabled) {
  color: var(--signal);
  text-decoration-color: var(--signal);
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1;
}

.icon-button:hover {
  border-color: var(--signal);
  background: var(--signal);
  color: #fff;
}

/* Login */

.login-view {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: clamp(34px, 6vw, 88px);
  place-items: center;
  isolation: isolate;
}

.login-view::before {
  position: absolute;
  z-index: -1;
  top: 10px;
  right: 10px;
  width: min(40vw, 520px);
  height: calc(100% - 20px);
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--forest);
  background-size: 34px 34px;
}

.login-view::after {
  position: absolute;
  z-index: -1;
  top: 14%;
  right: clamp(30px, 8vw, 128px);
  width: clamp(160px, 25vw, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(241, 238, 229, 0.3);
  border-radius: 50%;
  box-shadow:
    0 0 0 38px rgba(241, 238, 229, 0.025),
    0 0 0 76px rgba(241, 238, 229, 0.018);
  content: "";
}

.login-edition {
  position: absolute;
  top: 34px;
  left: clamp(34px, 6vw, 88px);
  padding-top: 7px;
  border-top: 2px solid var(--signal);
}

.login-card {
  display: grid;
  width: min(1040px, 100%);
  min-height: 540px;
  grid-template-columns: 120px minmax(280px, 1.12fr) minmax(300px, 0.88fr);
  align-items: end;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: rgba(250, 248, 242, 0.93);
  box-shadow: var(--shadow);
  animation: editorial-rise 620ms cubic-bezier(0.21, 0.8, 0.26, 1) both;
}

.login-mark {
  display: flex;
  align-self: stretch;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--signal);
  color: #fff;
  font-family: var(--serif);
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.login-mark::before,
.login-mark::after {
  width: 1px;
  height: 52px;
  background: rgba(255, 255, 255, 0.48);
  content: "";
}

.login-copy {
  align-self: stretch;
  padding: clamp(48px, 6vw, 82px) clamp(34px, 5vw, 72px);
  border-right: 1px solid var(--line);
}

.login-copy .eyebrow {
  color: var(--signal);
}

.login-copy h1 {
  margin: 52px 0 30px;
  font-family: var(--serif);
  font-size: clamp(2.15rem, 4.5vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.login-intro {
  max-width: 32rem;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.9;
}

.login-form {
  padding: 52px clamp(28px, 4vw, 58px);
}

.login-form > label,
.filter-form > label {
  display: block;
  margin: 0 0 9px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  min-height: 52px;
  padding: 13px 58px 13px 0;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.08rem;
}

.password-field input:focus {
  border-bottom-color: var(--signal);
}

.password-field .text-button {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.field-hint {
  margin: 11px 0 28px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.6;
}

.login-button {
  width: 100%;
  min-height: 50px;
  justify-content: space-between;
  padding-inline: 18px;
}

.form-message {
  min-height: 21px;
  margin: 15px 0 0;
  color: var(--danger);
  font-size: 0.77rem;
  line-height: 1.5;
}

.login-footnote {
  position: absolute;
  right: clamp(32px, 6vw, 88px);
  bottom: 32px;
  color: rgba(241, 238, 229, 0.65);
}

/* App shell */

.app-shell {
  width: min(1740px, calc(100% - 20px));
  min-height: calc(100vh - 20px);
  margin: 10px auto;
  background: rgba(241, 238, 229, 0.72);
}

.masthead {
  display: grid;
  min-height: 152px;
  grid-template-columns: minmax(330px, 1fr) auto auto;
  align-items: center;
  gap: 34px;
  padding: 28px clamp(26px, 4vw, 64px);
  border-bottom: 1px solid var(--ink);
  animation: editorial-rise 480ms ease both;
}

.issue-line {
  margin-bottom: 15px;
  color: var(--muted);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-seal {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  background: var(--signal);
  color: #fff;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 700;
}

.brand-lockup h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.brand-lockup p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.masthead-note {
  display: flex;
  min-width: 220px;
  align-items: flex-start;
  gap: 11px;
  padding: 16px 20px;
  border-left: 1px solid var(--line-dark);
}

.masthead-note div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.masthead-note strong {
  font-family: var(--serif);
  font-size: 0.94rem;
}

.masthead-note span:last-child {
  color: var(--muted);
  font-size: 0.7rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #65a982;
  box-shadow: 0 0 0 5px rgba(101, 169, 130, 0.14);
  animation: signal-pulse 2.4s ease-in-out infinite;
}

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

.channel-ribbon {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) repeat(4, minmax(138px, 1fr));
  border-bottom: 1px solid var(--ink);
  background: var(--forest);
  color: #fff;
  animation: editorial-rise 520ms 60ms ease both;
}

.channel-heading,
.channel-status {
  min-height: 104px;
  padding: 21px clamp(17px, 2vw, 30px);
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.channel-heading {
  display: flex;
  align-items: center;
  gap: 15px;
}

.section-number {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.channel-heading h2,
.rail-heading h2,
.feed-header h2,
.detail-toolbar h2 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.channel-heading .eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.channel-status {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-status div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.channel-status strong {
  font-family: var(--serif);
  font-size: 0.98rem;
}

.channel-status span:not(.channel-monogram, .status-pip) {
  color: rgba(255, 255, 255, 0.53);
  font-size: 0.68rem;
  white-space: nowrap;
}

.channel-monogram {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-family: var(--serif);
  font-size: 0.95rem;
}

.channel-status--connected {
  background: rgba(73, 127, 97, 0.3);
}

.channel-status--connected .channel-monogram {
  border-color: #7ab393;
  background: #6da187;
  color: #102019;
}

.channel-status--pending {
  opacity: 0.62;
}

.status-pip {
  position: absolute;
  top: 17px;
  right: 17px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #80c19c;
}

.signal-strip {
  display: grid;
  min-height: 116px;
  grid-template-columns: repeat(4, minmax(120px, 0.72fr)) minmax(260px, 1.4fr);
  border-bottom: 1px solid var(--ink);
  background: rgba(250, 248, 242, 0.64);
  animation: editorial-rise 520ms 100ms ease both;
}

.signal-strip article {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 4px 8px;
  padding: 20px clamp(16px, 2.2vw, 34px);
  border-right: 1px solid var(--line);
}

.signal-strip strong {
  grid-row: span 2;
  align-self: center;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.2vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.055em;
}

.stat-label {
  align-self: end;
  font-size: 0.78rem;
  font-weight: 700;
}

.stat-caption {
  align-self: start;
  color: var(--muted);
  font-size: 0.58rem;
}

.strip-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 20px clamp(22px, 3vw, 46px);
  background:
    linear-gradient(105deg, rgba(207, 79, 59, 0.09), transparent 55%),
    transparent;
}

.strip-note span {
  color: var(--signal);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.strip-note strong {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0;
}

/* Main workspace */

.workspace {
  display: grid;
  min-height: 670px;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: start;
  border-bottom: 1px solid var(--ink);
  transition: grid-template-columns 260ms ease;
}

.workspace.has-detail {
  grid-template-columns: minmax(210px, 250px) minmax(430px, 1fr) minmax(360px, 0.84fr);
}

.filter-rail {
  position: sticky;
  top: 0;
  min-height: 670px;
  padding: 30px clamp(20px, 2.3vw, 34px);
  border-right: 1px solid var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent),
    var(--paper-deep);
  animation: editorial-rise 520ms 150ms ease both;
}

.rail-heading,
.feed-header,
.detail-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rail-heading .section-number {
  color: var(--signal);
}

.rail-heading .eyebrow,
.feed-header .eyebrow,
.detail-toolbar .eyebrow {
  color: var(--muted);
}

.filter-form {
  margin-top: 34px;
}

.filter-form select {
  width: 100%;
  min-height: 44px;
  margin: 0 0 22px;
  padding: 8px 31px 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  border-radius: 0;
  outline: 0;
  background-color: transparent;
  color: var(--ink);
  font-size: 0.81rem;
}

.filter-form select:focus {
  border-color: var(--signal);
  box-shadow: 0 2px 0 var(--signal);
}

.filter-form select:disabled {
  color: var(--muted);
}

.filter-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.rail-rule {
  height: 1px;
  margin: 34px 0 25px;
  background: var(--line-dark);
}

.keyboard-guide .eyebrow {
  margin-bottom: 14px;
  color: var(--muted);
}

.keyboard-guide dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.keyboard-guide dt {
  display: flex;
  gap: 3px;
}

.keyboard-guide dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

kbd {
  min-width: 24px;
  padding: 3px 5px;
  border: 1px solid var(--line-dark);
  border-bottom-width: 2px;
  background: var(--paper-light);
  font-family: var(--mono);
  font-size: 0.58rem;
  text-align: center;
}

.feed-column {
  min-width: 0;
  padding: 30px clamp(24px, 3vw, 50px) 44px;
  animation: editorial-rise 520ms 190ms ease both;
}

.feed-header {
  justify-content: space-between;
}

.feed-header > div:first-child {
  padding-left: 14px;
  border-left: 3px solid var(--signal);
}

.feed-header h2 {
  font-size: 1.75rem;
}

.feed-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
}

.feed-count span {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.35rem;
}

.feed-count small {
  font-size: 0.65rem;
}

.search-bar {
  position: relative;
  display: grid;
  min-height: 62px;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 11px;
  margin: 26px 0 10px;
  padding: 8px 9px 8px 18px;
  border: 1px solid var(--ink);
  background: rgba(250, 248, 242, 0.72);
  box-shadow: 5px 5px 0 var(--paper-deep);
}

.search-bar:focus-within {
  border-color: var(--signal);
  box-shadow: 5px 5px 0 rgba(207, 79, 59, 0.15);
}

.search-bar input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 0.98rem;
}

.search-bar input::placeholder {
  color: #8e8f88;
}

.search-glyph {
  color: var(--signal);
  font-family: var(--serif);
  font-size: 1.5rem;
}

.search-shortcut {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.search-submit {
  min-width: 75px;
}

.active-filters {
  display: flex;
  min-height: 39px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: var(--paper-light);
  color: var(--ink-soft);
  font-size: 0.65rem;
}

.filter-chip button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--signal);
  font-weight: 800;
}

.list-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.68rem;
}

.event-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  list-style: none;
}

.event-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 47px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition:
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.event-item::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  content: "";
  background: transparent;
  transition: background-color 160ms ease;
}

.event-item:hover {
  z-index: 1;
  background: rgba(250, 248, 242, 0.72);
}

.event-item.is-active {
  z-index: 2;
  background: var(--paper-light);
  box-shadow: 8px 0 0 var(--signal) inset;
}

.event-item.is-active::before,
.event-item.is-important::before {
  background: var(--signal);
}

.event-open {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 21px 16px 21px 20px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.event-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.channel-chip,
.source-tag,
.category-tag,
.importance-tag,
.status-tag,
.todo-count {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 7px;
  font-family: var(--mono);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.channel-chip {
  border: 1px solid var(--blue);
  color: var(--blue);
}

.source-tag {
  border: 1px solid #8b7ab8;
  color: #5f4c91;
}

.category-tag {
  background: var(--blue-light);
  color: #315866;
}

.importance-tag {
  background: var(--amber-light);
  color: #79500e;
}

.importance-tag.is-high {
  background: #f3d6ce;
  color: var(--signal-dark);
}

.status-tag {
  border: 1px solid var(--line-dark);
  color: var(--muted);
}

.status-tag.is-processing {
  border-color: var(--amber);
  color: var(--amber);
}

.status-tag.is-error {
  border-color: var(--danger);
  color: var(--danger);
}

.event-time {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  white-space: nowrap;
}

.event-sender {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-subject {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.6vw, 1.34rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.event-summary {
  display: -webkit-box;
  max-width: 73ch;
  margin: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 0.81rem;
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.todo-preview {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.todo-count {
  flex: 0 0 auto;
  background: var(--green-light);
  color: #315e48;
}

.todo-text {
  min-width: 0;
  overflow: hidden;
  color: var(--green);
  font-size: 0.69rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-flag {
  display: grid;
  width: 47px;
  min-height: 100%;
  place-items: start center;
  padding: 22px 0 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--line-dark);
  font-size: 1.12rem;
}

.event-flag:hover {
  color: var(--signal);
}

.event-flag[aria-pressed="true"] {
  background: rgba(207, 79, 59, 0.075);
  color: var(--signal);
}

.event-flag.is-saving {
  animation: flag-blink 720ms ease-in-out infinite;
}

.skeleton-card {
  display: grid;
  gap: 13px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--line);
}

.skeleton-line {
  height: 10px;
  overflow: hidden;
  background: var(--paper-deep);
}

.skeleton-line::after {
  display: block;
  width: 42%;
  height: 100%;
  transform: translateX(-110%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78), transparent);
  content: "";
  animation: shimmer 1.25s ease-in-out infinite;
}

.skeleton-line:nth-child(1) {
  width: 35%;
}

.skeleton-line:nth-child(2) {
  width: 78%;
  height: 17px;
}

.skeleton-line:nth-child(3) {
  width: 94%;
}

.empty-state,
.error-state {
  min-height: 340px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-state:not([hidden]) {
  display: flex;
  flex-direction: column;
}

.empty-mark {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  color: var(--signal);
  font-family: var(--serif);
  font-size: 2.2rem;
}

.empty-state h3,
.error-state h3 {
  margin: 19px 0 7px;
  font-family: var(--serif);
  font-size: 1.45rem;
}

.empty-state p,
.error-state p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.76rem;
}

.error-state:not([hidden]) {
  display: flex;
  gap: 18px;
  text-align: left;
}

.error-state > span {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  background: var(--danger);
  color: #fff;
  font-family: var(--serif);
  font-size: 1.5rem;
}

.error-state h3 {
  margin-top: 0;
}

.load-more {
  display: flex;
  width: 100%;
  min-height: 53px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid var(--line-dark);
  border-top: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.load-more:hover {
  background: var(--forest);
  color: #fff;
}

/* Detail */

.detail-panel {
  position: sticky;
  top: 0;
  display: grid;
  min-width: 0;
  max-height: 100vh;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-self: stretch;
  overflow: hidden;
  border-left: 1px solid var(--ink);
  background: var(--paper-light);
  animation: detail-enter 280ms cubic-bezier(0.2, 0.78, 0.24, 1) both;
}

.detail-toolbar {
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--ink);
}

.detail-loading {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 420px;
  padding: 36px;
}

.detail-loading span {
  height: 13px;
  background: var(--paper-deep);
  animation: detail-breathe 1.1s ease-in-out infinite alternate;
}

.detail-loading span:nth-child(1) {
  width: 56%;
}

.detail-loading span:nth-child(2) {
  width: 93%;
  animation-delay: 100ms;
}

.detail-loading span:nth-child(3) {
  width: 78%;
  animation-delay: 200ms;
}

.detail-loading p {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.82rem;
}

.detail-error {
  align-self: center;
  margin: 35px;
  padding: 22px;
  border: 1px solid var(--danger);
}

.detail-error p {
  color: var(--muted);
  font-size: 0.75rem;
}

.detail-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail-article {
  padding: 27px clamp(24px, 3vw, 44px) 48px;
}

.detail-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.detail-subject {
  margin: 24px 0 16px;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 2.7vw, 2.8rem);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.detail-from {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 0.92rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  margin: 13px 0 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.detail-meta span {
  overflow-wrap: anywhere;
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.brief-block {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.brief-block--wide {
  grid-column: 1 / -1;
}

.brief-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brief-value {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 0.84rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.detail-section {
  margin-top: 34px;
}

.detail-section-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 14px;
}

.detail-section-heading::before {
  width: 22px;
  height: 2px;
  background: var(--signal);
  content: "";
}

.detail-section-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
}

.detail-todos {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-todos li {
  position: relative;
  padding: 11px 12px 11px 35px;
  border-left: 2px solid var(--green);
  background: var(--green-light);
  color: #294c3b;
  font-family: var(--serif);
  font-size: 0.8rem;
  line-height: 1.65;
}

.detail-todos li::before {
  position: absolute;
  top: 12px;
  left: 12px;
  content: "□";
  font-family: var(--mono);
}

.detail-body {
  min-height: 150px;
  margin: 0;
  padding: 19px;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(48, 56, 50, 0.035) 1px, transparent 1px),
    #fff;
  background-size: 100% 28px;
  color: #262a27;
  font-family: var(--serif);
  font-size: 0.82rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.attachment-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.download-button {
  display: grid;
  width: 100%;
  min-height: 46px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 0.72rem;
  text-align: left;
}

.download-button span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-button small {
  color: var(--muted);
}

.download-button:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 7px;
  padding: 15px 20px;
  border-top: 1px solid var(--ink);
  background: var(--paper-deep);
}

.detail-actions .primary-button.is-important {
  background: var(--signal);
}

.page-footer {
  display: flex;
  min-height: 55px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(24px, 4vw, 64px);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-footer span:nth-child(2) {
  color: var(--green);
  font-weight: 700;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 25px;
  bottom: 25px;
  display: grid;
  width: min(360px, calc(100% - 50px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 5px 1fr;
  gap: 12px;
  padding: 14px 16px 14px 0;
  background: var(--forest);
  color: #fff;
  box-shadow: 0 12px 30px rgba(20, 28, 24, 0.25);
  font-size: 0.76rem;
  line-height: 1.55;
  animation: toast-enter 220ms ease both;
}

.toast::before {
  background: var(--green);
  content: "";
}

.toast.is-error::before {
  background: var(--signal);
}

.toast.is-leaving {
  animation: toast-leave 180ms ease both;
}

noscript {
  display: block;
  padding: 20px;
  background: var(--signal);
  color: #fff;
  text-align: center;
}

@keyframes editorial-rise {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes detail-enter {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes signal-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 5px rgba(101, 169, 130, 0.14);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(101, 169, 130, 0.04);
  }
}

@keyframes shimmer {
  to {
    transform: translateX(260%);
  }
}

@keyframes flag-blink {
  50% {
    opacity: 0.35;
  }
}

@keyframes detail-breathe {
  to {
    opacity: 0.4;
  }
}

@keyframes toast-enter {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
}

@keyframes toast-leave {
  to {
    transform: translateY(8px);
    opacity: 0;
  }
}

@media (max-width: 1280px) {
  .workspace.has-detail {
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  }

  .detail-panel {
    position: fixed;
    z-index: 50;
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: min(580px, calc(100vw - 50px));
    max-height: none;
    border: 1px solid var(--ink);
    box-shadow: -26px 0 80px rgba(20, 27, 23, 0.24);
  }

  .channel-ribbon {
    grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(120px, 1fr));
  }

  .channel-heading,
  .channel-status {
    padding-inline: 18px;
  }

  .channel-status {
    gap: 8px;
  }

  .channel-monogram {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 980px) {
  body::before {
    border-width: 6px;
  }

  .login-view::before {
    width: 33vw;
  }

  .login-card {
    grid-template-columns: 75px 1fr;
  }

  .login-form {
    grid-column: 2;
    padding-top: 0;
  }

  .login-copy {
    border-right: 0;
  }

  .masthead {
    grid-template-columns: 1fr auto;
  }

  .masthead-note {
    display: none;
  }

  .channel-ribbon {
    grid-template-columns: repeat(4, 1fr);
  }

  .channel-heading {
    grid-column: 1 / -1;
    min-height: 78px;
  }

  .channel-status {
    min-height: 83px;
  }

  .signal-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .strip-note {
    grid-column: 1 / -1;
    min-height: 82px;
    border-top: 1px solid var(--line);
  }

  .signal-strip article {
    grid-template-columns: 1fr;
  }

  .signal-strip strong {
    grid-row: auto;
    grid-column: 1;
    order: -1;
  }

  .workspace,
  .workspace.has-detail {
    grid-template-columns: 1fr;
  }

  .filter-rail {
    position: static;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .filter-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 14px;
  }

  .filter-form > label {
    align-self: end;
  }

  .filter-actions {
    grid-column: 1 / -1;
    grid-template-columns: auto auto;
    justify-content: start;
  }

  .keyboard-guide,
  .rail-rule {
    display: none;
  }
}

@media (max-width: 720px) {
  .login-view {
    padding: 72px 22px 55px;
  }

  .login-view::before {
    display: none;
  }

  .login-edition {
    top: 24px;
    left: 22px;
  }

  .login-card {
    display: block;
    min-height: auto;
  }

  .login-mark {
    height: 64px;
    flex-direction: row;
    font-size: 1.5rem;
  }

  .login-mark::before,
  .login-mark::after {
    width: 38px;
    height: 1px;
  }

  .login-copy {
    padding: 34px 25px 26px;
  }

  .login-copy h1 {
    margin: 28px 0 20px;
    font-size: 2.35rem;
  }

  .login-form {
    padding: 0 25px 32px;
  }

  .login-footnote {
    right: 22px;
    bottom: 20px;
    color: var(--muted);
  }

  .app-shell {
    width: calc(100% - 12px);
    margin: 6px auto;
  }

  .masthead {
    min-height: 126px;
    gap: 16px;
    padding: 22px 18px;
  }

  .issue-line {
    display: none;
  }

  .brand-seal {
    width: 40px;
    height: 40px;
    font-size: 1.35rem;
  }

  .brand-lockup h1 {
    font-size: 2rem;
  }

  .brand-lockup p {
    font-size: 0.59rem;
  }

  .masthead-actions {
    flex-direction: column;
  }

  .masthead-actions .utility-button {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 0.66rem;
  }

  .channel-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }

  .channel-heading {
    grid-column: 1 / -1;
  }

  .channel-status {
    min-height: 76px;
  }

  .channel-status:nth-child(even) {
    border-right: 0;
  }

  .signal-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .signal-strip article {
    min-height: 98px;
  }

  .signal-strip article:nth-child(2) {
    border-right: 0;
  }

  .signal-strip article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .strip-note {
    grid-column: 1 / -1;
  }

  .filter-rail {
    padding: 25px 18px;
  }

  .filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feed-column {
    padding: 25px 15px 36px;
  }

  .feed-header h2 {
    font-size: 1.45rem;
  }

  .search-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding-left: 12px;
  }

  .search-shortcut,
  .search-submit {
    display: none;
  }

  .search-clear {
    grid-column: 3;
  }

  .event-item {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .event-open {
    padding: 18px 12px 18px 15px;
  }

  .event-time {
    width: 100%;
    margin-left: 0;
  }

  .detail-panel {
    top: 6px;
    right: 6px;
    bottom: 6px;
    left: 6px;
    width: auto;
  }

  .detail-article {
    padding-inline: 20px;
  }

  .detail-subject {
    font-size: 1.8rem;
  }

  .brief-grid {
    grid-template-columns: 1fr;
  }

  .brief-block--wide {
    grid-column: auto;
  }

  .detail-actions {
    grid-template-columns: 1fr 1fr;
  }

  .detail-actions .primary-button {
    grid-column: 1 / -1;
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .page-footer span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
