main { max-width: 1200px; }
h2 { font-size: 1.15rem; font-weight: 650; margin: 0 0 16px; }
[hidden] { display: none !important; }
.connection, .card { background: white; border: 1px solid #d8dfd5; border-radius: 10px; padding: 20px; margin: 20px 0; }
.connection { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.connection p { margin: 5px 0 0; font-size: .9rem; overflow-wrap: anywhere; }
.connection-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
a { color: #36583d; text-underline-offset: 3px; }
.setup { display: grid; grid-template-columns: 1fr 1.45fr; gap: 32px; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e7efe4; color: #36583d; font-size: .9rem; margin-right: 8px; }
.upload { display: grid; gap: 12px; padding: 20px; background: #f6f5ef; border: 1px dashed #9aaf98; border-radius: 8px; font-weight: 600; }
input[type="file"] { display: block; width: 100%; min-width: 0; font: inherit; font-weight: normal; font-size: .9rem; }
input[type="file"]::file-selector-button { color: #36583d; padding: 8px; border: 1px solid #b9c8b9; border-radius: 6px; background: white; cursor: pointer; }
.muted { color: #65705f; font-size: .9rem; line-height: 1.5; }
.scope-options { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.scope-options label { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid #d8dfd5; border-radius: 8px; cursor: pointer; }
.scope-options label:has(input:checked) { background: #e7efe4; border-color: #587259; }
.scope-options input { accent-color: #43664a; }
.scope-options small { display: block; color: #65705f; margin-top: 3px; }
.analyze-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
#analyze { padding: 12px 22px; }
#analysis-status { font-size: .95rem; color: #586353; }
.send-note { max-width: 750px; }
.error { padding: 14px; color: #8d2b25; background: #fff0ec; border: 1px solid #e8b7ae; border-radius: 8px; overflow-wrap: anywhere; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.section-heading h2 { margin-bottom: 0; }
.token-counts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.token-counts dt { font-size: .85rem; color: #65705f; }
.token-counts dd { margin: 8px 0; font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.small { font-size: .8rem; }
.history { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { padding: 10px 8px; border-bottom: 1px solid #e7e9e2; text-align: left; white-space: nowrap; }
.model-label { display: grid; gap: 8px; margin: 16px 0; max-width: 400px; }
#pair-code { padding: 10px; font: inherit; width: 180px; margin-right: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
dialog { max-width: 440px; border: 1px solid #b9c8b9; border-radius: 12px; padding: 24px; color: #253329; }
dialog::backdrop { background: #18271966; }
@media (max-width: 650px) {
  .connection { align-items: flex-start; flex-direction: column; }
  .setup { grid-template-columns: 1fr; gap: 24px; }
  .card { padding: 16px; }
  .token-counts { grid-template-columns: repeat(2, 1fr); gap: 8px 20px; }
  .token-counts div:first-child { grid-column: 1 / -1; }
}
