:root {
  --navy: #0d1b2a;
  --navy-soft: #16283a;
  --blue: #1b4f8c;
  --blue-light: #2f6fad;
  --gold: #d4af37;
  --gold-soft: #eadb9a;
  --white: #ffffff;
  --light: #f4f7fa;
  --light-blue: #edf4fa;
  --gray: #667085;
  --gray-dark: #344054;
  --border: #dbe3ea;
  --shadow: 0 20px 55px rgba(13, 27, 42, .12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--navy);
  background: var(--white);
  font-family:
    Inter,
    "Segoe UI",
    Arial,
    Helvetica,
    sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  width: 270px;
  max-height: 62px;
  object-fit: contain;
  object-position: left center;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--gray-dark);
  font-size: 15px;
  font-weight: 650;
}

.main-nav a {
  transition: color .2s ease;
}

.main-nav a:hover {
  color: var(--blue);
}

.login-link {
  padding: 10px 18px;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 9px;
  transition:
    background .2s ease,
    color .2s ease;
}

.login-link:hover {
  color: var(--white) !important;
  background: var(--blue);
}

/* HERO */

.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 100px;
  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(27, 79, 140, .13),
      transparent 32%
    ),
    linear-gradient(
      135deg,
      #f8fafc 0%,
      #edf3f8 100%
    );
}

.hero::after {
  content: "";
  position: absolute;
  right: -150px;
  bottom: -170px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(212, 175, 55, .25);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  gap: 72px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 25px;
  font-size: clamp(42px, 5vw, 66px);
  line-height: 1.06;
  letter-spacing: -.035em;
}

.hero-lead {
  max-width: 720px;
  margin: 0;
  color: #465568;
  font-size: 20px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 34px 0 24px;
}

.btn {
  min-height: 52px;
  padding: 0 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-weight: 750;
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 10px 25px rgba(27, 79, 140, .22);
}

.btn-primary:hover {
  background: #153f70;
}

.btn-secondary {
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--border);
}

.ai-notice {
  position: relative;
  max-width: 720px;
  margin: 0;
  padding-left: 18px;
  color: var(--gray);
  font-size: 13px;
}

.ai-notice::before {
  content: "";
  position: absolute;
  top: .5em;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
}

.hero-visual {
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual img {
  width: 100%;
  max-height: 510px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* FEATURES */

.features {
  padding: 105px 0;
  background: var(--white);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 50px;
}

.section-heading h2,
.benefits h2,
.cta-box h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 49px);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.feature-card {
  min-height: 285px;
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(13, 27, 42, .04);
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: #c8d4df;
  box-shadow: 0 18px 40px rgba(13, 27, 42, .09);
}

.feature-number {
  color: var(--gold);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .08em;
}

.feature-card h3 {
  margin: 17px 0 12px;
  font-size: 21px;
  line-height: 1.3;
}

.feature-card p {
  margin: 0;
  color: var(--gray);
}

/* BENEFITS */

.benefits {
  position: relative;
  overflow: hidden;
  padding: 105px 0;
  color: var(--white);
  background:
    linear-gradient(
      135deg,
      var(--navy) 0%,
      #102c48 100%
    );
}

.benefits::after {
  content: "";
  position: absolute;
  top: -160px;
  right: -160px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(212, 175, 55, .18);
  border-radius: 50%;
}

.benefits .eyebrow {
  color: var(--gold);
}

.benefits-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 90px;
}

.benefit-list {
  display: grid;
  gap: 0;
}

.benefit-item {
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
}

.benefit-item:first-child {
  padding-top: 0;
}

.benefit-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--white);
  font-size: 19px;
}

.benefit-item span {
  color: #cbd5e1;
}

/* CTA */

.cta-section {
  padding: 90px 0;
  background: var(--light);
}

.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 55px;
  padding: 50px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 35px rgba(13, 27, 42, .05);
}

.cta-box p:not(.eyebrow) {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--gray);
}

/* FOOTER */

.site-footer {
  padding: 66px 0 30px;
  color: #cbd5e1;
  background: #07111d;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: start;
}

.footer-logo {
  width: 250px;
  max-height: 65px;
  margin-bottom: 18px;
  object-fit: contain;
  object-position: left center;
}

.footer-grid p {
  max-width: 580px;
  margin: 0;
  color: #9eabb9;
}

.footer-links {
  display: grid;
  gap: 11px;
  min-width: 175px;
}

