:root {
  --ink: #111111;
  --muted: #666666;
  --line: #dcdcd7;
  --paper: #ffffff;
  --surface: #f6f5f1;
  --accent: #1a73e8;
  --pass: #188038;
  --warning: #b26a00;
  --danger: #b3261e;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
}

.writing-checklist {
  height: 100vh;
  overflow:hidden;
}

.tool-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.tool-header-inner {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

h1 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.tool-header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.tool-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 16px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.tool-btn:hover {
  border-color: var(--ink);
}

.tool-btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.tool-btn-primary:hover {
  background: #000;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 5px;
  width: min(1500px, calc(100% - 10px));
  margin: 5px auto;
  align-items: start;
}

.editor-pane {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

#editor-container {
  min-height: calc(100vh - 100px);
  background: var(--surface);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
#editor-container.w-e-full-screen-editor{
    min-height: 100vh;
    max-height: 100vh;
}
#editor-container .w-e-text-container,
#editor-container .w-e-text-container .w-e-text{
    min-height: calc(100vh - 185px)!important;
    border: 0px solid #c9d8db!important;
}

.checklist-pane {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

h2 {
  margin: 0;
  font-size: 1.1rem;
}

.draft-score {
  display: grid;
  justify-items: end;
}

.score-label {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.score-value {
  font-size: 1.3rem;
  font-weight: 800;
}

.draft-brief {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 18px;
  background: #fbfaf7;
}

h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.field {
  display: block;
  margin-bottom: 10px;
}

.field span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

input:focus {
  outline: 2px solid rgba(26, 115, 232, 0.2);
  border-color: var(--accent);
}

.check-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.check-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 11px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.check-tab.active {
  border-color: var(--ink);
  color: var(--ink);
  background: #eceae4;
}

.check-results {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.check-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfaf7;
}

.check-item.pass {
  border-left-color: var(--pass);
}

.check-item.needs-work {
  border-left-color: var(--warning);
}

.check-message {
  margin: 0 0 4px;
  font-weight: 650;
  font-size: 0.88rem;
}

.check-suggestion {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.check-jump {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  cursor: pointer;
}

.check-jump:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.empty-result {
  color: var(--muted);
  font-size: 0.88rem;
}

.next-actions {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.next-actions ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
}

.next-actions strong {
  color: var(--ink);
}

.check-highlight {
  outline: 3px solid rgba(26, 115, 232, 0.45);
  outline-offset: 3px;
  transition: outline 0.2s ease;
}

.stats-panel {
  margin-bottom: 20px;
  display:none;
}
.stats-active .stats-panel{
    display:block;
}
.stats-active .check-results,
.stats-active .next-actions{
    display:none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fbfaf7;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.stat-value {
  font-size: 0.92rem;
  font-weight: 750;
}

@media (max-width: 700px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.export-area {
  display: none;
}

@media (max-width: 1100px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }

  .checklist-pane {
    position: static;
    max-height: none;
  }

  #editor-container {
    min-height: 65vh;
  }
}

@media print {
  .tool-header,
  .checklist-pane,
  .editor-pane {
    display: none !important;
  }

  .export-area {
    display: block;
  }
}