:root {
  --ink: #12231f;
  --ink-soft: #44564f;
  --paper: #fffdf8;
  --cream: #f5f0e6;
  --cream-dark: #e9e1d1;
  --green: #125844;
  --green-bright: #1d7158;
  --mint: #d9efe5;
  --coral: #d7634f;
  --amber: #f2b84b;
  --red-soft: #fbe9e5;
  --white: #ffffff;
  --border: #d9ded9;
  --shadow: 0 28px 80px rgba(18, 35, 31, 0.12);
  --shadow-small: 0 10px 30px rgba(18, 35, 31, 0.08);
  --radius: 20px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 88% 8%, rgba(217, 239, 229, 0.65), transparent 23rem),
    var(--paper);
  color: var(--ink);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.site-header {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(18, 35, 31, 0.11);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--paper);
  background: var(--green);
  font-family: Georgia, serif;
  font-size: 25px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: -0.03em;
}

.brand small {
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

nav a {
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--green);
}

.local-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #a8cabb;
  border-radius: 999px;
  background: rgba(217, 239, 229, 0.66);
  color: var(--green);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.local-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #29a36a;
  box-shadow: 0 0 0 4px rgba(41, 163, 106, 0.12);
}

.hero {
  width: min(1180px, calc(100% - 40px));
  min-height: 670px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(48px, 8vw, 110px);
  padding: 76px 0 82px;
}

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

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 720px;
  margin-bottom: 25px;
  font-size: clamp(50px, 6.5vw, 82px);
  line-height: 0.97;
}

h1 em {
  color: var(--green);
  font-weight: 500;
}

.hero-intro {
  max-width: 660px;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 30px;
}

.button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 19px;
  cursor: pointer;
  font-weight: 750;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

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

.button:focus-visible,
.step:focus-visible,
.export-card:focus-visible,
.upload-zone:focus-visible {
  outline: 3px solid rgba(242, 184, 75, 0.65);
  outline-offset: 3px;
}

.button.primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(18, 88, 68, 0.2);
}

.button.primary:hover {
  background: var(--green-bright);
}

.button.secondary {
  border-color: #b9c2bd;
  background: var(--white);
  color: var(--ink);
}

.button.compact {
  min-height: 40px;
  padding: 9px 14px;
  font-size: 13px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 13px;
}

.trust-row span {
  color: var(--green);
  font-weight: 900;
}

.hero-card {
  position: relative;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -25px -25px 8px 20px;
  z-index: -1;
  border-radius: 38% 62% 63% 37% / 46% 35% 65% 54%;
  background: var(--mint);
}

.paper {
  position: relative;
  min-height: 465px;
  padding: 36px;
  border: 1px solid #e1ded6;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

.paper-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e8e7e2;
}

.authority-seal {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef1ef;
  color: var(--green);
  font-weight: 850;
}

.paper-heading strong,
.paper-heading small {
  display: block;
}

.paper-heading small {
  margin-top: 4px;
  color: var(--ink-soft);
}

.paper-lines {
  display: grid;
  gap: 12px;
  padding: 36px 0 20px;
}

.paper-lines span {
  width: 72%;
  height: 9px;
  border-radius: 6px;
  background: #e8ebe9;
}

.paper-lines .long {
  width: 95%;
}

.paper-lines .medium {
  width: 84%;
}

.highlight-line {
  margin-top: 28px;
  border-left: 4px solid var(--amber);
  background: #fff7df;
  padding: 16px 18px;
}

.highlight-line small,
.highlight-line strong {
  display: block;
}

.highlight-line small {
  color: #745814;
  margin-bottom: 4px;
}

.explain-bubble {
  position: absolute;
  width: min(330px, 92%);
  right: -50px;
  bottom: -32px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 16px;
  background: var(--green);
  color: var(--white);
  padding: 20px;
  box-shadow: 0 18px 45px rgba(18, 88, 68, 0.24);
  transform: rotate(-1.2deg);
}

.explain-bubble span {
  color: var(--amber);
  font-size: 22px;
}

.explain-bubble p {
  margin: 0;
  line-height: 1.45;
}

.workspace-shell {
  padding: 80px max(20px, calc((100vw - 1240px) / 2)) 100px;
  background: var(--cream);
}

