:root {
  font-family: Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color: #17243c;
  background: #f6f8fc;
  font-synthesis: none;
  --blue: #194de1;
  --muted: #59677f;
  --line: #dce3ee;
  --mono: "SFMono-Regular",Consolas,"Liberation Mono",monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

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

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

button,a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  color: #8993a6;
}

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

a:hover {
  color: var(--blue);
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline: 3px solid #82a7ff;
  outline-offset: 4px;
}

[hidden] {
  display: none!important;
}

.site-header,main,.site-footer {
  width: min(1200px,calc(100% - 80px));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  padding-block: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: white;
  background: var(--blue);
  font: 700 20px var(--mono);
  letter-spacing: -1px;
}

.brand-slash {
  margin: 0 9px;
  color: #8993a6;
}

.brand strong {
  font-weight: 550;
}

.source-link {
  font-size: 14px;
  color: #4c5c76;
}

.source-link span[aria-hidden] {
  margin-left: 8px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 20px;
  margin-left: auto;
}

.language-control select {
  max-width: 100%;
  font-size: 13px;
}

:lang(zh-CN) h1 {
  letter-spacing: 0;
  line-height: 1.4;
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 48px 0 35px;
}

.eyebrow {
  font: 600 12px var(--mono);
  letter-spacing: 1.6px;
  color: var(--blue);
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(27px,3vw,37px);
  font-weight: 620;
  letter-spacing: -1.3px;
  line-height: 1.18;
  margin: 0;
}

.mobile-break {
  display: none;
}

.intro-description {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.local-note {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  flex-shrink: 0;
}

.local-note svg {
  width: 27px;
  height: 27px;
  color: var(--blue);
}

.local-note strong {
  color: #344666;
  font-weight: 500;
}

.variant-fieldset {
  padding: 0;
  border: 0;
  margin: 0 0 24px;
  min-width: 0;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 12px var(--mono);
  color: #7a889f;
  margin: 0 0 12px;
}

.section-label span {
  font: 600 14px Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color: #3c4d69;
}

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

.variant-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.variant-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.variant-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 17px 18px;
  border: 1px solid #d7dfed;
  border-radius: 10px;
  background: white;
  transition: background .15s,border-color .15s;
}

.variant-card strong {
  font-size: 15px;
  font-weight: 600;
}

.variant-card small {
  grid-row: 2;
  font-size: 13px;
  color: var(--muted);
}

.variant-card .radio-mark {
  width: 15px;
  height: 15px;
  border: 1px solid #b7c3d8;
  border-radius: 50%;
  align-self: center;
}

.variant-option input:checked+.variant-card {
  background: #edf2ff;
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.variant-option input:checked+.variant-card strong {
  color: #1540b5;
}

.variant-option input:checked+.variant-card .radio-mark {
  border: 4px solid var(--blue);
  background: white;
}

.variant-option input:focus-visible+.variant-card {
  outline: 3px solid #82a7ff;
  outline-offset: 3px;
}

.variant-option:hover .variant-card {
  border-color: #7999e7;
}

.workspace {
  overflow: hidden;
  border: 1px solid #d4ddec;
  border-radius: 13px;
  background: white;
  box-shadow: 0 5px 18px #172b5410;
}

.workspace-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.mode-switch {
  display: flex;
  background: #f0f3f9;
  border-radius: 7px;
  padding: 3px;
  gap: 3px;
}

.mode-switch button {
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: #5a6981;
  border-radius: 5px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 550;
}

.mode-switch button span[aria-hidden] {
  margin-left: 12px;
}

.mode-switch button[aria-pressed=true] {
  color: #193f9f;
  background: white;
  box-shadow: 0 1px 4px #192d5320;
}

.auto-control,.check-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #455775;
  cursor: pointer;
  white-space: nowrap;
}

input[type=checkbox] {
  accent-color: var(--blue);
  width: 15px;
  height: 15px;
  margin: 0;
}

.editors {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.editor {
  min-width: 0;
}

.input-editor {
  border-right: 1px solid var(--line);
}

.output-editor {
  background: #fafbfe;
}

.editor-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 22px 13px;
  min-height: 56px;
}

.editor-header label {
  font-size: 14px;
  font-weight: 650;
}

.format-label {
  color: #62718a;
  background: #ecf0f7;
  border-radius: 4px;
  padding: 3px 6px;
  font: 11px var(--mono);
  white-space: nowrap;
}

.editor-header .text-button {
  margin-left: auto;
}

.text-button {
  border: 0;
  background: transparent;
  padding: 4px 0;
  color: #466494;
  font-size: 13px;
}

.text-button:hover:not(:disabled) {
  color: var(--blue);
}

textarea {
  display: block;
  width: 100%;
  min-height: 240px;
  height: 260px;
  border: 0;
  resize: vertical;
  padding: 10px 22px 20px;
  line-height: 1.75;
  background: transparent;
  color: #253954;
  font: 14px/1.8 var(--mono);
  overflow-wrap: anywhere;
  border-radius: 0;
}

textarea::placeholder {
  color: #7f8ba1;
  font-family: inherit;
  font-size: 13px;
}

textarea:focus-visible {
  outline-offset: -3px;
}

.output-editor textarea {
  color: #1949bc;
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 22px 15px;
  color: #77849b;
  font: 12px var(--mono);
}

.settings-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.format-control {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #50617d;
  font-size: 14px;
}

