/* Hallmark v2.0.0 | WebM8 v1.9.77 | existing design | scope: text workbench | genre: modern-minimal */
/* Critique: give the input and output equal space; put column settings and the primary action in a compact workbench, not a second design system. */
:root { --m8-text-error: #ffabb4; --m8-text-mono: ui-monospace, SFMono-Regular, Consolas, monospace; }
:root[data-theme="light"] { --m8-text-error: #a12d40; }
.m8-text {
  --m8-text-surface: var(--header);
  --m8-text-field-bg: var(--background);
  --m8-text-ink: var(--text);
  --m8-text-muted: var(--muted);
  --m8-text-line: var(--line);
  --m8-text-accent: var(--accent);
  --m8-text-on-accent: var(--accent-ink);
  --m8-text-hover: var(--active);
  min-width: 0;
  padding-block: 32px 40px;
}
.m8-text .m8-text-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; flex-wrap:wrap; }
.m8-text h1 { margin:0; font-size:clamp(24px, 2.3vw, 30px); font-weight:650; letter-spacing:-.7px; line-height:1.25; overflow-wrap:break-word; min-width:0; text-wrap:balance; }
.m8-text .m8-text-heading p { margin:0; color:var(--m8-text-muted); font-size:14px; }
.m8-text .m8-text-private { display:flex; align-items:center; gap:8px; color:var(--m8-text-muted); font-size:12px; }
.m8-text .m8-text-private svg { width:16px; height:16px; }
.m8-text .m8-text-controls { background:var(--m8-text-surface); border:1px solid var(--m8-text-line); border-radius:12px; padding:16px; margin-bottom:16px; }
.m8-text .m8-text-settings { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr) auto; align-items:start; gap:12px; }
.m8-text .m8-text-field { display:flex; min-width:0; flex-direction:column; gap:4px; }
.m8-text .m8-text-field label { font-size:13px; font-weight:600; }
.m8-text .m8-text-field input { width:100%; min-width:0; min-height:40px; padding:8px 12px; border:1px solid var(--m8-text-line); border-radius:8px; background:var(--m8-text-field-bg); color:var(--m8-text-ink); font:inherit; }
.m8-text input::placeholder, .m8-text textarea::placeholder { color:var(--m8-text-muted); opacity:1; }
.m8-text small { font-size:12px; line-height:1.45; color:var(--m8-text-muted); }
.m8-text .m8-text-options { display:flex; align-items:center; flex-wrap:wrap; gap:8px 20px; margin-top:12px; }
.m8-text .m8-text-options > label { display:inline-flex; align-items:center; gap:8px; font-size:13px; cursor:pointer; min-height:32px; }
.m8-text input[type="checkbox"] { accent-color:var(--m8-text-accent); width:16px; height:16px; margin:0; }
.m8-text .m8-text-more { flex:1 0 auto; min-width:0; }
.m8-text .m8-text-more[open] { flex-basis:100%; }
.m8-text .m8-text-more summary { width:fit-content; color:var(--m8-text-accent); font-size:13px; font-weight:600; cursor:pointer; padding-block:4px; }
.m8-text .m8-text-advanced { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:12px; }
.m8-text .m8-text-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:16px; }
.m8-text .m8-text-editor { display:flex; flex-direction:column; min-width:0; border:1px solid var(--m8-text-line); border-radius:12px; background:var(--m8-text-surface); overflow:clip; }
.m8-text .m8-text-editor-head { min-height:72px; padding:12px 16px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; border-bottom:1px solid var(--m8-text-line); }
.m8-text .m8-text-editor-head h2 { font-size:15px; font-weight:650; margin:0; line-height:1.45; letter-spacing:-.2px; }
.m8-text .m8-text-count { font-size:12px; font-variant-numeric:tabular-nums; color:var(--m8-text-muted); }
.m8-text .m8-text-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; min-width:0; }
.m8-text .m8-text-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:36px; border:1px solid var(--m8-text-line); border-radius:8px; background:var(--m8-text-surface); color:var(--m8-text-ink); padding:8px 12px; font:600 13px/1.4 var(--font); cursor:pointer; }
.m8-text .m8-text-button svg { width:16px; height:16px; }
.m8-text .m8-text-button:hover:not(:disabled) { background:var(--m8-text-hover); color:var(--m8-text-accent); }
.m8-text .m8-text-primary { align-self:start; margin-top:24px; min-height:40px; padding-inline:20px; border-color:var(--m8-text-accent); color:var(--m8-text-on-accent); background:var(--m8-text-accent); }
.m8-text .m8-text-primary:hover:not(:disabled) { background:var(--m8-text-accent); color:var(--m8-text-on-accent); box-shadow:inset 0 0 0 1px var(--m8-text-on-accent); }
.m8-text .m8-text-button:active:not(:disabled) { transform:translateY(1px); }
.m8-text .m8-text-button:disabled { cursor:not-allowed; color:var(--m8-text-muted); background:var(--m8-text-field-bg); border-color:var(--m8-text-line); }
.m8-text textarea { display:block; width:100%; min-width:0; flex:1; min-height:304px; resize:vertical; border:0; border-radius:0 0 12px 12px; padding:16px; font:400 13px/1.65 var(--m8-text-mono); background:var(--m8-text-surface); color:var(--m8-text-ink); overflow-wrap:anywhere; }
.m8-text :is(input,textarea,button,summary):focus-visible { outline:2px solid var(--m8-text-accent); outline-offset:2px; }
.m8-text textarea:focus-visible { outline-offset:-3px; }
.m8-text .m8-text-status { color:var(--m8-text-muted); font-size:13px; line-height:1.5; margin:12px 0 0; overflow-wrap:anywhere; min-height:20px; }
.m8-text .m8-text-status:empty { margin:0; min-height:0; }
.m8-text .m8-text-status[data-kind="error"] { color:var(--m8-text-error); }
@media(max-width:960px) {
  .m8-text .m8-text-settings { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .m8-text .m8-text-primary { justify-self:stretch; }
}
@media(max-width:760px) {
  .m8-text { padding-block:24px; }
  .m8-text .m8-text-grid, .m8-text .m8-text-advanced { grid-template-columns:minmax(0,1fr); }
  .m8-text textarea { min-height:224px; }
}
@media(max-width:520px) {
  .m8-text .m8-text-settings { grid-template-columns:minmax(0,1fr); }
  .m8-text .m8-text-primary { margin-top:0; }
  .m8-text .m8-text-heading { margin-bottom:16px; gap:8px; }
  .m8-text .m8-text-controls, .m8-text .m8-text-editor-head { padding:12px; }
  .m8-text .m8-text-options { gap:4px 12px; }
  .m8-text .m8-text-more { flex-basis:100%; }
  .m8-text .m8-text-button { min-height:40px; padding-inline:8px; }
  .m8-text textarea { padding:12px; }
}
@media(prefers-reduced-motion:reduce) { .m8-text *, .m8-text *::before, .m8-text *::after { animation:none!important; transition:none!important; } }
