:root {
  --navy: #0b1b34;
  --navy-light: #142c4c;
  --yellow: #f5c640;
  --yellow-soft: #fff5ce;
  --ink: #162641;
  --muted: #63738a;
  --line: #dce4ee;
  --surface: #fff;
  --canvas: #f2f5f9;
  --error: #a72f43;
  --radius: 15px;
  --shadow: 0 4px 24px #10284807;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #d7ac28;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: "Manrope", var(--font);
}
h1 {
  font-size: clamp(1.6rem, 2.2vw, 2.15rem);
  letter-spacing: -0.055em;
  margin-bottom: 9px;
  font-weight: 800;
}
h2 {
  font-size: 1.05rem;
  margin: 0;
  font-weight: 800;
}
h3 {
  font-size: 1rem;
}
p {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.app-frame {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 232px;
  position: fixed;
  inset: 0 auto 0 0;
  background: linear-gradient(170deg, var(--navy), #102741);
  color: #e2e9f6;
  display: flex;
  flex-direction: column;
  padding: 32px 18px;
  z-index: 20;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  padding: 0 13px 42px;
  font-size: 1.02rem;
  line-height: 1.3;
}
.brand strong {
  display: block;
  font-family: Manrope, var(--font);
  font-size: 1.22rem;
  font-weight: 800;
  color: #fff;
}
.brand-mark {
  border: 1px solid #f5c64075;
  background: #f5c64018;
  color: var(--yellow);
  font-weight: 800;
  width: 43px;
  height: 46px;
  display: grid;
  place-items: center;
  clip-path: polygon(
    25% 0,
    75% 0,
    100% 25%,
    100% 75%,
    75% 100%,
    25% 100%,
    0 75%,
    0 25%
  );
}
.sidebar-label {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  color: #7991b0;
  margin: 0 16px 13px;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.nav-item {
  border: 0;
  background: transparent;
  color: #a8bad1;
  display: flex;
  gap: 13px;
  width: 100%;
  align-items: center;
  text-align: left;
  padding: 13px 16px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    background 0.2s,
    color 0.2s;
}
.nav-item span {
  font-size: 1.35rem;
}
.nav-item:hover {
  background: #ffffff08;
  color: #fff;
}
.nav-item.active {
  background: #f5c64015;
  color: var(--yellow);
  box-shadow: inset 3px 0 var(--yellow);
}
.sidebar-bottom {
  margin-top: auto;
  padding: 26px 14px 0;
  border-top: 1px solid #ffffff12;
}
.privacy-icon {
  font-size: 2rem;
  color: var(--yellow);
  display: block;
  line-height: 1.4;
}
.sidebar-bottom strong {
  font-size: 0.87rem;
}
.sidebar-bottom p {
  font-size: 0.82rem;
  line-height: 1.7;
  color: #8da1bf;
  margin: 9px 0 18px;
}
.sidebar-bottom small {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: #657d9d;
  margin-top: 26px;
}
.subtle {
  background: none;
  border: 0;
  color: #d8e1ee;
  font-size: 0.84rem;
  padding: 0;
}
.main-frame {
  margin-left: 232px;
  width: calc(100% - 232px);
}
.topbar {
  height: 78px;
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffffed;
  border-bottom: 1px solid var(--line);
}
.topbar-title {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--muted);
}
.separator {
  padding: 0 14px;
  color: #bac6d7;
}
#topbar-context {
  color: var(--ink);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.local-badge {
  color: #3b6880;
  background: #edf5f5;
  border: 1px solid #deeeee;
  border-radius: 24px;
  padding: 6px 11px;
  font-size: 0.74rem;
  white-space: nowrap;
}
.avatar {
  width: 35px;
  height: 35px;
  background: var(--navy);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--yellow);
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 6px;
}
main {
  max-width: 1600px;
  margin: auto;
  padding: 32px 38px 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.page-heading p {
  margin: 0;
  font-size: 0.95rem;
}
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: #8c742b;
  font-weight: 700;
  margin-bottom: 9px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
  max-width: 100%;
}
.button:hover {
  background: #f8fafd;
  border-color: #b9c8dc;
}
.button:active {
  transform: translateY(1px);
}
.button.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 3px 7px #0b1b3417;
}
.button.primary:hover {
  background: #1b3658;
}
.button.small {
  font-size: 0.79rem;
  min-height: 34px;
  padding: 7px 12px;
}
.button.full {
  width: 100%;
  min-height: 48px;
}
.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0;
}
.workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 26px;
  padding: 14px 19px;
  box-shadow: var(--shadow);
}
.step {
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 13px;
  padding: 0 16px;
  color: #8190a4;
  position: relative;
}
.step:not(:last-child) {
  border-right: 1px solid var(--line);
}
.step b {
  display: grid;
  place-items: center;
  border: 1px solid #dce4ee;
  border-radius: 50%;
  font-size: 0.8rem;
  width: 34px;
  height: 34px;
  font-weight: 600;
  flex-shrink: 0;
}
.step span {
  font-size: 0.9rem;
  font-weight: 600;
}
.step small {
  display: block;
  font-size: 0.74rem;
  font-weight: 400;
  margin-top: 1px;
}
.step.active {
  color: var(--ink);
}
.step.active b {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--navy);
  box-shadow: 0 0 0 4px #f5c64015;
}
.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
}
.method {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  padding: 18px 19px;
  position: relative;
  box-shadow: var(--shadow);
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}
.method:hover {
  transform: translateY(-2px);
  border-color: #94aac5;
  box-shadow: 0 8px 24px #1028480c;
}
.method.active {
  border-color: #ba972e;
  background: linear-gradient(120deg, #fffdf5, #fff);
  box-shadow: inset 0 0 0 1px #dfba43;
}
.method.active:after {
  content: "✓";
  position: absolute;
  right: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  background: var(--yellow);
  color: var(--navy);
  border-radius: 50%;
  font-size: 0.75rem;
}
.method-icon {
  display: block;
  color: #375371;
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 18px;
}
.method small {
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: #8b789c;
  display: block;
  margin-bottom: 6px;
}
.method.active small {
  color: #977722;
}
.method strong {
  display: block;
  font-size: 0.97rem;
  font-family: Manrope, var(--font);
}
.method p {
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 8px 0 0;
  color: var(--muted);
}
.mode-help {
  font-size: 0.79rem;
  margin: 12px 3px 25px;
  min-height: 25px;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 23px;
  align-items: start;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}
.card-head {
  padding: 20px 24px;
  border-bottom: 1px solid #e8edf4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-body {
  padding: 24px;
}
.card-foot {
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}
.tag {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 8px;
  background: #f0f4f8;
  border: 1px solid #e6edf4;
  color: #73849b;
  border-radius: 5px;
  white-space: nowrap;
}
.tag.amber {
  background: var(--yellow-soft);
  color: #927019;
  border-color: #f4df92;
}
.tag.good {
  background: #eaf5f0;
  color: #306d55;
  border-color: #d6eadd;
}
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 17px;
}
input:not([type="checkbox"], [type="file"]),
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #d5dfeb;
  border-radius: 7px;
  background: #fff;
  padding: 11px 12px;
  color: var(--ink);
  margin-top: 8px;
  min-width: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
