:root {
  --bg: #f2f7fa;
  --bg-deep: #e7f1f5;
  --surface: #ffffff;
  --surface-soft: #f7fbfc;
  --surface-tint: #edf7f9;
  --ink: #17313f;
  --ink-strong: #0f2430;
  --ink-soft: #5b6f7d;
  --ink-faint: #8496a2;
  --line: #dce8ee;
  --line-strong: #c9dbe3;
  --primary: #176f87;
  --primary-strong: #105a6f;
  --primary-soft: #e2f3f7;
  --teal: #2a9d8f;
  --teal-soft: #e4f6f3;
  --amber: #e99a3e;
  --amber-soft: #fdf1e2;
  --rain: #4f86c6;
  --rain-soft: #e8f0fa;
  --danger: #c34f4f;
  --danger-soft: #fbecec;
  --success: #31866c;
  --success-soft: #e7f5ef;
  --gradient: linear-gradient(135deg, #176f87 0%, #2794ac 100%);
  --gradient-warm: linear-gradient(135deg, #e99a3e 0%, #f1ba69 100%);
  --shadow-sm: 0 2px 8px rgba(20, 53, 68, 0.05);
  --shadow: 0 12px 36px rgba(20, 53, 68, 0.08);
  --shadow-lg: 0 24px 70px rgba(20, 53, 68, 0.16);
  --radius: 22px;
  --radius-sm: 14px;
  --font: "Segoe UI Variable", "Segoe UI", "Trebuchet MS", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "Consolas", "Courier New", monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 3% -2%, rgba(80, 174, 200, 0.17), transparent 31rem),
    radial-gradient(circle at 102% 2%, rgba(238, 166, 75, 0.12), transparent 28rem),
    linear-gradient(180deg, #f6fafc 0%, var(--bg) 48%, #eef5f8 100%);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(23, 111, 135, 0.12) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 38%);
  z-index: 0;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

::selection {
  background: rgba(39, 148, 172, 0.22);
}

:focus-visible {
  outline: 3px solid rgba(39, 148, 172, 0.35);
  outline-offset: 2px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.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;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 24px 32px 0;
}



.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 4px 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  border-radius: 16px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(145deg, #1b7f99, #2ca1ba);
  box-shadow: 0 10px 24px rgba(23, 111, 135, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.brand-mark svg {
  width: 44px;
  height: 44px;
}

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

.brand-copy strong {
  font-size: 21px;
  letter-spacing: -0.4px;
  color: var(--ink-strong);
}

.brand-copy span {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.date-pill,
.records-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink-soft);
  font-size: 13px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.date-pill .icon,
.records-pill .icon {
  width: 17px;
  height: 17px;
  color: var(--primary);
}

.records-pill strong {
  color: var(--ink);
  font-size: 15px;
}



.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 650;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.button .icon {
  width: 18px;
  height: 18px;
}

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

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button--primary {
  color: #fff;
  background: var(--gradient);
  border-color: rgba(16, 90, 111, 0.22);
  box-shadow: 0 8px 18px rgba(23, 111, 135, 0.2);
}

.button--primary:hover:not(:disabled) {
  box-shadow: 0 12px 24px rgba(23, 111, 135, 0.28);
}

.button--ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.button--ghost:hover:not(:disabled) {
  border-color: #b3ced9;
  background: #fff;
}

.button--danger {
  color: #fff;
  background: #c34f4f;
  border-color: #ab3e3e;
  box-shadow: 0 8px 18px rgba(195, 79, 79, 0.18);
}

.button--danger:hover:not(:disabled) {
  background: #b54242;
}

.button--compact {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
}

.button--compact .icon {
  width: 16px;
  height: 16px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}

.text-button:hover {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button .icon {
  width: 15px;
  height: 15px;
}

.text-button--danger {
  color: var(--danger);
}

.text-button--danger:hover {
  color: #9f3e3e;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.icon-button:hover {
  color: var(--ink);
  background: var(--surface-soft);
  border-color: var(--line);
}

.inline-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-link:hover {
  color: var(--primary-strong);
}


.tabbar {
  position: sticky;
  top: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(201, 219, 227, 0.85);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(20, 53, 68, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabbar::-webkit-scrollbar {
  display: none;
}

.tab-button {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.tab-button .icon {
  width: 18px;
  height: 18px;
}

.tab-button:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.tab-button.is-active {
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 6px 14px rgba(23, 111, 135, 0.22);
}

main {
  min-height: 62vh;
}

.tab-panel {
  animation: panel-in 0.28s ease both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 34px 0 24px;
}

.page-heading h1 {
  margin: 2px 0 8px;
  color: var(--ink-strong);
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.06;
  letter-spacing: -1.4px;
  font-weight: 750;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.page-lead {
  max-width: 700px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.data-badge,
.version-badge,
.subtle-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.version-badge {
  color: var(--primary);
  border-color: #c2e0e8;
  background: var(--primary-soft);
}

.subtle-badge {
  min-height: 28px;
  padding: 0 11px;
  font-size: 11.5px;
  box-shadow: none;
}


.card {
  border: 1px solid rgba(211, 226, 233, 0.92);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card h2 {
  color: var(--ink-strong);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 14px;
}

.card-icon .icon {
  width: 23px;
  height: 23px;
}

.card-icon--blue {
  color: var(--primary);
  background: var(--primary-soft);
}

.card-icon--amber {
  color: #b56f1f;
  background: var(--amber-soft);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 18px;
}

.card-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
}

.alert--error {
  color: #913838;
  border-color: #f0cccc;
  background: var(--danger-soft);
}

.alert--warning {
  color: #825a1d;
  border-color: #f0ddb7;
  background: #fdf7e9;
}

.alert--success {
  color: #276c57;
  border-color: #c7e6da;
  background: var(--success-soft);
}



.import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 20px;
  align-items: stretch;
}

.import-card {
  padding: 24px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 306px;
  padding: 32px 24px;
  border: 1.5px dashed #b6d5df;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(39, 148, 172, 0.1), transparent 16rem),
    linear-gradient(180deg, #fbfeff, #f3fafc);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--primary);
  background:
    radial-gradient(circle at 50% 0%, rgba(39, 148, 172, 0.16), transparent 18rem),
    linear-gradient(180deg, #fbfeff, #ebf7fa);
}

.dropzone.is-dragging {
  transform: scale(1.006);
}

.dropzone-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin-bottom: 16px;
  border-radius: 20px;
  color: var(--primary);
  background: #fff;
  border: 1px solid #d9ecf2;
  box-shadow: 0 10px 24px rgba(23, 111, 135, 0.12);
}

.dropzone-icon .icon {
  width: 29px;
  height: 29px;
}

.dropzone h2 {
  margin: 0 0 6px;
  font-size: 21px;
  letter-spacing: -0.4px;
}

.dropzone p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.dropzone .dropzone-hint {
  margin-top: 16px;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.2px;
}

.link-like {
  color: var(--primary);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #d5e8ee;
  border-radius: 13px;
  background: var(--surface-tint);
}

.file-chip-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--primary);
  background: #fff;
}

.file-chip-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.35;
}

.file-chip-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
}

.file-chip-copy span {
  color: var(--ink-faint);
  font-size: 11.5px;
}

.import-card > .alert {
  margin-top: 14px;
}

.format-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  background:
    linear-gradient(180deg, #fff 0%, #fbfdfe 100%);
}

.format-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: -0.4px;
}

.format-card > p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.format-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: format;
}

.format-list li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 11px;
  border: 1px solid #e7f0f4;
  border-radius: 10px;
  background: #fbfdfe;
}

.format-list code {
  color: var(--primary-strong);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
}

.format-list span {
  color: #5c6f7b;
  font-size: 12px;
}

.format-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 11px;
  background: var(--rain-soft);
  color: #39608a;
  font-size: 12px;
  line-height: 1.45;
}

.format-note .icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.format-note code {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
}

.format-card .text-button {
  margin-top: auto;
  padding-top: 16px;
}

.import-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 0;
}

.import-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(211, 226, 233, 0.75);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}

.import-step > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #fff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 750;
  border: 1px solid #dcebf0;
}