.workspace-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.workspace-heading h2,
.process-section h2,
.privacy-section h2 {
  margin: 0;
  font-size: clamp(35px, 4.5vw, 56px);
  line-height: 1.04;
}

.text-button {
  border: 0;
  border-bottom: 1px solid;
  background: transparent;
  color: var(--green);
  padding: 4px 0;
  cursor: pointer;
  font-weight: 700;
}

.workspace {
  min-height: 720px;
  display: grid;
  grid-template-columns: 245px 1fr;
  overflow: hidden;
  border: 1px solid #d8d3c9;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-small);
}

.stepper {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-right: 1px solid #dfe2df;
  background: #f9faf8;
  padding: 26px 18px;
}

.step {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.step:disabled {
  cursor: default;
  opacity: 0.45;
}

.step > span {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #bec6c1;
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.step strong,
.step small {
  display: block;
}

.step strong {
  font-size: 14px;
}

.step small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 11px;
}

.step.active {
  background: var(--mint);
}

.step.active > span,
.step.completed > span {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.privacy-note {
  margin-top: auto;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  border-top: 1px solid var(--border);
  padding: 11px 4px 2px;
  color: var(--ink-soft);
}

.privacy-note span {
  font-size: 13px;
  color: var(--green);
}

.privacy-note p {
  margin: 0;
  font-size: 9px;
  line-height: 1.35;
}

.privacy-note strong {
  display: inline;
  margin-right: 3px;
  color: var(--ink);
}

.panel {
  min-width: 0;
  padding: clamp(28px, 5vw, 64px);
}

.panel[hidden] {
  display: none;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  gap: 17px;
  margin-bottom: 34px;
}

.panel-title .number {
  flex: 0 0 auto;
  padding-top: 5px;
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 17px;
}

.panel-title h3 {
  margin-bottom: 7px;
  font-family: Georgia, serif;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.panel-title p {
  margin: 0;
  color: var(--ink-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.external-processing-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  align-items: start;
  margin: 20px 0 0;
  padding: 16px 18px;
  border: 1px solid rgba(20, 101, 78, 0.25);
  border-radius: 14px;
  background: rgba(222, 243, 234, 0.45);
}

.external-processing-consent[hidden] {
  display: none;
}

.external-processing-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green);
}

.external-processing-consent span,
.external-processing-consent small {
  grid-column: 2;
}

.external-processing-consent small {
  color: var(--muted);
  line-height: 1.45;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid #bdc7c2;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  padding: 12px 13px;
}

select,
input {
  min-height: 46px;
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(18, 88, 68, 0.11);
}

.upload-zone {
  min-height: 112px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  border: 1.5px dashed #9aaba3;
  border-radius: 14px;
  background: #fbfcfb;
  padding: 20px;
  cursor: default;
}

.upload-zone.dragover {
  border-color: var(--green);
  background: var(--mint);
}

.upload-zone p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.upload-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--mint);
  color: var(--green);
  font-size: 23px;
  font-weight: 800;
}

.file-status {
  margin-top: 10px;
  border-radius: 9px;
  background: var(--mint);
  color: var(--green);
  padding: 10px 13px;
  font-size: 12px;
  font-weight: 650;
}

.file-status.warning {
  background: #fff4d6;
  color: #715411;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: #718079;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}

.textarea-label {
  display: grid;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  color: #718079;
  font-size: 11px;
  font-weight: 500;
}

.panel-actions {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.panel-actions .form-message {
  margin-right: auto;
}

.form-message {
  margin: 0;
  color: var(--coral);
  font-size: 12px;
  font-weight: 650;
}

.analysis-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  border-radius: 14px;
  background: var(--mint);
  padding: 22px;
  margin-bottom: 16px;
}

.analysis-banner.high {
  background: var(--red-soft);
}

.analysis-banner h4 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 500;
}

.analysis-banner p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.confidence {
  align-self: start;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

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

.result-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 18px;
}

.result-card.full {
  grid-column: 1 / -1;
}

