/*
 * Visual shell independent of Tailwind — loads first so UI stays correct if tailwind.css 404/blocked.
 * Semantic hooks: body.oth-app, [data-oth="…"], and stable IDs (#drop-zone, etc.).
 */
:root {
  --oth-bg: #f8fafc;
  --oth-surface: #ffffff;
  --oth-text: #0f172a;
  --oth-muted: #475569;
  --oth-border: #e2e8f0;
  --oth-accent: #0f172a;
  --oth-accent-hover: #1e293b;
  --oth-amber-bg: #fffbeb;
  --oth-amber-border: #fde68a;
  --oth-amber-text: #451a03;
  --oth-emerald-bg: #ecfdf5;
  --oth-emerald-border: #a7f3d0;
  --oth-emerald-text: #064e3b;
  --oth-danger-bg: #fef2f2;
  --oth-danger-border: #fecaca;
  --oth-danger-text: #7f1d1d;
  --oth-radius: 0.75rem;
  --oth-radius-lg: 1rem;
  --oth-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --oth-max: 48rem;
}

/* —— Payment —— */
.oth-payment-page .oth-app > main,
.oth-payment-page > main {
  max-width: 42rem;
}
.oth-payment-card {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--oth-border);
  border-radius: 1.25rem;
  background: var(--oth-surface);
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
}
.oth-payment-eyebrow {
  margin: 0 0 0.6rem;
  color: #047857;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.oth-payment-card h1 {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.oth-payment-lead {
  margin: 0.9rem 0 0;
  color: var(--oth-muted);
  line-height: 1.7;
}
.oth-payment-order {
  display: grid;
  gap: 0.9rem;
  margin: 1.6rem 0;
  padding: 1.15rem;
  border: 1px solid var(--oth-border);
  border-radius: var(--oth-radius);
  background: #f8fafc;
}
.oth-payment-order > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}
.oth-payment-order span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 0.82rem;
}
.oth-payment-order strong,
.oth-payment-order code {
  overflow-wrap: anywhere;
  text-align: right;
}
.oth-payment-notice {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--oth-radius);
  background: #f8fafc;
  color: #334155;
  font-size: 0.88rem;
  line-height: 1.6;
}
.oth-payment-notice.is-sandbox {
  border-color: #fde68a;
  background: #fffbeb;
  color: #78350f;
}
.oth-payment-notice.is-success {
  border-color: var(--oth-emerald-border);
  background: var(--oth-emerald-bg);
  color: var(--oth-emerald-text);
}
.oth-payment-notice.is-error {
  border-color: var(--oth-danger-border);
  background: var(--oth-danger-bg);
  color: var(--oth-danger-text);
}
.oth-payment-primary {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.85rem 1.2rem;
  border: 0;
  border-radius: var(--oth-radius);
  background: #1677ff;
  color: #fff !important;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.oth-payment-primary:hover {
  background: #0b64dd;
}
.oth-payment-primary.is-secondary {
  background: #0f172a;
}
.oth-payment-fineprint {
  margin: 0.8rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.6;
}
.oth-payment-back {
  display: inline-block;
  margin-top: 1.3rem;
  color: #475569;
  font-size: 0.88rem;
  text-decoration: none;
}
.oth-payment-back:hover {
  color: #0f172a;
}
@media (max-width: 560px) {
  .oth-payment-order > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }
  .oth-payment-order strong,
  .oth-payment-order code {
    text-align: left;
  }
}