.import-step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.4;
}

.import-step strong {
  color: var(--ink);
}



.preview-card {
  margin-top: 24px;
  padding: 26px;
  scroll-margin-top: 100px;
}

.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.preview-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.6px;
}

.preview-file {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 12.5px;
}

.preview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 12px;
}

.stat-chip strong {
  color: var(--ink);
  font-size: 14px;
}

.stat-chip .icon {
  width: 15px;
  height: 15px;
}

.stat-chip--success {
  color: #286d58;
  border-color: #cde8dd;
  background: var(--success-soft);
}

.stat-chip--success strong {
  color: var(--success);
}

.stat-chip--warning {
  color: #805b20;
  border-color: #f0e1c0;
  background: #fdf8ec;
}

.stat-chip--warning strong {
  color: #a56e1f;
}

.stat-chip--danger {
  color: #943b3b;
  border-color: #f1d1d1;
  background: var(--danger-soft);
}

.stat-chip--danger strong {
  color: var(--danger);
}

.preview-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid #e4eef3;
  border-radius: 13px;
  background: var(--surface-soft);
}

.choice-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group legend {
  float: left;
  margin-right: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  cursor: pointer;
}

.radio-label input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}

.preview-note {
  max-width: 390px;
  color: #825a1d;
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.preview-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.table-hint {
  margin: 9px 2px 0;
  color: var(--ink-faint);
  font-size: 11.5px;
}

.preview-table {
  min-width: 900px;
}

.preview-table .cell-comment {
  max-width: 260px;
}

.preview-table tr.row-invalid td {
  background: #fffafa;
}

.preview-table tr.row-invalid:hover td {
  background: #fff5f5;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge .icon {
  width: 13px;
  height: 13px;
}

.status-badge--success {
  color: #276c57;
  background: var(--success-soft);
}

.status-badge--warning {
  color: #946320;
  background: #fdf4e4;
}

.status-badge--danger {
  color: #9a3c3c;
  background: var(--danger-soft);
}

.status-error-text {
  display: block;
  margin-top: 3px;
  color: #a24242;
  font-size: 10.5px;
  line-height: 1.3;
  white-space: normal;
  min-width: 150px;
}


.table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.table-scroll::-webkit-scrollbar {
  height: 9px;
}

.table-scroll::-webkit-scrollbar-track {
  background: #f3f8fa;
}

.table-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #f3f8fa;
  border-radius: 999px;
  background: #c7dbe3;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.data-table th {
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: #f7fafc;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: 0.55px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 15px;
  border-bottom: 1px solid #edf3f6;
  color: var(--ink);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.12s ease;
}