.result-card .card-label {
  display: block;
  margin-bottom: 9px;
  color: var(--coral);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-card p,
.result-card li {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

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

.result-card ul {
  margin: 0;
  padding-left: 18px;
}

.deadline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  margin-top: 10px;
  border-left: 4px solid var(--amber);
  background: #fff8e5;
  padding: 13px;
}

.deadline-item time {
  color: #6e5211;
  font-weight: 850;
}

.deadline-item p {
  margin: 0;
  font-size: 12px;
}

.source-warning {
  margin-top: 14px;
  border: 1px solid #e8c975;
  border-radius: 12px;
  background: #fff9e9;
  padding: 15px;
  color: #664d11;
  font-size: 12px;
  line-height: 1.5;
}

.evidence-list {
  display: grid;
  gap: 8px;
}

.evidence {
  border-left: 3px solid var(--cream-dark);
  padding: 8px 0 8px 12px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.draft-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.draft-editor {
  min-height: 500px;
  border-color: #aebbb5;
  border-radius: 12px;
  background: #fffefa;
  padding: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.75;
}

.correction-box {
  margin-top: 18px;
  border-radius: 13px;
  background: var(--cream);
  padding: 16px;
}

.correction-box > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 8px;
}

.warning-text {
  margin: 14px 0 0;
  color: #755513;
  font-size: 12px;
  line-height: 1.5;
}

.completion {
  max-width: 660px;
  margin: 0 auto 30px;
  text-align: center;
}

.completion-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  font-size: 25px;
  font-weight: 900;
}

.completion h3 {
  margin-bottom: 10px;
  font-family: Georgia, serif;
  font-size: 36px;
  font-weight: 500;
}

.completion p:not(.eyebrow) {
  color: var(--ink-soft);
  line-height: 1.6;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.export-card {
  display: grid;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--white);
  padding: 20px;
  cursor: pointer;
  text-align: left;
}

.export-card:hover {
  border-color: var(--green);
  background: #fbfefc;
}

.export-card > span {
  color: var(--green);
  font-size: 25px;
  margin-bottom: 8px;
}

.export-card small {
  color: var(--ink-soft);
}

.email-delivery {
  margin-top: 18px;
  border: 1px solid #a8cabb;
  border-radius: 16px;
  background: rgba(217, 239, 229, 0.38);
  padding: clamp(18px, 3vw, 28px);
}

.email-delivery-heading {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
}

.email-delivery-heading > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--green);
  color: var(--white);
  font-size: 20px;
}

.email-delivery h4 {
  margin: 1px 0 7px;
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 500;
}

.email-delivery-heading p,
.email-privacy-note {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.email-delivery-fields {
  display: grid;
  grid-template-columns: 1.45fr 0.55fr;
  gap: 12px;
  margin-top: 20px;
}

.email-delivery-fields label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 750;
}

.email-delivery-fields input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  padding: 10px 12px;
}

.consent-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 16px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.consent-row input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--green);
}

.email-privacy-note {
  margin-top: 10px;
  font-size: 12px;
}

.email-delivery-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.email-delivery-actions .form-message {
  margin: 0;
}

.website-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.final-preview {
  max-height: 340px;
  overflow: auto;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffefa;
  padding: 20px;
}

.final-preview pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1.55;
}

.process-section {
  width: min(1180px, calc(100% - 40px));
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  margin: 0 auto;
  padding: 110px 0;
}

.process-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.process-list li > span {
  color: var(--coral);
  font-family: Georgia, serif;
}

.process-list strong {
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 500;
}

.process-list p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.privacy-section {
  width: min(1180px, calc(100% - 40px));
  display: grid;
  grid-template-columns: auto 0.8fr 1.2fr;
  align-items: center;
  gap: 35px;
  margin: 0 auto 90px;
  border-radius: 20px;
  background: var(--ink);
  color: var(--paper);
  padding: 42px;
}

.privacy-section .eyebrow {
  color: var(--amber);
}

.privacy-section h2 {
  font-size: clamp(30px, 3.7vw, 45px);
}

.privacy-section > p {
  margin: 0;
  color: #d4ded9;
  line-height: 1.7;
}

.privacy-link {
  color: var(--green-dark);
  font-weight: 750;
  text-underline-offset: 4px;
}

.privacy-section .privacy-link {
  color: var(--mint);
}

.source-result-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-result-list a {
  color: var(--green-dark);
  font-weight: 750;
  text-underline-offset: 3px;
}

.source-result-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.legal-claim {
  display: grid;
  gap: 4px;
}

.legal-claim.unverified {
  border-inline-start: 3px solid var(--coral);
  padding-inline-start: 10px;
}

.legal-page {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 96px;
}

