:root {
  --bg: #10110e;
  --panel: #191b16;
  --line: #2b2e25;
  --ink: #f0f1e8;
  --muted: #a0a694;
  --lime: #d4ee90;
  --dim: #778064;
  --serif: Georgia, "Times New Roman", serif;
  font-family: Arial, Helvetica, sans-serif;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  outline-offset: 5px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.13;
  font-weight: 400;
  letter-spacing: -1.8px;
  margin-bottom: 20px;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.6px;
  font-weight: 500;
  line-height: 1.3;
}
.muted,
.fine {
  color: var(--muted);
}
.fine {
  font-size: 12px;
}
.eyebrow,
.number-label {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 20px;
}
.brand {
  font-family: var(--serif);
  font-size: 33px;
  letter-spacing: -1.5px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand span {
  font-size: 11px;
  color: var(--lime);
}
.primary,
.secondary {
  border: 0;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  white-space: nowrap;
}
.primary {
  background: var(--lime);
  color: #1a2310;
}
.primary:hover {
  background: #e0f6af;
}
.secondary {
  background: transparent;
  border: 1px solid #414837;
  color: var(--lime);
}
.secondary:hover {
  background: #242b1b;
}
.wide {
  width: 100%;
  justify-content: space-between;
}
.text-button,
.icon-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--lime);
  font-size: 12px;
}
.text-button:hover {
  text-decoration: underline;
}
.icon-button {
  font-size: 24px;
}
.entry {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.entry-story {
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
  background:
    radial-gradient(ellipse at 15% 45%, #343d24, transparent 70%), #1b2015;
  border-right: 1px solid var(--line);
}
.entry-story h1 {
  font-size: clamp(42px, 4.6vw, 68px);
}
.intro {
  color: #c1c9b2;
  font-size: 16px;
  line-height: 1.8;
}
.story-tags {
  display: flex;
  gap: 12px;
  margin-top: 38px;
}
.story-tags span {
  border: 1px solid #46513a;
  color: #c5d4b0;
  border-radius: 30px;
  padding: 5px 12px;
  font-size: 11px;
}
.entry-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 32px;
}
.form-wrap {
  width: 100%;
  max-width: 365px;
}
.form-wrap h2 {
  font-family: var(--serif);
  font-size: 35px;
}
.form-wrap > p {
  font-size: 13px;
}
form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #d8ddcf;
  margin: 22px 0;
}
input,
textarea {
  width: 100%;
  background: #141710;
  border: 1px solid #363c2e;
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 14px;
}
input::placeholder,
textarea::placeholder {
  color: #737c66;
}
textarea {
  resize: vertical;
}
.switch {
  margin-top: 22px;
  text-align: center;
}
.form-wrap > .fine {
  margin-top: 55px;
  text-align: center;
  font-size: 11px;
}
.onboarding {
  max-width: 1080px;
  margin: 0 auto;
  padding: 35px 40px;
}
.onboarding-inner {
  max-width: 650px;
  margin: 60px auto;
}
.onboarding h1 {
  font-size: 58px;
}
.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}
.topic {
  border: 1px solid #3c4432;
  background: transparent;
  border-radius: 30px;
  padding: 10px 18px;
  font-size: 13px;
}
.topic[aria-pressed="true"] {
  background: var(--lime);
  color: #1b2314;
  border-color: var(--lime);
}
.actions {
  display: flex;
  gap: 26px;
  align-items: center;
  margin-top: 30px;
}
.app {
  display: flex;
  min-height: 100vh;
}
aside {
  width: 236px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 25px 22px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
aside .brand {
  padding: 0 10px;
}
.workspace-label {
  margin: 58px 10px 15px;
  color: #79826c;
  font-size: 9px;
}
nav {
  display: grid;
  gap: 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 12px;
  font-size: 13px;
  color: #abb49e;
}
.nav-item > span {
  font-size: 20px;
  width: 20px;
  line-height: 1;
}
.nav-item.active {
  background: #29331f;
  color: var(--lime);
}
.nav-item small {
  margin-left: auto;
  border: 1px solid #4a563c;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 10px;
}
.sidebar-note {
  margin-top: auto;
  padding: 40px 10px;
  font-size: 13px;
  color: #b0baa2;
}
.dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  margin-bottom: 15px;
}
.sidebar-note p {
  margin-bottom: 12px;
}
.account {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.avatar {
  background: #333d27;
  border: 1px solid #4b593a;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--lime);
  font-size: 13px;
}
.account strong {
  font-size: 12px;
  font-weight: 500;
  max-width: 108px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account .text-button {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.account .icon-button {
  margin-left: auto;
}
main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 1.4px;
}
.topbar > .muted {
  letter-spacing: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
}
.view {
  max-width: 1140px;
  width: 100%;
  padding: 58px 64px 64px;
  margin: 0 auto;
  flex: 1;
}
.view > h1 {
  font-size: 45px;
}
.view > .muted {
  font-size: 14px;
  margin-bottom: 34px;
}
.search-box {
  display: flex;
  align-items: center;
  padding: 7px;
  background: #1c2016;
  border: 1px solid #566340;
  border-radius: 9px;
  box-shadow: 0 0 0 4px #182011;
}
.search-box > span {
  font-size: 28px;
  padding: 0 10px;
  color: var(--lime);
}
.search-box input {
  border: 0;
  background: transparent;
  padding: 12px 5px;
  min-width: 0;
}
.suggestions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 19px;
  min-height: 30px;
}
.suggestions > span {
  font-size: 10px;
  color: var(--muted);
}
.suggestions button {
  background: transparent;
  border: 1px solid #32392a;
  border-radius: 25px;
  padding: 4px 11px;
  font-size: 11px;
  color: #b9c5a8;
}
.discovery-card {
  text-align: center;
  margin-top: 60px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: radial-gradient(ellipse at 50% 0%, #222b19, transparent 65%);
  padding: 35px 20px 40px;
}
.orb {
  font-size: 65px;
  line-height: 1.4;
  color: var(--lime);
  font-family: var(--serif);
  margin-bottom: 20px;
}
.discovery-card .eyebrow {
  font-size: 9px;
  margin-bottom: 12px;
}
.discovery-card h2 {
  font-family: var(--serif);
  font-size: 29px;
}
.discovery-card p:last-child {
  font-size: 12px;
  margin-bottom: 0;
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 40px 0 15px;
}
.list-heading .eyebrow {
  font-size: 9px;
  margin-bottom: 8px;
}
.list-heading h2 {
  margin-bottom: 0;
}
.result {
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}
.result .domain {
  font-size: 11px;
  color: #a7b493;
  margin-bottom: 7px;
  overflow-wrap: anywhere;
}
.result h3 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 8px;
}
.result h3 a:hover {
  color: var(--lime);
}
.result p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0;
  overflow-wrap: anywhere;
}
.cards {
  display: grid;
  gap: 12px;
  margin-top: 40px;
}
.saved-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.saved-card .run-saved {
  font-family: var(--serif);
  font-size: 23px;
  color: var(--ink);
  text-align: left;
  overflow-wrap: anywhere;
}
.saved-card .run-saved:hover {
  color: var(--lime);
}
.saved-card .fine {
  margin: 4px 0 0;
}
.empty-state {
  border: 1px dashed #3a4330;
  padding: 40px 24px;
  text-align: center;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 25px;
}
.contribute-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 38px;
}
.panel {
  background: var(--panel);
  border: 1px solid #353d2b;
  padding: 28px;
  border-radius: 8px;
}
.number-label {
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 20px;
}
.panel h2 {
  font-family: var(--serif);
  font-size: 29px;
}
.panel label {
  margin: 22px 0;
}
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #858e78;
  font-size: 10px;
  margin: 24px 0;
}
.divider:before,
.divider:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.file-label input {
  font-size: 11px;
  padding: 10px;
}
input::file-selector-button {
  background: #323d26;
  color: var(--lime);
  border: 0;
  border-radius: 4px;
  padding: 6px 10px;
  margin-right: 10px;
  font: inherit;
  cursor: pointer;
}
.contribution-explainer {
  padding: 28px 0;
}
.contribution-explainer h2 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
}
.contribution-explainer > p {
  color: var(--muted);
  font-size: 13px;
}
.status-example {
  border-top: 1px solid var(--line);
  padding: 18px 0 0;
  margin-top: 20px;
}
.status-example p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 9px;
}
.status {
  font-size: 10px;
  border-radius: 20px;
  padding: 4px 9px;
  white-space: nowrap;
}
.pending {
  background: #3e3620;
  color: #e7cf8f;
}
.queued {
  background: #2e3e24;
  color: #c4e89c;
}
.submission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.submission-row a {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.submission-row a:hover {
  color: var(--lime);
}
.submission-row .fine {
  margin: 4px 0 0;
  font-size: 10px;
}
footer {
  padding: 22px 48px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: #7d886e;
  font-size: 10px;
}
footer span {
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
}
#notice {
  position: fixed;
  z-index: 10;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 36px);
  width: max-content;
  border: 1px solid #64784a;
  background: #26341c;
  color: #e4f4d3;
  padding: 13px 22px;
  border-radius: 8px;
  box-shadow: 0 8px 40px #0008;
  font-size: 13px;
}
#notice.error {
  background: #402822;
  border-color: #a96550;
  color: #ffdbd1;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1550px) {
  .view {
    padding-top: 85px;
  }
}
@media (max-width: 1050px) {
  aside {
    width: 205px;
    padding: 25px 14px;
  }
  .view {
    padding: 40px 32px;
  }
  .view > h1 {
    font-size: 38px;
  }
  .topbar {
    padding: 0 32px;
  }
  .contribute-grid {
    gap: 24px;
  }
  .entry-story {
    padding: 36px;
  }
  .contribution-explainer h2 {
    font-size: 30px;
  }
}
@media (max-width: 760px) {
  .entry {
    grid-template-columns: 1fr;
  }
  .entry-story {
    padding: 25px;
    gap: 30px;
  }
  .entry-story h1 {
    font-size: 39px;
  }
  .entry-story .intro {
    font-size: 14px;
  }
  .story-tags,
  .entry-story > .fine {
    display: none;
  }
  .entry-form {
    padding: 38px 25px;
  }
  .form-wrap > .fine {
    margin-top: 25px;
  }
  .app {
    display: block;
  }
  aside {
    position: static;
    width: 100%;
    height: auto;
    padding: 15px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
  }
  aside .brand {
    padding: 0;
    font-size: 29px;
  }
  .workspace-label,
  .sidebar-note {
    display: none;
  }
  nav {
    grid-row: 2;
    grid-column: 1/-1;
    display: flex;
    gap: 4px;
  }
  .nav-item {
    padding: 9px;
    font-size: 11px;
    flex: 1;
    gap: 6px;
  }
  .nav-item > span {
    font-size: 17px;
    width: auto;
  }
  .nav-item small {
    display: none;
  }
  .account {
    border: 0;
    padding: 0;
    grid-row: 1;
    grid-column: 2;
  }
  .account .avatar {
    display: none;
  }
  .account .icon-button {
    margin-left: 10px;
  }
  .topbar {
    height: 48px;
    padding: 0 22px;
    font-size: 8px;
  }
  .view {
    padding: 35px 22px 45px;
  }
  .view > h1 {
    font-size: 35px;
  }
  .search-box .primary {
    padding: 10px 13px;
    gap: 6px;
  }
  .search-box input {
    font-size: 12px;
  }
  .search-box > span {
    padding: 0 6px;
  }
  .contribute-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .panel {
    padding: 22px;
  }
  .contribution-explainer {
    padding: 26px 4px;
  }
  .discovery-card {
    margin-top: 35px;
  }
  .list-heading h2 {
    font-size: 19px;
  }
  .list-heading .secondary {
    padding: 9px 11px;
    font-size: 11px;
  }
  .onboarding {
    padding: 25px;
  }
  .onboarding-inner {
    margin: 40px auto;
  }
  .onboarding h1 {
    font-size: 44px;
  }
  .topic {
    padding: 8px 13px;
    font-size: 12px;
  }
  footer {
    padding: 20px 22px;
    font-size: 9px;
    gap: 15px;
  }
  .saved-card {
    padding: 18px;
  }
  .saved-card .run-saved {
    font-size: 21px;
  }
}