.oth-app {
  box-sizing: border-box;
  min-height: 100vh;
  margin: 0;
  background: var(--oth-bg) !important;
  color: var(--oth-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
.oth-app *,
.oth-app *::before,
.oth-app *::after {
  box-sizing: border-box;
}

/* —— Header —— */
.oth-app > header {
  border-bottom: 1px solid var(--oth-border);
  background: var(--oth-surface);
}
.oth-app > header > div {
  max-width: var(--oth-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
}
.oth-app > header a {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
}
.oth-app > header p {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}
.oth-app > header a:hover {
  color: var(--oth-text);
}
.oth-app > header span {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .oth-app > header > div {
    align-items: flex-start;
    flex-direction: column;
  }
  .oth-app > header > div > div:last-child {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.15rem;
  }
  .oth-app > main {
    padding-top: 1.25rem;
  }
}

/* —— Main —— */
.oth-app > main {
  max-width: var(--oth-max);
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* —— Footer —— */
.oth-app > footer {
  max-width: var(--oth-max);
  margin: 3rem auto 0;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--oth-amber-border);
  background: var(--oth-amber-bg);
  font-size: 0.875rem;
  color: var(--oth-amber-text);
}
.oth-app > footer > p:first-child {
  margin: 0;
  font-weight: 600;
  color: #92400e;
}
.oth-app > footer > p:last-child {
  margin: 0.5rem 0 0;
  line-height: 1.65;
}

/* —— Hero (landing) —— */
[data-oth="hero-card"] {
  background: var(--oth-surface);
  border: 1px solid var(--oth-border);
  border-radius: var(--oth-radius-lg);
  padding: 2rem;
  box-shadow: var(--oth-shadow);
}
[data-oth="hero-card"] .bg-slate-900 {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}
[data-oth="hero-card"] h1 {
  margin: 0;
  font-size: clamp(1.375rem, 4vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--oth-text);
}
[data-oth="hero-card"] > p {
  margin: 0.75rem 0 0;
  color: var(--oth-muted);
  font-size: 1rem;
  line-height: 1.6;
}
[data-oth="cta-primary"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  padding: 1rem 1.75rem;
  background: var(--oth-accent) !important;
  color: #fff !important;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: var(--oth-radius);
  text-decoration: none !important;
  box-shadow: var(--oth-shadow);
  width: 100%;
  border: none;
  cursor: pointer;
}
[data-oth="cta-primary"]:hover {
  background: var(--oth-accent-hover) !important;
  color: #fff !important;
}
@media (min-width: 768px) {
  [data-oth="cta-primary"] {
    width: auto;
    min-width: 12rem;
  }
}

/* —— Generic panel (upload, etc.) —— */
[data-oth="panel"] {
  background: var(--oth-surface);
  border: 1px solid var(--oth-border);
  border-radius: var(--oth-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--oth-shadow);
}
[data-oth="panel"] summary,
.oth-app details > summary {
  list-style: none;
}
[data-oth="panel"] summary::-webkit-details-marker,
.oth-app details > summary::-webkit-details-marker {
  display: none;
}
[data-oth="panel"] h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--oth-text);
}
[data-oth="panel"] > p:first-of-type,
[data-oth="panel"] > p.text-sm {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--oth-muted);
  line-height: 1.6;
}

/* —— Alerts —— */
[data-oth="alert-error"] {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--oth-radius);
  border: 1px solid var(--oth-danger-border);
  background: var(--oth-danger-bg);
  color: var(--oth-danger-text);
}
[data-oth="alert-error"] p {
  margin: 0;
  font-size: 0.875rem;
}
[data-oth="alert-error"] p:first-child {
  font-weight: 600;
}
[data-oth="alert-info"] {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--oth-radius);
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #0c4a6e;
}
[data-oth="alert-info"] p {
  margin: 0;
  font-size: 0.875rem;
}
[data-oth="alert-info"] p:first-child {
  font-weight: 600;
}

[data-oth="notes-panel"] {
  background: var(--oth-surface);
  border: 1px solid var(--oth-border);
  border-radius: var(--oth-radius-lg);
  box-shadow: var(--oth-shadow);
}

[data-oth="result-banner"] p {
  margin: 0;
}

/* —— Upload form —— */
.oth-upload-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.oth-drop-zone {
  position: relative;
  min-height: 190px;
  border: 1.5px dashed #94a3b8 !important;
  background: #f8fafc !important;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.oth-drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}
.oth-drop-zone:hover,
.oth-drop-zone:focus-within {
  border-color: #0f172a !important;
  background: #f1f5f9 !important;
  transform: translateY(-1px);
}
.oth-upload-mark {
  display: grid !important;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 0 0.75rem !important;
  place-items: center;
  border-radius: 999px;
  background: #0f172a;
  color: #fff !important;
  font-size: 1.25rem !important;
  font-weight: 700;
}
.oth-drop-zone strong {
  color: #0f172a;
  font-size: 1rem;
}
.oth-selected-files {
  display: grid;
  flex: 1;
  min-width: min(100%, 18rem);
  gap: 0.4rem;
}
.oth-selected-files:empty {
  display: none;
}
.oth-selected-files > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.35rem 0;
}
.oth-selected-files strong {
  overflow: hidden;
  color: #334155;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.oth-selected-files small {
  color: #64748b;
  white-space: nowrap;
}
.oth-file-error {
  min-height: 1.2rem;
  margin: -0.35rem 0 0;
  color: #b91c1c;
  font-size: 0.8125rem;
  font-weight: 600;
}
.oth-upload-submit {
  min-height: 3rem;
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}
.oth-upload-submit:not(:disabled):hover {
  transform: translateY(-1px);
}
#upload-form {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
#drop-zone {
  position: relative;
  min-height: 176px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #cbd5e1;
  border-radius: var(--oth-radius);
  background: #f1f5f9;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}
