:root {
  --color-white: #ffffff;
  --color-soft: #f5f5f5;
  --color-ink: #3e4355;
  --color-muted: #575c71;
  --color-accent: #c39167;
  --color-accent-dark: #9f744f;
  --color-line: #e6e8ec;
  --color-teal: #2f7f84;
  --shadow-panel: 0 20px 50px rgba(62, 67, 85, 0.12);
  --radius: 8px;
  color-scheme: light;
  font-family: "Avenir Next", "Helvetica Neue", Inter, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-ink);
}

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

button,
textarea,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 132px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  color: var(--color-accent);
  background: transparent;
}

.brand-mark svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.brand strong {
  display: block;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
  margin-left: 124px;
  margin-right: auto;
  color: var(--color-ink);
  font-size: 14px;
  font-weight: 400;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0.3);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  opacity: 0.8;
  transform: scaleX(1);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.language-trigger,
.ghost-button,
.primary-button {
  min-height: 42px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 400;
}

.language-menu {
  position: relative;
}

.language-trigger,
.ghost-button {
  border: 0;
  background: transparent;
  color: var(--color-ink);
  padding: 0;
}

.language-trigger {
  display: inline-grid;
  place-items: center;
  width: 40px;
}

.flag-circle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(62, 67, 85, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(62, 67, 85, 0.08);
}

.language-options {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  min-width: 168px;
  border: 1px solid rgba(230, 232, 236, 0.96);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  padding: 6px;
  box-shadow: 0 20px 44px rgba(62, 67, 85, 0.14);
  backdrop-filter: blur(16px);
}

.language-options[hidden] {
  display: none;
}

.language-options button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--color-ink);
  cursor: pointer;
  padding: 0 10px;
  text-align: left;
}

.language-options button:hover,
.language-options button:focus-visible {
  background: rgba(195, 145, 103, 0.1);
}

.ghost-button {
  position: relative;
  font-size: 14px;
}

.ghost-button::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0.3);
  transition: opacity 160ms ease, transform 160ms ease;
}

.ghost-button:hover::after,
.ghost-button:focus-visible::after {
  opacity: 0.8;
  transform: scaleX(1);
}

.primary-button {
  border: 1px solid rgba(62, 67, 85, 0.86);
  background: var(--color-ink);
  color: var(--color-white);
  padding: 0 26px;
  box-shadow: 0 12px 28px rgba(62, 67, 85, 0.18);
}

.primary-button:hover {
  border-color: var(--color-accent-dark);
  background: var(--color-accent-dark);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #ffffff;
}

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 1;
  filter: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.98) 36%, rgba(255, 255, 255, 0.56) 50%, rgba(255, 255, 255, 0.1) 64%, rgba(255, 255, 255, 0) 78%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 28%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding-top: 76px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-family: "Avenir Next", "Helvetica Neue", Inter, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(68px, 8vw, 118px);
  line-height: 0.88;
  font-weight: 300;
  letter-spacing: 0;
  color: var(--color-ink);
}

h1 span {
  color: var(--color-accent);
  font-size: 0.46em;
  font-weight: 300;
  vertical-align: baseline;
}

.slogan {
  margin-bottom: 12px;
  max-width: 580px;
  font-size: clamp(27px, 2.8vw, 40px);
  line-height: 1.12;
  font-weight: 300;
}

.subcopy {
  max-width: 520px;
  margin-bottom: 34px;
  color: var(--color-muted);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
}

.ai-panel {
  width: min(560px, 100%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.ai-panel textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 0;
  border-bottom: 1px solid rgba(62, 67, 85, 0.28);
  border-radius: 0;
  padding: 0 0 18px;
  color: var(--color-ink);
  background: transparent;
  font-size: 22px;
  font-weight: 300;
  line-height: 1.45;
  outline: none;
}

.ai-panel textarea::placeholder {
  color: rgba(87, 92, 113, 0.72);
}

.ai-panel textarea:focus {
  border-color: var(--color-accent);
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 18px;
}

.practice-results {
  width: min(960px, 100%);
  margin-top: 34px;
  border: 1px solid rgba(230, 232, 236, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  padding: 24px;
  box-shadow: 0 26px 70px rgba(62, 67, 85, 0.16);
  backdrop-filter: blur(18px);
}

.practice-results[hidden],
.other-cases[hidden] {
  display: none;
}

.results-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.results-head .eyebrow {
  margin-bottom: 8px;
}

.results-head h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 300;
  line-height: 1.08;
}

.results-count,
.status-text {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.55;
}

.results-count {
  max-width: 280px;
  margin: 4px 0 0;
  text-align: right;
}

.status-text {
  margin-bottom: 16px;
}

.practice-results.has-error .status-text {
  color: #a44734;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.case-card {
  border: 1px solid rgba(230, 232, 236, 0.98);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(250, 246, 240, 0.9));
  padding: 18px;
}