.footer-links a {
  transition: color .2s ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.footer-bottom p {
  max-width: 940px;
  margin: 0;
  color: #8492a2;
  font-size: 13px;
}

/* ACCESSIBILITY */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* RESPONSIVE */

@media (max-width: 1020px) {
  .main-nav {
    gap: 17px;
    font-size: 14px;
  }

  .brand-logo {
    width: 225px;
  }

  .hero-grid {
    gap: 45px;
  }

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 74px;
  }

  .main-nav {
    display: none;
  }

  .hero {
    padding: 65px 0 75px;
  }

  .hero-grid,
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: auto;
  }

  .benefits-grid {
    gap: 45px;
  }

  .cta-box {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .brand-logo {
    width: 205px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-lead {
    font-size: 18px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .feature-card {
    min-height: auto;
  }

  .cta-box {
    padding: 32px 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* AUTH */

.auth-page {
  min-height: 100vh;
  background: var(--light);
}

.auth-main {
  min-height: calc(100vh - 86px);
  padding: 70px 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.auth-card {
  width: min(100%, 520px);
  padding: 42px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card-wide {
  width: min(100%, 650px);
}

.auth-card h1 {
  margin: 0 0 12px;
  font-size: 38px;
  line-height: 1.15;
}

.auth-intro {
  margin: 0 0 30px;
  color: var(--gray);
}

.auth-form {
  display: grid;
  gap: 20px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--gray-dark);
  font-size: 14px;
  font-weight: 700;
}

.auth-form input:not([type="checkbox"]) {
  width: 100%;
  min-height: 50px;
  padding: 10px 13px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid #cbd5df;
  border-radius: 8px;
}

.auth-form input:not([type="checkbox"]):focus {
  border-color: var(--blue);
  outline: 3px solid rgba(27, 79, 140, .12);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.consent-row {
  grid-template-columns: auto 1fr !important;
  align-items: start;
  font-weight: 400 !important;
  line-height: 1.5;
}

.consent-row input {
  margin-top: 4px;
}

.consent-row a,
.auth-switch a {
  color: var(--blue);
  text-decoration: underline;
}

.form-message {
  min-height: 24px;
  font-size: 14px;
}

.form-message-error {
  color: #b42318;
}

.form-message-success {
  color: #067647;
}

.auth-switch {
  margin: 26px 0 0;
  color: var(--gray);
  text-align: center;
}

.auth-ai-notice {
  margin-top: 28px;
}

@media (max-width: 560px) {
  .auth-main {
    padding: 35px 14px;
  }

  .auth-card {
    padding: 28px 22px;
  }

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

/* DASHBOARD */

.dashboard-page {
  min-height: 100vh;
  background: var(--light);
}

.dashboard-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.dashboard-header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.dashboard-user {
  display: flex;
  align-items: center;
  gap: 18px;
}

.dashboard-user > div {
  display: grid;
  text-align: right;
}

.dashboard-user span {
  color: var(--gray);
  font-size: 13px;
}

.dashboard-main {
  padding: 55px 0 90px;
}

.dashboard-welcome {
  margin-bottom: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.dashboard-welcome h1 {
  margin: 0 0 8px;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.1;
}

.dashboard-welcome p:not(.eyebrow) {
  margin: 0;
  color: var(--gray);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 25px;
  align-items: start;
}

.dashboard-panel {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    0 8px 28px
    rgba(13, 27, 42, .05);
}

#new-request-panel {
  margin-bottom: 25px;
}

.panel-heading {
  margin-bottom: 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 25px;
}

.dashboard-form {
  display: grid;
  gap: 18px;
}

.dashboard-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  font-size: 14px;
}

.dashboard-form input,
.dashboard-form textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid #cbd5df;
  border-radius: 8px;
}

.dashboard-link-button {
  padding: 0;
  color: var(--blue);
  background: none;
  border: 0;
  cursor: pointer;
  font-weight: 700;
}

.dashboard-link-button:hover {
  text-decoration: underline;
}

.requests-list {
  display: grid;
  gap: 10px;
}

.request-item {
  width: 100%;
  padding: 16px;
  display: grid;
  gap: 6px;
  text-align: left;
  color: var(--navy);
  background: #fbfcfd;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.request-item:hover {
  border-color: var(--blue);
  background: var(--light-blue);
}

.request-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.request-code,
.request-date,
.request-owner {
  color: var(--gray);
  font-size: 12px;
}

.status-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  color: #175cd3;
  background: #eff8ff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.detail-panel {
  min-height: 520px;
}

.empty-state {
  min-height: 450px;
  padding: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: var(--gray);
}

.empty-state-logo {
  width: 130px;
  margin-bottom: 22px;
}

.empty-state h2 {
  margin: 0 0 8px;
  color: var(--navy);
}

.detail-header {
  padding-bottom: 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.detail-header h2 {
  margin: 0 0 8px;
  font-size: 29px;
}

.detail-description {
  margin: 0;
  color: var(--gray);
  white-space: pre-wrap;
}

.owner-box {
  margin: 18px 0;
  padding: 13px 15px;
  color: var(--gray-dark);
  background: var(--light-blue);
  border-radius: 8px;
  font-size: 14px;
}

.detail-section {
  padding-top: 30px;
}

.detail-section + .detail-section {
  margin-top: 30px;
  border-top: 1px solid var(--border);
}

.detail-section-heading h3 {
  margin: 0 0 18px;
  font-size: 22px;
}

.upload-form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.upload-form input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.upload-help {
  margin: 7px 0;
  color: var(--gray);
  font-size: 12px;
}

.documents-list {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.document-card {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: #fbfcfd;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.document-info {
  display: grid;
  gap: 3px;
}

.document-info span {
  color: var(--gray);
  font-size: 12px;
}

.document-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.professional-warning {
  margin-bottom: 25px;
  padding: 18px;
  color: #614b00;
  background: #fffbea;
  border: 1px solid #eadb9a;
  border-radius: 10px;
}

.professional-warning p {
  margin: 6px 0 0;
}

.analyses-list {
  display: grid;
  gap: 20px;
}

.analysis-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.analysis-card-header {
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.analysis-card-header > div {
  display: grid;
}

.analysis-id {
  font-weight: 800;
}

.analysis-date {
  color: var(--gray);
  font-size: 12px;
}

.review-badge {
  height: fit-content;
  padding: 6px 10px;
  color: #7a2e0e;
  background: #fff4ed;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.analysis-block {
  margin-top: 22px;
}

.analysis-block h4 {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 16px;
}

.analysis-block p {
  margin: 0;
  white-space: pre-wrap;
}

.analysis-block ul {
  margin: 8px 0 0;
  padding-left: 22px;
}

.analysis-block li {
  margin-bottom: 7px;
}

.loading-text,
.empty-list {
  color: var(--gray);
}

@media (max-width: 1000px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .requests-panel {
    max-height: 440px;
    overflow-y: auto;
  }
}

@media (max-width: 700px) {
  .dashboard-header-inner,
  .dashboard-welcome,
  .detail-header,
  .document-card,
  .analysis-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-user {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-user > div {
    text-align: left;
  }

  .upload-form,
  .document-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-panel {
    padding: 20px;
  }
}

/* CONTENT PAGES */

.content-hero {
  padding: 75px 0;
  color: var(--white);
  background:
    linear-gradient(
      135deg,
      var(--navy),
      #12385e
    );
}

.content-hero .eyebrow {
  color: var(--gold);
}

.content-hero-inner {
  max-width: 900px;
}

.content-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -.03em;
}

.content-hero p:not(.eyebrow) {
  max-width: 780px;
  margin: 0;
  color: #d6e0ea;
  font-size: 19px;
}

.content-section {
  padding: 85px 0 100px;
  background: var(--light);
}

.content-layout {
  max-width: 930px;
}

.content-main {
  display: grid;
  gap: 24px;
}

.content-card {
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.content-cta {
  padding: 36px;
  background: var(--navy);
  color: var(--white);
  border-radius: 15px;
}

.content-cta h2 {
  margin-top: 0;
}

.content-cta p {
  color: #cbd5e1;
}

.steps-list {
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
  list-style: none;
}

.step-card {
  padding: 27px;
  display: grid;
  grid-template-columns: 55px 1fr;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.step-card > span {
  color: var(--gold);
  font-size: 18px;
  font-weight: 900;
}

.step-card h2 {
  margin: 0 0 7px;
  font-size: 22px;
}

.step-card p {
  margin: 0;
  color: var(--gray);
}

.legal-content {
  padding: 40px;
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 15px;
}

.legal-content h2 {
  margin: 35px 0 10px;
  font-size: 22px;
}

.legal-content h2:first-of-type {
  margin-top: 10px;
}

.legal-content p {
  color: var(--gray-dark);
}

.legal-alert,
.data-placeholder {
  margin-bottom: 28px;
  padding: 18px;
  color: #614b00;
  background: #fffbea;
  border: 1px solid #eadb9a;
  border-radius: 10px;
}

.legal-alert p,
.data-placeholder p {
  margin-bottom: 0;
}

@media (max-width: 650px) {
  .content-hero {
    padding: 55px 0;
  }

  .content-section {
    padding: 55px 0 70px;
  }

  .content-card,
  .legal-content {
    padding: 24px 20px;
  }

  .step-card {
    grid-template-columns: 1fr;
  }
}

/* COOKIE TABLE */

.cookie-table-wrapper {
  margin: 22px 0 30px;
  overflow-x: auto;
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cookie-table th,
.cookie-table td {
  padding: 14px;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--border);
}

.cookie-table th {
  color: var(--navy);
  background: var(--light-blue);
}

.cookie-table code {
  font-weight: 700;
}
/* AI ANALYSIS PROGRESS */

.ai-progress {
  margin: 18px 0 24px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.ai-progress[hidden] {
  display: none !important;
}

.ai-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.ai-progress-time {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.7;
}

.ai-progress-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  background: #e8edf3;
  border-radius: 999px;
}

.ai-progress-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 38%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #173b63,
    #2f79b7,
    #173b63
  );
  animation:
    ai-progress-move
    1.4s
    ease-in-out
    infinite;
}

.ai-progress-status {
  margin: 14px 0 5px;
  font-weight: 700;
  line-height: 1.45;
}

.ai-progress-help {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.72;
}

.ai-progress-complete
.ai-progress-bar {
  width: 100%;
  animation: none;
}

.ai-progress-error
.ai-progress-bar {
  animation: none;
  width: 100%;
}

@keyframes ai-progress-move {
  0% {
    left: -40%;
  }

  50% {
    left: 52%;
  }

  100% {
    left: 105%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-progress-bar {
    animation-duration: 3s;
  }
}

@media (max-width: 560px) {
  .ai-progress-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

/*
 * Azioni disponibili sulle analisi IA.
 */

.analysis-actions {
  margin-top: 26px;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--border);
}

.professional-request-button {
  font-weight: 800;
}

.professional-request-message {
  margin-top: 12px;
  font-size: 13px;
}

.professional-request-success {
  color: #176b3a;
  font-weight: 700;
}

.professional-request-error {
  color: #a32626;
  font-weight: 700;
}

@media (max-width: 700px) {
  .analysis-actions {
    display: grid;
  }

  .analysis-actions button {
    width: 100%;
  }
}

/*
 * Pulsante di richiesta professionale visibile
 * anche nell'intestazione di ogni analisi IA.
 */
.professional-request-button-top {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.professional-request-button-top:disabled {
  cursor: default;
  opacity: 0.65;
}


/*
 * APPROFONDIMENTO IA
 * Conversazione contestuale collegata alla singola analisi.
 */

.ai-followup {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.72);
}

.ai-followup-header {
  margin-bottom: 18px;
}

.ai-followup-header h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.ai-followup-header p {
  margin: 0;
  line-height: 1.6;
}

.ai-followup-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
  max-height: 520px;
  overflow-y: auto;
}

.ai-followup-empty {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.94rem;
}

.ai-followup-message {
  max-width: 92%;
  padding: 14px 16px;
  border-radius: 14px;
  line-height: 1.6;
}

.ai-followup-message-user {
  align-self: flex-end;
  background: rgba(226, 232, 240, 0.9);
}

.ai-followup-message-assistant {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.32);
}

.ai-followup-message-label {
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-followup-message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-followup-form {
  margin-top: 6px;
}

.ai-followup-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.ai-followup-question {
  display: block;
  width: 100%;
  min-height: 110px;
  padding: 14px 16px;
  resize: vertical;
  border: 1px solid rgba(100, 116, 139, 0.45);
  border-radius: 12px;
  background: #ffffff;
  font: inherit;
  line-height: 1.5;
}

.ai-followup-question:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.ai-followup-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.ai-followup-disclaimer {
  flex: 1;
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0.78;
}

.ai-followup-submit {
  flex: 0 0 auto;
}

.ai-followup-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.ai-followup-status {
  min-height: 22px;
  margin-top: 10px;
  font-size: 0.9rem;
}

.ai-followup-success {
  font-weight: 600;
}

.ai-followup-error {
  font-weight: 600;
}

@media (max-width: 760px) {
  .ai-followup {
    padding: 16px;
  }

  .ai-followup-message {
    max-width: 100%;
  }

  .ai-followup-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-followup-submit {
    width: 100%;
  }
}


/*
 * STAMPA
 * La conversazione IA non viene inclusa nella stampa dell'analisi.
 */

@media print {
  .ai-followup {
    display: none !important;
  }
}