.legal-page h1,
.legal-page h2 {
  font-family: var(--font-display);
}

.legal-page h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.95;
}

.legal-page h2 {
  margin-top: 2.5rem;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.legal-page p,
.legal-page li {
  max-width: 78ch;
  line-height: 1.7;
}

.legal-page .legal-status {
  padding: 16px 18px;
  border: 1px solid rgba(198, 91, 75, 0.35);
  border-radius: 14px;
  background: rgba(255, 241, 235, 0.65);
}

.privacy-symbol {
  width: 65px;
  height: 65px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  font-size: 32px;
}

footer {
  min-height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding: 20px max(20px, calc((100vw - 1180px) / 2));
  color: var(--ink-soft);
  font-size: 12px;
}

@media (max-width: 920px) {
  nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 55px;
  }

  .hero-card {
    max-width: 560px;
    margin: 0 auto;
  }

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

  .stepper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 12px;
  }

  .step {
    justify-content: center;
    padding: 8px;
  }

  .step div,
  .privacy-note {
    display: none;
  }

  .process-section {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .privacy-section {
    grid-template-columns: auto 1fr;
  }

  .privacy-section > p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-header {
    width: calc(100% - 28px);
  }

  .local-badge {
    padding: 8px;
    font-size: 0;
  }

  .local-badge span {
    display: block;
  }

  .hero,
  .process-section,
  .privacy-section {
    width: calc(100% - 28px);
  }

  .hero {
    min-height: auto;
    padding: 42px 0 80px;
  }

  h1 {
    font-size: 48px;
  }

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

  .paper {
    min-height: 400px;
    padding: 25px;
  }

  .explain-bubble {
    right: -8px;
    bottom: -45px;
  }

  .workspace-shell {
    padding: 65px 14px;
  }

  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace {
    border-radius: 14px;
  }

  .panel {
    padding: 24px 18px;
  }

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

  .email-delivery-fields {
    grid-template-columns: 1fr;
  }

  .email-delivery-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .email-delivery-actions .button {
    width: 100%;
  }

  .upload-zone {
    grid-template-columns: auto 1fr;
  }

  .upload-zone .button {
    display: none;
  }

  .analysis-banner {
    grid-template-columns: 1fr;
  }

  .correction-box > div {
    grid-template-columns: 1fr;
  }

  .panel-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

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

  .panel-actions .form-message {
    margin: 0;
  }

  .privacy-section {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px;
  }

  .privacy-section > p,
  .privacy-section .privacy-link {
    grid-column: 1;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Version 0.2 — full-width application workflow */
.site-header,
.hero,
.process-section,
.expert-section,
.privacy-section {
  width: calc(100% - 40px);
  max-width: none;
}

.workspace-shell {
  padding-inline: 20px;
}

.form-grid {
  align-items: start;
}

.form-grid > label {
  min-width: 0;
}

#application-types {
  min-height: 196px;
  padding: 7px;
}

#application-types option {
  border-radius: 6px;
  padding: 7px 8px;
}

#application-types option:checked {
  background: linear-gradient(var(--green), var(--green));
  color: var(--white);
}

.application-details {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfcfb;
  padding: 20px;
}

.application-details[hidden] {
  display: none;
}

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

.application-authority-grid textarea {
  min-height: 86px;
}

.official-language-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.official-language-field select {
  width: 100%;
}

.official-language-field small {
  color: var(--ink-soft);
  line-height: 1.5;
}

.authority-help {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.authority-help summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--green);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.authority-help summary::-webkit-details-marker {
  display: none;
}

.authority-help summary > span:first-child {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  font-family: Georgia, serif;
  font-size: 14px;
}

.authority-help p {
  max-width: 850px;
  margin: 11px 0 0 33px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.signature-notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid #e5c36c;
  border-radius: 12px;
  background: #fff8e5;
  color: #654b0d;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.55;
}

.signature-notice > span {
  flex: 0 0 auto;
  color: #9b6e08;
  font-size: 18px;
}

.signature-notice p {
  margin: 0;
}

.export-signature-notice {
  margin-top: 16px;
}

.missing-fields-list {
  margin: 0;
  padding-inline-start: 20px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.application-summary {
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) 1fr;
  margin: 0;
}

.application-summary dt,
.application-summary dd {
  margin: 0;
  border-bottom: 1px solid var(--border);
  padding: 11px 0;
  white-space: pre-line;
}

