:root {
  color-scheme: light;
  --background-100: #ffffff;
  --background-200: #fafafa;
  --gray-100: #f2f2f2;
  --gray-200: #ebebeb;
  --gray-300: #e6e6e6;
  --gray-400: #eaeaea;
  --gray-500: #c9c9c9;
  --gray-700: #8f8f8f;
  --gray-900: #4d4d4d;
  --gray-1000: #171717;
  --gray-alpha-100: #0000000d;
  --gray-alpha-200: #00000015;
  --gray-alpha-400: #00000014;
  --gray-alpha-500: #00000036;
  --blue-100: #f0f7ff;
  --blue-200: #e9f4ff;
  --blue-300: #dfefff;
  --blue-700: #006bff;
  --red-100: #ffeeef;
  --red-800: #ea001d;
  --green-100: #ecfdec;
  --green-800: #279141;
  --ink: var(--gray-1000);
  --muted: var(--gray-900);
  --line: var(--gray-alpha-200);
  --panel: var(--background-100);
  --panel-soft: var(--background-200);
  --accent: var(--blue-700);
  --shadow: 0 2px 2px rgba(0, 0, 0, 0.04);
  --shadow-popover: 0 1px 1px rgba(0, 0, 0, 0.02), 0 4px 8px -4px rgba(0, 0, 0, 0.04), 0 16px 24px -8px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background-100);
  color: var(--ink);
  font-family: "Geist Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 20px;
}

button,
input,
select {
  font: inherit;
}

button {
  appearance: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.icon-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--background-100), 0 0 0 4px var(--blue-700);
}

.login-view[hidden],
.shell[hidden],
.account-menu[hidden],
.app-toast[hidden] {
  display: none;
}

.login-view {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(360px, 42.14%) minmax(0, 1fr);
  background: #fbfaf8;
}

.login-art {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: #f5f0ea;
}

.login-art img {
  width: 100vw;
  max-width: none;
  height: 100svh;
  object-fit: fill;
  object-position: left top;
}

.login-form-panel {
  display: grid;
  min-width: 0;
  place-items: center;
  background: #fbfaf8;
  padding: 64px 8vw;
}

.login-form {
  display: grid;
  width: min(100%, 520px);
  gap: 28px;
}

.login-form h1 {
  font-family: "Songti SC", STSong, "Noto Serif CJK SC", Georgia, serif;
  font-size: 52px;
  font-weight: 500;
  line-height: 64px;
}

.login-form label {
  display: grid;
  gap: 8px;
}

.login-form label > span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.account-create-form label > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}

.login-form input {
  min-height: 64px;
  border-color: var(--gray-700);
  background: transparent;
  padding: 0 14px;
  font-size: 16px;
}

.login-submit,
.primary-button {
  min-height: 40px;
  border: 1px solid var(--gray-1000);
  border-radius: 6px;
  background: var(--gray-1000);
  color: var(--background-100);
  padding: 0 14px;
  font-weight: 500;
  cursor: pointer;
}

.login-submit {
  min-height: 64px;
  font-size: 16px;
}

.login-submit:hover,
.primary-button:hover {
  background: #2b2b2b;
}

.login-submit:disabled,
.primary-button:disabled {
  border-color: var(--gray-100);
  background: var(--gray-100);
  color: var(--gray-700);
  cursor: not-allowed;
}

.login-status {
  min-height: 20px;
  margin-top: -16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.login-status:empty {
  display: none;
}

.login-status[data-tone="error"],
.account-form-status[data-tone="error"],
.account-list-message[data-tone="error"] {
  color: var(--red-800);
}

.login-status[data-tone="pending"] {
  color: var(--muted);
}

.account-form-status[data-tone="success"] {
  color: var(--green-800);
}

.login-note {
  margin-top: -16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.shell {
  width: min(1400px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.app-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.account-button {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.account-button:hover,
.account-button[aria-expanded="true"] {
  color: var(--ink);
}

.database-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  cursor: pointer;
}

.database-button:hover {
  border-color: var(--gray-alpha-500);
  background: var(--background-200);
}

.database-button strong {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 9999px;
  background: var(--gray-1000);
  color: var(--background-100);
  padding: 0 6px;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 14px;
}

.account-button svg,
.database-button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.quote-database-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--background-100);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02), 0 8px 16px -4px rgba(0, 0, 0, 0.04), 0 24px 32px -8px rgba(0, 0, 0, 0.06);
}

.quote-database-dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
}

.quote-database-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--background-100);
  padding: 20px 24px;
}

.quote-database-head h2 {
  font-size: 20px;
  line-height: 26px;
}

.quote-database-head > div > p:last-child {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.quote-database-body {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.quote-database-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-200);
}

.quote-database-summary > div {
  min-width: 0;
  padding: 12px 16px;
  border-left: 1px solid var(--line);
}

.quote-database-summary > div:first-child {
  border-left: 0;
}

.quote-database-summary strong,
.quote-database-summary span {
  display: block;
}

.quote-database-summary strong {
  overflow: hidden;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-database-summary span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.quote-database-upload {
  display: flex;
  min-height: 88px;
  align-items: center;
  gap: 14px;
  border: 1px dashed var(--gray-500);
  border-radius: 6px;
  background: var(--background-200);
  padding: 16px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.quote-database-upload:hover,
.quote-database-upload.dragging,
.quote-database-upload:focus-within {
  border-color: var(--blue-700);
  background: var(--blue-100);
}

.quote-database-upload svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--blue-700);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.quote-database-upload span,
.quote-database-upload strong,
.quote-database-upload small {
  display: block;
}

.quote-database-upload strong {
  font-size: 13px;
  line-height: 18px;
}

.quote-database-upload small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}

.quote-database-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.quote-database-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}

.quote-database-status[data-tone="success"] { color: var(--green-800); }
.quote-database-status[data-tone="warning"] { color: #aa4d00; }
.quote-database-status[data-tone="error"] { color: var(--red-800); }

.quote-database-search {
  position: relative;
  display: block;
}

.quote-database-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--gray-700);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
  pointer-events: none;
}

.quote-database-search input {
  min-height: 40px;
  padding-left: 38px;
}

.quote-database-search:focus-within svg {
  stroke: var(--blue-700);
}