#drop-zone:hover {
  border-color: #94a3b8;
  background: #e2e8f0;
}
#drop-zone.border-slate-500 {
  border-color: #64748b;
}
#drop-zone.bg-slate-100 {
  background: #e2e8f0;
}
#drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
  width: 100%;
  height: 100%;
}
#drop-zone .pointer-events-none,
#drop-zone > div:last-child {
  pointer-events: none;
  text-align: center;
  padding: 2rem 1rem;
  color: #475569;
  font-size: 0.9375rem;
}
#drop-zone .text-xs,
#drop-zone span + span {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
}
#pick-files-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: var(--oth-shadow);
}
#pick-files-btn:hover {
  background: #f8fafc;
}
#clear-files-btn,
#append-clear-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  cursor: pointer;
}
#clear-files-btn:hover,
#append-clear-btn:hover {
  background: #f8fafc;
}
#file-count,
#append-file-count {
  font-size: 0.75rem;
  color: #475569;
  font-weight: 600;
}
#file-names {
  font-size: 0.75rem;
  color: #64748b;
  flex: 1;
  min-width: 0;
}
.oth-upload-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
#submit-btn {
  width: 100%;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff !important;
  background: var(--oth-accent) !important;
  border: none;
  border-radius: var(--oth-radius);
  cursor: pointer;
  box-shadow: var(--oth-shadow);
}
#submit-btn:hover {
  background: var(--oth-accent-hover) !important;
}
#submit-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}
#append-submit-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}
@media (min-width: 768px) {
  #submit-btn {
    width: auto;
  }
}

/* —— Progress overlay —— */
.oth-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  animation: oth-fade-in 180ms ease-out both;
}
.oth-progress-overlay.flex {
  display: flex !important;
}
.oth-progress-dialog {
  width: min(31rem, calc(100vw - 2rem));
  padding: 2rem 1.75rem;
  border-radius: var(--oth-radius-lg);
  background: #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: oth-rise-in 260ms ease-out both;
}
.oth-progress-spinner {
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
  margin-bottom: 0.75rem;
  border: 3px solid #cbd5e1;
  border-top-color: #0f172a;
  border-radius: 999px;
  animation: oth-spin 900ms linear infinite;
}
.oth-progress-track {
  height: 0.3rem;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.oth-progress-track span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: #0f172a;
  animation: oth-progress 1.8s ease-in-out infinite;
}
.oth-inline-progress {
  width: 100%;
  margin-top: 0.75rem;
  color: #334155;
  font-size: 0.8125rem;
}
.oth-inline-progress .oth-progress-spinner {
  width: 1rem;
  height: 1rem;
  margin: 0 0.45rem 0 0;
  border-width: 2px;
  vertical-align: -0.15rem;
}
@keyframes oth-spin { to { transform: rotate(360deg); } }
@keyframes oth-progress {
  0% { transform: translateX(-110%); }
  50% { transform: translateX(80%); }
  100% { transform: translateX(240%); }
}
@keyframes oth-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes oth-rise-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .oth-progress-overlay,
  .oth-progress-dialog,
  .oth-progress-track span,
  .oth-progress-spinner {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
#ai-progress {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}
#ai-progress.flex {
  display: flex !important;
}
#ai-progress > div {
  background: #fff;
  border-radius: var(--oth-radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 90vw;
}
#ai-progress p {
  margin: 0;
  color: var(--oth-text);
}
#ai-progress p + p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--oth-muted);
}
#ai-progress .text-xs {
  margin-top: 1rem !important;
  font-size: 0.75rem;
  color: #64748b;
}

/* —— Results —— */
#main-stage > h1 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--oth-text);
}
[data-oth="result-banner"] {
  padding: 1rem;
  border-radius: var(--oth-radius-lg);
  border: 1px solid var(--oth-emerald-border);
  background: rgba(236, 253, 245, 0.95);
  color: var(--oth-emerald-text);
}
[data-oth="result-banner"] p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
}
[data-oth="result-banner"] p:first-child {
  font-weight: 600;
  margin-bottom: 0.35rem;
}
[data-oth="result-banner"] + .grid > div {
  box-shadow: var(--oth-shadow);
}
[data-oth="hint-year"] {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--oth-radius);
  border: 1px solid var(--oth-amber-border);
  background: #fffbeb;
  color: #78350f;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Year switcher */
#year-block .rounded-xl.border.border-slate-200.bg-slate-50,
#year-block > div:first-child {
  padding: 1rem;
  border-radius: var(--oth-radius);
  border: 1px solid var(--oth-border);
  background: #f8fafc;
}
#year-block .flex.flex-wrap.gap-2,
#year-block > div:first-child > div {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
#year-block button[type="button"] {
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-family: inherit;
}
#year-block button[type="button"]:hover {
  background: #f1f5f9;
}
#year-block button.bg-slate-900,
#year-block button.text-white {
  background: var(--oth-accent) !important;
  color: #fff !important;
  border-color: var(--oth-accent);
}

/* Summary grid */
#year-block > .grid,
#year-block > div:nth-child(2) {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--oth-radius);
  border: 1px solid var(--oth-border);
  background: var(--oth-surface);
}
@media (min-width: 768px) {
  #year-block > .grid,
  #year-block > div:nth-child(2) {
    grid-template-columns: repeat(3, 1fr);
  }
}
#year-block .text-xs.text-slate-500 {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
}
#year-block .text-xl.font-bold {
  margin: 0.25rem 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--oth-text);
}
#year-block .text-amber-800 {
  color: #92400e !important;
}
#year-block .text-sm.text-slate-700 {
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.5;
}

