:root {
  --ink: #10232d;
  --ink-soft: #39505a;
  --paper: #f4f1e8;
  --paper-deep: #e9e4d8;
  --white: #fffdf8;
  --line: rgba(16, 35, 45, 0.14);
  --line-strong: rgba(16, 35, 45, 0.25);
  --signal: #e86f4d;
  --signal-deep: #b94f35;
  --teal: #21716f;
  --gold: #d7a84e;
  --shadow: 0 18px 45px rgba(16, 35, 45, 0.08);
  color-scheme: light;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(16, 35, 45, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 35, 45, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 84% -10%, rgba(232, 111, 77, 0.14), transparent 32rem),
    var(--paper);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

.app-shell {
  width: min(100%, 1440px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 5.25vw;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--signal);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.3;
}

.brand-mark circle:last-child {
  fill: currentColor;
  stroke: none;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-kicker {
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.topbar-actions,
.api-state {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: 20px;
}

.api-state {
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.status-dot,
.legend-dot,
.toolbar-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(215, 168, 78, 0.14);
}

.status-dot.is-ready {
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(33, 113, 111, 0.13);
}

.status-dot.is-error {
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(232, 111, 77, 0.14);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.tab-button:focus-visible,
.range-switcher button:focus-visible,
.mode-switcher button:focus-visible,
.dialog-close:focus-visible,
.inline-link:focus-visible,
.pagination-button:focus-visible,
.search-field input:focus-visible,
.select-field select:focus-visible {
  outline: 3px solid rgba(232, 111, 77, 0.35);
  outline-offset: 2px;
}

.button-quiet {
  border-color: var(--line-strong);
  background: transparent;
}

.button-quiet:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.button-dark {
  background: var(--ink);
  color: var(--paper);
}

.button-dark:hover {
  background: var(--signal-deep);
}

.button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

main {
  padding-bottom: 70px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.5fr);
  gap: 8vw;
  align-items: end;
  padding: clamp(68px, 9vw, 126px) 0 62px;
}

.eyebrow,
.section-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 17px;
  color: var(--signal-deep);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow span {
  display: block;
  width: 28px;
  height: 1px;
  background: currentColor;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

h1 {
  max-width: 850px;
  margin-bottom: 25px;
  font-size: clamp(3.45rem, 7.5vw, 7.4rem);
  line-height: 0.91;
  letter-spacing: -0.075em;
}

h1 em {
  color: var(--signal);
  font-style: italic;
}

.hero-intro {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.7;
}

.hero-note {
  position: relative;
  padding: 20px 0 0 22px;
  border-left: 1px solid var(--signal);
}

.hero-note-index {
  position: absolute;
  top: -5px;
  left: 20px;
  color: var(--signal);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.hero-note p {
  max-width: 250px;
  margin-bottom: 25px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.65;
}

.hero-note p strong {
  color: var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.hero-note-line {
  display: block;
  width: 100%;
  height: 1px;
  margin-bottom: 10px;
  background: var(--line);
}

.hero-note-caption {
  color: var(--ink-soft);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 65px;
}

.metric-card {
  min-height: 153px;
  padding: 21px 23px 19px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.5);
}

.metric-card-highlight {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.metric-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 19px;
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-card-highlight .metric-topline,
.metric-card-highlight .metric-caption {
  color: rgba(244, 241, 232, 0.65);
}

.metric-symbol {
  color: var(--teal);
  font-size: 0.8rem;
}

.metric-symbol-signal {
  color: var(--signal);
  font-size: 0.7rem;
}

.metric-card strong {
  display: block;
  margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 4vw, 3.35rem);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.metric-caption {
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.tab-nav {
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin-bottom: 45px;
  border-bottom: 1px solid var(--line-strong);
}

.tab-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-bottom: -1px;
  padding: 0 22px 15px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: rgba(16, 35, 45, 0.5);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  transition: color 160ms ease;
}

.tab-button + .tab-button {
  margin-left: 28px;
}

.tab-button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: transparent;
  content: "";
  transition: background-color 160ms ease;
}

.tab-button:hover,
.tab-button.is-active {
  color: var(--ink);
}

.tab-button.is-active::after {
  background: var(--signal);
}

.tab-number {
  color: var(--signal);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.global-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: -15px 0 35px;
  padding: 17px 20px;
  border: 1px solid rgba(232, 111, 77, 0.45);
  background: rgba(232, 111, 77, 0.1);
}

.global-error strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.78rem;
}

.global-error p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.73rem;
}

.tab-panel {
  min-height: 300px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 23px;
}

.section-label {
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 0.6rem;
}

.section-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.section-heading p:not(.section-label) {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.6;
}

.section-heading p strong {
  color: var(--ink);
  letter-spacing: 0.05em;
}

.range-switcher,
.mode-switcher {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 248, 0.42);
}

.range-switcher button,
.mode-switcher button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.range-switcher button + button,
.mode-switcher button + button {
  border-left: 1px solid var(--line);
}

.range-switcher button:hover,
.range-switcher button.is-active,
.mode-switcher button:hover,
.mode-switcher button.is-active {
  background: var(--ink);
  color: var(--paper);
}

.chart-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.68);
  box-shadow: var(--shadow);
}