.quote-database-search-meta {
  min-height: 16px;
  margin-top: -10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}

.quote-database-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.quote-database-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  min-height: 68px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
}

.quote-database-item:first-child {
  border-top: 0;
}

.quote-database-file-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 6px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
}

.quote-database-item-copy,
.quote-database-item-copy strong,
.quote-database-item-copy small {
  display: block;
  min-width: 0;
}

.quote-database-item-copy strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-database-item-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 15px;
}

.quote-database-item > button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
  color: var(--muted);
  padding: 0 9px;
  font-size: 11px;
  cursor: pointer;
}

.quote-database-item > button:hover,
.quote-database-item > button.confirming {
  border-color: #ffd7d6;
  background: var(--red-100);
  color: var(--red-800);
}

.quote-database-search-group {
  border-top: 1px solid var(--line);
}

.quote-database-search-group:first-child {
  border-top: 0;
}

.quote-database-search-group > header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--background-200);
  padding: 10px 12px;
}

.quote-database-search-group > header strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-database-search-group > header small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  line-height: 15px;
  white-space: nowrap;
}

.quote-database-search-lines {
  display: grid;
}

.quote-database-search-record {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.quote-database-search-record:first-child {
  border-top: 0;
}

.quote-database-search-record time {
  color: var(--muted);
  padding: 10px 0 10px 12px;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 17px;
  white-space: nowrap;
}

.quote-database-search-record code {
  color: var(--gray-900);
  padding: 10px 12px 10px 8px;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 17px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.quote-database-empty {
  display: grid;
  min-height: 132px;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.quote-database-empty strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 18px;
}

.quote-database-empty p {
  margin-top: 4px;
  font-size: 11px;
  line-height: 16px;
}

.account-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--background-100);
  box-shadow: var(--shadow-popover);
}

.account-identity {
  display: grid;
  gap: 2px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.account-identity strong {
  overflow: hidden;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity span {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.account-menu > button {
  width: 100%;
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
  text-align: left;
  cursor: pointer;
}

.account-menu > button:hover {
  background: var(--background-200);
}

.account-menu > button:last-child {
  border-top: 1px solid var(--line);
}

.account-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--background-100);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02), 0 8px 16px -4px rgba(0, 0, 0, 0.04), 0 24px 32px -8px rgba(0, 0, 0, 0.06);
}

.account-dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
}

.account-dialog-head,
.account-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.account-dialog-head {
  position: sticky;
  z-index: 2;
  top: 0;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--background-100);
}

.account-dialog-head h2 {
  font-size: 20px;
  line-height: 26px;
}

.icon-button {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
  color: var(--ink);
  padding: 0;
  cursor: pointer;
}

.icon-button:hover {
  background: var(--background-200);
}

.account-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.account-create-form > div,
.account-create-form .account-form-status {
  grid-column: 1 / -1;
}

.account-create-form h3,
.account-list-section h3 {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}

.account-create-form p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.account-create-form label {
  display: grid;
  gap: 6px;
}

.account-create-form input {
  min-height: 40px;
}

.account-create-form .primary-button {
  grid-column: 1 / -1;
}

.account-form-status {
  min-height: 16px;
  margin: -8px 0 0;
  font-size: 12px;
  line-height: 16px;
}

.account-list-section {
  padding: 24px;
}

.account-list-head span {
  color: var(--muted);
  font-size: 12px;
}

.account-list {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.account-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.account-row:first-child {
  border-top: 0;
}

.account-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9999px;
  background: var(--gray-100);
  color: var(--ink);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
}

.account-row-identity {
  display: grid;
  min-width: 0;
}

.account-row-identity strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-row-identity span {
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}

.account-issued-credential {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.account-issued-secret {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.account-issued-secret code {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-issued-secret code.credential-unavailable {
  color: var(--gray-800);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.credential-toggle {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--blue-700);
  padding: 0;
  font-size: 11px;
  line-height: 18px;
  cursor: pointer;
}

.credential-toggle:hover {
  text-decoration: underline;
}

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

.account-reset-button,
.account-row-actions .danger-button {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
}

.account-reset-form {
  display: grid;
  grid-column: 2 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.account-reset-form label {
  display: grid;
  gap: 6px;
}

.account-reset-form label > span {
  color: var(--gray-900);
  font-size: 11px;
  line-height: 16px;
}

.account-reset-form input {
  min-height: 40px;
}

.account-reset-form > div {
  display: flex;
  gap: 8px;
}

.role-badge {
  color: var(--muted);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.danger-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
  color: var(--red-800);
  padding: 0 9px;
  font-size: 12px;
  cursor: pointer;
}

.danger-button:hover,
.danger-button[data-confirmed="true"] {
  border-color: var(--red-800);
  background: var(--red-800);
  color: var(--background-100);
}

.account-list-message {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.app-toast {
  position: fixed;
  z-index: 60;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--gray-1000);
  color: var(--background-100);
  padding: 10px 14px;
  box-shadow: var(--shadow-popover);
  font-size: 13px;
}

body[data-role="viewer"] .admin-only {
  display: none;
}


.topbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 620px);
  gap: 32px;
  align-items: end;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(142px, 1.2fr);
  gap: 8px;
  width: 100%;
}

.metric {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
}

.metric strong {
  display: block;
  overflow: hidden;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 22px;
  font-weight: 500;
  line-height: 28px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.daily-market-view .metric-date strong {
  overflow: visible;
  font-size: 18px;
  letter-spacing: -0.45px;
  text-overflow: clip;
}

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

.brand-field > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.brand-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
  color: var(--ink);
  padding: 0 13px;
  text-align: left;
  cursor: pointer;
}

.brand-card:hover {
  border-color: var(--gray-alpha-500);
  background: var(--background-200);
}

.brand-card.active {
  border-color: var(--blue-700);
  background: var(--blue-100);
  color: var(--blue-700);
}

.brand-card span {
  font-size: 15px;
  font-weight: 600;
}

.brand-card strong {
  display: inline-grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--background-100);
  color: var(--muted);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 400;
}

.movers-panel {
  display: block;
  flex: 0 0 auto;
  margin: 16px -16px 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--background-200);
}

.movers-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 16px 10px;
}

.movers-heading h2 {
  font-size: 13px;
  line-height: 18px;
}