#year-block > p.mt-3 {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #78350f;
}

/* Table */
#year-block .overflow-x-auto {
  margin-top: 1.5rem;
  border-radius: var(--oth-radius);
  border: 1px solid var(--oth-border);
  overflow-x: auto;
}
#year-block table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
  background: #fff;
}
#year-block thead {
  background: #1e293b;
  color: #fff;
}
#year-block th {
  padding: 0.5rem 0.75rem;
  font-weight: 600;
}
#year-block td {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid #f1f5f9;
  vertical-align: top;
}
#year-block tbody tr:hover {
  background: #f8fafc;
}
#year-block .text-center.text-slate-500 {
  text-align: center;
  color: #64748b;
  padding: 1.5rem !important;
}

/* Tax row buttons */
#year-block button.rounded-md {
  margin: 0.125rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
#year-block .bg-emerald-700,
#year-block button.bg-emerald-700 {
  background: #047857 !important;
  color: #fff !important;
}
#year-block .bg-amber-800,
#year-block button.bg-amber-800 {
  background: #92400c !important;
  color: #fff !important;
}
#year-block .bg-slate-100 {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

/* Footer actions */
#year-block .oth-year-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
#year-block a[href*="/export/pdf"] {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.25rem;
  background: var(--oth-accent);
  color: #fff !important;
  font-weight: 600;
  border-radius: var(--oth-radius);
  text-decoration: none !important;
  font-size: 0.9375rem;
}
#year-block a[href*="/export/pdf"]:hover {
  background: var(--oth-accent-hover);
  color: #fff !important;
}
#year-block form[action="/reset"] button {
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  border-radius: var(--oth-radius);
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}
#year-block form[action="/reset"] button:hover {
  background: #f8fafc;
}
#year-block a[href*="/results"] {
  font-size: 0.875rem;
  color: #475569;
}

/* Space between stacked sections */
#main-stage.space-y-6 > * + * {
  margin-top: 1.5rem;
}

/* Kill default purple visited links on primary actions */
.oth-app > header a:visited {
  color: #1e293b;
}
[data-oth="cta-primary"]:visited,
#year-block a[href*="/export/pdf"]:visited {
  color: #fff !important;
}
[data-oth="alert-error"] a {
  margin-top: 0.75rem;
  display: inline-block;
  font-weight: 600;
  font-size: 0.875rem;
  color: #991b1b !important;
}