.data-table tbody tr:hover td {
  background: #f9fcfd;
}

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

.data-table .cell-comment {
  color: var(--ink-soft);
  font-size: 13px;
}

.data-table .cell-comment span {
  display: block;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table .cell-muted {
  color: var(--ink-faint);
}

.data-table .num {
  text-align: right;
}

.actions-column {
  width: 100px;
  text-align: right !important;
}



.export-group {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.export-label {
  padding: 0 5px 0 8px;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.export-group .button {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.export-group .button:hover:not(:disabled) {
  background: var(--surface-tint);
  border-color: #d8e8ee;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border-radius: 17px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 250px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-soft);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.search-box:focus-within {
  border-color: #8fc4d1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(39, 148, 172, 0.11);
}

.search-box .icon {
  width: 17px;
  height: 17px;
  color: var(--ink-faint);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.search-box input::placeholder {
  color: var(--ink-faint);
}

.select-box select {
  min-height: 40px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6f7d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
}

.select-box select:focus {
  border-color: #8fc4d1;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(39, 148, 172, 0.11);
}

.filter-result {
  margin-left: auto;
  color: var(--ink-faint);
  font-size: 12px;
  white-space: nowrap;
}

.diary-card {
  overflow: hidden;
}

.diary-table {
  min-width: 840px;
}

.diary-table th:first-child,
.diary-table td:first-child {
  padding-left: 24px;
}

.diary-table th:last-child,
.diary-table td:last-child {
  padding-right: 24px;
}

.date-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
}

.date-cell strong {
  color: var(--ink-strong);
  font-size: 13.5px;
  font-weight: 650;
}

.date-cell small {
  color: var(--ink-faint);
  font-size: 10.5px;
  text-transform: capitalize;
}

.temp-value,
.wind-value,
.pressure-value,
.precip-value {
  white-space: nowrap;
}

.temp-value {
  display: inline-flex;
  min-width: 60px;
  padding: 3px 7px;
  border-radius: 7px;
  font-weight: 700;
  justify-content: center;
}

.temp-value.is-warm {
  color: #a76013;
  background: #fdf4e8;
}

.temp-value.is-cold {
  color: #2f6c98;
  background: #edf5fb;
}

.temp-value.is-zero {
  color: var(--ink-soft);
  background: #f4f8fa;
}

.rain-value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--rain);
  white-space: nowrap;
}

.rain-value .icon {
  width: 14px;
  height: 14px;
}

.rain-value.is-dry {
  color: var(--ink-faint);
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.row-actions .icon-button {
  width: 32px;
  height: 32px;
}

.row-actions .icon-button .icon {
  width: 16px;
  height: 16px;
}

.row-actions .icon-button--danger:hover {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f0d0d0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}

.empty-state--compact {
  padding: 44px 24px;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin-bottom: 16px;
  border-radius: 20px;
  color: var(--primary);
  background: var(--surface-tint);
  border: 1px solid #d8ebf0;
}

.empty-icon .icon {
  width: 29px;
  height: 29px;
}

.empty-state h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.4px;
}

.empty-state p {
  max-width: 460px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fbfdfe;
  color: var(--ink-faint);
  font-size: 12px;
}

.table-footer-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #528274;
}

.save-indicator .icon {
  width: 14px;
  height: 14px;
}

.save-indicator.is-error {
  color: var(--danger);
}



.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-height: 114px;
  padding: 19px;
  border: 1px solid rgba(211, 226, 233, 0.9);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.kpi-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
}

