/* The public pages and the workbench share the Tudásműhely palette.
   Dense working surfaces stay light so existing forms, charts and status colours remain readable. */
.site-studio {
  --studio-night: #081d1c;
  --studio-forest: #123b34;
  --studio-gold: #e2cf92;
  --studio-paper: #f6f8f3;
  --studio-stroke: #cbd9cf;
  background:
    radial-gradient(circle at 83% 0, #2f5848 0, transparent 32%),
    linear-gradient(155deg, #0d302b, var(--studio-night) 65%);
  background-attachment: scroll;
}

.site-studio :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--studio-focus, var(--studio-gold));
  outline-offset: 3px;
}

.site-studio:has(> #main-content) {
  background: var(--studio-night);
}

.site-studio #workspace > [data-page]:not([data-page='academy']) button.primary:not(:disabled),
.site-studio #meeting-quick-start:not(:disabled) {
  border: 1px solid #f1dfaa;
  background: #e2cf92;
  color: #17372f;
  box-shadow: none;
}

.site-studio
  #workspace
  > [data-page]:not([data-page='academy'])
  button.primary:hover:not(:disabled),
.site-studio #meeting-quick-start:hover:not(:disabled) {
  background: #f0dda0;
  border-color: #fff0bf;
}

/* Keep the navigation compact and the currently selected task unmistakable. */
.site-studio > .sidebar {
  background: #10352f;
  border-right-color: #d8c78955;
}

.site-studio > .sidebar .nav.active {
  background: #e9e5d4;
  border-color: var(--studio-gold);
  color: #10392f;
}

.site-studio > #main-content {
  max-width: 1640px;
  color: #173a34;
}

.site-studio > #main-content > header {
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 10px 0 16px;
  border-bottom: 1px solid #d7d5ae55;
  color: #f0f5ee;
}

.site-studio > #main-content > header :is(h1, #page-description, .header-right label) {
  color: #f0f5ee;
}

.site-studio > #main-content > header h1 {
  margin: 7px 0 0;
  font-size: clamp(27px, 3vw, 42px);
  letter-spacing: -0.035em;
}

.site-studio > #main-content > header .eyebrow {
  color: var(--studio-gold);
}

.site-studio > #main-content > header #page-description {
  max-width: 68ch;
  opacity: 0.82;
}

.site-studio > #main-content > header .header-right select,
.site-studio > #main-content > header #refresh {
  border-color: #9cb5a7;
  background: #eaf0e8;
  color: #163c32;
}

/* The same action already leads the overview and case workspace. */
.site-studio:is([data-current-page='overview'], [data-current-page='calculators'])
  #meeting-quick-start {
  display: none;
}

.site-studio #workspace > [data-page]:not([data-page='academy']) {
  --studio-focus: #246749;
  padding: clamp(16px, 2vw, 26px);
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--studio-paper);
  box-shadow: none;
}

.site-studio #workspace > [data-page='academy'] {
  box-shadow: none;
}

.site-studio #workspace > [data-page]:not([data-page='academy']) .panel,
.site-studio #workspace > [data-page]:not([data-page='academy']) .stats article {
  border-color: var(--studio-stroke);
  box-shadow: none;
}

.site-studio #workspace > [data-page]:not([data-page='academy']) :is(h2, h3) {
  letter-spacing: -0.025em;
}

.site-studio #workspace > [data-page]:not([data-page='academy']) .eyebrow {
  color: #75612a;
  font-weight: 750;
}

.site-studio
  #workspace
  > [data-page]:not([data-page='academy'])
  :is(.work-hero, .calc-hero, .download-hero, .ql-hero, .ql-next-card, .mira-teacher-hero, .hero)
  .eyebrow {
  color: var(--studio-gold);
}

.site-studio
  #workspace
  > [data-page]:not([data-page='academy'])
  :is(.work-hero, .calc-hero, .download-hero) {
  --studio-focus: var(--studio-gold);
  border: 1px solid #d6c58f66;
  box-shadow: none;
}

.site-studio #workspace > [data-page]:not([data-page='academy']) .work-actions > button {
  border-color: #b8d0bd;
  box-shadow: none;
}

.site-studio #workspace > [data-page]:not([data-page='academy']) .work-actions > button:hover {
  border-color: #8a7138;
  box-shadow: none;
}

.site-studio #workspace > [data-page]:not([data-page='academy']) .work-actions > button strong {
  color: #0c5746;
}

.site-studio #workspace > [data-page]:not([data-page='academy']) :is(input, select, textarea) {
  border-color: #aebfb2;
}

.site-studio
  #workspace
  > [data-page]:not([data-page='academy'])
  :is(input, select, textarea):focus {
  border-color: #246749;
}

.site-studio #workspace > [data-page]:not([data-page='academy']) details.panel > summary {
  min-height: 44px;
  color: #17483b;
}

/* Public entry: one clear task, with secondary routes kept behind disclosures. */
.site-studio.entry-page {
  color: #f3f6f0;
}