.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 24px 0;
}

.chart-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--signal-deep);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.legend-dot {
  width: 8px;
  height: 8px;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(232, 111, 77, 0.12);
}

.chart-caption {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.chart-unit {
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.85rem;
  font-style: italic;
}

.chart-scroll {
  min-height: 390px;
  padding: 15px 18px 21px;
}

.frequency-svg {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
}

.frequency-svg .grid-line {
  stroke: rgba(16, 35, 45, 0.1);
  stroke-width: 1;
}

.frequency-svg .axis-label,
.frequency-svg .value-label {
  fill: var(--ink-soft);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 11px;
}

.frequency-svg .value-label {
  fill: var(--signal-deep);
  font-size: 10px;
  font-weight: 800;
}

.frequency-svg .bar {
  fill: var(--signal);
  opacity: 0.9;
  transition: opacity 160ms ease, fill 160ms ease;
}

.frequency-svg .bar:hover {
  fill: var(--teal);
  opacity: 1;
}

.frequency-svg .baseline {
  stroke: var(--ink);
  stroke-width: 1.1;
}

.loading-placeholder {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  min-height: 325px;
  padding: 30px 25px;
  background: linear-gradient(90deg, rgba(16, 35, 45, 0.04), rgba(255, 255, 255, 0.15), rgba(16, 35, 45, 0.04));
  background-size: 250% 100%;
  animation: shimmer 1.8s ease infinite;
}

.loading-chart span {
  display: block;
  width: 10%;
  height: var(--bar-height, 40%);
  background: rgba(232, 111, 77, 0.35);
}

.loading-chart span:nth-child(2) { --bar-height: 70%; }
.loading-chart span:nth-child(3) { --bar-height: 45%; }
.loading-chart span:nth-child(4) { --bar-height: 80%; }
.loading-chart span:nth-child(5) { --bar-height: 57%; }

.cloud-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.toolbar-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.64rem;
}

.toolbar-dot {
  width: 5px;
  height: 5px;
  background: var(--gold);
  box-shadow: none;
}

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

.cloud-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.7);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.cloud-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.cloud-card-header,
.cloud-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cloud-card-header {
  min-height: 58px;
  padding: 13px 15px 10px;
  border-bottom: 1px solid var(--line);
}

.cloud-card-week {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.cloud-card-number {
  color: var(--signal);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.cloud-card h3 {
  overflow: hidden;
  margin: 0;
  font-size: 1.04rem;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-card-count {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 0.59rem;
  white-space: nowrap;
}

.cloud-stage {
  position: relative;
  height: 228px;
  overflow: hidden;
  margin: 0 10px;
}

.cloud-word {
  position: absolute;
  display: block;
  max-width: calc(100% - 4px);
  overflow: hidden;
  color: var(--cloud-color, var(--teal));
  cursor: default;
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--cloud-size);
  font-style: var(--cloud-style, normal);
  font-weight: var(--cloud-weight, 400);
  left: var(--cloud-x);
  line-height: 1;
  text-overflow: ellipsis;
  top: var(--cloud-y);
  transform: translate(-50%, -50%);
  transition: color 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.cloud-word:hover {
  color: var(--signal-deep);
  transform: translate(-50%, -50%) scale(1.06);
}

.cloud-empty {
  display: grid;
  height: 228px;
  place-items: center;
  padding: 20px;
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-style: italic;
  text-align: center;
}

.cloud-card-footer {
  min-height: 39px;
  padding: 8px 15px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.59rem;
}

.cloud-card-footer span:last-child {
  color: var(--teal);
  font-weight: 800;
}

.loading-cloud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 228px;
  padding: 0;
  background: none;
  animation: none;
}

.loading-cloud span {
  height: 270px;
  border: 1px solid var(--line);
  background: linear-gradient(110deg, rgba(16, 35, 45, 0.04), rgba(255, 255, 255, 0.3), rgba(16, 35, 45, 0.04));
  background-size: 220% 100%;
  animation: shimmer 1.8s ease infinite;
}

.notes-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.search-field,
.select-field {
  display: flex;
  align-items: center;
  min-height: 41px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 248, 0.65);
}

.search-field {
  flex: 1 1 auto;
  gap: 10px;
  padding: 0 13px;
}

.search-field svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--ink-soft);
  stroke-linecap: round;
  stroke-width: 1.4;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.75rem;
}

.search-field input::placeholder {
  color: rgba(57, 80, 90, 0.68);
}

.select-field select {
  min-width: 175px;
  height: 39px;
  padding: 0 32px 0 12px;
  border: 0;
  outline: 0;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.7rem;
}

.notes-result {
  flex: 0 0 auto;
  min-width: 88px;
  color: var(--ink-soft);
  font-size: 0.67rem;
  text-align: right;
}

.table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.72);
  box-shadow: var(--shadow);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink-soft);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