.movers-heading p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.movers-heading > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 14px;
}

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

.mover-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
}

.mover-group.down {
  border-color: #ccefd2;
  background: color-mix(in srgb, var(--green-100), white 38%);
}

.mover-group.up {
  border-color: #ffd5d9;
  background: color-mix(in srgb, var(--red-100), white 34%);
}

.mover-group-head {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}

.mover-group-head > span {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
}

.mover-group.down .mover-group-head > span {
  background: var(--green-100);
  color: var(--green-800);
}

.mover-group.up .mover-group-head > span {
  background: var(--red-100);
  color: var(--red-800);
}

.mover-group-head strong {
  padding-left: 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 15px;
  white-space: nowrap;
}

.mover-group-head small {
  color: var(--muted);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 14px;
}

.mover-list {
  display: grid;
  padding: 3px 7px;
}

.mover-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 43px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 5px 1px;
  text-align: left;
  cursor: pointer;
}

.mover-list button:first-child {
  border-top: 0;
}

.mover-list button:hover b {
  color: var(--blue-700);
}

.mover-list span,
.mover-list b,
.mover-list small {
  display: block;
  min-width: 0;
}

.mover-list b {
  overflow: hidden;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mover-list small {
  color: var(--muted);
  font-size: 9px;
  line-height: 13px;
  white-space: nowrap;
}

.mover-list em {
  flex: 0 0 auto;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.mover-list em.down {
  color: var(--green-800);
}

.mover-list em.up {
  color: var(--red-800);
}

.mover-empty {
  min-height: 126px;
  color: var(--muted);
  padding: 12px 1px;
  font-size: 10px;
  line-height: 14px;
}

.comparison-panel {
  margin: 0;
  overflow: hidden;
}

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

.comparison-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.comparison-controls {
  display: flex;
  gap: 8px;
}

.comparison-controls label {
  display: grid;
  gap: 4px;
  min-width: 132px;
}

.comparison-controls label span {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.comparison-controls select {
  min-height: 36px;
}

.comparison-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.comparison-brand {
  min-width: 0;
  padding: 14px 16px 16px;
  border-left: 1px solid var(--line);
}

.comparison-brand:first-child {
  border-left: 0;
}

.comparison-brand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.comparison-brand-head strong {
  font-size: 13px;
  font-weight: 600;
}

.comparison-brand-head span {
  color: var(--muted);
  font-size: 11px;
}

.comparison-models {
  display: grid;
  gap: 6px;
}

.comparison-models button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
  color: var(--ink);
  padding: 6px 9px;
  text-align: left;
  cursor: pointer;
}

.comparison-models button:hover {
  border-color: var(--gray-alpha-500);
  background: var(--background-200);
}

.comparison-models button span,
.comparison-models b,
.comparison-models small {
  display: block;
  min-width: 0;
}

.comparison-models b {
  overflow: hidden;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-models small,
.comparison-models p,
.comparison-empty {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.comparison-models button > strong {
  flex: 0 0 auto;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  font-weight: 500;
}

.comparison-empty {
  grid-column: 1 / -1;
  padding: 20px 16px;
}

.workspace {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 24px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.controls {
  display: flex;
  flex-direction: column;
  height: 0;
  min-height: 100%;
  padding: 16px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
  color: var(--ink);
  padding: 0 12px;
}

input:hover,
select:hover {
  border-color: var(--gray-alpha-500);
}

input:focus,
select:focus {
  border-color: var(--blue-700);
}

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

.range-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.range-tabs button {
  min-height: 38px;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--background-100);
  color: var(--muted);
  padding: 0 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.range-tabs button:first-child {
  border-left: 0;
}

.range-tabs button:hover {
  background: var(--background-200);
  color: var(--ink);
}

.range-tabs button.active {
  background: var(--gray-1000);
  color: var(--background-100);
}

.brand-tab,
.type-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
  color: var(--ink);
  padding: 0 10px;
  cursor: pointer;
}

.brand-tab:hover,
.type-tab:hover,
.model-button:hover,
#clearSelection:hover,
#exportCsv:hover:not(:disabled) {
  border-color: var(--gray-alpha-500);
  background: var(--background-200);
}

.brand-tab.active,
.type-tab.active {
  border-color: var(--blue-700);
  background: var(--blue-100);
  color: var(--blue-700);
}

.brand-tab span,
.type-tab span {
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}

.brand-tab strong,
.type-tab strong {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--background-100);
  color: var(--muted);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 400;
}

.toggles {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  color: var(--gray-900);
  font-size: 13px;
  line-height: 18px;
}

.toggles label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggles input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--blue-700);
}

.model-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding-right: 4px;
}

.model-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
  color: var(--ink);
  overflow: hidden;
}

.model-row.active {
  border-color: color-mix(in srgb, var(--series-color), #171717 10%);
  background: color-mix(in srgb, var(--series-color), white 92%);
}

.model-button {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
}

.model-copy {
  min-width: 0;
}

.favorite-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--gray-700);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.favorite-button:hover,
.favorite-button.active {
  background: var(--background-200);
  color: var(--blue-700);
}

.swatch {
  width: 10px;
  height: 28px;
  border-radius: 9999px;
  background: var(--series-color);
}