.guest-banner {
  margin: 24px 48px 0;
  padding: 15px 20px;
  border: 1px solid #454e35;
  background: #21291a;
  border-radius: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.guest-banner strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.guest-banner span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.guest-banner .secondary {
  font-size: 11px;
  padding: 9px 13px;
}
@media (max-width: 760px) {
  .guest-banner {
    margin: 20px 22px 0;
    padding: 14px;
    align-items: flex-start;
    flex-direction: column;
  }
  .guest-banner .secondary {
    padding: 7px 10px;
  }
}

.mode-picker {
  display: flex;
  gap: 6px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: max-content;
  max-width: 100%;
}
.mode-picker button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  padding: 9px 18px;
  font-size: 12px;
  color: var(--muted);
}
.mode-picker button[aria-pressed="true"] {
  background: #2c3721;
  color: var(--lime);
}
.synthesis {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.synthesis h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  margin: 26px 0 12px;
}
.synthesis h3:first-child {
  margin-top: 0;
}
.synthesis p:last-child {
  margin-bottom: 0;
}
.synthesis pre {
  overflow: auto;
  background: var(--bg);
  padding: 16px;
  border-radius: 5px;
}
.synthesis code {
  font-size: 0.88em;
}
.citation {
  color: var(--lime);
  font-size: 12px;
  margin: 0 2px;
}
.research-plan {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--muted);
}
.research-plan summary {
  cursor: pointer;
  color: var(--lime);
}
.sources-heading {
  margin-top: 30px;
  font-size: 15px;
  font-weight: 500;
}
.source-card h3 {
  font-size: 16px;
}
@media (max-width: 760px) {
  .mode-picker {
    width: 100%;
  }
  .mode-picker button {
    flex: 1;
    padding: 8px 12px;
  }
  .synthesis {
    padding: 20px;
    font-size: 14px;
  }
}