/* —— Launch-ready UX additions —— */
.oth-app .oth-nav-link {
  font-size: 0.875rem;
  color: #475569;
  text-decoration: none;
}
.oth-app .oth-nav-link:hover {
  color: #0f172a;
  text-decoration: underline;
}
.oth-eyebrow {
  margin: 0 0 0.75rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.oth-lead {
  margin: 0.75rem 0 0;
  color: var(--oth-muted);
  font-size: 1rem;
  line-height: 1.6;
}
.oth-hero-grid {
  display: grid;
  gap: 1.5rem;
}
.oth-hero-actions,
.oth-final-cta,
.oth-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
}
.oth-secondary-cta,
.oth-final-cta a,
.oth-proof-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--oth-border);
  border-radius: var(--oth-radius);
  background: #fff;
  color: #0f172a;
  font-weight: 650;
  text-decoration: none;
}
.oth-secondary-cta:hover,
.oth-final-cta a:hover,
.oth-proof-row a:hover {
  background: #f8fafc;
}
.oth-privacy-line {
  margin-top: 1rem;
  color: #64748b;
  font-size: 0.875rem;
}
.oth-offer-panel {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-left: 4px solid #0f172a;
  background: #f8fafc;
  padding: 1rem;
  border-radius: var(--oth-radius);
}
.oth-offer-panel p,
.oth-offer-panel span {
  margin: 0;
  color: #475569;
  font-size: 0.875rem;
}
.oth-offer-panel strong {
  color: #0f172a;
  font-size: 2rem;
  line-height: 1.05;
}
.oth-supported-docs {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--oth-border);
}
.oth-supported-docs p {
  margin: 0 0 0.25rem;
  color: #64748b;
  font-size: 0.8125rem;
}
.oth-supported-docs strong {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 650;
}
.oth-inline-upload {
  margin-top: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--oth-border);
  border-radius: var(--oth-radius);
  background: #f8fafc;
}
.oth-trust-strip {
  display: grid;
  gap: 0;
  margin-top: 1.5rem;
  border-top: 1px solid var(--oth-border);
  border-bottom: 1px solid var(--oth-border);
}
.oth-trust-strip span {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 0;
  color: #64748b;
  font-size: 0.8rem;
}
.oth-trust-strip strong {
  color: #0f172a;
  font-size: 0.875rem;
}
.oth-processor-status {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #dbeafe;
  border-radius: var(--oth-radius);
  background: #eff6ff;
}
.oth-processor-status > span {
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.32rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 4px #dbeafe;
}
.oth-processor-status.is-fallback {
  border-color: #fde68a;
  background: #fffbeb;
}
.oth-processor-status.is-fallback > span {
  background: #d97706;
  box-shadow: 0 0 0 4px #fef3c7;
}
.oth-processor-status strong {
  color: #0f172a;
  font-size: 0.875rem;
}
.oth-processor-status p {
  margin: 0.2rem 0 0;
  color: #475569;
  font-size: 0.8125rem;
}
.oth-upload-facts {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding: 1rem 0;
  border-top: 1px solid var(--oth-border);
  border-bottom: 1px solid var(--oth-border);
  color: #64748b;
  font-size: 0.8125rem;
}
.oth-upload-facts span {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.oth-upload-facts strong {
  color: #334155;
}
.oth-processor-badge {
  display: inline-flex;
  margin-left: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
}
.oth-processor-badge.is-codex {
  background: #dbeafe;
  color: #1d4ed8;
}
@media (min-width: 768px) {
  .oth-hero-grid,
  .oth-supported-docs {
    grid-template-columns: minmax(0, 1fr) 17rem;
    align-items: center;
  }
  .oth-trust-strip,
  .oth-upload-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .oth-trust-strip span {
    padding: 0.9rem 1rem;
    border-right: 1px solid var(--oth-border);
  }
  .oth-trust-strip span:first-child { padding-left: 0; }
  .oth-trust-strip span:last-child { border-right: 0; }
  .oth-upload-facts span {
    display: grid;
    gap: 0.2rem;
    padding-right: 1rem;
    border-right: 1px solid var(--oth-border);
  }
  .oth-upload-facts span:last-child { border-right: 0; }
}

[data-oth="workflow-stepper"] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}
[data-oth="workflow-stepper"] span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--oth-border);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 650;
}
[data-oth="workflow-stepper"] .is-current {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}
.oth-review-guide {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #dbeafe;
  border-radius: var(--oth-radius);
  background: #eff6ff;
}
.oth-review-guide div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.oth-review-guide strong {
  color: #0f172a;
  font-size: 0.875rem;
}
.oth-review-guide span {
  color: #475569;
  font-size: 0.8125rem;
}
.oth-account-benefits,
.oth-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.oth-account-benefits {
  margin-top: 1rem;
}
.oth-account-benefits span,
.oth-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 650;
}
.oth-password-reset {
  margin-top: 1.25rem;
  border-top: 1px solid var(--oth-border);
  padding-top: 1rem;
}
.oth-password-reset summary {
  cursor: pointer;
  color: #0f172a;
  font-weight: 700;
}
.oth-password-reset p {
  margin: 0.5rem 0 0;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.55;
}
.oth-password-reset form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}
.oth-password-reset label {
  display: grid;
  gap: 0.35rem;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 650;
}
.oth-password-reset input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
  color: #0f172a;
  font: inherit;
}
.oth-password-reset button {
  border: 0;
  border-radius: var(--oth-radius);
  background: #0f172a;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 0.75rem 1rem;
}
.oth-app button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.oth-badge.is-emerald {
  background: #ecfdf5;
  color: #047857;
}
.oth-badge.is-amber {
  background: #fffbeb;
  color: #92400e;
}
.oth-badge.is-rose {
  background: #fff1f2;
  color: #be123c;
}
.oth-badge.is-slate {
  background: #f1f5f9;
  color: #475569;
}
.oth-table-desc {
  display: grid;
  gap: 0.35rem;
  max-width: 26rem;
}
.oth-table-desc small {
  color: #64748b;
  line-height: 1.4;
}
.oth-delete-link {
  border: 1px solid #fecdd3;
  border-radius: 0.5rem;
  background: #fff;
  color: #be123c;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
}
.oth-delete-link:hover {
  background: #fff1f2;
}

.oth-manual-add {
  margin-top: 1rem;
  border: 1px solid var(--oth-border);
  border-radius: var(--oth-radius);
  background: #fff;
  padding: 1rem;
}
.oth-manual-add summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f172a;
}
.oth-manual-add form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}
.oth-manual-add label {
  display: grid;
  gap: 0.3rem;
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 650;
}
.oth-manual-add input,
.oth-manual-add select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
  color: #0f172a;
  font: inherit;
}
.oth-manual-add button {
  border: 0;
  border-radius: var(--oth-radius);
  background: #0f172a;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 0.75rem 1rem;
}