.kpi-icon .icon {
  width: 21px;
  height: 21px;
}

.kpi-icon--blue {
  color: var(--primary);
  background: var(--primary-soft);
}

.kpi-icon--teal {
  color: var(--teal);
  background: var(--teal-soft);
}

.kpi-icon--amber {
  color: #b56f1f;
  background: var(--amber-soft);
}

.kpi-icon--rain {
  color: var(--rain);
  background: var(--rain-soft);
}

.kpi-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 1px;
}

.kpi-label {
  margin-bottom: 4px;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.55px;
  text-transform: uppercase;
}

.kpi-copy strong {
  color: var(--ink-strong);
  font-size: 25px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
}

.kpi-copy strong.kpi-value-text {
  font-size: 18px;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.kpi-note {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 10.5px;
  white-space: nowrap;
}

.kpi-grid--compact {
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card--compact {
  min-height: 88px;
  padding: 14px 17px;
  align-items: center;
}

.kpi-card--compact .kpi-icon {
  width: 38px;
  height: 38px;
}

.kpi-card--compact .kpi-copy strong {
  font-size: 21px;
}

.stats-empty-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid #d6e8ee;
  border-radius: 12px;
  background: var(--surface-tint);
  color: var(--ink-soft);
  font-size: 13px;
}

.stats-empty-note .icon {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--primary);
}

.stats-card {
  margin-bottom: 18px;
  overflow: hidden;
}

.stats-card--period {
  border-color: #cfe3e9;
}

.stats-table {
  min-width: 940px;
}

.stats-table th:first-child,
.stats-table td:first-child {
  padding-left: 26px;
}

.stats-table th:last-child,
.stats-table td:last-child {
  padding-right: 26px;
}

.stats-table .month-name {
  color: var(--ink-strong);
  font-weight: 650;
  white-space: nowrap;
}

.stats-table .period-name {
  color: var(--ink-strong);
  font-weight: 700;
  white-space: nowrap;
}

.stats-table .period-row td {
  background: #f4fafb;
}

.stats-table .period-row:hover td {
  background: #f0f8fa;
}

.percent-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 74px;
}

.percent-cell strong {
  font-size: 12.5px;
}

.percent-bar {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9f1f4;
}

.percent-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #66a9d9, #4f86c6);
}

.stats-table .empty-cell {
  padding: 28px 26px;
  color: var(--ink-faint);
  text-align: center;
}

.method-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 6px 0 10px;
  padding: 16px 18px;
  border: 1px solid #dce9ee;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font-size: 12.5px;
}

.method-note .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--primary);
}

.method-note strong {
  color: var(--ink);
}

.method-note p {
  margin: 3px 0 0;
}



.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.chart-card {
  min-width: 0;
  padding: 23px 24px 18px;
}

.chart-card--wide {
  grid-column: 1 / -1;
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.chart-head h2 {
  margin: 0 0 3px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.4px;
}

.chart-head p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-faint);
  font-size: 12px;
}

.chart-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.chart-wrap {
  position: relative;
  height: 285px;
  width: 100%;
}

.chart-wrap--line {
  height: 310px;
}