.case-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.case-number {
  color: var(--color-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.confidence-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(47, 127, 132, 0.28);
  border-radius: 999px;
  background: rgba(47, 127, 132, 0.08);
  color: var(--color-teal);
  padding: 5px 9px;
  font-size: 12px;
}

.case-summary {
  margin-bottom: 16px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.58;
}

.case-meta {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.case-meta div {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 10px;
}

.case-meta dt {
  color: rgba(87, 92, 113, 0.78);
  font-size: 12px;
}

.case-meta dd {
  margin: 0;
  color: var(--color-ink);
  font-size: 13px;
  line-height: 1.42;
}

.case-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.download-chip,
.other-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid rgba(62, 67, 85, 0.84);
  border-radius: 999px;
  background: var(--color-ink);
  color: var(--color-white);
  padding: 0 14px;
  font-size: 13px;
}

.download-chip.disabled,
.other-download.muted {
  border-color: rgba(87, 92, 113, 0.2);
  background: rgba(87, 92, 113, 0.08);
  color: var(--color-muted);
}

.download-note {
  color: var(--color-muted);
  font-size: 12px;
}

.other-cases {
  margin-top: 18px;
  border-top: 1px solid var(--color-line);
  padding-top: 18px;
}

.other-cases h3 {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 400;
}

.other-cases p {
  margin-bottom: 12px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.55;
}

.other-progress {
  margin-bottom: 12px;
  color: var(--color-teal);
  font-size: 13px;
}

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

.other-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(230, 232, 236, 0.98);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 14px;
}

.other-item div {
  display: grid;
  gap: 4px;
}

.other-item strong {
  font-size: 14px;
}

.other-item span {
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.4;
}

.show-more-button {
  min-height: 40px;
  margin-top: 14px;
  border: 1px solid rgba(62, 67, 85, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--color-ink);
  cursor: pointer;
  padding: 0 18px;
  font-size: 14px;
  box-shadow: 0 12px 26px rgba(62, 67, 85, 0.08);
}

.show-more-button:hover,
.show-more-button:focus-visible {
  border-color: rgba(195, 145, 103, 0.5);
  background: rgba(195, 145, 103, 0.1);
}

.show-more-button[hidden] {
  display: none;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0;
}

.muted-section {
  width: 100%;
  max-width: none;
  padding-inline: max(20px, calc((100vw - 1180px) / 2));
  background: var(--color-soft);
}

.section-heading {
  max-width: 650px;
  margin-bottom: 34px;
}

.section-heading h2 {
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.08;
  font-weight: 300;
  letter-spacing: 0;
}

.feature-grid,
.pricing-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pricing-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-grid article,
.pricing-row article {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-white);
  padding: 26px;
}

.feature-grid span {
  display: inline-block;
  margin-bottom: 36px;
  color: var(--color-accent);
  font-weight: 400;
}

.feature-grid h3,
.pricing-row h3 {
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 350;
}

.feature-grid p,
.pricing-row p {
  margin-bottom: 0;
  color: var(--color-muted);
  line-height: 1.6;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0;
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(30, 35, 50, 0.42);
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none;
}

.auth-modal {
  position: relative;
  width: min(460px, 100%);
  border-radius: var(--radius);
  background: var(--color-white);
  padding: 30px;
  box-shadow: var(--shadow-panel);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-white);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.auth-modal label,
.auth-modal span,
.auth-modal input {
  display: block;
}