[data-oth="mobile-transactions"] {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}
[data-oth="desktop-transactions"] {
  display: none;
}
.oth-tx-card {
  border: 1px solid var(--oth-border);
  border-radius: var(--oth-radius);
  background: #fff;
  padding: 1rem;
  box-shadow: var(--oth-shadow);
}
.oth-tx-card-head {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-start;
}
.oth-tx-card-head p,
.oth-tx-desc,
.oth-tx-reason,
.oth-tx-cny {
  margin: 0;
}
.oth-tx-card-head p {
  color: #64748b;
  font-size: 0.8125rem;
}
.oth-tx-card-head strong {
  display: block;
  margin-top: 0.1rem;
  color: #0f172a;
  font-size: 1.125rem;
}
.oth-tx-desc {
  margin-top: 0.75rem;
  color: #0f172a;
  font-weight: 650;
}
.oth-tx-reason,
.oth-tx-cny {
  margin-top: 0.45rem;
  color: #64748b;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.oth-tx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.85rem;
}
.oth-tx-actions button,
.oth-tx-actions span {
  min-height: 2.25rem;
  border: 1px solid var(--oth-border);
  border-radius: 0.65rem;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.45rem 0.8rem;
}
.oth-tx-actions .is-active-include {
  border-color: #047857;
  background: #047857;
  color: #fff;
}
.oth-tx-actions .is-active-exclude {
  border-color: #92400e;
  background: #92400e;
  color: #fff;
}
.oth-tx-actions .is-danger {
  border-color: #fecdd3;
  color: #be123c;
}
.oth-empty-state {
  margin: 1rem 0 0;
  color: #64748b;
  text-align: center;
}

[data-oth="trust-page"] h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.5rem, 4vw, 2.125rem);
  line-height: 1.2;
}
.oth-trust-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}
.oth-trust-list article {
  border-top: 1px solid var(--oth-border);
  padding-top: 1rem;
}
.oth-trust-list h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}
.oth-trust-list p {
  margin: 0.45rem 0 0;
  color: #475569;
  line-height: 1.65;
}

@media (min-width: 720px) {
  .oth-review-guide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .oth-manual-add form {
    grid-template-columns: 9rem 1fr 8rem 6rem 8rem auto;
    align-items: end;
  }
  [data-oth="mobile-transactions"] {
    display: none;
  }
  [data-oth="desktop-transactions"] {
    display: block;
  }
}

@media (max-width: 640px) {
  .oth-app > header > div {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* —— Wide transaction workspace —— */
.oth-results-page {
  --oth-max: 100rem;
}
.oth-results-page > main {
  width: 100%;
  padding: 1.5rem clamp(1rem, 2.5vw, 2rem) 3rem;
}
.oth-results-page > header > div,
.oth-results-page > footer {
  padding-right: clamp(1rem, 2.5vw, 2rem);
  padding-left: clamp(1rem, 2.5vw, 2rem);
}
.oth-results-stage {
  display: grid;
  gap: 1rem;
}
.oth-results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.oth-results-heading h1,
.oth-results-heading p {
  margin: 0;
}
.oth-results-heading h1 {
  color: #0f172a;
  font-size: clamp(1.5rem, 2vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.oth-results-heading p {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.875rem;
}
.oth-results-heading > span {
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 650;
  white-space: nowrap;
}
.oth-result-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  gap: 1rem;
  border-top: 1px solid #d1fae5;
  border-bottom: 1px solid #d1fae5;
  padding: 0.6rem 0;
  animation: oth-rise-in 240ms ease-out both;
}
.oth-result-statusbar > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: #64748b;
  font-size: 0.8125rem;
}
.oth-result-statusbar strong {
  color: #065f46;
  font-size: 0.875rem;
}
.oth-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 4px #d1fae5;
}
.oth-result-statusbar button,
.oth-add-toggle {
  border: 0 !important;
  background: transparent !important;
  color: #0f172a !important;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem !important;
  font-weight: 750 !important;
  white-space: nowrap;
}
.oth-result-statusbar button:hover,
.oth-add-toggle:hover {
  color: #047857 !important;
}
.oth-append-panel {
  border-bottom: 1px solid var(--oth-border);
  background: #fff;
  padding: 1rem 0 1.25rem;
  animation: oth-panel-reveal 180ms ease-out both;
}
.oth-append-panel p {
  margin: 0;
}
.oth-app [hidden] {
  display: none !important;
}

#year-block {
  display: grid;
  gap: 1rem;
  margin-top: 0 !important;
}
.oth-year-overview,
#year-block > .oth-year-overview:first-child {
  display: grid;
  grid-template-columns: minmax(15rem, 0.75fr) minmax(22rem, 1.5fr) auto;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  border: 1px solid var(--oth-border);
  border-radius: 0.9rem;
  background: #fff;
  padding: 1rem 1.125rem;
}
#year-block .oth-year-overview > div {
  display: block;
  margin: 0;
}
.oth-control-label {
  display: block;
  margin-bottom: 0.45rem;
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.oth-year-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
#year-block .oth-year-options button {
  min-width: 3.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: #f1f5f9;
  padding: 0.42rem 0.65rem;
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 700;
}
#year-block .oth-year-options button.is-selected {
  background: #0f172a;
  color: #fff;
}
.oth-summary-metrics {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 !important;
  border-left: 1px solid var(--oth-border);
}
.oth-summary-metrics > div {
  padding: 0 1.5rem;
}
.oth-summary-metrics span,
.oth-summary-metrics strong {
  display: block;
}
.oth-summary-metrics span {
  color: #64748b;
  font-size: 0.75rem;
}
.oth-summary-metrics strong {
  margin-top: 0.15rem;
  color: #0f172a;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  letter-spacing: -0.02em;
}
.oth-summary-metrics strong.is-tax {
  color: #92400e;
}
#year-block .oth-export-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  border-radius: 0.65rem;
  background: #0f172a;
  padding: 0.65rem 1rem;
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 750;
  text-decoration: none !important;
  transition: transform 150ms ease, background 150ms ease;
}
#year-block .oth-export-button:hover {
  background: #1e293b;
  transform: translateY(-1px);
}
.oth-attention-strip,
#year-block > .oth-attention-strip:nth-child(2) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  border: 1px solid #fde68a;
  border-radius: 0.7rem;
  background: #fffbeb;
  padding: 0.7rem 0.9rem;
  color: #92400e;
  font-size: 0.8125rem;
}