th:nth-child(1) { width: 25%; }
th:nth-child(2) { width: 37%; }
th:nth-child(3) { width: 14%; }
th:nth-child(4) { width: 13%; }
th:nth-child(5) { width: 11%; }

tbody tr {
  transition: background-color 150ms ease;
}

tbody tr:hover {
  background: rgba(232, 111, 77, 0.055);
}

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

.title-cell a {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
}

.title-cell a:hover {
  color: var(--signal-deep);
}

.cell-date {
  color: var(--ink-soft);
  font-size: 0.62rem;
}

.content-preview {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.inline-link {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--signal-deep);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.inline-link:hover {
  text-decoration: underline;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  color: var(--teal);
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.source-link:hover {
  color: var(--signal-deep);
  text-decoration: underline;
}

.source-link svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.label-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid rgba(57, 80, 90, 0.24);
  border-radius: 20px;
  color: var(--ink-soft);
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.label-badge.is-conflict {
  border-color: rgba(232, 111, 77, 0.5);
  background: rgba(232, 111, 77, 0.12);
  color: var(--signal-deep);
}

.score-cell {
  min-width: 75px;
}

.score-value {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
}

.score-meter {
  width: 100%;
  height: 3px;
  background: var(--paper-deep);
}

.score-meter span {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--signal);
}

.table-loading,
.table-empty {
  padding: 60px 20px;
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-style: italic;
  text-align: center;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 63px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.pagination-summary {
  color: var(--ink-soft);
  font-size: 0.66rem;
}

.pagination-controls {
  display: flex;
  gap: 5px;
}

.pagination-button {
  min-width: 29px;
  height: 29px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-weight: 800;
}

.pagination-button:hover:not(:disabled),
.pagination-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.pagination-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 35px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-dialog {
  width: min(680px, calc(100% - 30px));
  max-height: min(780px, calc(100vh - 30px));
  padding: 26px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 25px 80px rgba(16, 35, 45, 0.25);
}

.note-dialog::backdrop {
  background: rgba(16, 35, 45, 0.55);
  backdrop-filter: blur(3px);
}

.dialog-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  color: var(--signal-deep);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dialog-close {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
}

.dialog-date {
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 0.67rem;
}

.note-dialog h2 {
  margin-bottom: 15px;
  font-size: clamp(1.7rem, 4vw, 2.65rem);
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.dialog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.dialog-content {
  max-height: 310px;
  overflow-y: auto;
  padding: 17px;
  border-left: 2px solid var(--signal);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.75;
  white-space: pre-wrap;
}

.dialog-link {
  margin-top: 22px;
  text-decoration: none;
}

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

[hidden] {
  display: none !important;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (max-width: 900px) {
  .app-shell {
    padding: 0 4vw;
  }

  .hero {
    gap: 5vw;
  }

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

@media (max-width: 680px) {
  .topbar {
    min-height: 74px;
  }

  .brand-kicker {
    display: none;
  }

  .brand-copy strong {
    font-size: 1.25rem;
  }

  .topbar-actions {
    gap: 10px;
  }

  .api-state span:last-child {
    display: none;
  }

  .button-quiet {
    min-width: 38px;
    padding: 0 11px;
    font-size: 0;
  }

  .button-quiet svg {
    width: 17px;
    height: 17px;
  }

  .hero {
    display: block;
    padding: 60px 0 42px;
  }

  h1 {
    font-size: clamp(3.2rem, 17vw, 5.8rem);
  }

  .hero-intro {
    max-width: 440px;
  }

  .hero-note {
    max-width: 300px;
    margin: 42px 0 0 15px;
  }

  .metrics {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 45px;
  }

  .metric-card {
    min-height: 121px;
  }

  .metric-topline {
    margin-bottom: 13px;
  }

  .metric-card strong {
    font-size: 2.8rem;
  }

  .tab-nav {
    overflow-x: auto;
    margin-right: -4vw;
    margin-bottom: 35px;
    padding-right: 4vw;
  }

  .tab-button {
    flex: 0 0 auto;
    padding-right: 15px;
    font-size: 0.68rem;
  }

  .tab-button + .tab-button {
    margin-left: 18px;
  }

  .section-heading,
  .section-heading-clouds {
    display: block;
  }

  .range-switcher,
  .mode-switcher {
    width: fit-content;
    margin-top: 20px;
  }

  .chart-header {
    padding: 18px 15px 0;
  }

  .chart-unit {
    display: none;
  }

  .chart-scroll {
    min-height: 340px;
    overflow-x: auto;
    padding: 12px 5px 15px;
  }

  .cloud-toolbar {
    display: block;
    margin-bottom: 15px;
  }

  .toolbar-note {
    margin-top: 7px;
  }

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

  .notes-toolbar {
    flex-wrap: wrap;
  }

  .search-field {
    flex-basis: 100%;
  }

  .select-field {
    flex: 1 1 auto;
  }

  .select-field select {
    width: 100%;
  }

  .notes-result {
    text-align: left;
  }

  .table-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 15px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .note-dialog {
    padding: 20px;
  }
}