.model-name {
  display: block;
  overflow: hidden;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.chart-area {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.chart-panel {
  padding: 16px;
}

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

.chart-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

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

#clearSelection,
#exportCsv {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
  color: var(--ink);
  padding: 0 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

#exportCsv:disabled {
  color: var(--gray-700);
  cursor: not-allowed;
  opacity: 0.6;
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 360px;
  aspect-ratio: 16 / 8.2;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.tooltip {
  position: absolute;
  z-index: 4;
  max-width: 260px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-popover);
  color: var(--ink);
  font-size: 12px;
  line-height: 16px;
  pointer-events: none;
}

.table-panel {
  overflow: hidden;
}

.table-panel .chart-head,
.detail-section .chart-head {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.detail-section {
  margin: 12px -16px -16px;
  border-top: 1px solid var(--line);
}

.detail-section .chart-head h2 {
  font-size: 13px;
  line-height: 18px;
}

.detail-section .chart-head p {
  margin-top: 1px;
  font-size: 11px;
  line-height: 15px;
}

.model-detail {
  display: grid;
  gap: 12px;
  padding: 10px 12px 12px;
}

.empty-detail {
  color: var(--muted);
  padding: 4px 0;
  font-size: 12px;
  line-height: 16px;
}

.model-detail-group {
  display: grid;
  gap: 8px;
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-title h3 {
  margin: 0;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
}

.detail-title p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.date-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
}

.date-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  min-height: 68px;
  border: 1px solid color-mix(in srgb, var(--series-color), white 74%);
  border-radius: 6px;
  background: color-mix(in srgb, var(--series-color), white 96%);
  padding: 8px;
}

.date-card span {
  grid-column: 1;
  grid-row: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.date-card strong {
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--ink);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 17px;
  font-weight: 500;
  line-height: 22px;
}

.date-card em {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: max-content;
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 1px 6px;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  line-height: 15px;
}

.date-card em.up {
  border-color: #ffd7d6;
  background: var(--red-100);
  color: var(--red-800);
}

.date-card em.down {
  border-color: #b9f5bc;
  background: var(--green-100);
  color: var(--green-800);
}

.date-card em.flat {
  border-color: var(--line);
  background: var(--gray-100);
  color: var(--muted);
}

.date-card small {
  grid-column: 1 / -1;
  grid-row: 3;
  color: var(--muted);
  font-size: 10px;
  line-height: 14px;
}

.table-wrap {
  height: min(760px, calc(100vh - 180px));
  overflow: auto;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-tools input {
  width: min(300px, 30vw);
  min-height: 34px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 18px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--background-200);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.table-sort:hover,
.table-sort.active {
  color: var(--ink);
}

.table-sort span {
  width: 12px;
  color: var(--gray-700);
  text-align: center;
}

td:nth-child(4),
td:nth-child(5) {
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
}

td:nth-child(6) {
  color: var(--muted);
  white-space: normal;
}

.page-tabs {
  display: flex;
  gap: 4px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--background-200);
  padding: 4px;
}

.page-tabs button {
  position: relative;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
}

.page-tabs button:hover:not(.active) {
  border-color: var(--gray-300);
  background: var(--background-100);
  color: var(--ink);
}

.page-tabs button.active {
  border-color: var(--gray-1000);
  background: var(--gray-1000);
  color: var(--background-100);
  font-weight: 600;
}

.page-tabs button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px var(--background-100), 0 0 0 4px var(--blue-700);
}

.page-view[hidden] {
  display: none;
}

.best-topbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(420px, 600px);
  gap: 32px;
  align-items: end;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.best-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.best-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 72px;
  align-content: center;
  border: 1px solid var(--line);
  border-left: 0;
  background: var(--background-100);
  padding: 12px 16px;
}

.best-summary > div:first-child {
  border-left: 1px solid var(--line);
  border-radius: 6px 0 0 6px;
}

.best-summary > div:last-child {
  border-radius: 0 6px 6px 0;
}

.best-summary strong {
  overflow: hidden;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 20px;
  font-weight: 500;
  line-height: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.best-summary > div:nth-child(4) strong {
  font-size: 14px;
  line-height: 20px;
}

.best-summary span {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.best-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 24px;
}

.best-controls {
  overflow: hidden;
}

.best-control-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.best-control-section:first-child {
  border-top: 0;
}

.best-control-section h2,
.best-section-head h2 {
  font-size: 13px;
  line-height: 18px;
}

.best-range-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-200);
  padding: 4px;
}

.best-range-tabs button {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 6px;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.best-range-tabs button:hover:not(.active) {
  background: var(--background-100);
  color: var(--ink);
}

.best-range-tabs button.active {
  border-color: var(--gray-1000);
  background: var(--gray-1000);
  color: var(--background-100);
}

.best-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quiet-button,
.secondary-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
  color: var(--ink);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  cursor: pointer;
}

.quiet-button {
  min-height: 28px;
  border-color: transparent;
  color: var(--muted);
  padding: 0 4px;
}

.quiet-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled) {
  border-color: var(--gray-alpha-500);
  background: var(--background-200);
}

.quiet-button:disabled,
.secondary-button:disabled {
  background: var(--gray-100);
  color: var(--gray-700);
  cursor: not-allowed;
}

.best-upload {
  display: grid;
  gap: 3px;
  min-height: 92px;
  place-content: center;
  border: 1px dashed var(--gray-500);
  border-radius: 6px;
  background: var(--background-200);
  padding: 16px;
  text-align: center;
  cursor: pointer;
}

.best-upload:hover,
.best-upload.dragging,
.best-upload:has(input:focus-visible) {
  border-color: var(--blue-700);
  background: var(--blue-100);
}

.best-upload strong {
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.best-upload span,
.best-file-status,
.best-basis-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.best-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.best-file-status {
  overflow-wrap: anywhere;
}

.best-upload-history {
  display: grid;
  max-height: 176px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
}

.best-upload-history:empty {
  display: none;
}

.best-upload-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px 8px;
  border-top: 1px solid var(--line);
}

.best-upload-item:first-child {
  border-top: 0;
}

.best-upload-item > span,
.best-upload-item strong,
.best-upload-item small {
  display: block;
  min-width: 0;
}

.best-upload-item strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.best-upload-item small {
  margin-top: 2px;
  color: var(--muted);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  line-height: 13px;
}

.best-upload-item button {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--gray-700);
  padding: 0;
  font-size: 16px;
  line-height: 16px;
  cursor: pointer;
}

.best-upload-item button:hover {
  background: var(--red-100);
  color: var(--red-800);
}

.best-file-status[data-tone="success"] {
  color: var(--green-800);
}

.best-file-status[data-tone="warning"] {
  color: #aa4d00;
}

.best-file-status[data-tone="error"] {
  color: var(--red-800);
}

.best-number-field,
.best-filters > label:not(.best-check) {
  display: grid;
  gap: 5px;
}

.best-number-field > span,
.best-filters > label > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.best-number-field input,
.best-filters input,
.best-filters select {
  min-height: 36px;
}

.number-with-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
}

.number-with-suffix input {
  border-radius: 6px 0 0 6px;
}