textarea {
  resize: vertical;
  line-height: 1.6;
  font-size: 0.9rem;
  font-weight: 400;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #8ea5c7;
  box-shadow: 0 0 0 3px #c1d4ef30;
}
select {
  cursor: pointer;
  font-size: 0.86rem;
}
input::placeholder,
textarea::placeholder {
  color: #99a6b8;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid .button {
  align-self: end;
  margin-bottom: 17px;
}
.helper {
  font-size: 0.8rem;
  line-height: 1.6;
  margin: 10px 0 18px;
}
.control-note {
  font-size: 0.79rem;
  color: var(--muted);
  align-self: center;
}
.format-status {
  font-size: 0.75rem;
  line-height: 1.6;
  margin: -2px 0 21px;
  padding-left: 11px;
  border-left: 3px solid var(--yellow);
}
.upload-zone {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  min-height: 196px;
  border: 1.5px dashed #bbc9db;
  border-radius: 11px;
  background: linear-gradient(150deg, #fafcfe, #f4f7fb);
  padding: 21px;
  cursor: pointer;
  text-align: center;
  transition:
    background 0.2s,
    border-color 0.2s;
  margin-bottom: 18px;
  position: relative;
}
.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.upload-zone.drag {
  border-color: #bd9220;
  background: #fff9e7;
}
.upload-glyph {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e9eef5;
  color: var(--navy);
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 12px;
}
.upload-zone strong {
  font-size: 0.94rem;
}
.upload-zone span:not(.upload-glyph) {
  font-size: 0.81rem;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 400;
}
.upload-zone small {
  font-size: 0.68rem;
  color: #93a0b2;
  margin-top: 15px;
  font-weight: 400;
}
.source-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.source-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafcfe;
}
.source-row img {
  width: 40px;
  height: 45px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.source-row .file-label {
  font-size: 0.82rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.source-row small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.73rem;
}
.icon-button {
  background: transparent;
  border: 0;
  min-width: 30px;
  min-height: 32px;
  font-size: 1.2rem;
  color: var(--muted);
  border-radius: 5px;
}
.icon-button:hover {
  background: #e9eff7;
  color: var(--ink);
}
.checkline {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.81rem;
  font-weight: 400;
  color: #536680;
  margin: 16px 0;
  line-height: 1.6;
}
.checkline input {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: var(--navy);
  margin: 3px 0 0;
}
.source-tip {
  padding: 14px 15px;
  border-radius: 8px;
  background: #eff4fa;
  color: #405b7d;
  margin: 18px 0 21px;
  font-size: 0.79rem;
}
.source-tip b {
  display: block;
  margin-bottom: 4px;
}
.source-tip span {
  display: block;
  font-size: 0.76rem;
  line-height: 1.6;
}
.paper-viewport {
  padding: 25px;
  background: #edf1f6;
  max-height: 700px;
  overflow: auto;
}
.paper {
  background: #fff;
  min-height: 520px;
  padding: 30px 25px;
  box-shadow: 0 2px 10px #1028480c;
  color: #111;
  font-family: "Times New Roman", serif;
  font-size: 11pt;
}
.paper .country {
  font-size: 10pt;
  text-align: center;
  margin-bottom: 7px;
  letter-spacing: 0.06em;
}
.paper h3 {
  font-family: "Times New Roman", serif;
  text-align: center;
  font-size: 13pt;
  margin: 0 0 8px;
  color: #111;
  letter-spacing: 0.015em;
}
.paper .subtitle {
  text-align: center;
  font-size: 8pt;
  color: #777;
  margin: 0 0 25px;
}
.paper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9pt;
}
.paper td {
  border: 1px solid #cdd4df;
  padding: 7px;
  vertical-align: top;
  white-space: pre-wrap;
  word-break: break-word;
}
.paper td:first-child {
  width: 44%;
}
.paper .group td {
  background: #edf1f7;
  color: #384960;
  font-weight: 700;
  padding: 7px;
}
.paper .empty-value {
  display: block;
  background: #eff3f8;
  width: 65%;
  height: 5px;
  border-radius: 2px;
  margin: 4px 0;
}
.paper .paper-note {
  font-size: 8pt;
  color: #7c8795;
  margin-top: 22px;
}
.notice {
  padding: 15px 18px;
  margin: 16px 0 23px;
  border: 1px solid #dbe5ef;
  background: #f5f9fd;
  color: #385877;
  border-radius: 9px;
  font-size: 0.88rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.notice.error {
  background: #fff1f3;
  border-color: #efc8cf;
  color: #a0394b;
}
.notice.warning {
  background: #fff8df;
  border-color: #efdfa7;
  color: #886727;
}
.notice strong {
  color: inherit;
}
.progress-area {
  padding: 17px 21px;
  margin: 18px 0 24px;
  background: var(--navy);
  color: #fff;
  border-radius: 12px;
}
.progress-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.84rem;
}
.progress-info .button {
  margin-left: auto;
  background: #ffffff12;
  border-color: #ffffff20;
  color: #fff;
}
.progress-area progress {
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 15px;
  accent-color: var(--yellow);
  border: 0;
}
.progress-area progress::-webkit-progress-bar {
  background: #ffffff18;
  border-radius: 3px;
}
.progress-area progress::-webkit-progress-value {
  background: var(--yellow);
  border-radius: 3px;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff3c;
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 10px 0 24px;
}
.review-toolbar h2 {
  font-size: 1.15rem;
}
.review-toolbar p {
  margin: 7px 0 0;
  font-size: 0.84rem;
}
.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 23px;
  align-items: start;
}
.reference-card {
  position: sticky;
  top: 18px;
}
.card-head select {
  max-width: 160px;
  margin: 0;
  font-size: 0.77rem;
  padding: 7px;
}
.source-preview {
  height: 350px;
  background: #edf1f6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.source-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.source-preview iframe {
  border: 0;
  width: 100%;
  height: 100%;
}
.source-preview p {
  font-size: 0.88rem;
  text-align: center;
}
details {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 17px;
}
details:last-child {
  border: 0;
  padding: 0;
  margin: 0;
}
summary {
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 17px;
}
#field-list {
  max-height: 1200px;
  overflow: auto;
}
.field-group {
  font-size: 0.75rem;
  color: #53708f;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 12px 24px;
  background: #f4f7fb;
  margin: 0;
  border-top: 1px solid var(--line);
  text-transform: uppercase;
}
.field {
  padding: 17px 24px;
  border-bottom: 1px solid #e9eef5;
}
.field-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.field-title label {
  margin: 0;
  font-size: 0.85rem;
}
.field-source {
  font-size: 0.74rem;
  color: #5a7191;
  background: #f4f7fb;
  border-radius: 5px;
  padding: 9px 11px;
  margin: 10px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.field textarea {
  font-size: 0.9rem;
  margin-top: 9px;
  min-height: 46px;
}
.field .checkline {
  margin: 9px 0 0;
  font-size: 0.73rem;
}
.field .note {
  font-size: 0.73rem;
  color: #937321;
  line-height: 1.5;
  margin: 8px 0 0;
}
.bottom-actions {
  display: flex;
  justify-content: space-between;
  margin: 24px 0 5px;
  gap: 12px;
}
.review-check {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.review-check strong {
  color: #866a1e;
}
.review-check.good strong {
  color: #336f56;
}
.workspace-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 25px 0;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: #8a98ad;
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 24px;
  max-width: 1100px;
}
.connection-guide > div {
  padding-left: 45px;
  position: relative;
  margin-bottom: 30px;
}
.connection-guide b {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.8rem;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #f0f4f9;
  display: grid;
  place-items: center;
  color: #496585;
}
.connection-guide p {
  font-size: 0.84rem;
}
.connection-guide h3 {
  margin: 0 0 9px;
  font-size: 0.92rem;
}
.connection-guide .source-tip {
  padding: 18px;
  margin: 0;
}
.connection-guide .source-tip b {
  position: static;
  background: none;
  display: block;
  width: auto;
  height: auto;
}
.formats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.format-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  padding: 22px;
  box-shadow: var(--shadow);
}
.format-card h2 {
  margin: 14px 0 7px;
}
.format-card p {
  font-size: 0.8rem;
}
.format-card .code {
  font-size: 0.75rem;
  display: inline-block;
  background: #edf2f8;
  border-radius: 6px;
  color: #385674;
  font-weight: 700;
  padding: 7px 9px;
}
.format-card .button-row {
  margin-bottom: 0;
}
.format-card .button {
  font-size: 0.8rem;
  padding: 8px 12px;
}
dialog {
  width: min(680px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 25px;
  max-height: 85vh;
  overflow: auto;
  color: var(--ink);
  box-shadow: 0 20px 80px #071a3344;
}
dialog::backdrop {
  background: #071a3370;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
#dialog-format-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 0;
  max-height: 380px;
  overflow: auto;
  font-size: 0.8rem;
}
#dialog-format-fields code {
  display: block;
  font-size: 0.7rem;
  color: #8593a8;
  word-break: break-all;
}
#phrase-list {
  font-size: 0.79rem;
  color: var(--muted);
}
.phrase-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.phrase-item button {
  float: right;
}
.app-frame {
  animation: appear 0.35s ease-out;
}
@keyframes appear {
  from {
    opacity: 0.92;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1500px) {
  main {
    padding-top: 40px;
  }
  .method {
    padding: 22px;
  }
  .paper-viewport {
    padding: 30px;
  }
  .card-body {
    padding: 28px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 205px;
    padding: 28px 12px;
  }
  .main-frame {
    margin-left: 205px;
    width: calc(100% - 205px);
  }
  main {
    padding: 26px 25px 0;
  }
  .topbar {
    padding: 0 25px;
  }
  .method {
    padding: 15px 12px;
  }
  .method small {
    font-size: 0.56rem;
  }
  .method p {
    font-size: 0.75rem;
  }
  .workspace-grid,
  .review-grid {
    gap: 16px;
  }
  .card-body {
    padding: 19px;
  }
  .card-head {
    padding: 18px 19px;
  }
  .paper-viewport {
    padding: 15px;
  }
  .paper {
    padding: 25px 18px;
  }
  .formats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 960px) {
  .sidebar {
    width: 76px;
    padding: 24px 8px;
    align-items: center;
  }
  .brand {
    padding: 0 0 32px;
  }
  .brand > span:last-child,
  .sidebar-label,
  .nav-item {
    font-size: 0;
  }
  .nav-item {
    justify-content: center;
    padding: 13px 12px;
  }
  .nav-item span {
    font-size: 1.55rem;
  }
  .sidebar-bottom {
    display: none;
  }
  .main-frame {
    margin-left: 76px;
    width: calc(100% - 76px);
  }
  .topbar-title {
    font-size: 0.8rem;
  }
  .local-badge {
    display: none;
  }
  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .method-icon {
    margin-bottom: 14px;
  }
  .method small {
    font-size: 0.65rem;
  }
  .method p {
    font-size: 0.8rem;
  }
  .workspace-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .format-preview {
    display: none;
  }
  .review-grid {
    grid-template-columns: 1fr;
  }
  .reference-card {
    position: static;
  }
  .source-preview {
    height: 320px;
  }
  #field-list {
    max-height: none;
  }
  .paper-viewport {
    max-height: 750px;
  }
  .step {
    padding: 0 10px;
  }
  .step small {
    display: none;
  }
}
@media (max-width: 600px) {
  .sidebar {
    position: static;
    width: 100%;
    height: 70px;
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #ffffff15;
  }
  .brand {
    padding: 0;
    gap: 8px;
  }
  .brand-mark {
    width: 32px;
    height: 36px;
    font-size: 0.78rem;
  }
  .brand > span:last-child {
    font-size: 0.8rem;
    display: block;
  }
  .brand strong {
    font-size: 0.95rem;
  }
  .sidebar nav {
    display: flex;
    gap: 5px;
  }
  .nav-item {
    padding: 8px 10px;
  }
  .nav-item.active {
    box-shadow: none;
  }
  .nav-item span {
    font-size: 1.3rem;
  }
  .app-frame {
    display: block;
  }
  .main-frame {
    margin: 0;
    width: 100%;
  }
  .topbar {
    height: 60px;
    padding: 0 17px;
  }
  .topbar-title {
    font-size: 0.73rem;
  }
  .separator {
    padding: 0 5px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .avatar {
    display: none;
  }
  .header-actions .button {
    font-size: 0.7rem;
    padding: 6px 8px;
  }
  .header-actions .button[data-action="open"] {
    display: none;
  }
  main {
    padding: 23px 16px 0;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 20px;
  }
  .page-heading > .button {
    display: none;
  }
  .page-heading p {
    font-size: 0.84rem;
  }
  .eyebrow {
    font-size: 0.6rem;
  }
  .workflow-steps {
    padding: 12px 6px;
    gap: 0;
    margin-bottom: 21px;
  }
  .step {
    gap: 6px;
    padding: 0 7px;
  }
  .step b {
    width: 25px;
    height: 25px;
    font-size: 0.68rem;
  }
  .step span {
    font-size: 0.71rem;
  }
  .method-grid {
    gap: 9px;
  }
  .method {
    padding: 15px 13px;
  }
  .method strong {
    font-size: 0.84rem;
  }
  .method small {
    font-size: 0.52rem;
  }
  .method p {
    font-size: 0.73rem;
  }
  .method-icon {
    font-size: 1.45rem;
    margin-bottom: 13px;
  }
  .mode-help {
    font-size: 0.73rem;
  }
  .form-grid {
    gap: 10px;
  }
  .card-body {
    padding: 17px;
  }
  .card-head {
    padding: 17px;
  }
  .card-head h2 {
    font-size: 0.97rem;
  }
  .upload-zone {
    min-height: 180px;
    padding: 15px;
  }
  .upload-zone strong {
    font-size: 0.87rem;
  }
  .upload-zone small {
    font-size: 0.62rem;
  }
  .tag {
    font-size: 0.57rem;
  }
  .review-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .review-toolbar .button-row {
    margin: 0;
  }
  .field,
  .field-group {
    padding-left: 17px;
    padding-right: 17px;
  }
  .formats-grid {
    grid-template-columns: 1fr;
  }
  .notice {
    font-size: 0.8rem;
    padding: 12px 14px;
  }
  .progress-info {
    font-size: 0.75rem;
  }
  #dialog-format-fields {
    grid-template-columns: 1fr;
  }
  .workspace-footer {
    align-items: flex-start;
    flex-direction: column;
    font-size: 0.62rem;
  }
  .settings-grid {
    gap: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  body {
    background: #fff;
  }
  .sidebar,
  .topbar,
  .workflow-steps,
  .page-heading,
  .workspace-footer,
  .bottom-actions,
  .card-head,
  #notice,
  #progress-area,
  #upload-panel,
  #review-panel,
  #formats-view,
  #settings-view,
  #export-panel .workspace-grid > section:first-child,
  #export-panel > .button {
    display: none !important;
  }
  .main-frame {
    margin: 0;
    width: 100%;
  }
  main {
    padding: 0;
    max-width: none;
  }
  #export-panel,
  #export-panel .workspace-grid {
    display: block !important;
  }
  .card {
    border: 0;
    box-shadow: none;
  }
  .paper-viewport {
    padding: 0;
    background: #fff;
    max-height: none;
    overflow: visible;
  }
  .paper {
    padding: 0;
    min-height: 0;
    box-shadow: none;
    font-size: 11pt;
  }
  .paper table {
    font-size: 11pt;
  }
  .paper tr {
    break-inside: avoid;
  }
  .paper .group {
    break-after: avoid;
  }
  .paper .paper-note {
    font-size: 9pt;
  }
  @page {
    size: A4;
    margin: 15mm;
  }
}