.application-summary dt {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.application-summary dd {
  color: var(--ink-soft);
  font-size: 13px;
}

@media (max-width: 820px) {
  .site-header,
  .hero,
  .process-section,
  .expert-section,
  .privacy-section {
    width: calc(100% - 28px);
  }

  .workspace-shell {
    padding-inline: 14px;
  }

  .application-authority-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  #application-types {
    min-height: 176px;
  }

  .application-details {
    padding: 16px;
  }

  .application-summary {
    grid-template-columns: 1fr;
  }

  .application-summary dt {
    border-bottom: 0;
    padding-bottom: 3px;
  }

  .application-summary dd {
    padding-top: 0;
  }

  .authority-help p {
    margin-inline-start: 0;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  .final-preview,
  .final-preview * {
    visibility: visible;
  }

  .final-preview {
    position: absolute;
    inset: 0;
    max-height: none;
    border: 0;
    padding: 2cm;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Multilingual product shell */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 14px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(1320px, calc(100% - 40px));
}

.language-control {
  min-width: 172px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.language-control select {
  min-height: 38px;
  border-color: var(--border);
  padding: 7px 30px 7px 10px;
  font-size: 12px;
}

.hero {
  width: min(1180px, calc(100% - 40px));
  min-height: auto;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: clamp(66px, 8vw, 108px) 0 82px;
}

.hero-copy {
  max-width: 880px;
}

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(40px, 5.2vw, 66px);
  line-height: 1.01;
}

h1 span,
h1 em {
  display: block;
}

h2 em {
  color: var(--green);
  font-weight: 500;
}

.hero-intro {
  max-width: 790px;
  font-size: clamp(16px, 1.4vw, 19px);
}

.path-label {
  margin: 30px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.entry-card {
  position: relative;
  min-height: 250px;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  align-content: start;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  padding: 24px;
  cursor: pointer;
  text-align: start;
  box-shadow: var(--shadow-small);
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.entry-card::after {
  content: "";
  position: absolute;
  width: 95px;
  height: 95px;
  inset-block-start: -48px;
  inset-inline-end: -35px;
  border-radius: 50%;
  background: var(--mint);
  opacity: 0;
  transition: opacity 170ms ease;
}

.entry-card:hover,
.entry-card.active {
  transform: translateY(-3px);
  border-color: #84aa99;
  box-shadow: 0 18px 44px rgba(18, 35, 31, 0.12);
}

.entry-card.active {
  background: #fbfefc;
}

.entry-card.active::after {
  opacity: 1;
}

.entry-card:focus-visible {
  outline: 3px solid rgba(242, 184, 75, 0.65);
  outline-offset: 3px;
}

.entry-number {
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 13px;
}

.entry-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--mint);
  color: var(--green);
  font-size: 22px;
}

.entry-card strong {
  max-width: 250px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.12;
}

.entry-card small {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.entry-link {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.hero .trust-row {
  margin-top: 3px;
  padding-top: 23px;
  border-top: 1px solid var(--border);
}

.mode-context {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 16px;
  border: 1px solid #b9d2c6;
  border-radius: 16px;
  background: #edf8f2;
  padding: 17px 20px;
}

.mode-context-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--green);
  color: white;
  font-size: 21px;
}

.mode-context strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 500;
}

.mode-context p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.preview-chip {
  border: 1px solid #9bc5b3;
  border-radius: 999px;
  background: white;
  color: var(--green);
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.field-help {
  min-height: 16px;
  color: var(--green);
  font-size: 10px;
  font-weight: 650;
}

.field-help.pending {
  color: #8a6512;
}

.button.disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.draft-unavailable {
  margin: 18px 0 0;
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink-soft);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
}

.source-warning.risk {
  border-color: #dfa897;
  background: var(--red-soft);
  color: #76392e;
}

.expert-section {
  width: min(1180px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(45px, 7vw, 90px);
  align-items: center;
  margin: 0 auto;
  padding: 20px 0 110px;
}

.expert-photo-wrap {
  position: relative;
}

.expert-photo-wrap::before {
  content: "";
  position: absolute;
  inset: -18px 26px 24px -18px;
  z-index: -1;
  border-radius: 26px;
  background: var(--mint);
}

.expert-photo {
  width: 100%;
  max-height: 620px;
  display: block;
  border-radius: 20px;
  object-fit: cover;
  object-position: center 26%;
  box-shadow: var(--shadow);
}

.expert-photo-badge {
  position: absolute;
  inset-inline-end: -18px;
  inset-block-end: 24px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 800;
  box-shadow: var(--shadow-small);
}

.expert-copy h2 {
  margin-bottom: 4px;
  font-size: clamp(38px, 5vw, 58px);
}

.expert-role {
  margin-bottom: 18px;
  color: var(--coral);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.expert-lead {
  max-width: 690px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 28px 0 20px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  border-inline-start: 1px solid var(--border);
}

.credential-grid li {
  min-height: 92px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  border-inline-end: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px;
}

.credential-grid span {
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 12px;
}

.credential-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.48;
}

.expert-note {
  margin: 0;
  color: #6b7973;
  font-size: 11px;
  line-height: 1.55;
}

.rtl .entry-card,
.rtl .step,
.rtl .export-card {
  text-align: right;
}

.rtl .result-card ul {
  padding-right: 18px;
  padding-left: 0;
}

.rtl .deadline-item {
  border-right: 4px solid var(--amber);
  border-left: 0;
}

.rtl .evidence {
  border-right: 3px solid var(--cream-dark);
  border-left: 0;
  padding: 8px 12px 8px 0;
}

@media (max-width: 1080px) {
  .site-header nav {
    display: none;
  }

  .entry-card {
    min-height: 270px;
  }

  .expert-section {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 42px;
  }
}

@media (max-width: 820px) {
  .entry-grid {
    grid-template-columns: 1fr;
  }

  .entry-card {
    min-height: 0;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 16px;
  }

  .entry-number {
    grid-column: 1;
  }

  .entry-icon {
    grid-column: 1;
    grid-row: 2 / span 2;
  }

  .entry-card strong,
  .entry-card small,
  .entry-link {
    grid-column: 2;
  }

  .entry-card strong {
    grid-row: 1;
    align-self: end;
  }

  .entry-card small {
    grid-row: 2;
  }

  .entry-link {
    grid-row: 3;
  }

  .expert-section {
    grid-template-columns: 1fr;
  }

  .expert-photo-wrap {
    max-width: 520px;
  }

  .expert-photo {
    max-height: 540px;
  }
}

@media (max-width: 680px) {
  .site-header {
    width: calc(100% - 28px);
    min-height: 72px;
    gap: 12px;
  }

  .brand small,
  .language-control > span {
    display: none;
  }

  .language-control {
    min-width: 0;
  }

  .language-control select {
    width: 132px;
  }

  .hero {
    width: calc(100% - 28px);
    padding-top: 48px;
  }

  h1 {
    font-size: clamp(38px, 12vw, 51px);
  }

  .entry-card {
    padding: 20px;
  }

  .hero .trust-row {
    display: grid;
    gap: 9px;
  }

  .mode-context {
    grid-template-columns: auto 1fr;
  }

  .preview-chip {
    display: none;
  }

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

  .expert-section {
    width: calc(100% - 28px);
    padding-bottom: 75px;
  }

  .expert-photo-badge {
    inset-inline-end: 12px;
  }
}

/* Version 0.9 — compact, symmetrical application shell */
.site-header,
.hero,
.process-section,
.privacy-section,
footer {
  width: min(1280px, calc(100% - 40px));
  max-width: 1280px;
}

.site-header {
  min-height: 76px;
  gap: 20px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  flex: 0 0 auto;
  border-radius: 13px;
  background: transparent;
}

.site-header nav {
  gap: clamp(16px, 2vw, 28px);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-home {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 12px;
  background: rgba(255,255,255,.72);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.back-home:hover { background: var(--mint); }
.back-home:focus-visible { outline: 3px solid rgba(242, 184, 75, 0.65); outline-offset: 3px; }

.language-control { min-width: 0; }
.language-control select { width: 148px; min-height: 42px; }

.hero {
  gap: 24px;
  padding: 46px 0 52px;
}

.hero-copy,
.hero-intro,
h1 {
  max-width: none;
}

.hero-copy { width: 100%; }
.hero-intro { line-height: 1.58; }
.path-label { margin-top: 22px; }

.entry-grid { gap: 14px; }
.entry-card { min-height: 220px; padding: 22px; }
.entry-card strong { max-width: none; }

.workspace-shell {
  padding: 54px max(20px, calc((100vw - 1280px) / 2)) 64px;
}

.workspace-heading { margin-bottom: 20px; }
.workspace-heading > div,
.panel-title > div { min-width: 0; width: 100%; }

.mode-context { min-height: 74px; margin-bottom: 14px; padding: 14px 18px; }

.workspace {
  min-height: 640px;
  grid-template-columns: 230px minmax(0, 1fr);
  border-radius: 18px;
}

.stepper { padding: 22px 15px; }
.panel { padding: clamp(26px, 3.2vw, 44px); }
.panel-title { margin-bottom: 26px; }
.panel-title h3 { max-width: none; }
.panel-title p { max-width: none; line-height: 1.55; }
.form-grid { gap: 12px; margin-bottom: 16px; }
.application-details { margin-bottom: 16px; padding: 18px; }
.upload-zone { min-height: 96px; padding: 17px 18px; }
.divider { margin: 17px 0; }
.textarea-label textarea { min-height: 210px; }
.panel-actions { min-height: 58px; margin-top: 20px; padding-top: 17px; }

.process-section {
  gap: clamp(42px, 7vw, 92px);
  padding: 76px 0;
}

.process-list li { padding: 20px 0; }

.privacy-section {
  grid-template-columns: auto .85fr 1.15fr;
  gap: 28px;
  margin-bottom: 60px;
  padding: 36px;
}

footer {
  margin-inline: auto;
}

@media (max-width: 1080px) {
  .site-header,
  .hero,
  .process-section,
  .privacy-section,
  footer {
    width: calc(100% - 32px);
  }

  .hero { padding-top: 40px; }
  .workspace-shell { padding-inline: 16px; }
  .workspace { grid-template-columns: 205px minmax(0, 1fr); }
  .privacy-section { grid-template-columns: auto 1fr; }
  .privacy-section > p,
  .privacy-section .privacy-link { grid-column: 2; }
}

@media (max-width: 760px) {
  .site-header { min-height: 70px; gap: 10px; }
  .brand { gap: 8px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
  .brand strong { font-size: 14px; }
  .header-tools { margin-inline-start: auto; gap: 7px; }
  .back-home {
    position: relative;
    width: 42px;
    min-width: 42px;
    padding: 0;
    overflow: hidden;
    color: transparent;
  }
  .back-home::before {
    content: "←";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--green);
    font-size: 19px;
  }
  .language-control select { width: 112px; min-height: 42px; }
  .hero { padding: 34px 0 40px; gap: 20px; }
  h1 { font-size: clamp(37px, 11vw, 50px); }
  .hero-intro { font-size: 16px; }
  .entry-grid { gap: 10px; }
  .entry-card { padding: 18px; }
  .workspace-shell { padding-top: 40px; padding-bottom: 46px; }
  .workspace-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .mode-context { grid-template-columns: auto 1fr; }
  .workspace { display: block; min-height: 0; overflow: visible; }
  .stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 10px;
  }
  .step { min-height: 48px; justify-content: center; padding: 8px 4px; }
  .step > div { display: none; }
  .privacy-note { display: none; }
  .panel { padding: 22px 17px; }
  .panel-title { gap: 10px; margin-bottom: 21px; }
  .form-grid,
  .application-authority-grid,
  .result-grid,
  .export-grid,
  .email-delivery-fields { grid-template-columns: 1fr; }
  .upload-zone { grid-template-columns: auto 1fr; gap: 12px; }
  .upload-zone .button { grid-column: 1 / -1; width: 100%; }
  .field-meta { gap: 10px; flex-wrap: wrap; }
  .process-section { grid-template-columns: 1fr; gap: 24px; padding: 56px 0; }
  .privacy-section {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 42px;
    padding: 25px 21px;
  }
  .privacy-section > p,
  .privacy-section .privacy-link { grid-column: 1; }
}

@media (max-width: 420px) {
  .site-header,
  .hero,
  .process-section,
  .privacy-section,
  footer { width: calc(100% - 24px); }
  .brand small { display: none; }
  .language-control select { width: 102px; }
  .entry-card {
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 12px;
  }
  .workspace-shell { padding-inline: 12px; }
  .panel { padding-inline: 14px; }
}