.chart-wrap--doughnut {
  height: 285px;
  max-width: 440px;
  margin: 0 auto;
}

.chart-wrap canvas {
  max-width: 100%;
}



.help-layout {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.help-nav {
  position: sticky;
  top: 94px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
}

.help-nav h2 {
  margin: 0 0 10px;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.help-nav > a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  transition: color 0.16s ease, background 0.16s ease;
}

.help-nav > a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.help-nav-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.45;
}

.help-nav-note .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  flex: 0 0 auto;
  color: var(--primary);
}

.help-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.help-section {
  scroll-margin-top: 100px;
  overflow: hidden;
}

.help-section summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.help-section summary::-webkit-details-marker {
  display: none;
}

.help-section summary:hover {
  background: #fcfefe;
}

.help-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #d7e9ee;
  border-radius: 12px;
  background: var(--surface-tint);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 750;
}

.help-section summary strong {
  display: block;
  color: var(--ink-strong);
  font-size: 17px;
  letter-spacing: -0.3px;
}

.help-section summary small {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 11.5px;
}

.help-chevron {
  width: 18px;
  height: 18px;
  color: var(--ink-faint);
  transition: transform 0.18s ease, color 0.18s ease;
}

.help-section[open] .help-chevron {
  transform: rotate(90deg);
  color: var(--primary);
}

.help-section[open] summary {
  border-bottom: 1px solid var(--line);
}

.help-body {
  padding: 22px 26px 28px;
}

.help-body h3 {
  margin: 24px 0 8px;
  color: var(--ink-strong);
  font-size: 16px;
  letter-spacing: -0.2px;
}

.help-body h3:first-child {
  margin-top: 0;
}

.help-body p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.help-body ul,
.help-body ol {
  margin: 0 0 12px;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.help-body li {
  margin: 5px 0;
}

.help-body li::marker {
  color: var(--primary);
  font-weight: 700;
}

.help-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  counter-reset: step;
  list-style: none;
  padding-left: 0 !important;
}

.help-steps li {
  position: relative;
  padding-left: 34px;
  counter-increment: step;
}

.help-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 750;
}

.help-callout {
  padding: 11px 13px;
  border-left: 3px solid #79b9c8;
  border-radius: 0 9px 9px 0;
  background: #f2fafc;
  color: #416574 !important;
  font-size: 12.5px !important;
}

.help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 4px;
}

.help-table {
  min-width: 680px;
  margin: 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.help-table th:first-child,
.help-table td:first-child {
  padding-left: 15px;
}

.help-table td {
  font-size: 12.5px;
}

.required-mark,
.optional-mark {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
}

.required-mark {
  color: #276c57;
  background: var(--success-soft);
}

.optional-mark {
  color: var(--ink-faint);
  background: #f1f5f7;
}

.code-block {
  margin: 8px 0 14px;
  padding: 15px 17px;
  overflow-x: auto;
  border: 1px solid #dbe9ee;
  border-radius: 11px;
  background: #f6fafc;
  color: #315261;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre;
}

.check-list {
  list-style: none;
  padding-left: 0 !important;
}

.check-list li {
  position: relative;
  padding-left: 22px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #76b7c5;
}

.format-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 10px 0 17px;
}

.format-cards > div {
  padding: 12px 13px;
  border: 1px solid #e1edf2;
  border-radius: 11px;
  background: #fbfdfe;
}

.format-cards strong {
  display: block;
  margin-bottom: 3px;
  color: var(--primary-strong);
  font-size: 12.5px;
}

.format-cards span {
  display: block;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.4;
}

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

.chart-help-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 16px;
}

.chart-help-list > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #e3eef2;
  border-radius: 10px;
  background: #fbfdfe;
}

.chart-help-list p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
}

.chart-help-list strong {
  color: var(--ink);
}

.chart-help-icon {
  width: 8px;
  height: 30px;
  flex: 0 0 auto;
  margin-top: 2px;
  border-radius: 4px;
  background: var(--primary);
}

.chart-help-icon--bar {
  background: var(--rain);
}

.chart-help-icon--pie {
  background: var(--teal);
}

.chart-help-icon--season {
  background: var(--amber);
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.benefit-grid > div {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid #e3eef2;
  border-radius: 11px;
  background: #fbfdfe;
}

.benefit-grid .icon {
  width: 19px;
  height: 19px;
  margin-bottom: 7px;
  color: var(--primary);
}

.benefit-grid strong {
  font-size: 12.5px;
}

.benefit-grid span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.4;
}