.number-with-suffix > span {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: var(--background-200);
  color: var(--muted);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.best-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.best-check input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.best-results {
  min-width: 0;
  overflow: hidden;
}

.best-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.best-results-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.best-table-wrap {
  position: relative;
  min-height: 420px;
  max-height: calc(100vh - 220px);
  overflow: auto;
}

@media (min-width: 961px) {
  .best-layout {
    align-items: stretch;
  }

  .best-controls {
    overflow: hidden;
  }

  .best-results {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 0;
    min-height: 100%;
  }

  .best-table-wrap {
    height: 100%;
    min-height: 0;
    max-height: none;
  }
}

.best-table {
  min-width: 930px;
  table-layout: fixed;
}

.best-table th:nth-child(1) { width: 145px; }
.best-table th:nth-child(2) { width: 170px; }
.best-table th:nth-child(3),
.best-table th:nth-child(4),
.best-table th:nth-child(5) { width: 95px; }
.best-table th:nth-child(6) { width: 105px; }
.best-table th:nth-child(7) { width: 225px; }

.best-table td {
  height: 62px;
  color: var(--ink);
  white-space: normal;
}

.best-table td:nth-child(1),
.best-table td:nth-child(3),
.best-table td:nth-child(4),
.best-table td:nth-child(5),
.best-table td:nth-child(6) {
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
}

.best-model,
.best-parameter strong,
.best-quote-cell strong,
.best-normalized strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.best-quote-cell small,
.best-parameter small,
.best-normalized small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: "Geist Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 10px;
  line-height: 14px;
}

.best-quote-cell.winner {
  background: var(--green-100);
  box-shadow: inset 2px 0 0 var(--green-800);
}

.best-quote-cell {
  padding: 0;
}

.best-quote-cell > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 62px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 9px 8px 9px 12px;
  text-align: left;
  cursor: pointer;
}

.best-quote-cell > button:hover {
  background: var(--gray-alpha-100);
}

.best-quote-cell > button > span:first-child {
  min-width: 0;
}

.best-quote-chevron {
  color: var(--gray-700);
  font-family: "Geist Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 16px;
  text-align: center;
}

.best-quote-cell.empty {
  padding: 10px 12px;
  color: var(--gray-700);
}

.best-original-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
}

.best-original-copy {
  min-width: 0;
}

.best-original-copy strong {
  display: -webkit-box;
  overflow: hidden;
  max-height: 30px;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  line-height: 15px;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.best-original-copy small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.best-original em {
  justify-self: end;
  font-size: 9px;
  font-style: normal;
  line-height: 13px;
  text-align: right;
}

.best-savings {
  display: grid;
  min-width: 76px;
  border: 1px solid #b9f5bc;
  border-radius: 6px;
  background: var(--green-100);
  padding: 6px 7px;
  color: var(--green-800);
}

.best-savings span {
  white-space: nowrap;
}

.best-savings b {
  margin-top: 1px;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
}

.best-single {
  max-width: 48px;
  color: var(--muted);
  font-weight: 500;
}

.best-table tr.expanded > td {
  border-bottom-color: transparent;
}

.best-detail-row > td {
  height: auto;
  border-bottom: 1px solid var(--line);
  background: var(--background-200);
  padding: 0;
  font-family: "Geist Sans", Inter, ui-sans-serif, system-ui, sans-serif;
}

.best-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.best-detail-head strong {
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
}

.best-detail-head span {
  color: var(--muted);
  font-size: 10px;
  line-height: 14px;
}

.best-detail-table {
  display: grid;
  padding: 0 12px 10px;
}

.best-detail-record {
  display: grid;
  grid-template-columns: 90px 105px 105px minmax(0, 1fr);
  align-items: center;
  min-height: 48px;
  border-top: 1px solid var(--line);
}

.best-detail-record:first-child {
  border-top: 0;
}

.best-detail-record > * {
  min-width: 0;
  padding: 7px 8px;
}

.best-detail-labels {
  min-height: 30px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  line-height: 13px;
}

.best-detail-record > strong {
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
}

.best-detail-record > span:first-child {
  display: flex;
  align-items: center;
  gap: 5px;
}

.best-detail-record > span:first-child b {
  font-size: 10px;
  font-weight: 500;
  line-height: 14px;
  white-space: nowrap;
}

.best-detail-record > span:first-child em {
  border: 1px solid #b9f5bc;
  border-radius: 9999px;
  background: var(--green-100);
  color: var(--green-800);
  padding: 0 5px;
  font-size: 8px;
  font-style: normal;
  font-weight: 600;
  line-height: 14px;
}

.best-detail-record.cheapest {
  background: color-mix(in srgb, var(--green-100), white 48%);
}

.best-detail-source b,
.best-detail-source small {
  display: block;
  min-width: 0;
}

.best-detail-source b {
  overflow: hidden;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.best-detail-source small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 13px;
}

.best-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--background-200);
  padding: 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 14px;
  white-space: nowrap;
}

.best-badge.taxed,
.best-badge.untaxed,
.best-badge.usd {
  border-color: #b9f5bc;
  background: var(--green-100);
  color: var(--green-800);
}

.best-empty {
  display: grid;
  min-height: 350px;
  place-content: center;
  color: var(--muted);
  padding: 32px;
  text-align: center;
}

.best-empty[hidden] {
  display: none;
}

.best-empty strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.best-empty p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 16px;
}

.daily-market-view {
  display: grid;
  gap: 16px;
}

.daily-market-view .panel {
  border-color: var(--gray-alpha-200);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px -20px rgba(0, 0, 0, 0.28);
}

.daily-source-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(220px, 300px) minmax(260px, 1fr);
  align-items: stretch;
  overflow: hidden;
}

.daily-source-copy,
.daily-source-meta {
  padding: 20px 24px;
}

.daily-source-copy h2,
.daily-panel-head h2,
.daily-panel-head h3,
.daily-security-head h2 {
  margin: 0;
}

.daily-source-copy h2 {
  margin-top: 2px;
  font-size: 20px;
  line-height: 26px;
}