.rejected {
  background: #422a26;
  color: #f0b3a5;
}
.unverified {
  background: #35303e;
  color: #d1bfeb;
}
.submitted-url {
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* Keep shared-login actions separated when password/sign-up controls are hidden. */
#continue-guest { margin-top: 14px; }
.entry-connect { display: block; margin: 22px auto 0; text-align: center; }
.form-wrap > .fine { margin-top: 30px; }
.corpus-note { border-left: 2px solid var(--lime); padding: 10px 16px; color: var(--muted); font-size: 13px; max-width: 920px; margin: 0 0 32px; }
.credit-balance { font-size: 18px; color: var(--lime); margin: 24px 0 8px; }
.monthly-credits { border-top: 1px solid var(--line); padding: 14px 0; }
.monthly-credits dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.monthly-credits dt { color: var(--muted); font-size: 11px; }
.monthly-credits dd { margin: 2px 0 0; font-weight: 600; }
.setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 30px; }
.setup-grid article:last-child { grid-column: 1 / -1; }
.setup-grid pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.setup-links { display: flex; flex-wrap: wrap; gap: 16px; }
@media (max-width: 760px) { .setup-grid { grid-template-columns: 1fr; } .corpus-note { margin-bottom: 24px; } }

/* Focused workspace: shared spacing, quiet surfaces, readable controls. */
:root { --bg: #111310; --panel: #191c17; --line: #2d3329; --muted: #a8b09f; --lime: #d0eb94; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
h1, h2, .form-wrap h2, .panel h2, .discovery-card h2, .contribution-explainer h2, .saved-card .run-saved, .synthesis h3 { font-family: inherit; font-weight: 600; letter-spacing: -.035em; }
h1, .view > h1 { font-size: clamp(30px, 3.4vw, 42px); margin-bottom: 12px; }
h2, .panel h2, .discovery-card h2, .contribution-explainer h2 { font-size: 21px; line-height: 1.35; }
p { margin-bottom: 16px; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--lime); }
.primary, .secondary { min-height: 44px; padding: 11px 18px; gap: 12px; border-radius: 8px; }
.wide { justify-content: center; }
.primary > span { margin-left: auto; }
.text-button { font-size: 12px; line-height: 1.6; }
input, textarea, select { background: #131610; border: 1px solid #3c4435; border-radius: 8px; color: var(--ink); padding: 12px 14px; }
input::placeholder, textarea::placeholder { color: #909a83; }
select { width: 100%; }
.entry-story { background: #191f15; padding: 48px clamp(32px, 5vw, 72px); gap: 48px; }
.entry-story h1 { font-size: clamp(38px, 4.3vw, 60px); line-height: 1.1; letter-spacing: -.045em; max-width: 560px; }
.entry-story .intro { font-size: 16px; max-width: 340px; line-height: 1.65; }
.entry-story > .fine { margin: 0; color: var(--muted); }
.form-wrap { max-width: 370px; }
.form-wrap h2 { font-size: 28px; margin-bottom: 10px; }
.form-wrap > .muted { margin-bottom: 24px; }
form label { font-size: 13px; margin: 18px 0; }
#continue-guest { margin-top: 14px; }
.entry-connect { margin-top: 22px; }
.form-wrap > .fine { margin: 22px 0 0; line-height: 1.65; }
aside { width: 232px; padding: 28px 18px 20px; gap: 0; overflow-y: auto; }
aside .brand { padding: 0 12px; margin-bottom: 34px; }
nav { gap: 4px; }
.nav-item { min-height: 44px; padding: 11px 12px; color: #b9c2ae; border-radius: 8px; font-size: 13px; }
.nav-item:hover { background: #20261c; color: var(--ink); }
.nav-item.active { background: #2a351e; color: var(--lime); }
.nav-item > span { font-size: 18px; flex: 0 0 20px; text-align: center; }
.credits-section { margin-top: auto; padding: 28px 10px 22px; }
.credits-section:has(> [hidden]):not(:has(> :not([hidden]))) { display: none; }
.credit-balance { font-size: 19px; font-weight: 600; letter-spacing: -.025em; margin: 0 0 12px; }
.monthly-credits { padding: 12px 0 0; }
.monthly-credits > .fine { font-size: 11px; line-height: 1.6; margin: 0 0 8px; }
.monthly-credits dl { gap: 8px; margin: 12px 0 14px; }
.monthly-credits dd { font-size: 15px; font-variant-numeric: tabular-nums; }
#buy-credits { width: 100%; margin: 8px 0; }
#payment-info { margin: 8px 0 0; line-height: 1.5; }
.account { padding-top: 18px; min-height: 56px; }
.account .avatar { flex-shrink: 0; }
.account .text-button { font-size: 11px; margin-top: 2px; }
main { padding-top: 24px; }
#request-limits, .corpus-note { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 48px; font-size: 11px; line-height: 1.7; color: var(--muted); border: 0; }
#request-limits:empty { display: none; }
.corpus-note { margin-top: 4px; color: #909b84; }
.view { max-width: 980px; padding: 36px 48px 56px; }
.view > .muted { max-width: 720px; margin-bottom: 26px; line-height: 1.65; }
.mode-picker { padding: 4px; margin-bottom: 16px; background: #171b14; border-color: var(--line); }
.mode-picker button { min-height: 36px; padding: 8px 18px; }
.search-box { background: #1c2117; border-color: #53633f; box-shadow: none; padding: 6px; border-radius: 10px; }
.search-box:focus-within { border-color: var(--lime); box-shadow: 0 0 0 2px #d0eb9414; }
.search-box input { font-size: 15px; padding: 13px 8px; }
.search-box input:focus-visible { outline: 0; }
.search-box > span { font-size: 25px; }
.suggestions { margin-top: 16px; }
.discovery-card { margin-top: 28px; padding: 28px 24px; background: transparent; border-style: dashed; }
.discovery-card h2 { font-size: 19px; margin-bottom: 8px; }
.discovery-card p:last-child { font-size: 13px; }
.list-heading { margin-top: 32px; }
.cards { margin-top: 26px; }
.saved-card { padding: 20px; }
.saved-card .run-saved { font-size: 18px; }
.result h3 { font-size: 19px; }
.result p { font-size: 14px; line-height: 1.7; }
.contribute-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.panel { border-color: var(--line); border-radius: 10px; padding: 26px; }
.panel h2 { margin-bottom: 16px; }
.contribution-explainer { padding: 26px 0 0; }
.contribution-explainer > p, .status-example p { line-height: 1.7; }
.status-example { margin-top: 16px; padding-top: 16px; }
#shared-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, .7fr) auto; gap: 16px; align-items: end; margin-bottom: 20px; }
#shared-form label { margin: 0; }
#shared-result:empty { display: none; }
.shared-article-text { white-space: pre-wrap; overflow-wrap: anywhere; }
#shared-refresh { margin-top: 4px; }
.setup-grid { gap: 20px; margin-top: 28px; }
.setup-grid .panel { min-width: 0; }
.setup-grid .panel > p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.setup-grid .panel > .fine { font-size: 11px; }
.setup-grid pre { margin: 18px 0; padding: 16px; line-height: 1.7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.setup-links { gap: 14px 24px; margin-top: 18px; }
.guest-banner { margin: 20px 48px 0; padding: 14px 18px; background: #1d2517; border-color: #3b4730; }
footer { padding: 18px 48px; margin-top: auto; color: var(--muted); font-size: 11px; }
footer span { font: inherit; font-weight: 600; }
.onboarding-inner { margin: 60px auto; }
.onboarding h1 { font-size: 42px; }
@media (min-width: 1550px) { .view { padding-top: 40px; } }
@media (max-width: 1050px) {
  aside { width: 212px; padding-left: 14px; padding-right: 14px; }
  .view { padding: 32px; }
  #request-limits, .corpus-note { padding: 0 32px; }
  #shared-form { grid-template-columns: 1fr 1fr; }
  #shared-form .primary { grid-column: 1 / -1; }
  .guest-banner { margin-left: 32px; margin-right: 32px; }
}
@media (max-width: 760px) {
  .entry-story { padding: 26px; gap: 24px; }
  .entry-story h1 { font-size: 36px; margin-bottom: 12px; }
  .entry-story .intro { margin-bottom: 0; font-size: 14px; }
  .entry-form { padding: 32px 26px 44px; }
  .app aside { display: grid; width: 100%; height: auto; padding: 18px 20px; gap: 16px; overflow: visible; }
  aside .brand { padding: 0; margin: 0; font-size: 28px; }
  nav { overflow-x: auto; padding-bottom: 2px; gap: 4px; }
  .nav-item { flex: 1 0 auto; justify-content: center; padding: 9px 10px; font-size: 12px; min-height: 42px; }
  .nav-item > span { display: none; }
  .credits-section { grid-column: 1 / -1; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
  .credit-balance { margin-bottom: 8px; font-size: 16px; }
  .monthly-credits { border: 0; padding: 0; }
  .monthly-credits dl { margin: 8px 0; }
  .monthly-credits > .fine:last-child { display: none; }
  #buy-credits { width: auto; }
  .account { min-height: 0; padding: 0; }
  main { padding-top: 18px; }
  #request-limits, .corpus-note { padding: 0 22px; font-size: 10px; }
  .view { padding: 28px 22px 40px; }
  .view > h1 { font-size: 30px; }
  .view > .muted { font-size: 13px; margin-bottom: 22px; }
  .search-box .primary { padding: 10px 12px; gap: 6px; }
  .search-box input { font-size: 13px; }
  .mode-picker button { padding: 8px 10px; }
  .contribute-grid, .setup-grid, #shared-form { grid-template-columns: 1fr; }
  .panel { padding: 22px; }
  .setup-grid article:last-child, #shared-form .primary { grid-column: auto; }
  .contribution-explainer { padding: 18px 2px 0; }
  .guest-banner { margin: 18px 22px 0; flex-direction: row; align-items: center; padding: 12px; }
  .guest-banner .secondary { white-space: normal; min-width: 80px; }
  .discovery-card { padding: 30px 18px; margin-top: 28px; }
  .onboarding-inner { margin: 38px auto; }
  .onboarding h1 { font-size: 34px; }
  footer { padding: 18px 22px; }
}

.boot { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; background: var(--bg); }
.boot .brand { margin-bottom: 8px; }
.boot p { margin: 0; color: var(--muted); font-size: 13px; }
.loading-spinner { width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--lime); border-radius: 50%; animation: loading-turn .9s linear infinite; }
@keyframes loading-turn { to { transform: rotate(360deg); } }
.monthly-credits .monthly-free { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 0 0 10px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.monthly-free dt { font-size: 12px; color: var(--ink); }
.monthly-free dd { margin: 0; color: var(--lime); }
@media (prefers-reduced-motion: reduce) { .loading-spinner { animation: none; } }

/* Full-size native controls and a dedicated, explicit purchase flow. */
select { -webkit-appearance: none; appearance: none; min-height: 46px; line-height: 1.4; padding: 12px 38px 12px 14px; background-image: linear-gradient(45deg, transparent 50%, #a8b09f 50%), linear-gradient(135deg, #a8b09f 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
#shared-form input, #shared-form button { min-height: 46px; }
#shared-form { margin-bottom: 24px; }
#shared-result:not(:empty) { margin: 0 0 16px; }
#shared-refresh { display: inline-flex; margin: 16px 0 4px; min-height: 44px; }
.manage-credits { margin-top: 12px; padding: 4px 0; }
.billing-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 28px 0 24px; }
.billing-overview .panel { padding: 24px; }
.billing-overview .fine { margin-bottom: 10px; }
.billing-overview .fine:last-child { margin: 10px 0 0; }
.billing-value { display: block; font-size: 32px; line-height: 1.2; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.billing-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.purchase-card { border-color: #4b593a; }
.purchase-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 26px; }
.purchase-heading h2 { margin: 0; }
.billing-tag { border: 1px solid var(--line); border-radius: 20px; padding: 4px 9px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.purchase-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.purchase-price > strong { font-size: 48px; line-height: 1.1; font-weight: 600; letter-spacing: -.055em; }
.purchase-price > span { color: var(--muted); font-size: 14px; }
.purchase-price span strong { color: var(--ink); font-weight: 500; }
.purchase-card > .muted { font-size: 13px; }
.billing-mode { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; margin: 24px 0 14px; }
.purchase-card #buy-credits { min-height: 46px; margin: 0; }
.purchase-card #payment-info { margin-top: 14px; }
.billing-explainer { padding: 24px 0; }
.billing-explainer p { font-size: 13px; line-height: 1.75; }
.billing-explainer > .fine { font-size: 11px; margin-top: 24px; }
@media (max-width: 760px) {
  .billing-overview { gap: 12px; margin-top: 24px; }
  .billing-overview .panel { padding: 18px; }
  .billing-value { font-size: 26px; }
  .billing-grid { grid-template-columns: 1fr; gap: 0; }
  .purchase-heading { flex-wrap: wrap; }
  .purchase-price > strong { font-size: 40px; }
  .billing-explainer { padding: 28px 2px 0; }
}

/* Plans keep the free allowance visible beside optional paid access. */
.billing-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.plan-card { display: flex; flex-direction: column; align-items: stretch; }
.plan-card .purchase-heading { margin-bottom: 22px; flex-wrap: wrap; }
.plan-card .muted, .plan-card > .fine { font-size: 13px; line-height: 1.7; }
.plan-card > .fine { margin: auto 0 0; padding-top: 8px; }
.plan-allowance { font-size: 14px; line-height: 1.65; margin: 6px 0 14px; }
.plan-allowance strong { color: var(--lime); font-weight: 600; }
.plan-card .primary { width: 100%; margin-top: auto; }
.billing-plan-status { display: block; font-size: 19px; font-weight: 600; line-height: 1.5; }
#manage-subscription { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; }
#payment-info { padding: 0 2px; }
.topup-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 24px; padding: 24px; }
.topup-card h2 { font-size: 18px; margin-bottom: 8px; }
.topup-price { margin-bottom: 8px; font-size: 14px; }
.topup-card .fine { margin: 0; line-height: 1.65; }
.topup-card #buy-credits { width: auto; flex-shrink: 0; min-height: 46px; margin: 0; }
.billing-footnote { margin-top: 24px; color: var(--muted); }
.billing-footnote p { font-size: 12px; line-height: 1.75; margin-bottom: 10px; }
.billing-footnote strong { color: var(--ink); font-weight: 500; }
.billing-footnote .text-button { margin-left: 6px; }
@media (max-width: 760px) {
  .billing-plans { grid-template-columns: 1fr; gap: 16px; }
  .billing-overview { grid-template-columns: 1fr 1fr; }
  .billing-plan-status { font-size: 16px; }
  .topup-card { flex-direction: column; align-items: stretch; gap: 18px; padding: 22px; }
  .topup-card #buy-credits { width: 100%; justify-content: center; }
}
@media (max-width: 420px) { .billing-overview { grid-template-columns: 1fr; } }

/* Keep daily navigation light; billing owns the detailed credit ledger. */
.credits-section { padding: 24px 10px 20px; }
.sidebar-allowance { margin: 8px 0 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.credits-section .manage-credits { margin-top: 8px; }
.workspace-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; width: 100%; max-width: 980px; padding: 0 48px; margin: 0 auto; }
.workspace-meta .corpus-note { flex: 1 1 280px; width: auto; margin: 0; padding: 0; }
.usage-limits { margin-left: auto; font-size: 11px; color: var(--muted); }
.usage-limits summary { cursor: pointer; padding: 6px 0; line-height: 1.7; }
.usage-limits summary:hover { color: var(--ink); }
.usage-limits[open] { flex-basis: 100%; }
.usage-limits #request-limits { max-width: none; padding: 14px 16px; margin: 6px 0 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 12px; line-height: 1.8; }
.billing-activity { margin-top: 30px; padding: 24px; }
.activity-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.activity-heading h2 { font-size: 18px; margin: 0; }
.activity-heading .fine { margin: 0; font-size: 11px; }
.billing-activity dl { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; }
.billing-activity .monthly-free { display: block; grid-column: auto; padding: 0; margin: 0; border: 0; }
.billing-activity dt, .billing-activity .monthly-free dt { color: var(--muted); font-size: 12px; }
.billing-activity dd, .billing-activity .monthly-free dd { font-size: 24px; margin: 6px 0 0; line-height: 1.3; }
@media (max-width: 1050px) { .workspace-meta { padding: 0 32px; } }
@media (max-width: 760px) {
  .credits-section { padding: 12px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 18px; row-gap: 2px; }
  .credits-section .credit-balance { margin: 0; }
  .sidebar-allowance, .credits-section .manage-credits { margin: 0; }
  .workspace-meta { padding: 0 22px; gap: 4px 16px; }
  .workspace-meta .corpus-note { font-size: 11px; flex-basis: 220px; }
  .usage-limits { margin-left: 0; }
  .usage-limits summary { min-height: 36px; display: list-item; padding: 8px 0; }
  .billing-activity { padding: 22px; }
  .billing-activity dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 0; }
  .activity-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}
:root .auth-options { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 8px 0; }
:root .auth-options .text-button { min-height: 36px; padding: 8px 12px; font-size: 13px; font-weight: 400; color: var(--muted); }
:root .auth-options .text-button:hover { color: var(--accent); }