.about-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 8% 10%, rgba(39, 148, 172, 0.09), transparent 20rem),
    linear-gradient(120deg, #fff, #f9fdfe);
}

.about-photo-wrap {
  position: relative;
}

.about-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 6px solid #fff;
  border-radius: 28px;
  box-shadow: 0 16px 38px rgba(20, 53, 68, 0.16);
}

.photo-badge {
  position: absolute;
  bottom: -12px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 11px;
  transform: translateX(-50%);
  border: 1px solid #cfe4ea;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.photo-badge .icon {
  width: 13px;
  height: 13px;
}

.about-intro h2 {
  margin: 3px 0 2px;
  font-size: 33px;
  line-height: 1.1;
  letter-spacing: -1px;
}

.about-role {
  margin: 0 0 13px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 650;
}

.about-bio {
  max-width: 700px;
  margin: 0 0 17px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.contact-list a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 190px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.contact-list a:hover {
  border-color: #b9d6df;
  background: #fff;
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  border-radius: 9px;
  color: var(--primary);
  background: var(--primary-soft);
}

.contact-icon .icon {
  width: 15px;
  height: 15px;
}

.contact-list a > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.contact-list small {
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.contact-list strong {
  font-size: 12.5px;
  font-weight: 650;
}

.contact-hint {
  margin: 12px 0 0;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 20px;
  margin-top: 20px;
}

.about-card {
  padding: 26px;
}

.about-card h2 {
  margin: 0 0 9px;
  font-size: 22px;
  letter-spacing: -0.5px;
}

.about-card p {
  margin: 0 0 11px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}

.feature-tags span {
  padding: 4px 9px;
  border: 1px solid #d9e9ee;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--primary-strong);
  font-size: 10.5px;
  font-weight: 650;
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
}

.stack-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #e4edf1;
}

.stack-list li:last-child {
  border-bottom: 0;
}

.stack-list span {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
}

.stack-list small {
  color: var(--ink-faint);
  font-size: 10.5px;
  text-align: right;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--success-soft);
  color: #39705f;
  font-size: 11.5px;
}

.privacy-note .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.about-facts {
  margin-top: 20px;
  padding: 26px;
}

.about-facts h2 {
  margin: 0 0 18px;
  font-size: 22px;
  letter-spacing: -0.5px;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.facts-grid > div {
  padding: 14px;
  border: 1px solid #e3eef2;
  border-radius: 12px;
  background: var(--surface-soft);
  text-align: center;
}

.facts-grid strong {
  display: block;
  color: var(--primary);
  font-size: 28px;
  font-weight: 750;
  line-height: 1.1;
}

.facts-grid span {
  color: var(--ink-soft);
  font-size: 10.5px;
}



.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  padding: 22px 4px 28px;
  border-top: 1px solid rgba(201, 219, 227, 0.65);
  color: var(--ink-faint);
  font-size: 11px;
}



