/*
Copyright 2018 The Manrope Project Authors (https://github.com/googlefonts/manrope)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
*/

@font-face {
  font-family: Manrope;
  src: url("fonts/Manrope-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --rail: #181e1d;
  --panel: #202625;
  --panel-field: #282f2d;
  --panel-border: #424b46;
  --panel-text: #f1f4f0;
  --panel-muted: #b5bfb9;
  --paper: #ffffff;
  --ink: #1b2621;
  --muted: #637068;
  --rule: #e1e6e2;
  --sage: #c2d5ac;
  --sage-hover: #d0e1be;
  --green: #355747;
  --soft: #f1f4ef;
  --error: #a53832;
  --font:
    Manrope, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --rail-width: 64px;
  --panel-width: 328px;
  --gutter: clamp(24px, 2.7vw, 48px);
}

* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 92px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color 140ms,
    color 140ms,
    border-color 140ms;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}
a {
  color: inherit;
  text-decoration: none;
}
p,
h1,
h2,
h3,
h4 {
  margin: 0;
}
[hidden] {
  display: none !important;
}
.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.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;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 30;
  padding: 12px 18px;
  background: var(--sage);
  color: var(--ink);
  border-radius: 6px;
}
.skip-link:focus {
  top: 12px;
}

/* A fixed-height editing station beside a naturally flowing manuscript. */
.app-shell {
  display: grid;
  grid-template-columns: var(--rail-width) var(--panel-width) minmax(0, 1fr);
  align-items: start;
  min-height: 100vh;
  min-height: 100dvh;
}
.utility-rail {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  height: 100dvh;
  padding: 25px 9px 20px;
  background: var(--rail);
  color: var(--panel-muted);
  border-right: 1px solid #303934;
}
.rail-brand {
  display: grid;
  place-items: center;
  width: 44px;
  height: 36px;
  color: var(--panel-text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -1.2px;
}
.rail-brand > span > span {
  color: var(--sage);
}
.rail-navigation {
  display: grid;
  gap: 12px;
  margin-top: 48px;
}
.rail-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
}
.rail-link .icon {
  width: 22px;
  height: 22px;
}
.rail-link:hover,
.rail-link:focus-visible {
  background: #303b34;
  color: var(--sage);
}
.rail-help {
  margin-top: auto;
}
.rail-tooltip {
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  z-index: 15;
  display: none;
  padding: 7px 12px;
  transform: translateY(-50%);
  border: 1px solid var(--panel-border);
  border-radius: 5px;
  background: var(--rail);
  color: var(--panel-text);
  font-size: 12px;
  white-space: nowrap;
}
.rail-link:hover .rail-tooltip,
.rail-link:focus-visible .rail-tooltip {
  display: block;
}
.utility-rail :focus-visible,
.input-panel :focus-visible {
  outline-color: var(--sage);
}