.oth-transaction-workspace {
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 0.9rem;
  background: #fff;
  box-shadow: 0 14px 35px -30px rgba(15, 23, 42, 0.5);
}
.oth-transaction-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--oth-border);
  padding: 1rem 1.125rem;
}
.oth-heading-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.oth-heading-line h2,
.oth-transaction-toolbar p {
  margin: 0;
}
.oth-heading-line h2 {
  color: #0f172a;
  font-size: 1rem;
}
.oth-heading-line > span {
  border-radius: 999px;
  background: #f1f5f9;
  padding: 0.15rem 0.5rem;
  color: #475569;
  font-size: 0.6875rem;
  font-weight: 750;
}
.oth-transaction-toolbar p {
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.8125rem;
}
.oth-transaction-controls {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}
.oth-transaction-controls label {
  display: grid;
  gap: 0.25rem;
}
.oth-transaction-controls label > span {
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 700;
}
.oth-transaction-controls select {
  min-width: 9rem;
  min-height: 2.25rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  background: #fff;
  padding: 0.35rem 2rem 0.35rem 0.65rem;
  color: #0f172a;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
}
.oth-manual-add {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--oth-border);
  border-radius: 0;
  background: #f8fafc;
  padding: 1rem 1.125rem;
  animation: oth-panel-reveal 180ms ease-out both;
}
.oth-manual-add form {
  margin: 0;
}

.oth-table-shell,
#year-block .oth-table-shell {
  display: none;
  max-height: min(68vh, 54rem);
  margin: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
}
#year-block .oth-table-shell table {
  min-width: 68rem;
  font-size: 0.8125rem;
}
#year-block .oth-table-shell thead {
  position: sticky;
  z-index: 4;
  top: 0;
  background: #0f172a;
}
#year-block .oth-table-shell th {
  border: 0;
  padding: 0.7rem 0.75rem;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
#year-block .oth-table-shell td {
  padding: 0.65rem 0.75rem;
  vertical-align: middle;
}
#year-block .oth-table-shell tbody > tr {
  transition: background 120ms ease;
}
.is-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.is-nowrap {
  white-space: nowrap;
}
.oth-bank-name {
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
}
.oth-tax-toggle {
  display: inline-flex;
  overflow: hidden;
  min-width: 7.2rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
}
#year-block .oth-tax-toggle button {
  flex: 1;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: 0.35rem 0.55rem;
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 750;
}
#year-block .oth-tax-toggle button + button {
  border-left: 1px solid #cbd5e1;
}
#year-block .oth-tax-toggle .is-active-include {
  background: #047857;
  color: #fff;
}
#year-block .oth-tax-toggle .is-active-exclude {
  background: #92400e;
  color: #fff;
}
.oth-muted-state {
  color: #94a3b8;
  font-size: 0.75rem;
}
.oth-table-desc {
  min-width: 16rem;
  max-width: 36rem;
  gap: 0.3rem;
}
.oth-row-note {
  color: #64748b;
  font-size: 0.72rem;
}
.oth-row-note summary {
  width: max-content;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 2px;
}
.oth-row-note p {
  max-width: 34rem;
  margin: 0.3rem 0 0;
  line-height: 1.45;
}
.oth-bank-group-row td {
  position: sticky;
  z-index: 2;
  top: 2.45rem;
  border-top: 1px solid #cbd5e1 !important;
  border-bottom: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.035em;
}
.oth-empty-cell {
  padding: 2rem !important;
  color: #64748b;
  text-align: center;
}