.dialog {
  width: min(640px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.dialog[open] {
  animation: dialog-in 0.2s ease both;
}

.dialog::backdrop {
  background: rgba(10, 33, 44, 0.5);
  backdrop-filter: blur(3px);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dialog-form {
  display: flex;
  flex-direction: column;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 16px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.7px;
}

.dialog-body {
  padding: 0 26px 6px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field-label {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.field-label em {
  color: var(--danger);
  font-style: normal;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.45;
}

.field input:focus,
.field textarea:focus {
  border-color: #83bfcd;
  outline: 0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(39, 148, 172, 0.12);
}

.field.is-invalid input,
.field.is-invalid textarea {
  border-color: #d88d8d;
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(195, 79, 79, 0.09);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a3b1ba;
}

.field input:invalid:not(:placeholder-shown) {
  border-color: #e1a8a8;
}

.field-hint {
  color: var(--ink-faint);
  font-size: 10.5px;
}

.field-hint--counter {
  text-align: right;
}

.dialog-body > .alert {
  margin-top: 14px;
}

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 18px 26px 24px;
}

.dialog--confirm {
  width: min(430px, calc(100vw - 28px));
}

.dialog--confirm .dialog-form {
  padding: 26px;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 15px;
  color: var(--danger);
  background: var(--danger-soft);
}

.confirm-icon .icon {
  width: 24px;
  height: 24px;
}

.confirm-copy h2 {
  margin: 0 0 5px;
  font-size: 23px;
  letter-spacing: -0.6px;
}

.confirm-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.dialog--confirm .dialog-footer {
  padding: 22px 0 0;
}



.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20, 53, 68, 0.18);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.4;
  pointer-events: auto;
  animation: toast-in 0.22s ease both;
}

.toast.is-leaving {
  animation: toast-out 0.2s ease both;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 8px;
}

.toast-icon .icon {
  width: 16px;
  height: 16px;
}

.toast--success .toast-icon {
  color: var(--success);
  background: var(--success-soft);
}

.toast--error .toast-icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.toast--info .toast-icon {
  color: var(--primary);
  background: var(--primary-soft);
}

.toast p {
  margin: 0;
  padding-top: 4px;
  flex: 1;
}

.toast-close {
  width: 24px;
  height: 24px;
  margin: 2px -4px 0 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-faint);
}

.toast-close:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.toast-close .icon {
  width: 14px;
  height: 14px;
}

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

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

.noscript {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 200;
  padding: 14px;
  border-radius: 12px;
  background: #fff3cd;
  color: #664d03;
  text-align: center;
}



@media (max-width: 1120px) {
  .date-pill {
    display: none;
  }

  .kpi-note {
    white-space: normal;
  }
}

@media (max-width: 980px) {
  .app-shell {
    padding: 20px 22px 0;
  }

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

  .format-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    align-items: start;
  }

  .format-card .card-icon {
    grid-row: 1 / 5;
    margin-bottom: 0;
  }

  .format-card .format-list,
  .format-card .format-note,
  .format-card .text-button,
  .format-card > p {
    grid-column: 2;
  }

  .format-card .format-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .format-card .text-button {
    padding-top: 12px;
  }

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

  .chart-card--wide {
    grid-column: auto;
  }

  .about-hero {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
  }

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

  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
  }

  .help-nav h2,
  .help-nav-note {
    grid-column: 1 / -1;
  }

  .help-nav-note {
    margin-top: 8px;
  }
}