.daily-source-copy > p:last-child {
  max-width: 640px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.daily-upload {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 112px;
  border: 0;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--background-200);
  cursor: pointer;
  text-align: center;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.daily-upload:hover,
.daily-upload.dragging,
.daily-upload:focus-within {
  background: var(--blue-100);
  box-shadow: inset 0 0 0 1px var(--blue-700);
}

.daily-upload strong {
  font-size: 14px;
  line-height: 20px;
}

.daily-upload span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.daily-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.daily-source-meta {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.daily-upload-history {
  display: flex;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px;
}

.daily-upload-item {
  display: flex;
  flex: 0 0 min(240px, 72vw);
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
  padding: 7px 8px 7px 10px;
}

.daily-upload-item > span {
  display: grid;
  min-width: 0;
}

.daily-upload-item strong,
.daily-upload-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-upload-item strong {
  font-size: 12px;
  line-height: 16px;
}

.daily-upload-item small,
.daily-file-status {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.daily-upload-item button {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--gray-700);
  cursor: pointer;
}

.daily-upload-item button:hover {
  background: var(--red-100);
  color: var(--red-800);
}

.daily-upload-item button.confirming {
  width: auto;
  min-width: 44px;
  padding: 0 8px;
  background: var(--red-100);
  color: var(--red-800);
  font-size: 11px;
  font-weight: 600;
}

.daily-file-status[data-tone="success"] { color: var(--green-800); }
.daily-file-status[data-tone="warning"] { color: #aa4d00; }
.daily-file-status[data-tone="error"] { color: var(--red-800); }

.daily-toolbar {
  display: grid;
  grid-template-columns:
    minmax(260px, 1.35fr)
    minmax(140px, 0.7fr)
    minmax(140px, 0.7fr)
    minmax(300px, 1.15fr)
    minmax(140px, 0.55fr);
  align-items: end;
  justify-content: stretch;
  gap: 12px;
  padding: 16px;
}

.daily-database-status {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  overflow-wrap: anywhere;
}

.daily-database-status[data-tone="success"] { color: var(--green-800); }
.daily-database-status[data-tone="warning"] { color: #aa4d00; }
.daily-database-status[data-tone="error"] { color: var(--red-800); }

.daily-toolbar > label,
.daily-range-control {
  min-width: 0;
}

.daily-toolbar label,
.daily-range-control {
  display: grid;
  gap: 6px;
}

.daily-toolbar label > span,
.daily-range-control > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.daily-toolbar input[type="search"],
.daily-toolbar select {
  min-height: 40px;
}

.daily-check {
  display: flex !important;
  min-height: 40px;
  align-items: center;
  gap: 8px !important;
  color: var(--gray-900);
  white-space: nowrap;
}

.daily-check input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--blue-700);
}

.daily-market-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.78fr) minmax(0, 1.65fr);
  align-items: stretch;
  gap: 16px;
  height: clamp(720px, calc(100vh - 32px), 900px);
}

.daily-watchlist,
.daily-security {
  position: relative;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.daily-watchlist {
  display: flex;
  flex-direction: column;
}

#dailySecurityContent:not([hidden]) {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.daily-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.daily-panel-head h2 {
  font-size: 16px;
  line-height: 24px;
}

.daily-panel-head h3 {
  font-size: 14px;
  line-height: 20px;
}

.daily-panel-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.daily-live-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green-800);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 16px;
}

.daily-live-mark i {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--green-800);
}

.daily-list-labels,
.daily-market-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 132px minmax(98px, 0.75fr);
  align-items: center;
  gap: 12px;
}

.daily-list-labels {
  min-height: 34px;
  border-bottom: 1px solid var(--line);
  background: var(--background-200);
  color: var(--muted);
  padding: 0 14px;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
}

.daily-list-labels span:last-child {
  text-align: right;
}

.daily-model-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.daily-market-row {
  width: 100%;
  min-height: 88px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--background-100);
  color: var(--ink);
  padding: 13px 14px;
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.daily-market-row:hover {
  background: linear-gradient(90deg, var(--background-200), var(--background-100));
}

.daily-market-row.active {
  box-shadow: inset 3px 0 var(--blue-700);
  background: var(--blue-100);
}

.daily-market-row:active {
  background: var(--blue-200);
}

.daily-market-identity,
.daily-market-quote {
  display: grid;
  min-width: 0;
}

.daily-market-identity strong,
.daily-market-quote strong {
  overflow: hidden;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-market-identity small,
.daily-market-quote small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-market-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.daily-market-meta small {
  min-width: 0;
  margin-top: 0;
}

.drive-interface-badge {
  display: inline-flex;
  min-width: 38px;
  min-height: 20px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 1px 7px;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.2px;
}

.drive-interface-badge.interface-sas {
  border-color: var(--blue-300);
  background: var(--blue-100);
  color: #0059ec;
}

.drive-interface-badge.interface-sata {
  border-color: #b9f5bc;
  background: var(--green-100);
  color: var(--green-800);
}

.drive-interface-badge.interface-usb {
  border-color: #d8b4fe;
  background: #faf5ff;
  color: #7e22ce;
}

.drive-interface-badge.interface-unknown {
  border-color: var(--line);
  background: var(--background-200);
  color: var(--gray-700);
}

.daily-market-quote {
  justify-items: end;
  text-align: right;
}

.daily-market-quote strong {
  font-size: 17px;
  line-height: 22px;
}

.daily-market-quote em,
.daily-security-price em {
  margin-top: 2px;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  line-height: 15px;
}

.daily-market-view .up { color: var(--red-800) !important; }
.daily-market-view .down { color: var(--green-800) !important; }
.daily-market-view .flat { color: var(--muted) !important; }

.daily-sparkline {
  display: block;
  height: 48px;
  border-radius: 6px;
  padding: 2px;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.daily-market-row.active .daily-sparkline {
  background: transparent;
  box-shadow: none;
}

.daily-sparkline svg {
  display: block;
  width: 100%;
  height: 100%;
}

.daily-spark-path {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.daily-spark-axis,
.daily-spark-grid {
  fill: none;
  stroke: #a8a8a8;
  stroke-width: 0.9;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
}

.daily-spark-grid {
  stroke: var(--gray-300);
  stroke-dasharray: 2 4;
}

.daily-spark-last {
  fill: var(--background-100);
  stroke: currentColor;
  stroke-width: 1.75;
  vector-effect: non-scaling-stroke;
}

.daily-list-empty,
.daily-security-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 260px;
  color: var(--muted);
  padding: 32px;
  text-align: center;
}

.daily-security-empty[hidden],
#dailySecurityContent[hidden] {
  display: none;
}

.daily-list-empty strong,
.daily-security-empty strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
}

