:root {
  color-scheme: light;
  --ink: #192d23;
  --muted: #53685d;
  --line: #d7dfd7;
  --accent: #25593d;
  --press: #19452e;
  --paper: #fff;
  --ground: #f6f7f3;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--ground);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, select, textarea { font: inherit; }
a { color: var(--accent); text-underline-offset: 0.25em; }
:focus-visible { outline: 2px solid #326847; outline-offset: 3px; }

.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header-inner, main, .site-footer { max-width: 1100px; margin: auto; padding-inline: 24px; }
.site-header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 68px; gap: 16px; font-size: .91rem; }
.header-actions { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 10px 18px; }
.header-actions label, .dialect { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
[hidden] { display: none !important; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 650; }
.brand-mark { background: var(--accent); color: white; padding: 5px 7px; border-radius: 6px; font: 700 1.05rem Georgia, serif; }

.intro { margin: 52px 0 34px; }
h1 { font: 500 clamp(2.5rem, 6vw, 4.6rem)/1 Georgia, serif; letter-spacing: -.05em; margin: 0 0 14px; }
.intro p { color: var(--muted); margin: 0; font-size: 1.05rem; line-height: 1.5; }
.toolbar { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
fieldset { border: 1px solid var(--line); background: #edf1eb; border-radius: 9px; display: flex; gap: 3px; margin: 0; padding: 3px; }
fieldset label { position: relative; }
fieldset input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
fieldset span { display: block; font-size: .9rem; font-weight: 600; padding: 8px 14px; border: 1px solid transparent; border-radius: 6px; }
fieldset input:checked + span { background: var(--paper); border-color: var(--line); }
fieldset input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
fieldset input:disabled + span { opacity: .5; }
.dialect { color: var(--muted); font-size: .85rem; font-weight: 600; }
select { border: 1px solid var(--line); color: var(--ink); border-radius: 7px; padding: 8px; background: var(--paper); }

.workbench { display: grid; grid-template-columns: minmax(0, 1.24fr) minmax(0, 1fr); gap: 12px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.panel-header, .panel-footer { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; gap: 10px; }
.panel-header { border-bottom: 1px solid var(--line); min-height: 66px; }
.panel-footer { border-top: 1px solid var(--line); font-size: .87rem; color: var(--muted); }
h2 { font-size: 1rem; margin: 0; font-weight: 680; }
textarea { display: block; width: 100%; min-height: 340px; padding: 19px; line-height: 1.65; resize: vertical; background: transparent; border: none; color: var(--ink); }
textarea:focus-visible { outline-offset: -2px; }
textarea::placeholder { color: #63766a; }

button { color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 7px; padding: 7px 11px; cursor: pointer; font-size: .88rem; font-weight: 600; line-height: 1.28; }
button:hover:not(:disabled) { border-color: var(--accent); background: #edf4ee; }
button:disabled { opacity: .52; cursor: default; }
.text-button { border-color: transparent; color: var(--accent); }
.primary { background: var(--accent); border-color: var(--accent); color: white; padding: 9px 13px; }
.primary:hover:not(:disabled) { background: var(--press); border-color: var(--press); }

.result-content { padding: 18px; max-height: 400px; overflow: auto; overflow-wrap: anywhere; }
.status { color: var(--muted); font-size: .93rem; margin: 0 0 10px; }
.issue { padding: 13px 0; border-top: 1px solid var(--line); }
.issue-category { margin: 0; color: var(--muted); font-size: .79rem; font-weight: 650; }
.issue-message { margin: 5px 0 9px; font-size: .94rem; }
.issue-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.preview { padding: 12px; border: 1px solid var(--line); background: var(--ground); border-radius: 7px; white-space: pre-wrap; font-size: .94rem; line-height: 1.56; }
.change-list { padding-left: 1.3em; font-size: .87rem; color: var(--muted); }
.change-list li { margin-bottom: 5px; }

.actions { display: flex; align-items: baseline; justify-content: end; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
#feedback { min-height: 1.4em; margin: 6px 0 0; text-align: right; font-size: .86rem; color: var(--muted); }
.site-footer { margin-top: 26px; padding-bottom: 27px; font-size: .85rem; display: flex; flex-wrap: wrap; gap: 18px; }
.info { max-width: 760px; }
.info section { margin: 33px 0; line-height: 1.55; }

@media (max-width: 700px) {
  .site-header-inner, main, .site-footer { padding-inline: 16px; }
  .site-header-inner { flex-wrap: wrap; padding-block: 12px; }
  .intro { margin: 32px 0 24px; }
  .workbench { grid-template-columns: 1fr; }
  textarea { min-height: 220px; }
  .result-content { max-height: none; }
}