.input-panel {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  background: var(--panel);
  color: var(--panel-text);
  border-right: 1px solid var(--panel-border);
}
.brand {
  flex-shrink: 0;
  padding: 25px 26px 24px;
  border-bottom: 1px solid #363e39;
}
.brand a {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.brand strong {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.9px;
}
.brand span {
  color: var(--panel-muted);
  font-size: 13px;
  letter-spacing: 0.2px;
}
#generator-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.input-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 23px;
  min-height: 0;
  overflow-y: auto;
  padding: 25px 25px 28px;
  scrollbar-width: thin;
  scrollbar-color: #59655b var(--panel);
}
.panel-heading h2 {
  font-size: 17px;
  font-weight: 750;
}
.panel-heading h2 span {
  margin-left: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--panel-muted);
}
.panel-heading p {
  margin-top: 5px;
  color: var(--panel-muted);
  font-size: 12px;
}
.panel-heading p span {
  margin-left: 5px;
}
.field label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 650;
}
.field label > span[lang] {
  color: var(--panel-muted);
  font-weight: 400;
}
.field .optional {
  margin-left: auto;
  color: var(--panel-muted);
  font-size: 10px;
  font-weight: 400;
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel-field);
  color: var(--panel-text);
  line-height: 1.8;
  caret-color: var(--sage);
}
.field input {
  height: 43px;
  font-size: 13px;
}
.field textarea {
  min-height: 198px;
  max-height: 420px;
  resize: vertical;
  font-size: 14px;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #a2aea7;
  opacity: 1;
}
.field input:hover,
.field textarea:hover {
  border-color: #707e73;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--sage);
}
.field-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--panel-muted);
  font-size: 11px;
}
.field-bottom > span:last-child {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.examples-heading {
  margin-bottom: 10px;
  color: var(--panel-muted);
  font-size: 12px;
}
.examples-heading span {
  margin-left: 4px;
}
.example-grid {
  display: grid;
}
.example-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 49px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-bottom-color: #3b453e;
  border-radius: 0;
  background: transparent;
  color: var(--panel-text);
  text-align: left;
}
.example-button > .icon {
  width: 21px;
  height: 21px;
  color: var(--panel-muted);
}
.example-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 550;
}
.example-name span {
  margin-left: 5px;
  color: var(--panel-muted);
  font-size: 12px;
  font-weight: 400;
}
.example-button .example-arrow {
  width: 15px;
  height: 15px;
  opacity: 0.6;
}
.example-button:hover:not(:disabled) {
  background: #2c3630;
}
.example-button[aria-pressed="true"] {
  border-color: #65765c;
  border-left: 3px solid var(--sage);
  border-radius: 5px;
  padding-left: 10px;
  background: #344136;
}
.example-button[aria-pressed="true"] > .icon {
  color: var(--sage);
}
.input-actions {
  flex-shrink: 0;
  padding: 21px 25px 22px;
  border-top: 1px solid #363e39;
  background: var(--panel);
}
.generate-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--sage);
  color: #182319;
  font-size: 14px;
  font-weight: 800;
}
.generate-button:hover:not(:disabled) {
  background: var(--sage-hover);
}
.generate-button .icon {
  width: 16px;
  height: 16px;
}
.generate-button:disabled {
  opacity: 0.65;
}
.button-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #8b9c7e;
  border-top-color: #182319;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 15px;
}
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--panel-muted);
  font-size: 11px;
  text-align: left;
}
.demo-badge:hover {
  color: var(--panel-text);
}
.status-dot {
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.demo-badge .status-dot {
  color: var(--sage);
}
.demo-badge[data-status="unconfigured"] .status-dot {
  border: 1px solid currentColor;
  background: transparent;
}
.text-button {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 600;
}
.text-button:hover:not(:disabled) {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.clear-button {
  color: var(--panel-muted);
  font-size: 11px;
}
.clear-button span {
  margin-left: 3px;
}
.input-error {
  max-height: 140px;
  overflow-y: auto;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #94675e;
  border-radius: 5px;
  background: #3b2c28;
  color: #f5d6cb;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.field [aria-invalid="true"] {
  border-color: #dfb2a4;
}

/* Manuscript controls and paired Spanish / Chinese rows. */
.workspace {
  min-width: 0;
}
.output-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 82px;
  padding: 17px var(--gutter);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.toolbar-title {
  font-size: 15px;
  font-weight: 750;
}
.toolbar-title span {
  margin-left: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.output-actions {
  display: flex;
  gap: 10px;
}
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #cbd3cc;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}
.secondary-button span[lang] {
  margin-left: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.secondary-button .icon {
  width: 17px;
  height: 17px;
}
.secondary-button:hover:not(:disabled) {
  background: var(--soft);
  border-color: #97a695;
}
.icon-button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}
.icon-button:hover:not(:disabled) {
  border-color: var(--rule);
  background: var(--soft);
  color: var(--ink);
}
.icon-button .icon {
  width: 17px;
  height: 17px;
}
.output-panel {
  scroll-margin-top: 20px;
}
.output-panel:focus {
  outline: none;
}
.workspace-heading {
  padding: 31px var(--gutter) 29px;
}
.workspace-heading h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 13px;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.8px;
}
.workspace-heading h1 > span[lang] {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}
.workspace-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 12px;
}
.detail-divider {
  margin: 0 6px;
  color: #a9b3ab;
}
.document-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}
.document-status .status-dot {
  background: transparent;
  border: 1px solid currentColor;
}
.output-panel[data-state="ready"] .document-status .status-dot {
  border-color: var(--green);
  background: var(--green);
}
.output-panel[data-state="loading"] .document-status .status-dot {
  border-color: var(--muted);
  border-top-color: transparent;
  width: 10px;
  height: 10px;
  animation: spin 800ms linear infinite;
}
.stale-label {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.document-wrap {
  padding: 0 var(--gutter);
}
.language-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.language-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 17px 26px 20px 0;
  border-top: 1px solid var(--rule);
}
.language-heading + .language-heading {
  padding-right: 0;
  padding-left: 26px;
  border-left: 1px solid var(--rule);
}
.language-heading h2 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.35px;
}
.language-heading h2 span {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}
.language-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.language-heading p span {
  margin-left: 5px;
}
.language-copy {
  margin-top: -3px;
}
.result-document {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.document-row {
  display: contents;
}
.document-cell {
  min-width: 0;
  padding: 13px 26px 13px 0;
  overflow-wrap: anywhere;
}
.document-cell + .document-cell {
  padding-right: 0;
  padding-left: 26px;
  border-left: 1px solid var(--rule);
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.6;
}
.character-count {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.title-row .document-cell {
  padding-top: 6px;
  padding-bottom: 27px;
}
.seo-title {
  font-size: 20px;
  line-height: 1.55;
  font-weight: 800;
  letter-spacing: -0.35px;
}
.document-cell[lang="zh-CN"] .seo-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}
.document-body {
  font-size: 15px;
  line-height: 1.85;
}
.document-cell[lang="zh-CN"] .document-body {
  line-height: 1.95;
}
.description-row .document-cell {
  padding-top: 0;
  padding-bottom: 17px;
}
.description-start .document-cell {
  padding-top: 23px;
  border-top: 1px solid var(--rule);
}
.faq-row .document-cell {
  padding-top: 15px;
  padding-bottom: 17px;
  border-top: 1px solid var(--rule);
}
.faq-start .document-cell {
  padding-top: 23px;
}
.faq-start .section-label {
  margin-bottom: 19px;
}
.faq-question {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}
.faq-question > span {
  display: grid;
  place-items: center;
  min-height: 27px;
  border-radius: 5px;
  background: #f0f3ef;
  color: #556356;
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.faq-answer {
  margin-top: 5px;
  margin-left: 38px;
  color: #526057;
  font-size: 13px;
  line-height: 1.85;
}
.mobile-language {
  display: none;
}
.review-notes {
  margin-top: 25px;
  padding: 19px 21px;
  border: 1px solid #d5dfd0;
  border-left: 3px solid #8fa17e;
  border-radius: 4px;
  background: #f5f7f2;
}
.review-notes h3 {
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 750;
}
.review-note-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.review-note-row + .review-note-row {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid #dce3d7;
}
.review-notes p {
  color: #52604f;
  font-size: 12px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.output-bottom {
  display: flex;
  align-items: start;
  gap: 8px;
  margin-top: 28px;
  padding: 19px 0 23px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}
.output-bottom > .icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}
.output-bottom p {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
  font-size: 10px;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 470px;
  padding: 56px 20px;
  text-align: center;
}
.empty-document {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 25px;
  padding: 14px 20px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  color: var(--muted);
}
.empty-document .icon {
  width: 25px;
  height: 25px;
  margin-right: 2px;
}
.empty-document > span {
  font-size: 13px;
  font-weight: 650;
}
.empty-document > span + span {
  padding-left: 13px;
  border-left: 1px solid var(--rule);
}
.empty-state h2 {
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.65px;
}
.empty-state p {
  max-width: 400px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}
.empty-state p > span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}
.empty-state > .secondary-button {
  margin-top: 23px;
}
.output-outline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 19px;
  margin-top: 37px;
  color: var(--muted);
  font-size: 10px;
}
.output-outline > span + span {
  padding-left: 19px;
  border-left: 1px solid var(--rule);
}
.output-outline span[lang] {
  margin-left: 3px;
}

