:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --ink: #1f2430;
  --muted: #626978;
  --subtle: #707887;
  --green: #087f63;
  --green-hover: #06634e;
  --green-dark: #064d3c;
  --green-light: #e9f5ee;
  --line: #e1e4e8;
  --page: #f5f6f8;
  --surface: #fff;
  --radius: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); }
button, textarea, input { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
button:disabled { opacity: .45; cursor: not-allowed; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #50aa91; outline-offset: 3px; }
button:active:not(:disabled) { transform: translateY(1px); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1536px; min-height: 80px; padding: 20px var(--space-7); margin: auto; display: flex; align-items: center; gap: var(--space-5); }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); font-size: 22px; font-weight: 700; letter-spacing: -.7px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--green); border-radius: 50%; }
.brand-mark svg { width: 25px; height: 25px; fill: none; stroke: white; stroke-width: 2.8; stroke-linejoin: round; stroke-linecap: round; }
.header-context { padding-left: var(--space-5); border-left: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 24px; }
.privacy-label { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; color: var(--muted); font-size: 14px; }
.privacy-label .icon { color: var(--green); width: 16px; height: 16px; }
main { max-width: 1536px; padding: 40px var(--space-7) 24px; margin: auto; }
.page-heading { margin-bottom: var(--space-6); }
h1, h2, p, figure, blockquote { margin: 0; }
h1 { font-size: clamp(28px, 2.55vw, 38px); font-weight: 650; letter-spacing: -1.2px; line-height: 1.25; }
.page-heading p { margin-top: var(--space-3); font-size: 16px; line-height: 1.6; color: var(--muted); }
h2 { font-size: 16px; line-height: 24px; font-weight: 650; letter-spacing: -.2px; }
.workbench { display: grid; grid-template-columns: minmax(0, 1fr) 264px; grid-template-areas: "editor settings"; gap: var(--space-6); align-items: start; }
.writing-surface { grid-area: editor; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); box-shadow: 0 2px 5px #1f243005; min-width: 0; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.editor-panel { display: flex; flex-direction: column; min-width: 0; padding: var(--space-5); }
.input-panel { border-right: 1px solid var(--line); }
.output-panel { background: #fcfdfc; }
.panel-header { display: flex; justify-content: space-between; align-items: center; min-height: 32px; gap: var(--space-3); }
.output-heading { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; min-width: 0; }
.result-badge { color: var(--green-hover); background: var(--green-light); border-radius: 4px; padding: 3px 8px; font-size: 12px; line-height: 18px; font-weight: 600; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; border: 0; padding: 4px 0 4px 8px; background: transparent; color: var(--muted); font-size: 14px; border-radius: var(--radius); }
.text-button:hover:not(:disabled) { color: var(--green); }
.edit-button .icon { width: 15px; height: 15px; }
.edit-button[aria-pressed="true"] { color: var(--green); }
.panel-description { display: flex; align-items: center; gap: 6px; min-height: 24px; margin: var(--space-2) 0 var(--space-5); color: var(--muted); font-size: 13px; line-height: 24px; }
.panel-description .icon { width: 15px; height: 15px; }
textarea { display: block; width: 100%; min-height: 350px; height: 350px; padding: 0; border: 0; background: transparent; resize: vertical; color: var(--ink); font-size: 16px; line-height: 1.85; outline: none; border-radius: 2px; }
textarea::placeholder { color: #737c8b; opacity: 1; }
textarea:focus-visible { outline: 2px solid #8ac5b2; outline-offset: 8px; }
textarea[readonly]:focus-visible { outline: 2px solid #c3d8cf; }
.editor-meta { display: flex; justify-content: space-between; gap: var(--space-2); align-items: center; min-height: 24px; margin-top: var(--space-5); font-size: 12px; line-height: 20px; color: var(--subtle); }
.at-limit, .stale-note { color: #9a572d; }
.stale-note { text-align: right; }
.panel-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 44px; margin-top: var(--space-4); }
.primary-button, .copy-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: 11px 16px; border: 1px solid transparent; border-radius: var(--radius); font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap; }
.primary-button { background: var(--green); border-color: var(--green); color: white; gap: var(--space-3); }
.primary-button:hover:not(:disabled) { background: var(--green-hover); border-color: var(--green-hover); }
.copy-button { background: white; color: var(--green-hover); border-color: #b5cfc4; }
.copy-button:hover:not(:disabled) { background: var(--green-light); border-color: var(--green); }
.copy-button .icon { width: 16px; height: 16px; }
.shortcut { color: var(--subtle); font-size: 12px; white-space: nowrap; }
.variation-button { display: inline-flex; align-items: center; gap: var(--space-2); padding: 10px 0; border: 0; border-radius: var(--radius); background: transparent; font-size: 14px; line-height: 24px; color: var(--muted); white-space: nowrap; }
.variation-button:hover:not(:disabled) { color: var(--green); }
.variation-button .icon { width: 16px; height: 16px; }
.examples { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-4); padding: 16px 24px; border-top: 1px solid var(--line); background: #fafbfc; }
.examples-label { font-size: 13px; color: var(--subtle); }
.example-options { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.example-button { min-height: 32px; padding: 4px 0; border: 0; border-bottom: 1px solid #c0d3cb; border-radius: 0; color: var(--green-hover); background: transparent; font-size: 14px; line-height: 22px; }
.example-button:hover { color: var(--green); border-bottom-color: var(--green); }
.writing-settings { grid-area: settings; min-width: 0; padding-top: 4px; }
.settings-title { font-size: 16px; margin-bottom: var(--space-5); }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
legend { font-size: 14px; font-weight: 600; line-height: 22px; padding: 0; margin-bottom: var(--space-3); }
.format-control { margin-bottom: var(--space-5); }
.format-options { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #e9ecef; border-radius: var(--radius); }
.format-options label { display: flex; position: relative; min-width: 0; cursor: pointer; }
.format-options input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; }
.format-options label > span { display: flex; align-items: center; justify-content: center; width: 100%; gap: var(--space-2); min-height: 40px; padding: 8px; font-size: 14px; font-weight: 500; color: var(--muted); border-radius: 5px; border: 1px solid transparent; transition: background .15s, color .15s; }
.format-options input:checked + span { background: white; color: var(--green-hover); border-color: #d5ddd8; box-shadow: 0 1px 2px #26383008; }
.format-options input:focus-visible + span { outline: 3px solid #50aa91; outline-offset: 2px; }
.level-options { display: grid; gap: 4px; }
.tone-option { display: flex; align-items: flex-start; gap: var(--space-3); padding: 12px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; }
.tone-option:hover { background: #edf1ef; }
.tone-option:has(input:checked) { background: var(--green-light); border-color: #c5dfd3; }
.tone-option input { width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--green); margin: 3px 0 0; cursor: pointer; }
.tone-option > span { min-width: 0; }
.tone-option strong { display: block; font-size: 14px; line-height: 22px; font-weight: 600; }
.tone-option:has(input:checked) strong { color: var(--green-hover); }
.tone-option small { display: block; margin-top: 3px; font-size: 12px; line-height: 18px; color: var(--muted); }
.tone-example { margin-top: var(--space-5); padding: var(--space-5); background: var(--green-dark); color: white; border-radius: var(--radius); }
.phrase-source { font-size: 18px; line-height: 1.5; color: #cae9dd; }
.phrase-connector { display: flex; align-items: center; gap: var(--space-3); margin: 16px 0; color: #91cbb2; }
.phrase-connector .icon { transform: rotate(90deg); width: 21px; height: 21px; }
.phrase-connector span { height: 1px; flex: 1; background: #ffffff26; }
.tone-example blockquote { font-size: 24px; line-height: 1.35; font-weight: 600; letter-spacing: -.5px; overflow-wrap: break-word; }
.tone-example figcaption { margin-top: 24px; font-size: 12px; line-height: 1.6; color: #cae9dd; }
.workspace-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-3); padding-top: var(--space-5); color: var(--subtle); font-size: 12px; line-height: 20px; }
.workspace-footer > span:first-child { display: flex; align-items: center; gap: 6px; }
.workspace-footer .icon { width: 14px; height: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10; max-width: calc(100% - 32px); padding: 14px 20px; background: var(--ink); color: white; border-radius: var(--radius); box-shadow: 0 8px 28px #1f243020; font-size: 14px; line-height: 1.5; }
[hidden] { display: none !important; }
.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: 1440px) {
  .editor-panel { padding: 28px; }
  textarea { min-height: 365px; height: 365px; }
}
@media (max-width: 1279px) {
  .header-inner { padding-inline: 32px; }
  main { padding: 32px; }
  .workbench { grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; }
  .editor-panel { padding: 20px; }
  .output-heading { gap: 6px; }
  .shortcut { display: none; }
  .panel-actions { gap: 8px; }
  .variation-button { font-size: 13px; gap: 6px; }
  .copy-button { padding-inline: 12px; }
  #output-note { display: none; }
  .tone-example { padding: 20px; }
}
@media (max-width: 1050px) {
  .workbench { grid-template-columns: minmax(0, 1fr) 216px; gap: 20px; }
  .editor-panel { padding: 20px 16px; }
  .panel-header { flex-wrap: wrap; }
  .output-heading { gap: 8px; }
  .result-badge { display: none; }
  .output-actions { flex-wrap: wrap; }
  .copy-button { flex: 1; }
  .variation-button { min-height: 44px; }
  .tone-example blockquote { font-size: 22px; }
}
@media (max-width: 900px) {
  .header-inner { min-height: 72px; padding: 16px 24px; }
  .header-context { display: none; }
  main { padding: 28px 24px; }
  .page-heading { margin-bottom: 24px; }
  .workbench { grid-template-columns: minmax(0, 1fr); grid-template-areas: "preferences" "editor" "example"; gap: 24px; }
  .writing-settings { display: contents; }
  .settings-controls { grid-area: preferences; display: grid; grid-template-columns: 192px minmax(0, 1fr); gap: 24px; align-items: start; }
  .settings-title { display: none; }
  .format-control { margin: 0; }
  .level-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: #e9ecef; padding: 4px; border-radius: var(--radius); }
  .tone-option { justify-content: center; align-items: center; min-height: 40px; padding: 8px 6px; gap: 6px; border-radius: 5px; }
  .tone-option:has(input:checked) { background: white; border-color: #d5ddd8; }
  .tone-option strong { font-size: 14px; font-weight: 500; }
  .tone-option input { margin: 0; width: 14px; height: 14px; flex-basis: 14px; }
  .tone-option small { display: none; }
  .editor-panel { padding: 24px; }
  .panel-header { flex-wrap: nowrap; }
  .result-badge { display: inline-block; }
  .panel-actions { flex-wrap: nowrap; gap: 12px; }
  .copy-button { flex: none; }
  .variation-button { font-size: 14px; }
  .tone-example { grid-area: example; display: grid; grid-template-columns: 150px 24px minmax(0, 1fr); column-gap: 24px; align-items: center; padding: 24px; margin: 0; }
  .phrase-connector { margin: 0; }
  .phrase-connector .icon { transform: none; }
  .phrase-connector span { display: none; }
  .tone-example blockquote { font-size: 22px; }
  .tone-example figcaption { grid-column: 3; margin-top: 12px; }
}
@media (max-width: 650px) {
  .header-inner { padding: 16px 20px; }
  .brand { font-size: 20px; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-mark svg { width: 23px; height: 23px; }
  .privacy-label { font-size: 12px; gap: 6px; }
  .privacy-label .icon { width: 14px; height: 14px; }
  main { padding: 28px 16px 24px; }
  h1 { font-size: 29px; letter-spacing: -.8px; }
  .page-heading p { max-width: 370px; font-size: 15px; }
  .settings-controls { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .format-control { display: flex; align-items: center; gap: 12px; }
  .format-control legend { float: left; margin: 0 12px 0 0; line-height: 48px; }
  .format-options { flex: 1; }
  .intensity-control legend { margin-bottom: 8px; }
  .tone-option { min-height: 44px; padding: 8px 5px; gap: 6px; }
  .tone-option strong { font-size: 14px; }
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-panel { padding: 24px 20px; }
  .input-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .output-panel { border-top: 3px solid var(--green); }
  .panel-description { margin-bottom: 20px; }
  textarea { font-size: 16px; }
  #plain-text { height: 176px; min-height: 176px; }
  #corporate-text { height: 330px; min-height: 240px; }
  .editor-meta { margin-top: 16px; }
  .input-actions { margin-top: 16px; }
  .primary-button { width: 100%; justify-content: space-between; }
  .output-actions { gap: 12px; flex-wrap: wrap; }
  .variation-button { font-size: 14px; }
  .copy-button { padding-inline: 16px; }
  .result-badge { display: inline-block; }
  .examples { display: block; padding: 16px 20px; }
  .example-options { margin-top: 8px; column-gap: 16px; row-gap: 4px; }
  .tone-example { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 24px; }
  .phrase-source { font-size: 18px; }
  .phrase-connector { gap: 16px; }
  .phrase-connector .icon { transform: rotate(90deg); }
  .phrase-connector span { display: block; }
  .tone-example blockquote { max-width: 350px; font-size: 24px; }
  .tone-example figcaption { grid-column: 1; margin: 0; }
  .workspace-footer { display: grid; gap: 8px; padding-top: 24px; }
}
@media (max-width: 370px) {
  .privacy-label { max-width: 84px; line-height: 16px; }
  .result-badge { display: none; }
  .tone-option { gap: 4px; }
  .tone-option strong { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
