.hsw {
  --hsw-ink:var(--text,#202b26);
  --hsw-muted:var(--muted,#65746c);
  --hsw-line:var(--border,#dfe6e1);
  --hsw-paper:var(--surface,#fff);
  --hsw-soft:var(--surface-2,#f6f8f6);
  --hsw-tint:var(--surface-3,#edf4ef);
  --hsw-accent:var(--primary,#2f7159);
  --hsw-danger:var(--danger,#9d3a38);
  --hsw-shadow:0 12px 32px rgba(25,48,37,.06);
  width:min(1280px,100%);
  max-width:100%;
  margin-inline:auto;
  padding:clamp(16px,3vw,38px);
  color:var(--hsw-ink);
  font-size:14px;
  line-height:1.55;
}
.hsw[hidden],.hsw [hidden] { display:none !important; }
.hsw h2,.hsw h3,.hsw h4,.hsw p,.hsw blockquote { margin:0; }
.hsw-head,.hsw-section-head,.hsw-writing-head,.hsw-history-head,.hsw-score-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.hsw-head { margin-bottom:18px; }
.hsw-head h2 { font-size:clamp(23px,3vw,33px); line-height:1.22; letter-spacing:-.03em; }
.hsw-head p { margin-top:7px; color:var(--hsw-muted); line-height:1.45; }
.hsw-button { flex:none; font-size:13px; }
.hsw-tabs {
  display:inline-grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:4px;
  padding:4px;
  margin-bottom:16px;
  max-width:100%;
  border:1px solid var(--hsw-line);
  border-radius:13px;
  background:var(--hsw-soft);
}
.hsw-tabs button {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:4px 10px;
  min-width:0;
  min-height:44px;
  color:var(--hsw-muted);
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  padding:7px 13px;
  font:inherit;
  font-weight:680;
  cursor:pointer;
}
.hsw-tabs button small { color:inherit; opacity:.84; font-size:11px; font-weight:550; white-space:nowrap; }
.hsw-tabs button[aria-selected="true"] {
  border-color:var(--hsw-line);
  color:var(--hsw-accent);
  background:var(--hsw-paper);
  box-shadow:0 2px 6px rgba(23,42,32,.05);
}
.hsw-main { display:grid; grid-template-columns:minmax(0, .95fr) minmax(0,1.05fr); align-items:start; gap:16px; }
.hsw-card {
  min-width:0;
  padding:clamp(15px,2.35vw,25px);
  border:1px solid var(--hsw-line);
  border-radius:17px;
  background:var(--hsw-paper);
  box-shadow:var(--hsw-shadow);
  overflow-wrap:anywhere;
}
.hsw-card:focus { outline:0; }
.hsw-form { display:grid; gap:15px; }
.hsw-section-head h3,.hsw-report h3,.hsw-history h3 { font-size:18px; line-height:1.4; }
.hsw-section-head > span {
  color:var(--hsw-accent);
  background:var(--hsw-tint);
  border-radius:999px;
  padding:3px 9px;
  font-size:12px;
  font-weight:650;
  white-space:nowrap;
}
.hsw-context,.hsw-openings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.hsw-form > .hsw-context { grid-template-columns:minmax(0,1fr); }
.hsw-form > .hsw-junior-context { grid-template-columns:repeat(2,minmax(0,1fr)); }
.hsw-wide { grid-column:1/-1; }
.hsw-form-group {
  min-width:0;
  display:grid;
  gap:9px;
  margin:0;
  padding:10px 12px 12px;
  border:1px solid var(--hsw-line);
  border-radius:10px;
}
.hsw-form-group legend { padding:0 4px; font-weight:675; }
.hsw-field-note { color:var(--hsw-muted); font-size:12px; }
.hsw-form label { display:grid; min-width:0; gap:6px; font-weight:650; }
.hsw-form .hsw-check { display:flex; align-items:flex-start; gap:8px; font-weight:500; }
.hsw-form .hsw-check input { margin:4px 0 0; accent-color:var(--hsw-accent); }
.hsw-control {
  display:block;
  width:100%;
  min-width:0;
  min-height:42px;
  border:1px solid var(--hsw-line);
  border-radius:9px;
  background:var(--hsw-soft);
  color:var(--hsw-ink);
  padding:9px 11px;
  font:inherit;
  font-weight:400;
}
.hsw-control::placeholder { color:var(--hsw-muted); opacity:.9; }
.hsw textarea { resize:vertical; line-height:1.65; }
.hsw-student { min-height:154px; }
.hsw :is(button,input,textarea,select,summary):focus-visible { outline:2px solid var(--hsw-accent); outline-offset:2px; }
.hsw-writing-head { align-items:center; margin-bottom:7px; }
.hsw-ocr-actions { min-width:0; }
.hsw-input-meta { margin-top:6px; color:var(--hsw-muted); font-size:12px; text-align:right; }
.hsw-ocr-feedback { display:grid; gap:7px; justify-items:start; padding:10px 12px; margin-top:7px; border:1px solid var(--hsw-line); border-radius:9px; background:var(--hsw-soft); font-size:13px; }
.hsw-options { border-block:1px solid var(--hsw-line); padding:9px 0; }
.hsw-options summary { width:fit-content; color:var(--hsw-accent); padding:2px 0; cursor:pointer; font-weight:650; }
.hsw-options[open] summary { margin-bottom:10px; }
.hsw-options[open] .hsw-check { margin-top:9px; }
.hsw-submit { display:flex; align-items:center; gap:10px 12px; flex-wrap:wrap; }
.hsw-primary { min-height:42px; min-width:110px; }
.hsw :is(.hsw-primary,.hsw-button):disabled { opacity:.55; cursor:not-allowed; }
.hsw-status,.hsw [data-hsw-export-status] { color:var(--hsw-muted); font-size:13px; }
.hsw-status:empty,.hsw [data-hsw-export-status]:empty { display:none; }
.hsw .hsw-error { color:var(--hsw-danger); }
.hsw-report { scroll-margin-top:15px; }
.hsw-empty { min-height:182px; display:grid; align-content:center; justify-items:center; gap:8px; text-align:center; }
.hsw-empty p { max-width:280px; color:var(--hsw-muted); }
.hsw-report-tools { display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin-bottom:15px; }
.hsw-report-tools .hsw-button { min-height:34px; padding:6px 9px; font-size:12px; }
.hsw-more-actions { position:relative; }
.hsw-more-actions summary {
  padding:6px 9px;
  border:1px solid var(--hsw-line);
  border-radius:8px;
  color:var(--hsw-ink);
  background:var(--hsw-paper);
  font-size:12px;
  font-weight:650;
  cursor:pointer;
}
.hsw-more-actions > div {
  position:absolute;
  z-index:2;
  inset-inline-start:0;
  display:grid;
  gap:5px;
  min-width:155px;
  margin-top:5px;
  padding:7px;
  border:1px solid var(--hsw-line);
  border-radius:9px;
  background:var(--hsw-paper);
  box-shadow:0 6px 24px rgba(25,48,37,.13);
}
.hsw-more-actions a { text-decoration:none; text-align:center; }
.hsw-score-head {
  align-items:flex-end;
  min-height:95px;
  border-bottom:1px solid var(--hsw-line);
  padding:0 0 13px;
}
.hsw-score-head p { color:var(--hsw-muted); margin-top:3px; font-size:13px; }
.hsw-report-caption { display:block; color:var(--hsw-accent); margin-bottom:4px; font-size:12px; }
.hsw-score { flex:none; color:var(--hsw-accent); text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.hsw-score small { display:block; margin-bottom:3px; color:var(--hsw-muted); font-size:12px; }
.hsw-score strong { font-size:clamp(34px,5vw,52px); line-height:1; letter-spacing:-.04em; }
.hsw-score > span { color:var(--hsw-muted); font-size:15px; font-weight:600; }
.hsw-report-lead { padding:14px 0 0; line-height:1.65; }
.hsw-review-alert { margin-top:13px !important; padding:10px 11px; border:1px solid #dfb777; border-radius:8px; background:#fff4e4; color:#614312; font-size:13px; }
.hsw-review-alert strong { margin-right:4px; }
.hsw-report-section { padding-top:15px; margin-top:15px; border-top:1px solid var(--hsw-line); }
.hsw-report-section h4 { margin-bottom:10px; font-size:15px; color:var(--hsw-ink); }
.hsw-report-section h4 small { color:var(--hsw-muted); font-weight:450; font-size:.8em; }
.hsw-edition-head { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.hsw-edition-head h3 { margin-inline:auto; text-align:center; }
.hsw-edition-head span { color:var(--hsw-muted); font-size:12px; }
.hsw-edition-head strong,.hsw-score-line strong { color:var(--hsw-accent); font-variant-numeric:tabular-nums; }
.hsw-score-line { display:flex; align-items:baseline; gap:10px; margin-bottom:10px; }
.hsw-score-line strong { font-size:clamp(25px,4vw,36px); line-height:1.1; }
.hsw-score-line span { color:var(--hsw-muted); }
.hsw-score-table { width:100%; border-collapse:collapse; font-size:13px; text-align:start; }
.hsw-score-table :is(th,td) { padding:7px; border-bottom:1px solid var(--hsw-line); text-align:start; vertical-align:top; }
.hsw-score-table thead { border-bottom:1px solid currentColor; }
.hsw-score-table thead th { white-space:nowrap; }
.hsw-score-table td:nth-child(3) { font-weight:650; }
.hsw-comment-lines { display:grid; gap:9px; margin-top:10px; }
.hsw-source-analysis { display:grid; gap:9px; margin:0; }
.hsw-source-analysis div { display:grid; grid-template-columns:5em minmax(0,1fr); gap:6px; }
.hsw-source-analysis dt { font-weight:670; }
.hsw-source-analysis dd { margin:0; }
.hsw-source-analysis dd p + p { margin-top:4px; }
.hsw-source-analysis q { color:var(--hsw-muted); }
.hsw-examples { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.hsw-examples li { border:1px solid var(--hsw-line); border-radius:8px; padding:8px 10px; }
.hsw-example-method { display:block; margin-bottom:3px; color:var(--hsw-accent); }
.hsw-examples li p + p { margin-top:4px; }
.hsw-examples b { font-size:.94em; }
.hsw-materials small { color:var(--hsw-muted); margin-inline-start:5px; }
.hsw-inline-edits { line-height:1.9; }
.hsw-inline-edits ins { font-weight:750; text-decoration:none; }
.hsw-focus-quote { text-decoration:underline; text-decoration-style:dotted; text-underline-offset:3px; }
.hsw-correction-label {
  display:inline-block;
  margin-inline:4px 2px;
  padding:0 3px;
  border:1px solid currentColor;
  border-radius:3px;
  color:inherit;
  font-size:.69em;
  line-height:1.35;
  vertical-align:.16em;
}
.hsw-teacher-review {
  margin-top:16px;
  padding:10px 12px;
  border:1px solid var(--hsw-line);
  border-radius:9px;
  overflow-wrap:anywhere;
}
.hsw-teacher-review summary { cursor:pointer; font-weight:680; }
.hsw-teacher-review[open] summary { margin-bottom:6px; }
.hsw-dims { border:1px solid var(--hsw-line); border-radius:10px; overflow:hidden; }
.hsw-dim { padding:9px 11px; }
.hsw-dim + .hsw-dim { border-top:1px solid var(--hsw-line); }
.hsw-dim > div,.hsw-checklist li > div { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.hsw-dim > div span,.hsw-checklist li > div span { color:var(--hsw-accent); white-space:nowrap; font-weight:650; font-variant-numeric:tabular-nums; }
.hsw-dim p,.hsw-checklist p,.hsw-issues p { margin-top:4px; }
.hsw blockquote { margin-top:5px; border-inline-start:2px solid var(--hsw-line); padding-inline-start:8px; color:var(--hsw-muted); }
.hsw-checklist,.hsw-plain-list,.hsw-issues { display:grid; gap:9px; margin:0; }
.hsw-checklist { list-style:none; padding:0; }
.hsw-checklist li { border-bottom:1px solid var(--hsw-line); padding-bottom:8px; }
.hsw-checklist li:last-child { border:0; padding-bottom:0; }
.hsw-issues,.hsw-plain-list { padding-inline-start:21px; }
.hsw-issues li { border-bottom:1px solid var(--hsw-line); padding-bottom:9px; }
.hsw-issues li:last-child { border:0; padding-bottom:0; }
.hsw-issues li::marker { color:var(--hsw-accent); font-weight:650; }
.hsw .hsw-replacement { color:var(--hsw-accent); font-weight:680; }
.hsw-source {
  white-space:pre-wrap;
  border:1px solid var(--hsw-line);
  border-radius:9px;
  padding:11px 12px;
  background:var(--hsw-soft);
  line-height:1.7;
  overflow-wrap:anywhere;
}
.hsw-source mark { background:#f8e6db; color:#7f3827; border-bottom:1px solid #b56a58; border-radius:3px; }
.hsw-source mark sup { display:inline-block; font-size:.72em; padding-inline:2px; color:inherit; user-select:none; }
.hsw-report-note { padding-top:13px; margin-top:14px !important; border-top:1px solid var(--hsw-line); color:var(--hsw-muted); font-size:11px; }
.hsw-history {
  width:min(560px,calc(100% - 28px));
  max-height:calc(100dvh - 42px);
  overflow:auto;
  padding:18px;
  border:1px solid var(--hsw-line);
  border-radius:14px;
  background:var(--hsw-paper);
  color:var(--hsw-ink);
}
.hsw-history::backdrop { background:rgba(15,24,20,.44); }
.hsw-history-head { margin-bottom:12px; }
.hsw-history-row {
  display:grid;
  width:100%;
  text-align:left;
  align-content:center;
  gap:4px;
  min-height:54px;
  margin:0 0 7px;
  padding:8px 10px;
  color:var(--hsw-ink);
  font:inherit;
  border:1px solid var(--hsw-line);
  border-radius:8px;
  background:var(--hsw-soft);
  cursor:pointer;
  overflow-wrap:anywhere;
}
.hsw-history-row span,.hsw-history-empty { color:var(--hsw-muted); font-size:13px; }
.hsw-history > .button { margin:10px 6px 0 0; }
.hsw-print { display:none; }
@page highSchoolWriting { size:A4 portrait; margin:14mm 13mm; }
@media (max-width:850px) {
  .hsw-main { grid-template-columns:minmax(0,1fr); gap:12px; }
  .hsw-empty { min-height:120px; }
}
@media screen and (max-width:760px) {
  body:has(#essayView:not([hidden]) #highSchoolWriting.hsw:not([hidden])) #commandFloatingOpen { display:none; }
}
@media (max-width:430px) {
  .hsw { padding:12px; }
  .hsw-head { align-items:flex-start; gap:8px; }
  .hsw-head .hsw-button { padding-inline:8px; }
  .hsw-tabs { display:grid; width:100%; }
  .hsw-tabs button { flex-direction:column; gap:2px; padding-inline:3px; font-size:13px; }
  .hsw-openings { grid-template-columns:minmax(0,1fr); }
  .hsw-writing-head .hsw-button { min-height:32px; padding:5px 8px; font-size:12px; }
  .hsw-score-table :is(th,td) { padding:6px 4px; }
  .hsw-edition-head { flex-wrap:wrap; }
  .hsw-edition-head h3 { order:-1; width:100%; text-align:start; }
  .hsw-more-actions > div { inset-inline-start:auto; inset-inline-end:0; }
}
@media print {
  body.hsw-printing > :not(.hsw-print) { display:none !important; }
  body.hsw-printing { background:#fff !important; }
  .hsw-print {
    display:block !important;
    page:highSchoolWriting;
    width:auto;
    max-width:none;
    margin:0;
    padding:0;
    color:#202823;
    --hsw-ink:#202823;
    --hsw-muted:#4d5a51;
    --hsw-line:#d5ddd7;
    --hsw-soft:#f6f8f6;
    --hsw-accent:#225742;
    font-size:10pt;
    print-color-adjust:exact;
    -webkit-print-color-adjust:exact;
  }
  .hsw-print h3,.hsw-print h4 { break-after:avoid; }
  .hsw-print .hsw-dim,.hsw-print .hsw-checklist li,.hsw-print .hsw-issues li,.hsw-print .hsw-score-head,.hsw-print .hsw-source,.hsw-print .hsw-examples li { break-inside:avoid; }
  .hsw-print .hsw-score strong { font-size:32pt; }
  .hsw-print .hsw-score-head { min-height:0; }
}