/* Shared transient UI stays readable on both workspace backgrounds. */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: min(460px, calc(100vw - 32px));
  padding: 15px 20px;
  border: 1px solid #52634e;
  border-radius: 7px;
  background: #243127;
  color: #f1f5ec;
  box-shadow: 0 8px 26px #14231921;
  font-size: 13px;
  white-space: pre-line;
}
.toast .text-button {
  flex-shrink: 0;
  color: var(--sage);
}
dialog {
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 70px #111d2530;
}
dialog::backdrop {
  background: #101a1466;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 23px;
}
.dialog-heading h2 {
  font-size: 19px;
  font-weight: 800;
}
.dialog-heading h2 span {
  margin-left: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.guide-steps {
  margin: 0;
  padding-left: 23px;
}
.guide-steps li {
  padding-left: 5px;
  margin-bottom: 20px;
}
.guide-steps strong {
  display: block;
  font-size: 14px;
}
.guide-steps span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.guide-note {
  margin-top: 23px;
  padding: 17px;
  border-radius: 5px;
  background: var(--soft);
}
.guide-note strong {
  font-size: 13px;
}
.guide-note strong span {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 500;
}
.guide-note p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.guide-note p span,
#copy-dialog > p span {
  display: block;
  margin-top: 6px;
}
.dialog-done {
  min-height: 46px;
  margin-top: 23px;
  font-size: 13px;
}
#copy-dialog > p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13px;
}
#copy-fallback {
  width: 100%;
  padding: 14px;
  border: 1px solid #bbc7b9;
  border-radius: 5px;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 1600px) {
  :root {
    --panel-width: 350px;
    --gutter: 46px;
  }
  .document-body {
    font-size: 16px;
  }
  .faq-question,
  .faq-answer {
    font-size: 14px;
  }
}
@media (min-width: 1081px) and (max-height: 800px) {
  .brand {
    padding-top: 19px;
    padding-bottom: 18px;
  }
  .input-body {
    gap: 19px;
    padding-top: 20px;
    padding-bottom: 22px;
  }
  .panel-heading p {
    margin-top: 3px;
  }
  .field textarea {
    height: 180px;
    min-height: 150px;
  }
  .example-button {
    min-height: 43px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .input-actions {
    padding-top: 17px;
    padding-bottom: 17px;
  }
}
@media (max-width: 1200px) and (min-width: 1081px) {
  :root {
    --panel-width: 300px;
    --rail-width: 56px;
    --gutter: 24px;
  }
  .brand,
  .input-body,
  .input-actions {
    padding-left: 21px;
    padding-right: 21px;
  }
  .brand strong {
    font-size: 24px;
  }
  .generate-button {
    gap: 6px;
    font-size: 13px;
  }
  .generate-button .icon {
    display: none;
  }
  .output-toolbar {
    gap: 10px;
  }
  .secondary-button {
    gap: 7px;
    padding-left: 11px;
    padding-right: 11px;
  }
  .secondary-button span[lang] {
    display: block;
    margin: 1px 0 0;
  }
  .workspace-heading h1 {
    font-size: 23px;
  }
  .language-heading,
  .document-cell {
    padding-right: 20px;
  }
  .language-heading + .language-heading,
  .document-cell + .document-cell {
    padding-left: 20px;
  }
  .language-heading h2 {
    font-size: 17px;
  }
  .language-heading h2 span {
    font-size: 12px;
  }
  .language-heading p span {
    display: block;
    margin-left: 0;
  }
}
@media (max-width: 1080px) {
  :root {
    --gutter: 30px;
  }
  .app-shell {
    grid-template-columns: 60px minmax(0, 1fr);
  }
  .utility-rail {
    grid-row: 1 / 3;
  }
  .input-panel {
    position: static;
    height: auto;
  }
  .brand {
    padding: 23px 30px 19px;
  }
  #generator-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .input-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px 24px;
    padding: 22px 30px 25px;
    overflow: visible;
  }
  .panel-heading {
    grid-column: 1 / -1;
  }
  .panel-heading p {
    display: none;
  }
  .specs-field {
    grid-column: 1;
    grid-row: 3;
  }
  .field textarea {
    min-height: 154px;
    height: 154px;
    max-height: 340px;
  }
  .examples {
    grid-column: 2;
    grid-row: 2 / 4;
    padding-top: 1px;
  }
  .examples-heading {
    margin-bottom: 15px;
  }
  .example-button {
    min-height: 54px;
  }
  .example-name span {
    display: block;
    margin-left: 0;
    margin-top: 2px;
  }
  .input-actions {
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-self: stretch;
    padding: 25px 26px;
    border-top: 0;
    border-left: 1px solid #363e39;
  }
  .generate-button .icon {
    display: none;
  }
  .form-actions {
    flex-wrap: wrap;
    gap: 8px 15px;
  }
  .workspace {
    grid-column: 2;
  }
  .output-toolbar {
    min-height: 76px;
  }
  .language-heading,
  .document-cell {
    padding-right: 23px;
  }
  .language-heading + .language-heading,
  .document-cell + .document-cell {
    padding-left: 23px;
  }
}
@media (max-width: 900px) and (min-width: 761px) {
  #generator-form {
    display: flex;
  }
  .input-actions {
    padding: 0 30px 22px;
    border-left: 0;
  }
  .generate-button {
    max-width: 340px;
    align-self: end;
  }
  .generate-button .icon {
    display: block;
  }
  .form-actions {
    justify-content: end;
    gap: 25px;
  }
}
@media (max-width: 760px) {
  :root {
    --gutter: 22px;
  }
  html {
    scroll-padding-top: 145px;
  }
  .app-shell {
    display: block;
  }
  .utility-rail {
    position: relative;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    height: 56px;
    padding: 6px 17px;
    border-right: 0;
    border-bottom: 1px solid #363e39;
  }
  .rail-brand {
    font-size: 19px;
  }
  .rail-navigation {
    display: flex;
    gap: 4px;
    margin-top: 0;
    margin-left: auto;
  }
  .rail-help {
    margin-top: 0;
  }
  .rail-link {
    width: 40px;
    height: 40px;
  }
  .rail-tooltip {
    display: none !important;
  }
  .brand {
    padding: 22px 22px 20px;
  }
  .brand strong {
    font-size: 26px;
  }
  .brand span {
    font-size: 12px;
  }
  #generator-form {
    display: flex;
  }
  .input-body {
    display: flex;
    gap: 21px;
    padding: 23px 22px 24px;
  }
  .panel-heading h2 {
    font-size: 16px;
  }
  .field {
    width: 100%;
  }
  .field label {
    margin-bottom: 8px;
  }
  .field input,
  .field textarea {
    font-size: 16px;
  }
  .field input {
    height: 46px;
  }
  .field textarea {
    height: 181px;
    min-height: 160px;
    max-height: 480px;
  }
  .examples {
    width: 100%;
    padding: 0;
  }
  .examples-heading {
    margin-bottom: 11px;
  }
  .example-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .example-button {
    justify-content: center;
    gap: 7px;
    min-height: 63px;
    padding: 8px;
    border: 1px solid #465047;
    border-radius: 5px;
  }
  .example-button > .icon {
    width: 17px;
    height: 17px;
  }
  .example-name {
    flex: none;
    font-size: 11px;
  }
  .example-name span {
    display: block;
    margin: 2px 0 0;
    font-size: 10px;
  }
  .example-button .example-arrow {
    display: none;
  }
  .example-button[aria-pressed="true"] {
    padding-left: 6px;
  }
  .input-actions {
    display: block;
    padding: 0 22px 23px;
    border: 0;
  }
  .generate-button {
    min-height: 52px;
    font-size: 15px;
  }
  .generate-button .icon {
    display: block;
  }
  .form-actions {
    margin-top: 14px;
  }
  .demo-badge,
  .clear-button {
    font-size: 12px;
  }
  .output-toolbar {
    min-height: 112px;
    padding-top: 16px;
    padding-bottom: 15px;
    gap: 13px;
  }
  .toolbar-title {
    width: 100%;
    font-size: 14px;
  }
  .toolbar-title span {
    font-size: 12px;
  }
  .output-actions {
    width: 100%;
    gap: 9px;
  }
  .output-actions > button {
    flex: 1;
    padding-left: 10px;
    padding-right: 10px;
    min-height: 40px;
  }
  .secondary-button {
    font-size: 11px;
  }
  .secondary-button span[lang] {
    font-size: 10px;
  }
  .workspace-heading {
    padding-top: 27px;
    padding-bottom: 23px;
  }
  .workspace-heading h1 {
    flex-direction: column;
    gap: 5px;
    font-size: 24px;
    line-height: 1.4;
    letter-spacing: -0.6px;
  }
  .workspace-heading h1 > span[lang] {
    font-size: 14px;
  }
  .workspace-details {
    margin-top: 15px;
    gap: 9px;
  }
  .document-status {
    width: 100%;
    font-size: 11px;
  }
  .language-heading {
    align-items: center;
    padding: 12px 12px 12px 0;
  }
  .language-heading + .language-heading {
    padding: 12px 0 12px 14px;
  }
  .language-heading h2 {
    font-size: 13px;
  }
  .language-heading h2 span {
    display: block;
    font-size: 10px;
  }
  .language-heading p {
    display: none;
  }
  .language-copy {
    margin: 0;
    width: 36px;
    height: 40px;
  }
  .result-document {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 23px;
  }
  .document-cell,
  .document-cell + .document-cell {
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
  }
  .document-cell[lang="es-UY"] {
    order: 1;
  }
  .document-cell[lang="zh-CN"] {
    order: 2;
  }
  .mobile-language {
    display: none;
  }
  .title-row .mobile-language {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rule);
    font-size: 19px;
    font-weight: 750;
  }
  .mobile-language .language-token {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid #d5dfd0;
    border-radius: 5px;
    color: var(--green);
    font-size: 11px;
  }
  .title-row .document-cell {
    padding-top: 0;
    padding-bottom: 24px;
  }
  .title-row .document-cell[lang="zh-CN"] {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 3px solid #ced9c8;
  }
  .section-label {
    font-size: 12px;
  }
  .character-count {
    font-size: 11px;
  }
  .seo-title,
  .document-cell[lang="zh-CN"] .seo-title {
    font-size: 20px;
    line-height: 1.65;
  }
  .document-body {
    font-size: 15px;
  }
  .description-start .document-cell {
    padding-top: 22px;
  }
  .description-row .document-cell {
    padding-bottom: 17px;
  }
  .faq-question,
  .faq-answer {
    font-size: 14px;
  }
  .faq-row .document-cell {
    padding-top: 17px;
    padding-bottom: 20px;
  }
  .review-notes {
    margin-top: 25px;
    padding: 17px;
  }
  .review-note-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .empty-state {
    min-height: 390px;
    padding: 42px 4px;
  }
  .empty-state h2 {
    font-size: 21px;
  }
  .empty-state p {
    font-size: 13px;
  }
  .output-outline {
    gap: 10px 12px;
    font-size: 10px;
    margin-top: 30px;
  }
  .output-outline > span + span {
    padding-left: 12px;
  }
  .output-bottom {
    margin-top: 24px;
  }
  .output-bottom p {
    display: block;
    line-height: 1.9;
  }
  .output-bottom p span {
    display: block;
  }
  .toast {
    right: 16px;
    bottom: 16px;
    gap: 18px;
    padding: 13px 16px;
    font-size: 12px;
  }
  dialog {
    padding: 22px;
  }
}
@media (max-width: 370px) {
  :root {
    --gutter: 18px;
  }
  .brand,
  .input-body,
  .input-actions {
    padding-left: 18px;
    padding-right: 18px;
  }
  .example-button {
    gap: 5px;
    padding-left: 5px;
    padding-right: 5px;
  }
  .example-name {
    font-size: 10px;
  }
  .output-actions .secondary-button {
    gap: 6px;
  }
  .secondary-button span[lang] {
    display: block;
    margin: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