.oth-disclosure {
  margin: 0;
  border-top: 1px solid var(--oth-border);
  border-bottom: 1px solid var(--oth-border);
  background: transparent;
  padding: 0;
}
.oth-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  padding: 0.8rem 0;
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 750;
}
.oth-disclosure > summary small {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
}
.oth-stock-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 0.25rem 0 1rem;
}
.oth-stock-methods > div {
  border-left: 2px solid #bae6fd;
  padding-left: 0.8rem;
}
.oth-stock-methods span,
.oth-stock-methods strong,
.oth-stock-methods small {
  display: block;
}
.oth-stock-methods span {
  color: #475569;
  font-size: 0.75rem;
}
.oth-stock-methods strong {
  margin-top: 0.15rem;
  color: #0f172a;
  font-size: 1.25rem;
}
.oth-stock-methods small,
.oth-disclosure-note {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.75rem;
}
.oth-stock-methods small b {
  color: #0369a1;
}
.oth-calculation-notes,
.oth-notice-list {
  padding: 0 0 0.9rem;
  color: #475569;
  font-size: 0.8125rem;
}
.oth-calculation-notes p,
.oth-notice-list p {
  margin: 0.25rem 0;
}
.oth-rate-form {
  padding-bottom: 1rem;
}
.oth-rate-table {
  overflow-x: auto;
  border: 1px solid var(--oth-border);
  border-radius: 0.7rem;
}
#year-block .oth-rate-table table {
  min-width: 34rem;
}
.oth-rate-table input {
  width: 9rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.45rem 0.6rem;
  font: inherit;
}
.oth-rate-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}
.oth-rate-actions button {
  border: 0;
  border-radius: 0.6rem;
  background: #0f172a;
  padding: 0.6rem 0.9rem;
  color: #fff;
  cursor: pointer;
  font-weight: 750;
}
.oth-rate-actions a {
  color: #475569;
  font-size: 0.8125rem;
}

.oth-materials-panel,
.oth-upload-notices {
  margin-top: 0.25rem;
}
.oth-file-list {
  border-top: 1px solid var(--oth-border);
}
.oth-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #f1f5f9;
  padding: 0.65rem 0;
}
.oth-file-row > div {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.oth-file-row strong {
  overflow: hidden;
  color: #334155;
  font-size: 0.8125rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.oth-file-row span,
.oth-batch-history p {
  margin: 0;
  color: #64748b;
  font-size: 0.72rem;
}
.oth-file-row button {
  border: 0;
  background: transparent;
  color: #be123c;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
}
.oth-batch-history {
  padding: 0.75rem 0 1rem;
}
.oth-year-actions {
  margin-top: 0 !important;
}

@keyframes oth-rise-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes oth-panel-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 720px) {
  .oth-results-page [data-oth="mobile-transactions"] {
    display: none;
  }
  .oth-results-page [data-oth="desktop-transactions"],
  .oth-results-page .oth-table-shell,
  .oth-results-page #year-block .oth-table-shell {
    display: block;
  }
}

@media (max-width: 900px) {
  .oth-year-overview,
  #year-block > .oth-year-overview:first-child {
    grid-template-columns: 1fr auto;
  }
  .oth-summary-metrics {
    grid-row: 2;
    grid-column: 1 / -1;
    border-top: 1px solid var(--oth-border);
    border-left: 0;
    padding-top: 0.8rem;
  }
  .oth-summary-metrics > div {
    padding: 0;
  }
}

@media (max-width: 719px) {
  .oth-results-page > main {
    padding-top: 1rem;
  }
  .oth-results-heading,
  .oth-result-statusbar,
  .oth-transaction-toolbar {
    align-items: flex-start;
  }
  .oth-results-heading > span {
    display: none;
  }
  .oth-year-overview,
  #year-block > .oth-year-overview:first-child {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .oth-summary-metrics {
    grid-row: auto;
    grid-column: auto;
  }
  #year-block .oth-export-button {
    width: 100%;
  }
  .oth-transaction-toolbar {
    flex-direction: column;
  }
  .oth-transaction-controls {
    width: 100%;
    justify-content: space-between;
  }
  .oth-stock-methods {
    grid-template-columns: 1fr;
  }
  [data-oth="mobile-transactions"] {
    margin: 0;
    padding: 0.75rem;
  }
  .oth-tx-card {
    box-shadow: none;
  }
  .oth-bank-group-mobile {
    margin: 0.35rem 0 -0.2rem;
    padding: 0.35rem 0.15rem;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 800;
  }
}

@media (prefers-reduced-motion: reduce) {
  .oth-result-statusbar,
  .oth-append-panel,
  .oth-manual-add {
    animation: none;
  }
  #year-block .oth-export-button,
  #year-block .oth-table-shell tbody > tr {
    transition: none;
  }
}
