/* Swiss International — Safety Orange briefing.
   One accent: #FF6B35. No shadow, radius, gradient, or glass. */

:root {
  --paper: #fafaf8;
  --ink: #0a0a0a;
  --grey-1: #f0f0ee;
  --grey-2: #d4d4d2;
  --grey-3: #737373;
  --accent: #FF6B35;
  --accent-on: #ffffff;
  --sans: "Inter", "Noto Sans SC", "Helvetica Neue", Helvetica, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --sans-zh: "Noto Sans SC", "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "Noto Sans SC", ui-monospace, "SF Mono", Consolas, monospace;
  --index: 4.25rem;
  --measure: 68ch;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: var(--accent-on);
}

h1, h2, h3, p {
  overflow-wrap: break-word;
}

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

a:hover {
  color: var(--accent);
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  font-weight: 500;
  background: var(--grey-1);
  border: 1px solid var(--grey-2);
  border-radius: 0;
  padding: 0.05em 0.35em;
}

.page {
  width: min(1080px, calc(100% - 3rem));
  margin-left: max(1.5rem, calc((100% - 1080px) * 0.22));
  margin-right: auto;
  padding: 2.75rem 0 5.5rem;
}

/* ---------- Masthead ---------- */

.chrome {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--grey-2);
}

.eyebrow,
.chrome-meta,
.sec-index,
.toc-num,
.t-meta {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0;
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
}

.chrome-meta {
  color: var(--grey-3);
}

.brand {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin-top: 1.75rem;
}

.brand h1 {
  grid-column: 1 / 9;
  margin: 0;
  font-weight: 200;
  font-size: clamp(3.25rem, 8vw, 5.75rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
}

.subtitle {
  grid-column: 1 / 8;
  margin: 1.1rem 0 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--grey-3);
}

.rule-accent {
  width: 96px;
  height: 3px;
  margin: 1.75rem 0 0;
  border: 0;
  background: var(--accent);
}

.podcast-panel {
  margin-top: 2rem;
  max-width: 44rem;
  display: grid;
  gap: 0.85rem;
  padding: 1.15rem 1.25rem 1.3rem;
  border: 1px solid var(--grey-2);
  border-left: 3px solid var(--accent);
  background: var(--paper);
}

.podcast-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pill {
  display: inline-block;
  padding: 0.28rem 0.45rem 0.22rem;
  background: var(--accent);
  color: var(--accent-on);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.2;
  border-radius: 0;
}

#podcast-label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-3);
}

audio {
  width: min(100%, 28rem);
  height: 2.5rem;
  accent-color: var(--accent);
}

.podcast-script {
  margin: 0.15rem 0 0;
  max-width: var(--measure);
  font-family: var(--sans-zh);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
}

/* ---------- Index ---------- */

.toc {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 2.25rem 0 3.25rem;
  background: var(--paper);
  border-top: 1px solid var(--grey-2);
  border-bottom: 1px solid var(--grey-2);
}

.toc a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.85rem 1rem 0.95rem;
  border-right: 1px solid var(--grey-2);
  color: var(--ink);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
}

.toc a:first-child {
  padding-left: 0;
}

.toc a:last-child {
  border-right: 0;
}

.toc a:hover {
  background: var(--grey-1);
  color: var(--ink);
  text-decoration: none;
}

.toc-num {
  color: var(--accent);
}

/* ---------- Sections ---------- */

.section {
  margin: 0 0 4.5rem;
  scroll-margin-top: 5.75rem;
}

.section-head {
  display: grid;
  grid-template-columns: var(--index) minmax(0, 1fr);
  column-gap: 1.25rem;
  align-items: baseline;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--grey-2);
}

.sec-index {
  color: var(--accent);
  font-weight: 600;
  padding-top: 0.55rem;
}

.section-head h2 {
  margin: 0;
  font-weight: 300;
  font-size: clamp(1.85rem, 3vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.section-head p {
  margin: 0.4rem 0 0;
  max-width: var(--measure);
  color: var(--grey-3);
  font-size: 16px;
}

.card-grid {
  counter-reset: item;
}

.card,
.item-card,
.watch-panel,
.empty,
.local-list li,
.btn,
input,
select {
  border-radius: 0;
  box-shadow: none;
}

.card-grid > .item-card {
  counter-increment: item;
  display: grid;
  grid-template-columns: var(--index) minmax(0, 1fr);
  column-gap: 1.25rem;
  row-gap: 0.45rem;
  padding: 1.35rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--grey-2);
}

.card-grid > .item-card::before {
  content: counter(item, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1 / -1;
  padding-top: 0.35rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--grey-3);
}

.card-grid > .item-card > * {
  grid-column: 2;
}

#highlights-list > .item-card:first-child h3 {
  font-weight: 300;
  font-size: clamp(1.6rem, 2.5vw, 2.125rem);
  letter-spacing: -0.02em;
  line-height: 1.22;
}

.item-card h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

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

.item-card h3 a:hover {
  color: var(--accent);
}

.summary {
  margin: 0;
  max-width: var(--measure);
  color: var(--ink);
  font-family: var(--sans-zh);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  margin-top: 0.35rem;
}

.source-tag,
.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-3);
}

.source-tag {
  color: var(--accent);
}

a.meta-chip {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

a.meta-chip:hover {
  color: var(--accent);
}

.actions {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}

.btn {
  appearance: none;
  border: 1px solid var(--grey-2);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  padding: 0.45rem 0.7rem;
  min-height: 2.25rem;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--ink);
  background: var(--grey-1);
  color: var(--ink);
}

.btn.primary {
  justify-self: start;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-on);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.7rem 1.05rem;
  min-height: 2.75rem;
}