@media (max-width: 780px) {
  .app-shell {
    padding: 16px 16px 0;
  }

  .site-header {
    gap: 12px;
    padding-bottom: 16px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .brand-mark svg {
    width: 38px;
    height: 38px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy span {
    display: none;
  }

  .records-pill {
    height: 38px;
    padding: 0 10px;
  }

  .records-pill .icon {
    display: none;
  }

  .header-meta > .button span {
    display: none;
  }

  .header-meta > .button {
    width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 11px;
  }

  .tabbar {
    top: 8px;
    padding: 5px;
  }

  .tab-button {
    min-height: 40px;
    padding: 0 11px;
    font-size: 12.5px;
  }

  .tab-button .icon {
    width: 17px;
    height: 17px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin: 28px 0 20px;
  }

  .page-heading h1 {
    font-size: 30px;
  }

  .heading-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .import-steps {
    grid-template-columns: 1fr;
  }

  .import-step {
    padding: 10px 12px;
  }

  .preview-card {
    padding: 20px;
  }

  .preview-toolbar {
    flex-direction: column;
    gap: 10px;
  }

  .preview-note {
    max-width: none;
    text-align: left;
  }

  .filter-result {
    margin-left: 0;
  }

  .table-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .about-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 24px;
    text-align: center;
  }

  .about-photo-wrap {
    width: min(230px, 70vw);
  }

  .about-intro .eyebrow {
    text-align: center;
  }

  .about-bio {
    margin-left: auto;
    margin-right: auto;
  }

  .contact-list {
    justify-content: center;
  }

  .contact-hint {
    text-align: center;
  }

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

  .format-cards {
    grid-template-columns: 1fr;
  }

  .format-cards--stats {
    grid-template-columns: 1fr;
  }

  .chart-help-list {
    grid-template-columns: 1fr;
  }

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

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

  .field--full {
    grid-column: auto;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    margin-top: 34px;
  }
}

@media (max-width: 620px) {
  .tabbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .tab-button {
    width: 100%;
    min-width: 0;
    padding: 0 6px;
  }

  .tab-button .icon {
    width: 16px;
    height: 16px;
  }

  .header-meta {
    gap: 6px;
  }

  .records-pill span {
    display: none;
  }

  .records-pill strong {
    font-size: 14px;
  }

  .tab-button {
    padding: 0 10px;
  }

  .tab-button span {
    font-size: 12px;
  }

  .page-heading h1 {
    font-size: 27px;
  }

  .page-lead {
    font-size: 14px;
  }

  .import-card,
  .format-card {
    padding: 18px;
  }

  .dropzone {
    min-height: 260px;
    padding: 26px 16px;
  }

  .format-card {
    display: block;
  }

  .format-card .card-icon {
    margin-bottom: 14px;
  }

  .format-card .format-list {
    display: flex;
  }

  .preview-summary {
    gap: 6px;
  }

  .stat-chip {
    font-size: 11px;
  }

  .preview-footer {
    flex-direction: column-reverse;
  }

  .preview-footer .button {
    width: 100%;
  }

  .kpi-grid {
    gap: 9px;
  }

  .kpi-card {
    min-height: 104px;
    padding: 14px;
    gap: 9px;
  }

  .kpi-icon {
    width: 36px;
    height: 36px;
  }

  .kpi-copy strong {
    font-size: 21px;
  }

  .kpi-copy strong.kpi-value-text {
    font-size: 14px;
  }

  .kpi-label {
    font-size: 9.5px;
  }

  .kpi-note {
    font-size: 9.5px;
  }

  .kpi-card--compact {
    min-height: 80px;
    padding: 12px;
  }

  .kpi-card--compact .kpi-copy strong {
    font-size: 18px;
  }

  .card-heading {
    padding: 20px 18px 14px;
  }

  .card-heading h2 {
    font-size: 20px;
  }

  .stats-card .data-table th:first-child,
  .stats-card .data-table td:first-child {
    padding-left: 18px;
  }

  .help-section summary {
    grid-template-columns: 36px minmax(0, 1fr) 16px;
    gap: 9px;
    padding: 15px;
  }

  .help-number {
    width: 36px;
    height: 36px;
  }

  .help-section summary strong {
    font-size: 15px;
  }

  .help-section summary small {
    font-size: 10.5px;
  }

  .help-body {
    padding: 18px;
  }

  .help-nav {
    grid-template-columns: 1fr;
  }

  .about-card,
  .about-facts {
    padding: 20px;
  }

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

  .facts-grid strong {
    font-size: 24px;
  }

  .chart-card {
    padding: 18px 16px 14px;
  }

  .chart-wrap {
    height: 250px;
  }

  .chart-wrap--line {
    height: 280px;
  }

  .chart-wrap--doughnut {
    height: 250px;
  }

  .dialog-head,
  .dialog-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .dialog-footer {
    padding: 16px 18px 20px;
  }

  .dialog-footer .button {
    flex: 1;
  }

  .dialog--confirm .dialog-form {
    padding: 20px;
  }

  .toast-container {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 430px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-mark svg {
    width: 34px;
    height: 34px;
  }

  .header-meta > .button {
    width: 37px;
    min-height: 37px;
  }

  .tab-button {
    padding: 0 9px;
    gap: 6px;
  }

  .tab-button .icon {
    width: 16px;
    height: 16px;
  }

  .tab-button span {
    font-size: 11.5px;
  }

  .page-heading h1 {
    font-size: 25px;
  }

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

  .kpi-card {
    min-height: 74px;
    align-items: center;
  }

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

  .kpi-card--compact {
    min-height: 78px;
  }

  .kpi-card--compact .kpi-note {
    display: none;
  }

  .export-group {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .export-label {
    width: 100%;
    padding: 3px 6px;
  }

  .heading-actions > .button {
    width: 100%;
  }

  .editor-toolbar {
    padding: 11px;
  }

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

  .select-box {
    flex: 1 1 45%;
  }

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

  .filter-result {
    width: 100%;
  }

  .about-intro h2 {
    font-size: 27px;
  }

  .contact-list {
    flex-direction: column;
  }

  .contact-list a {
    width: 100%;
  }

  .chart-head {
    flex-direction: column;
    gap: 6px;
  }

  .chart-tag {
    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;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .tabbar,
  .site-footer,
  .heading-actions,
  .editor-toolbar,
  .table-footer,
  .toast-container {
    display: none !important;
  }

  .app-shell {
    padding: 0;
    width: 100%;
  }

  .card,
  .kpi-card {
    box-shadow: none;
    break-inside: avoid;
  }

  .tab-panel {
    display: block !important;
  }
}
