:root {
    --ink: #0a0a0a;
    --ink-soft: #3f3f46;
    --muted: #71717a;
    --line: #e4e4e7;
    --line-strong: #d4d4d8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-warm: #ffffff;
    --accent: #3b82f6;
    --accent-dark: #2563eb;
    --accent-soft: #eff6ff;
    --warning: #b45309;
    --warning-soft: #fffbeb;
    --danger: #b91c1c;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
    --radius-large: 20px;
    --radius-medium: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface-warm);
    font-family: "IBM Plex Sans", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
textarea,
input {
    font: inherit;
}

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

a {
    color: inherit;
}

button {
    color: inherit;
}

.container {
    width: min(calc(100% - 48px), var(--container));
    margin: 0 auto;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: white;
    background: var(--accent-dark);
    transform: translateY(-160%);
}

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

.site-header {
    position: relative;
    z-index: 10;
    border-bottom: 0;
    background: var(--surface);
}

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

.brand {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    color: white;
    background: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-copy strong {
    font-size: 15px;
    letter-spacing: -0.02em;
}

.brand-copy small {
    color: var(--muted);
    font-size: 11px;
}

.footer-links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

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

.button {
    display: inline-flex;
    min-height: 44px;
    padding: 0 19px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

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

.button:active {
    transform: translateY(0);
}

.button:disabled {
    opacity: 0.48;
    cursor: default;
    transform: none;
}

.button-primary {
    color: white;
    background: var(--accent);
}

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

.button-secondary {
    border-color: var(--line);
    background: var(--surface);
}

.button-secondary:hover {
    border-color: var(--line-strong);
    background: var(--surface-soft);
}

.login-button {
    min-height: auto;
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    justify-self: end;
    color: var(--ink);
    background: transparent;
    font-family: "IBM Plex Sans", Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
}

.login-button:hover {
    color: var(--accent-dark);
    background: transparent;
    transform: none;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 46px 0 76px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.hero-inner {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.section-label {
    margin: 0 0 16px;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    text-wrap: pretty;
}

h1 {
    max-width: 920px;
    margin: 0;
    font-family: "Days One", "IBM Plex Sans", Arial, sans-serif;
    font-size: clamp(44px, 5vw, 64px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.hero-copy {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    margin-bottom: 30px;
}

.hero-subtitle {
    max-width: 780px;
    margin: 20px auto 0;
    color: var(--ink-soft);
    font-size: clamp(17px, 1.7vw, 20px);
    line-height: 1.55;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.chat-workspace {
    width: min(100%, 920px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-output {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.chat-empty {
    display: flex;
    min-height: 230px;
    padding: 30px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
    color: var(--muted);
    cursor: pointer;
    text-align: center;
    transition: background 160ms ease;
}

.chat-empty:hover {
    background: var(--surface-soft);
}

.empty-upload-icon {
    display: grid;
    width: 50px;
    height: 50px;
    margin-bottom: 5px;
    place-items: center;
    border-radius: 14px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: 25px;
}

.chat-empty strong {
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
}

.chat-empty > span:last-child {
    font-size: 12px;
}

.chat-topbar {
    display: flex;
    min-height: 64px;
    padding: 12px 18px;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid var(--line);
}

.chat-avatar,
.message-avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: white;
    background: var(--accent);
    font-weight: 700;
}

.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 11px;
}

.chat-topbar > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.chat-topbar strong {
    font-size: 14px;
    font-weight: 600;
}

.chat-topbar span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
}

.chat-topbar i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
}

.chat-messages {
    display: flex;
    min-height: 340px;
    max-height: 560px;
    padding: 28px 30px;
    flex-direction: column;
    gap: 22px;
    overflow-y: auto;
    background: var(--surface);
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-width: thin;
}

.chat-workspace.has-conversation .chat-output,
.chat-workspace.has-conversation .chat-messages {
    min-height: 420px;
}

html.chat-mode,
body.chat-mode {
    height: 100%;
    overflow: hidden;
}

body.chat-mode main > .section,
body.chat-mode .site-footer {
    display: none;
}

body.chat-mode .hero {
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    padding: 18px 0 20px;
    border-bottom: 0;
}

body.chat-mode .hero-inner {
    height: 100%;
}

body.chat-mode .hero-copy {
    display: none;
}

body.chat-mode .chat-workspace {
    width: min(100%, 1040px);
    height: 100%;
    min-height: 0;
}

body.chat-mode .chat-output {
    min-height: 0;
    flex: 1 1 auto;
}

body.chat-mode .chat-messages {
    height: 100%;
    min-height: 0;
    max-height: none;
}

body.chat-mode .chat-composer {
    flex: 0 0 auto;
}

.message {
    display: flex;
    width: 100%;
    align-items: flex-start;
    gap: 10px;
}

.message-avatar {
    width: 30px;
    height: 30px;
    margin-top: 2px;
    border-radius: 9px;
    font-size: 9px;
}

.message-bubble {
    max-width: min(720px, calc(100% - 44px));
    padding: 15px 17px;
    border-radius: 5px 16px 16px 16px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    font-size: 14px;
    line-height: 1.55;
}

.message-bubble > strong {
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
}

.message-bubble p {
    margin: 7px 0 0;
}

.message-assistant .message-bubble {
    white-space: pre-line;
}

.message-web-sources {
    margin-top: -12px;
}

.message-web-sources .message-avatar {
    visibility: hidden;
}

.web-search-note {
    max-width: min(720px, calc(100% - 44px));
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.web-source-summary {
    display: inline-flex;
    padding: 2px 0;
    border: 0;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.web-source-summary:hover,
.web-source-summary:focus-visible {
    color: var(--accent-strong);
}

.web-source-domain {
    color: var(--accent-strong);
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.32);
    text-underline-offset: 3px;
}

.web-source-list {
    display: flex;
    margin-top: 8px;
    padding-left: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.web-source-list[hidden] {
    display: none;
}

.web-search-note a {
    color: var(--accent-strong);
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.28);
    text-underline-offset: 3px;
}

.web-source-link {
    display: inline-flex;
    min-width: 0;
    align-items: flex-start;
    gap: 5px;
}

.web-source-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border-radius: 3px;
    object-fit: contain;
}

.web-search-note a:hover {
    text-decoration-color: currentColor;
}

.chat-upload {
    display: flex;
    margin-top: 15px;
    padding: 13px 15px;
    align-items: center;
    gap: 11px;
    border: 1px dashed #bfdbfe;
    border-radius: 12px;
    color: var(--ink);
    background: var(--surface);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease;
}

.chat-upload:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.chat-upload-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 10px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: 21px;
}

.chat-upload > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.chat-upload strong {
    font-size: 13px;
    font-weight: 600;
}

.chat-upload small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.message-user {
    justify-content: flex-end;
}

.message-user .message-bubble {
    border: 1px solid #dbeafe;
    border-radius: 16px 5px 16px 16px;
    background: var(--accent-soft);
}

.user-file {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    min-width: min(360px, 70vw);
    align-items: center;
    gap: 11px;
}

.file-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 10px;
    color: var(--accent-dark);
    background: #dbeafe;
    font-size: 9px;
    font-weight: 700;
}

.file-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.file-copy strong {
    overflow: hidden;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}

.file-copy small {
    color: var(--muted);
    font-size: 11px;
}

.message-status + .message-status {
    margin-top: -13px;
}

.live-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.live-status-marker {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    animation: pulse 1.2s infinite;
}

.live-status.is-complete .live-status-marker {
    box-shadow: none;
    animation: none;
    opacity: 0.55;
}

.message-error .message-bubble {
    border: 1px solid #fecaca;
    color: #991b1b;
    background: #fef2f2;
}

.chat-composer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 58px;
    margin: 0;
    padding: 8px;
    align-items: end;
    gap: 7px;
    border: 1px solid var(--line-strong);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
}

.chat-composer:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
}

.pending-attachment {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 9px 10px;
    align-items: center;
    gap: 10px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: var(--accent-soft);
}

.pending-attachment[hidden] {
    display: none;
}

.pending-file-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    color: var(--accent-dark);
    background: #dbeafe;
    font-size: 8px;
    font-weight: 700;
}

.pending-file-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.pending-file-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
}