.site-studio.entry-page .entry-card {
  width: min(100%, 510px);
  border: 1px solid #d6c58f7d;
  background: linear-gradient(155deg, #1c4339, #0d2927 70%);
  box-shadow: 0 28px 80px #020d0b88;
}

.site-studio.entry-page .brand,
.site-studio.entry-page h1,
.site-studio.entry-page h3,
.site-studio.entry-page summary {
  color: #f3f6f0;
}

.site-studio.entry-page label {
  color: #e9f0e9;
}

.site-studio.entry-page h1 {
  margin-bottom: 8px;
  font-size: clamp(30px, 6vw, 42px);
  letter-spacing: -0.04em;
}

.site-studio.entry-page .entry-intro,
.site-studio.entry-page :is(details p, section p) {
  color: #c9dad0;
}

.site-studio.entry-page .entry-intro {
  margin: 0 0 25px;
  font-size: 14px;
}

.site-studio.entry-page input {
  border-color: #b9cabc;
  background: #f6f8f3;
  color: #173a34;
}

.site-studio.entry-page button,
.site-studio.entry-page .join {
  background: linear-gradient(140deg, #f2dda0, #c8ac67);
  color: #17372f;
  border: 1px solid #efda9f;
}

.site-studio.entry-page details {
  border-color: #d6c58f55;
}

.site-studio.entry-page .join {
  margin-top: 25px;
}

.site-studio.entry-page #notice {
  color: #682e23;
}

/* Downloads: the client remains the primary choice; the host stays distinct. */
.site-studio.downloads-page .download-hero {
  background:
    radial-gradient(circle at 92% 0, #40614d 0, transparent 35%),
    linear-gradient(135deg, #17483c, #071b1b);
  border: 1px solid #d6c58f88;
  box-shadow: 0 20px 52px #020d0b77;
}

.site-studio.downloads-page .download-content,
.site-studio.downloads-page footer {
  color: #f1f5ed;
}

.site-studio.downloads-page :is(.download-heading span, .download-group > p, footer) {
  color: #ceddd0;
}

.site-studio.downloads-page .download-group-host {
  border-color: #d6c58f77;
}

.site-studio.downloads-page .download-card,
.site-studio.downloads-page .download-group-host .download-card {
  background: #f6f8f3;
  border-color: #d2dcbf;
  color: #173a34;
  box-shadow: 0 10px 25px #020d0b33;
}

.site-studio.downloads-page .download-card a {
  background: #124a3d;
  border: 1px solid #124a3d;
  color: #fff;
}

.site-studio.downloads-page .download-group-host .download-card a {
  background: transparent;
  border-color: #124a3d;
  color: #124a3d;
}

.site-studio.downloads-page :is(.download-help, .download-mobile, .release-notes-disclosure) {
  background: #e9eee6;
  color: #173a34;
}

.site-studio.downloads-page #download-retry {
  border-color: #d6c58f;
  background: #173e34;
  color: #f3e7ba;
}

/* The customer portal has the same shell but keeps documents as light paper. */
.site-studio.portal-page main {
  max-width: 850px;
  margin: clamp(16px, 4vw, 48px) auto;
  color: #edf5ed;
}

.site-studio.portal-page {
  display: flow-root;
  min-height: 100svh;
}

.site-studio.portal-page main > header {
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid #d6c58f77;
  border-radius: 22px;
  background: linear-gradient(130deg, #1d4a3b, #0b2725);
}

.site-studio.portal-page main > header :is(small, p) {
  color: #d7e6d8;
}

.site-studio.portal-page :is(section article, form) {
  background: #f6f8f3;
  border-color: #cbd9cf;
  color: #173a34;
  box-shadow: 0 10px 26px #020d0b33;
}

.site-studio.portal-page footer {
  color: #d7e6d8;
}

.site-studio.portal-page #status:not(:empty) {
  color: #63491c;
}

/* The technical reference remains readable without becoming a separate visual island. */
.site-studio.api-page {
  display: flow-root;
  min-height: 100svh;
}

.site-studio.api-page main {
  width: min(100% - 32px, 960px);
  margin: clamp(16px, 4vw, 48px) auto;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid #d6c58f88;
  border-radius: 22px;
  background: var(--studio-paper);
  color: #173a34;
  box-shadow: 0 20px 50px #020d0b55;
}

.site-studio.api-page main > .eyebrow {
  color: #75612a;
}

.site-studio.api-page pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 18px;
  border-radius: 12px;
  background: #143c33;
  color: #f0f5ee;
}

@media (max-width: 700px) {
  .site-studio > #main-content > header {
    padding-top: 18px;
  }

  .site-studio #workspace > [data-page]:not([data-page='academy']) {
    padding: 16px;
    border-radius: 18px;
  }
}

@media print {
  .site-studio,
  .site-studio #workspace > [data-page]:not([data-page='academy']) {
    background: white;
    color: black;
    box-shadow: none;
  }
}