select {
  border: 1px solid #d7dfec;
  border-radius: 6px;
  padding: 8px 28px 8px 10px;
  background-color: white;
  color: #243b60;
  font-size: 14px;
  cursor: pointer;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-left: auto;
  padding: 11px 19px;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 7px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 3px #1642bc18;
}

.primary-button:hover {
  background: #123fc3;
}

.pem-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.pem-controls>label:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #50617d;
  font-size: 14px;
}

.pem-controls input[type=text] {
  width: 150px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px;
  font: 13px var(--mono);
}

.feedback-row {
  padding: 0 20px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.feedback-row p {
  margin: 0;
  color: #6c7b92;
  font-size: 12px;
  line-height: 1.6;
}

.shortcut {
  flex-shrink: 0;
  color: #7a869a;
  font-size: 11px;
}

kbd {
  font: 11px var(--mono);
}

.error-message {
  margin: 0 20px 18px;
  padding: 11px 14px;
  border: 1px solid #f1c7c7;
  border-radius: 6px;
  color: #a12626;
  background: #fff6f6;
  font-size: 14px;
  line-height: 1.6;
}

.variant-reference {
  display: grid;
  grid-template-columns: .95fr 1.2fr;
  gap: 60px;
  margin: 36px 0 42px;
}

.reference-intro h2 {
  margin: 0 0 9px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.5px;
}

.reference-intro>p:not(.section-label) {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 10px;
  max-width: 420px;
}

.reference-intro>a {
  font: 12px var(--mono);
  color: var(--blue);
}

.reference-data {
  padding-top: 26px;
}

.reference-data dl {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 22px;
  margin: 0;
}

.reference-data dt {
  font-size: 12px;
  color: #68778e;
  margin-bottom: 11px;
}

.reference-data dd {
  overflow-wrap: anywhere;
  margin: 0;
  font: 13px/1.6 var(--mono);
  color: #2b405f;
}

.reference-data>p {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 18px 0 0;
  color: #6c7b92;
  font-size: 12px;
  line-height: 1.7;
}

.site-footer {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 22px 0 30px;
  font-size: 12px;
  color: #738099;
}

.site-footer>span:first-child {
  font: 11px var(--mono);
  letter-spacing: .6px;
}

.site-footer>a {
  color: #536784;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media(min-width:1500px) {
  .intro {
    margin-top: 60px;
  }
  textarea {
    height: 300px;
  }
  .variant-reference {
    margin-top: 42px;
  }
}

@media(max-width:1000px) {
  .site-header,main,.site-footer {
    width: calc(100% - 48px);
  }
  .local-note {
    display: none;
  }
  .variant-card {
    padding: 16px 13px;
  }
  .variant-reference {
    gap: 32px;
  }
  .editor-header {
    padding-inline: 16px;
    gap: 7px;
  }
  textarea {
    padding-inline: 16px;
  }
  .editor-footer {
    padding-inline: 16px;
  }
  .format-label {
    font-size: 10px;
  }
  .reference-data dl {
    gap: 14px;
  }
  .reference-data dd {
    font-size: 12px;
  }
}

@media(max-width:700px) {
  .site-header,main,.site-footer {
    width: calc(100% - 32px);
  }
  .site-header {
    min-height: 74px;
    gap: 12px;
  }
  .header-actions {
    gap: 10px;
  }
  .language-control select {
    font-size: 12px;
  }
  .source-link {
    font-size: 13px;
  }
  .intro {
    margin: 32px 0 27px;
  }
  h1 {
    font-size: 31px;
    letter-spacing: -1px;
  }
  .mobile-break {
    display: block;
  }
  .intro-description {
    font-size: 14px;
    max-width: 310px;
  }
  .variant-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .variant-card {
    padding: 14px;
  }
  .variant-card small {
    font-size: 12px;
  }
  .variant-card strong {
    font-size: 14px;
  }
  .workspace-toolbar {
    padding: 13px;
  }
  .mode-switch button {
    padding: 8px 12px;
  }
  .mode-switch button span[aria-hidden] {
    margin-left: 7px;
  }
  .auto-control {
    font-size: 12px;
    gap: 6px;
  }
  .editors {
    grid-template-columns: 1fr;
  }
  .input-editor {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  textarea {
    height: 180px;
    min-height: 150px;
  }
  .editor-header {
    padding-top: 16px;
  }
  .editor-footer {
    padding-bottom: 12px;
  }
  .settings-row {
    padding: 14px;
    gap: 14px;
  }
  .format-control {
    font-size: 13px;
    gap: 8px;
  }
  select {
    padding-right: 19px;
    font-size: 13px;
  }
  .primary-button {
    gap: 15px;
  }
  .pem-controls {
    width: 100%;
    order: 2;
  }
  .check-control {
    font-size: 13px;
  }
  .feedback-row {
    padding: 0 14px 14px;
  }
  .shortcut {
    display: none;
  }
  .variant-reference {
    grid-template-columns: 1fr;
    gap: 0;
    margin: 30px 0;
  }
  .reference-data {
    padding-top: 20px;
  }
  .reference-data dd {
    font-size: 12px;
  }
  .reference-data dl {
    grid-template-columns: 1.25fr 1fr 1fr;
  }
  .site-footer {
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 24px;
  }
  .site-footer>span:nth-child(2) {
    display: none;
  }
  .error-message {
    margin-inline: 14px;
  }
  .format-label {
    font-size: 11px;
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    transition: none!important;
    scroll-behavior: auto!important;
  }
}