.btn.primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn.like.active,
.btn.like.active:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-on);
}

.btn.dislike.active,
.btn.dislike.active:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.empty {
  padding: 1.15rem 0;
  border-top: 1px solid var(--grey-2);
  border-bottom: 1px solid var(--grey-2);
  background: transparent;
  color: var(--grey-3);
  font-size: 16px;
  text-align: left;
}

/* ---------- Accounts ---------- */

.account-block > .card {
  counter-reset: post;
  padding: 0.35rem 0 0.15rem;
  background: transparent;
  border: 0;
}

.account-head {
  display: grid;
  grid-template-columns: var(--index) minmax(0, 1fr) auto;
  column-gap: 1.25rem;
  align-items: baseline;
  margin: 0;
  padding: 1.35rem 0 0.9rem;
  border-bottom: 1px solid var(--grey-2);
}

.account-head h3 {
  grid-column: 2;
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.account-head a {
  grid-column: 3;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--grey-3);
  text-decoration: none;
}

.account-head a:hover {
  color: var(--accent);
}

.account-item {
  counter-increment: post;
  display: grid;
  grid-template-columns: var(--index) minmax(0, 1fr);
  column-gap: 1.25rem;
  row-gap: 0.4rem;
  padding: 1.15rem 0;
  border-top: 0;
  border-bottom: 1px solid var(--grey-2);
}

.account-item::before {
  content: counter(post, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1 / -1;
  padding-top: 0.3rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--grey-3);
}

.account-item > * {
  grid-column: 2;
}

.account-item h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.45;
}

.account-block .empty {
  margin-left: calc(var(--index) + 1.25rem);
  border-bottom: 0;
}

.interactions {
  margin: 0.2rem 0 0;
  padding: 0.1rem 0 0.1rem 0.9rem;
  list-style: none;
  border-left: 1px solid var(--grey-2);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

.interactions li {
  margin: 0.35rem 0;
}

.interactions a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.interactions a:hover {
  color: var(--accent);
}

/* ---------- Community ---------- */

.section-block {
  margin-top: 2rem;
}

.section-block:first-child {
  margin-top: 0.35rem;
}

.source-title {
  margin: 0;
  padding: 1.15rem 0 0.85rem calc(var(--index) + 1.25rem);
  border-left: 0;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
}

.source-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.2rem;
  width: 2.15rem;
  height: 3px;
  background: var(--accent);
}

/* ---------- Watches ---------- */

.watch-panel.card {
  margin-top: 1.5rem;
  margin-left: calc(var(--index) + 1.25rem);
  max-width: 46rem;
  padding: 1.35rem 1.35rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--grey-2);
}

.watch-panel .hint {
  margin: 0 0 1.35rem;
  max-width: var(--measure);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
}

.watch-form {
  display: grid;
  gap: 1rem;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.9rem 1.15rem;
}

.watch-form label {
  display: grid;
  gap: 0.4rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-3);
}

.watch-form label.grow {
  flex: 1 1 220px;
}

.watch-form input,
.watch-form select {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--grey-2);
  border-radius: 0;
  padding: 0.6rem 0.7rem;
}

#watch-type {
  min-width: 7.5rem;
}

#watch-days {
  width: 6.5rem;
}

.watch-form input:focus,
.watch-form select:focus,
.btn:focus-visible,
.toc a:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::placeholder {
  color: var(--grey-3);
  opacity: 1;
}

.local-list {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--grey-2);
}

.local-list:empty {
  display: none;
}

.local-list h4 {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-3);
}

.local-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.local-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border: 0;
  border-bottom: 1px solid var(--grey-2);
  background: transparent;
  font-size: 16px;
}

.local-list li span:last-child {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--grey-3);
  white-space: nowrap;
}

/* ---------- Notes ---------- */

.gaps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: gap;
}

.gaps li {
  counter-increment: gap;
  display: grid;
  grid-template-columns: var(--index) minmax(0, 1fr);
  column-gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--grey-2);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
}

.gaps li::before {
  content: counter(gap, decimal-leading-zero);
  padding-top: 0.35rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--grey-3);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 0.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--ink);
  color: var(--grey-3);
  font-size: 16px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

@media (max-width: 720px) {
  :root {
    --index: 2.35rem;
  }

  body {
    font-size: 16px;
  }

  .page {
    width: calc(100% - 1.5rem);
    margin-left: auto;
    margin-right: auto;
    padding-top: 1.35rem;
  }

  .brand h1,
  .subtitle {
    grid-column: 1 / -1;
  }

  .brand h1 {
    font-size: 3.25rem;
  }

  .chrome-meta {
    letter-spacing: 0.08em;
  }

  .toc {
    grid-template-columns: 1fr 1fr;
    margin-top: 1.75rem;
  }

  .toc a {
    padding: 0.8rem 0.75rem 0.85rem;
    font-size: 16px;
  }

  .toc a:nth-child(odd) {
    padding-left: 0;
  }

  .toc a:nth-child(2n) {
    border-right: 0;
  }

  .toc a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--grey-2);
  }

  .account-head {
    grid-template-columns: var(--index) minmax(0, 1fr);
  }

  .account-head a {
    grid-column: 2;
    grid-row: 2;
  }

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

  .watch-panel.card,
  .account-block .empty {
    margin-left: 0;
  }

  .source-title {
    padding-left: 0;
    padding-top: 1.35rem;
  }

  .source-title::before {
    top: 0.35rem;
    width: 2rem;
  }

  #watch-days,
  #watch-type {
    width: 100%;
  }

  .field-row {
    display: grid;
    grid-template-columns: 1fr;
  }
}