.daily-list-empty span,
.daily-security-empty p {
  max-width: 360px;
  font-size: 12px;
  line-height: 18px;
}

.daily-security {
  min-height: 540px;
}

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

.daily-security-head h2 {
  margin-top: 4px;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
  letter-spacing: -1px;
}

.daily-security-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.daily-security-title-line h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.daily-security-title-line .drive-interface-badge {
  min-height: 24px;
  padding-inline: 9px;
  font-size: 11px;
}

.daily-security-price {
  display: grid;
  justify-items: end;
  text-align: right;
}

.daily-security-price strong {
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
  letter-spacing: -1px;
}

.daily-security-price span {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.daily-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.daily-detail-stats .metric {
  min-height: 66px;
  border-left: 1px solid var(--line);
  padding: 12px 16px;
}

.daily-detail-stats .metric:first-child {
  border-left: 0;
}

.daily-detail-stats .metric strong {
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 16px;
  line-height: 22px;
}

.daily-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 340px;
  aspect-ratio: 16 / 7.4;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--background-100);
}

.daily-chart-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.daily-source-table-section {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  margin-top: auto;
  min-height: 0;
  min-width: 0;
}

.daily-source-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.daily-source-table {
  table-layout: fixed;
}

.daily-source-table th:nth-child(1),
.daily-source-table td:nth-child(1) { width: 104px; }
.daily-source-table th:nth-child(2),
.daily-source-table td:nth-child(2) { width: 90px; }

.daily-source-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-source-table td:nth-child(2) {
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
}

.daily-source-record {
  display: grid;
  min-width: 0;
  gap: 4px;
  white-space: normal !important;
}

.daily-source-record > strong,
.daily-source-record > code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-source-record > strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
}

.daily-source-record > code {
  border-left: 2px solid var(--blue-300);
  color: var(--ink);
  padding-left: 8px;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 18px;
}

.daily-insights-layout {
  display: grid;
  grid-template-columns: minmax(380px, 0.78fr) minmax(0, 1.65fr);
  align-items: stretch;
  gap: 16px;
}

.daily-movers-panel,
.daily-insights-layout .comparison-panel {
  height: 100%;
}

.daily-movers-panel {
  overflow: hidden;
}

.daily-insights-loading {
  color: var(--muted);
  padding: 24px;
  font-size: 13px;
}

.daily-movers-head {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--background-200);
}

.daily-movers-head .eyebrow {
  margin-bottom: 2px;
}

.daily-movers-head h2 {
  font-size: 16px;
  line-height: 24px;
}

.daily-movers-head div > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.daily-movers-head > strong {
  flex: 0 0 auto;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 22px;
  font-weight: 500;
  line-height: 28px;
}

.daily-movers-head > strong small {
  color: var(--muted);
  font-family: "Geist", Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
}

.daily-movers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.daily-mover-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background-100);
}

.daily-mover-group.tone-down {
  border-color: #ccefd2;
  background: var(--green-100);
}

.daily-mover-group.tone-up {
  border-color: #ffd5d9;
  background: var(--red-100);
}

.daily-mover-group-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.daily-mover-group-head > span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--background-100);
}

.daily-mover-group-head svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.daily-mover-group.tone-down .daily-mover-group-head > span { color: var(--green-800); }
.daily-mover-group.tone-up .daily-mover-group-head > span { color: var(--red-800); }

.daily-mover-group-head strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-mover-group-head small {
  color: var(--muted);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.daily-mover-list {
  display: grid;
  padding: 4px 10px 8px;
}

.daily-mover-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 54px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 7px 2px;
  cursor: pointer;
  text-align: left;
  transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}

.daily-mover-list button:first-child {
  border-top: 0;
}

.daily-mover-list button:active {
  transform: scale(0.98);
}

.daily-mover-list button span,
.daily-mover-list b,
.daily-mover-list small {
  display: block;
  min-width: 0;
}

.daily-mover-list b {
  overflow: hidden;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-mover-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 14px;
  white-space: nowrap;
}