.pending-file-copy small {
    color: var(--muted);
    font-size: 10px;
}

.pending-file-remove {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 21px;
    line-height: 1;
}

.pending-file-remove:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.8);
}

.composer-attach,
.composer-send {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}

.composer-attach {
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 23px;
}

.composer-attach:hover {
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.composer-attach.is-disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.chat-composer textarea {
    width: 100%;
    min-height: 42px;
    max-height: 150px;
    padding: 10px 4px 8px;
    overflow-y: hidden;
    border: 0;
    outline: 0;
    resize: none;
    color: var(--ink);
    background: transparent;
    font-size: 14px;
    line-height: 1.45;
}

.chat-composer textarea::placeholder {
    color: #a1a1aa;
}

.composer-send {
    color: white;
    background: var(--accent);
    font-size: 20px;
    transition: background 160ms ease, opacity 160ms ease;
}

.composer-send:hover:not(:disabled) {
    background: var(--accent-dark);
}

.composer-send:disabled {
    opacity: 0.35;
    cursor: default;
}

.composer-note {
    margin: -6px 18px 0;
    color: var(--muted);
    text-align: center;
    font-size: 10px;
    line-height: 1.4;
}

.drop-overlay {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 2px dashed var(--accent);
    color: var(--accent-dark);
    background: rgba(239, 246, 255, 0.96);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 140ms ease;
}

.drop-overlay strong {
    font-size: 16px;
}

.drop-overlay span {
    font-size: 12px;
}

.chat-output.is-dragging .drop-overlay {
    opacity: 1;
    visibility: visible;
}

.section {
    padding: 110px 0;
}

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

.section-heading h2,
.safety-grid h2 {
    margin: 0;
    font-family: "Days One", "IBM Plex Sans", Arial, sans-serif;
    font-size: clamp(32px, 3.7vw, 46px);
    font-weight: 400;
    line-height: 1.16;
    letter-spacing: -0.02em;
}

.section-heading > p:last-child,
.result-copy > p,
.safety-copy p {
    color: var(--ink-soft);
    font-size: 17px;
    line-height: 1.65;
}

.how-section {
    background: var(--surface-warm);
}

.steps-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 64px 0 0;
    padding: 0;
    gap: 0;
    border-top: 1px solid var(--line-strong);
    list-style: none;
}