.auth-modal label {
  margin: 20px 0 16px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-modal input {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 13px 14px;
}

.auth-modal input:disabled {
  background: rgba(241, 238, 231, 0.78);
  color: var(--color-muted);
}

.auth-status {
  min-height: 20px;
  margin: 0 0 14px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-status.is-error {
  color: #b42318;
}

.auth-status.is-success {
  color: #147a46;
}

.full-width {
  width: 100%;
}

.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;
}

@media (max-width: 820px) {
  .site-header {
    width: min(100% - 32px, 720px);
    padding: 16px 0;
    gap: 12px;
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand-mark {
    width: 26px;
    height: 26px;
  }

  .brand-mark svg {
    width: 20px;
    height: 20px;
  }

  .brand strong {
    font-size: 15px;
  }

  .nav-links {
    display: none;
  }

  .header-actions {
    gap: 14px;
  }

  .ghost-button {
    min-height: 34px;
    font-size: 14px;
  }

  .language-trigger {
    min-height: 34px;
    width: 34px;
  }

  .flag-circle {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .language-options {
    right: -8px;
    min-width: 156px;
  }

  .hero {
    min-height: 100svh;
    align-items: flex-start;
    background: #ffffff;
  }

  .hero-photo {
    inset: auto 0 0 0;
    width: 100%;
    height: min(38svh, 330px);
    object-fit: cover;
    object-position: center 30%;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, #ffffff 0%, #ffffff 53%, rgba(255, 255, 255, 0.82) 61%, rgba(255, 255, 255, 0.06) 75%, rgba(255, 255, 255, 0) 100%),
      linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  }

  .hero-content {
    width: min(100% - 32px, 720px);
    padding-top: 98px;
  }

  h1 {
    margin-bottom: 12px;
    font-size: clamp(58px, 18.5vw, 78px);
    line-height: 0.92;
  }

  h1 span {
    font-size: 0.44em;
  }

  .slogan {
    max-width: 330px;
    margin-bottom: 12px;
    font-size: clamp(24px, 7vw, 31px);
    line-height: 1.14;
  }

  .subcopy {
    max-width: 320px;
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.5;
  }

  .ai-panel {
    width: min(100%, 360px);
  }

  .ai-panel textarea {
    min-height: 86px;
    padding-bottom: 12px;
    font-size: 17px;
    line-height: 1.48;
  }

  .panel-footer {
    align-items: center;
    justify-content: flex-start;
    margin-top: 14px;
  }

  .panel-footer .primary-button {
    min-width: 116px;
    min-height: 40px;
    padding: 0 22px;
    box-shadow: 0 12px 26px rgba(62, 67, 85, 0.16);
  }

  .practice-results {
    margin-top: 24px;
    border-radius: 14px;
    padding: 18px;
  }

  .results-head,
  .other-item {
    display: grid;
    gap: 10px;
  }

  .results-count {
    max-width: none;
    text-align: left;
  }

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

  .case-card header {
    display: grid;
  }

  .confidence-pill {
    width: fit-content;
  }

  .case-meta div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .section {
    width: min(100% - 32px, 720px);
    padding: 66px 0;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .section-heading h2 {
    font-size: clamp(29px, 9vw, 38px);
  }

  .feature-grid article,
  .pricing-row article {
    padding: 22px;
  }

  .feature-grid span {
    margin-bottom: 26px;
  }

  .site-footer {
    align-items: stretch;
    flex-direction: column;
    width: min(100% - 32px, 720px);
  }

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

@media (max-width: 420px) and (max-height: 720px) {
  .hero-content {
    padding-top: 92px;
  }

  h1 {
    margin-bottom: 10px;
    font-size: clamp(54px, 17vw, 66px);
  }

  .slogan {
    max-width: 310px;
    margin-bottom: 10px;
    font-size: clamp(23px, 6.6vw, 27px);
  }

  .subcopy {
    max-width: 315px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.45;
  }

  .ai-panel textarea {
    min-height: 70px;
    font-size: 16px;
  }

  .panel-footer {
    margin-top: 12px;
  }

  .hero-photo {
    height: 190px;
    object-position: center 28%;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, #ffffff 0%, #ffffff 63%, rgba(255, 255, 255, 0.64) 72%, rgba(255, 255, 255, 0.02) 84%, rgba(255, 255, 255, 0) 100%),
      linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
  }
}