.daily-mover-list em {
  display: grid;
  justify-items: end;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

.daily-mover-list em span {
  color: var(--muted);
  font-family: "Geist Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 9px;
  font-weight: 400;
  line-height: 12px;
}

.daily-mover-list p {
  min-height: 162px;
  color: var(--muted);
  padding: 16px 2px;
  font-size: 11px;
  line-height: 16px;
}

@media (max-width: 1100px) {
  .daily-source-panel {
    grid-template-columns: 1fr 260px;
  }

  .daily-source-meta {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .daily-toolbar {
    grid-template-areas:
      "search brand type"
      "range range changed"
      "status status status";
    grid-template-columns: minmax(220px, 1.5fr) minmax(140px, 0.75fr) minmax(140px, 0.75fr);
    gap: 12px;
  }

  .daily-search { grid-area: search; }
  .daily-brand-filter { grid-area: brand; }
  .daily-type-filter { grid-area: type; }
  .daily-range-control { grid-area: range; }
  .daily-check { grid-area: changed; }
  .daily-database-status { grid-area: status; }

  .daily-market-layout {
    grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  }

  .daily-list-labels,
  .daily-market-row {
    grid-template-columns: minmax(0, 1fr) 92px;
  }

  .daily-sparkline {
    display: none;
  }
}

@media (max-width: 960px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .best-topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .best-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .best-control-section {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .best-control-section:first-child {
    border-left: 0;
  }

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

  .comparison-results {
    grid-template-columns: 1fr;
  }

  .comparison-brand {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .comparison-brand:first-child {
    border-top: 0;
  }

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

  .daily-market-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .daily-watchlist {
    height: auto;
    max-height: 520px;
  }

  .daily-security,
  #dailySecurityContent:not([hidden]) {
    height: auto;
  }

  .daily-model-list {
    flex: 0 1 auto;
    max-height: 420px;
  }

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

  .daily-source-table-wrap {
    flex: 0 1 auto;
    max-height: 330px;
  }

  .daily-list-labels,
  .daily-market-row {
    grid-template-columns: minmax(0, 1.2fr) 116px minmax(94px, 0.75fr);
  }

  .daily-sparkline {
    display: block;
  }

  .chart-wrap {
    min-height: 300px;
  }

  .controls {
    display: block;
    height: auto;
    min-height: 0;
  }

  .model-list {
    min-height: 0;
    max-height: 260px;
    overflow: auto;
  }

  .table-wrap {
    height: 430px;
  }
}

@media (max-width: 560px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .login-art {
    min-height: 260px;
    height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .login-art img {
    width: 238%;
    max-width: none;
    height: auto;
    object-fit: initial;
    object-position: initial;
    transform: translateY(-48%);
  }

  .login-form-panel {
    place-items: start center;
    padding: 40px 24px 56px;
  }

  .login-form {
    gap: 24px;
  }

  .login-form h1 {
    font-size: 40px;
    line-height: 48px;
  }

  .login-form input,
  .login-submit {
    min-height: 52px;
  }

  .shell {
    width: min(100vw - 24px, 1400px);
    padding: 16px 0 32px;
  }

  .topbar {
    gap: 20px;
    padding-bottom: 20px;
  }

  .topbar h1 {
    font-size: clamp(34px, 11vw, 44px);
    line-height: 1.04;
    letter-spacing: -1.8px;
  }

  .daily-source-panel {
    grid-template-columns: 1fr;
  }

  .daily-source-copy,
  .daily-source-meta {
    padding: 16px;
  }

  .daily-upload {
    min-height: 88px;
    border: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .daily-source-meta {
    grid-column: auto;
  }

  .daily-toolbar {
    grid-template-areas:
      "search search"
      "brand type"
      "range range"
      "changed changed"
      "status status";
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px;
  }

  .daily-search { grid-area: search; }
  .daily-brand-filter { grid-area: brand; }
  .daily-type-filter { grid-area: type; }
  .daily-range-control { grid-area: range; }
  .daily-check { grid-area: changed; }
  .daily-database-status { grid-area: status; }

  .daily-check {
    align-self: end;
    justify-self: start;
  }

  .daily-list-labels,
  .daily-market-row {
    grid-template-columns: minmax(0, 1fr) 94px;
  }

  .daily-sparkline {
    display: none;
  }

  .daily-movers-grid {
    grid-template-columns: 1fr;
  }

  .daily-security-head {
    display: grid;
    gap: 16px;
    padding: 16px;
  }

  .daily-security-head h2,
  .daily-security-price strong {
    font-size: 24px;
    line-height: 30px;
    letter-spacing: -0.7px;
  }

  .daily-security-title-line {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .daily-security-price {
    justify-items: start;
    text-align: left;
  }

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

  .daily-detail-stats .metric:nth-child(3) {
    border-left: 0;
  }

  .daily-detail-stats .metric:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .daily-chart-wrap {
    min-height: 240px;
    aspect-ratio: auto;
  }

  .daily-panel-head {
    align-items: start;
  }

  .daily-source-table-wrap {
    max-height: 420px;
    padding: 8px;
    background: var(--background-200);
  }

  .daily-source-table,
  .daily-source-table tbody,
  .daily-source-table tr,
  .daily-source-table td {
    display: block;
    width: 100% !important;
  }

  .daily-source-table thead {
    display: none;
  }

  .daily-source-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--background-100);
    padding: 12px;
    box-shadow: var(--shadow);
  }

  .daily-source-table td {
    border: 0;
    padding: 0;
  }

  .daily-source-table td:nth-child(1) {
    grid-column: 1;
    color: var(--muted);
    font-size: 11px;
  }

  .daily-source-table td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }

  .daily-source-record {
    grid-column: 1 / -1;
    margin-top: 6px;
    border-top: 1px solid var(--line);
    padding-top: 9px !important;
  }

  .daily-source-record > code {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .page-tabs {
    gap: 4px;
    overflow-x: auto;
  }

  .page-tabs button {
    flex: 0 0 auto;
  }

  .app-navigation {
    gap: 12px;
  }

  .nav-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .database-button {
    padding: 0 7px;
  }

  .database-button > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .database-button svg {
    width: 20px;
    height: 20px;
  }

  .account-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .account-button svg {
    width: 20px;
    height: 20px;
  }

  .account-menu {
    width: min(280px, calc(100vw - 24px));
  }

  .quote-database-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .quote-database-head,
  .quote-database-body {
    padding: 16px;
  }

  .quote-database-head {
    gap: 12px;
  }

  .quote-database-head > div > p:last-child {
    max-width: 280px;
  }

  .quote-database-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .quote-database-item > button {
    grid-column: 2;
    justify-self: start;
  }

  .quote-database-search-group > header {
    display: grid;
    gap: 2px;
  }

  .quote-database-search-group > header small {
    white-space: normal;
  }

  .quote-database-search-record {
    grid-template-columns: 1fr;
  }

  .quote-database-search-record time {
    padding: 9px 12px 0;
  }

  .quote-database-search-record code {
    padding: 3px 12px 10px;
  }

  .account-create-form {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .account-create-form > div,
  .account-create-form .account-form-status,
  .account-create-form .primary-button {
    grid-column: auto;
  }

  .account-dialog-head,
  .account-list-section {
    padding: 20px;
  }

  .account-row {
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
  }

  .account-row-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .account-reset-form {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .best-topbar {
    gap: 24px;
  }

  .best-summary {
    grid-template-columns: 1fr 1fr;
  }

  .best-summary > div,
  .best-summary > div:first-child,
  .best-summary > div:last-child {
    border: 1px solid var(--line);
    border-radius: 6px;
  }

  .best-controls {
    display: block;
  }

  .best-control-section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .best-control-section:first-child {
    border-top: 0;
  }

  .best-results-head {
    display: grid;
    align-items: start;
  }

  .best-results-head .secondary-button {
    width: 100%;
  }

  .best-table-wrap {
    max-height: 560px;
  }

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

  .comparison-head {
    display: grid;
    align-items: start;
  }

  .comparison-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .comparison-controls label {
    min-width: 0;
  }

  .chart-head {
    display: grid;
  }

  .chart-actions {
    width: 100%;
  }

  .chart-actions button {
    flex: 1;
  }

  .table-tools {
    display: grid;
    width: 100%;
  }

  .table-tools input {
    width: 100%;
  }

  .chart-wrap {
    min-height: 260px;
    aspect-ratio: 4 / 3.5;
  }
}