.steps-list li {
    padding: 28px 38px 0 0;
}

.steps-list li:not(:first-child) {
    padding-left: 38px;
    border-left: 1px solid var(--line-strong);
}

.step-number {
    display: block;
    margin-bottom: 36px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}

.steps-list h3 {
    margin: 0 0 12px;
    font-size: 21px;
    letter-spacing: -0.025em;
}

.steps-list p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.result-section {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.result-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    align-items: center;
    gap: 90px;
}

.result-copy p {
    margin: 24px 0 28px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: none;
}

.text-link:hover span {
    transform: translateX(3px);
}

.text-link span {
    transition: transform 160ms ease;
}

.result-preview {
    padding: 26px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-large);
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.preview-topbar {
    display: flex;
    padding-bottom: 20px;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.assistant-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    color: white;
    background: var(--accent);
    font-size: 11px;
    font-weight: 900;
}

.preview-topbar > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.preview-topbar strong {
    font-size: 14px;
}

.preview-topbar small {
    color: var(--muted);
    font-size: 11px;
}

.preview-row {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.preview-row span {
    color: var(--muted);
}

.preview-row strong {
    text-align: right;
}

.risk-label {
    color: var(--warning);
}

.answer-draft {
    margin: 18px 0;
    padding: 16px;
    border-left: 3px solid var(--accent);
    background: var(--surface-soft);
}

.answer-draft span {
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.answer-draft p {
    margin: 7px 0 0;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.5;
}

.preview-input {
    display: flex;
    min-height: 50px;
    padding: 0 13px 0 16px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    color: #8a958e;
    font-size: 12px;
}

.preview-input b {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    color: white;
    background: var(--accent);
}

.safety-section {
    background: var(--surface-warm);
}

.safety-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 90px;
}

.safety-copy {
    padding-top: 29px;
}

.safety-copy p {
    margin: 0 0 22px;
}

.faq-section {
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.faq-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 90px;
}

.faq-list {
    border-top: 1px solid var(--line-strong);
}

.faq-list details {
    border-bottom: 1px solid var(--line-strong);
}

.faq-list summary {
    position: relative;
    padding: 23px 44px 23px 0;
    cursor: pointer;
    list-style: none;
    font-weight: 750;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    position: absolute;
    top: 20px;
    right: 5px;
    color: var(--accent);
    content: "+";
    font-size: 24px;
    font-weight: 400;
}

.faq-list details[open] summary::after {
    content: "−";
}

.faq-list details p {
    margin: -6px 0 23px;
    padding-right: 44px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.site-footer {
    padding: 54px 0;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px 70px;
}

.footer-brand {
    color: white;
}

.footer-grid > div:first-child > p {
    max-width: 420px;
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    align-items: flex-start;
    gap: 26px;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-note {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.5;
}

.toast {
    position: fixed;
    z-index: 50;
    right: 24px;
    bottom: 24px;
    max-width: min(380px, calc(100% - 48px));
    padding: 14px 16px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow);
    font-size: 13px;
    line-height: 1.45;
}

@keyframes pulse {
    50% {
        box-shadow: 0 0 0 7px rgba(59, 130, 246, 0.04);
    }
}

@media (max-width: 980px) {
    .hero {
        padding-top: 38px;
    }

    .result-grid,
    .safety-grid,
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 54px;
    }

    .steps-list {
        grid-template-columns: 1fr;
    }

    .steps-list li,
    .steps-list li:not(:first-child) {
        display: grid;
        grid-template-columns: 55px 1fr;
        padding: 28px 0;
        border-bottom: 1px solid var(--line);
        border-left: 0;
    }

    .step-number {
        margin: 4px 0 0;
    }

    .result-preview {
        max-width: 720px;
    }

    .safety-copy {
        padding-top: 0;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(calc(100% - 32px), var(--container));
    }

    .header-inner {
        min-height: 68px;
    }

    .brand-copy small {
        display: none;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .brand-copy strong {
        font-size: 13px;
    }

    .login-button {
        min-height: auto;
        padding: 8px 0;
        font-size: 14px;
    }

    .hero {
        padding: 32px 0 54px;
        background: var(--surface-warm);
    }

    h1 {
        font-size: clamp(38px, 11vw, 50px);
    }

    .hero-copy {
        margin-bottom: 23px;
    }

    .hero-subtitle {
        margin-top: 16px;
        font-size: 16px;
    }

    .chat-output {
        border-radius: 16px;
    }

    .chat-empty,
    .chat-output {
        min-height: 220px;
    }

    .chat-workspace.has-conversation .chat-output,
    .chat-workspace.has-conversation .chat-messages {
        min-height: 360px;
    }

    body.chat-mode .hero {
        height: calc(100vh - 68px);
        height: calc(100dvh - 68px);
        padding: 10px 0 14px;
    }

    body.chat-mode .chat-output,
    body.chat-mode .chat-messages {
        min-height: 0;
    }

    .chat-topbar {
        min-height: 60px;
        padding: 10px 13px;
    }

    .chat-avatar {
        width: 36px;
        height: 36px;
    }

    .chat-messages {
        min-height: 320px;
        max-height: 540px;
        padding: 20px 14px;
        gap: 18px;
    }

    .message {
        gap: 8px;
    }

    .message-avatar {
        width: 27px;
        height: 27px;
        border-radius: 8px;
        font-size: 8px;
    }

    .message-bubble {
        max-width: calc(100% - 35px);
        padding: 13px 14px;
        font-size: 13px;
    }

    .chat-upload {
        padding: 12px;
    }

    .chat-upload small {
        font-size: 10px;
    }

.user-file {
        min-width: 0;
        width: min(68vw, 330px);
    }

    .chat-composer {
        padding: 6px;
    }

    .composer-attach,
    .composer-send {
        width: 40px;
        height: 40px;
    }

    .chat-composer textarea {
        min-height: 40px;
        padding-top: 9px;
        font-size: 16px;
    }

    .composer-note {
        margin: -6px 10px 0;
    }

    .drop-overlay {
        inset: 60px 0 82px;
    }

    .section {
        padding: 76px 0;
    }

    .section-heading h2,
    .safety-grid h2 {
        font-size: 36px;
    }

    .section-heading > p:last-child,
    .result-copy > p,
    .safety-copy p {
        font-size: 15px;
    }

    .steps-list {
        margin-top: 42px;
    }

    .steps-list li,
    .steps-list li:not(:first-child) {
        grid-template-columns: 43px 1fr;
    }

    .result-preview {
        padding: 18px;
        border-radius: 18px;
    }

    .preview-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
        padding: 12px 0;
    }

    .preview-row strong {
        text-align: left;
    }

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

    .footer-links {
        flex-direction: column;
        gap: 14px;
    }

    .toast {
        right: 16px;
        bottom: 16px;
        max-width: calc(100% - 32px);
    }
}

.user-file-comment {
    margin: 12px 0 0;
    padding-top: 11px;
    border-top: 1px solid rgba(37, 99, 235, 0.12);
    white-space: pre-wrap;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus-visible,
a:focus-visible,
label:focus-within,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.24);
    outline-offset: 3px;
}
