/* Australian Spelling Converter. Every rule is scoped to .as-wrap so nothing leaks to other pages.
   Highlights never rely on colour alone: changed = solid underline, review = dashed underline plus "?",
   suggestion = dotted underline plus "+", kept original = struck-through outline. */
.as-wrap{--as-ink:#13251e;--as-text:#30473f;--as-muted:#566b61;--as-green:#176b4b;--as-green-d:#11533a;--as-tint:#e6f1eb;--as-wash:#f3f8f5;--as-line:#d5e1da;--as-line-2:#8fa69a;--as-amber:#8a4b00;--as-amber-tint:#fff3dc;--as-blue:#1f4f8a;--as-blue-tint:#e8f0fb;--as-focus:#1d63a3;
 max-width:1180px;margin:0 auto;padding:8px 16px 64px;color:var(--as-text);font-family:'DM Sans',system-ui,sans-serif;line-height:1.6}
.as-wrap *,.as-wrap *::before,.as-wrap *::after{box-sizing:border-box}
.as-wrap [hidden]{display:none!important}
.as-wrap :is(button,input,select,textarea,a,summary,[tabindex]):focus-visible{outline:3px solid var(--as-focus);outline-offset:2px}
.as-wrap .as-status{margin:0 0 14px;padding:10px 14px;border-left:3px solid var(--as-green);background:var(--as-wash);border-radius:0 8px 8px 0;font-size:15px;min-height:44px}
.as-wrap .as-status.as-warn{border-left-color:var(--as-amber);background:var(--as-amber-tint);color:#5a3200}
.as-wrap .as-tool{background:#fff;border:1px solid var(--as-line);border-radius:16px;padding:18px 16px;box-shadow:0 1px 2px rgba(19,37,30,.04),0 6px 20px rgba(19,37,30,.05);min-width:0}
.as-wrap .as-options{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr) auto;gap:14px 20px;align-items:end;margin:0 0 6px}
.as-wrap .as-target label{display:block;margin-bottom:4px}
.as-wrap select{width:100%;min-width:0;min-height:44px;border:1px solid var(--as-line-2);border-radius:8px;background:#fff;color:var(--as-ink);padding:8px 10px;font:inherit;font-weight:600}
.as-wrap .as-file{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;overflow:hidden}
.as-wrap .as-open-help{margin:0 0 12px}
.as-wrap .as-check{display:flex;gap:10px;align-items:center;min-height:44px;font-weight:600;color:var(--as-ink);cursor:pointer}
.as-wrap .as-check input{width:22px;height:22px;flex:none;accent-color:var(--as-green);margin:0}
.as-wrap .as-check small{display:block;font-weight:400;color:var(--as-muted);font-size:13px}
.as-wrap label{font-weight:650;color:var(--as-ink)}
.as-wrap .as-ignore label{display:block;margin-bottom:4px}
.as-wrap input[type=text],.as-wrap textarea,.as-wrap .as-pairs textarea{width:100%;min-width:0;border:1px solid var(--as-line-2);border-radius:8px;background:#fff;color:var(--as-ink);padding:10px 12px;font:inherit;min-height:44px}
.as-wrap .as-help{font-size:13px;color:var(--as-muted);margin:6px 0 0}
.as-wrap .as-quick{display:flex;gap:8px;flex-wrap:wrap}
.as-wrap button{min-height:44px;padding:9px 16px;border:1px solid var(--as-green);border-radius:8px;background:#fff;color:var(--as-green-d);font:inherit;font-weight:650;cursor:pointer;touch-action:manipulation}
.as-wrap button:hover:not(:disabled){background:var(--as-tint)}
.as-wrap button:disabled{opacity:.5;cursor:default}
.as-wrap button.as-primary{background:var(--as-green);color:#fff}
.as-wrap button.as-primary:hover:not(:disabled){background:var(--as-green-d)}
.as-wrap .as-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
.as-wrap .as-pane{min-width:0;display:flex;flex-direction:column}
.as-wrap .as-pane-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:6px;min-height:28px}
.as-wrap .as-pane-head h2{font-size:16px;margin:0;color:var(--as-ink);font-weight:650;text-align:left}
.as-wrap .as-meta{font-size:13px;color:var(--as-muted);font-variant-numeric:tabular-nums}
.as-wrap textarea#as-input{min-height:320px;resize:vertical;line-height:1.7;font-size:16px}
.as-wrap textarea#as-input[readonly]{background:var(--as-wash)}
.as-wrap .as-pane.as-drop textarea#as-input{outline:3px dashed var(--as-green);outline-offset:2px}
.as-wrap .as-result{min-height:320px;max-height:640px;overflow:auto;border:1px solid var(--as-line);border-radius:8px;background:var(--as-wash);padding:10px 12px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9;font-size:16px;color:var(--as-ink)}
.as-wrap .as-empty{margin:0;color:var(--as-muted)}
/* Highlighted words are buttons inside running text */
.as-wrap .as-result button.as-chg{display:inline;min-height:0;padding:0 1px;margin:0;border:0;border-radius:3px;font:inherit;font-weight:inherit;line-height:inherit;color:inherit;cursor:pointer;text-underline-offset:4px;text-decoration-thickness:2px;white-space:pre-wrap}
.as-wrap .as-k-spelling{background:var(--as-tint);text-decoration:underline solid var(--as-green)}
.as-wrap .as-k-review{background:var(--as-amber-tint);text-decoration:underline dashed var(--as-amber)}
.as-wrap .as-k-review::after{content:"?";font-size:.75em;font-weight:700;color:var(--as-amber);vertical-align:super;margin-left:1px}
.as-wrap .as-k-vocab{background:var(--as-blue-tint);text-decoration:underline dotted var(--as-blue)}
.as-wrap .as-k-vocab::after{content:"+";font-size:.75em;font-weight:700;color:var(--as-blue);vertical-align:super;margin-left:1px}
.as-wrap .as-k-off{background:#fff;text-decoration:line-through 1px var(--as-muted);outline:1px dashed var(--as-line-2)}
.as-wrap .as-result button.as-chg:hover{filter:brightness(.95)}
.as-wrap .as-result button.as-chg[aria-expanded=true],.as-wrap .as-result button.as-chg.as-current{outline:2px solid var(--as-focus);outline-offset:1px}
.as-wrap .as-legend{list-style:none;display:flex;flex-wrap:wrap;gap:6px 16px;padding:0;margin:10px 0 0;font-size:13px;color:var(--as-muted)}
.as-wrap .as-legend li{display:flex;align-items:center;gap:6px}
.as-wrap .as-key{padding:0 3px;border-radius:3px;color:var(--as-ink);text-underline-offset:4px;text-decoration-thickness:2px}
/* Dictionary, document bar, navigation */
.as-wrap .as-dict{margin:0 0 14px;border:1px solid var(--as-line);border-radius:12px;background:var(--as-wash)}
.as-wrap .as-dict>summary,.as-wrap .as-report>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;padding:8px 14px;font-weight:650;color:var(--as-ink);list-style:none}
.as-wrap .as-dict>summary span,.as-wrap .as-report>summary span{font-weight:400;color:var(--as-muted);margin-left:4px}
.as-wrap .as-dict>summary::-webkit-details-marker,.as-wrap .as-report>summary::-webkit-details-marker{display:none}
.as-wrap .as-dict>summary::before,.as-wrap .as-report>summary::before{content:"▸";color:var(--as-green);margin-right:8px;font-size:14px}
.as-wrap .as-dict[open]>summary::before,.as-wrap .as-report[open]>summary::before{content:"▾"}
.as-wrap .as-dict-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 20px;padding:4px 14px 14px}
.as-wrap .as-pairs label{display:block;margin-bottom:4px}
.as-wrap .as-pairs textarea{resize:vertical;min-height:72px}
.as-wrap .as-dict-foot{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px}
.as-wrap .as-dict-foot .as-help{flex-basis:100%;margin:0}
.as-wrap .as-warn-text{color:#7a4100}
.as-wrap .as-doc{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 14px;margin:0 0 14px;padding:10px 14px;border:1px solid var(--as-green);border-radius:12px;background:var(--as-tint)}
.as-wrap .as-doc strong{color:var(--as-ink);overflow-wrap:anywhere;margin-right:8px}
.as-wrap .as-doc-kind{font-size:14px;color:var(--as-text)}
.as-wrap .as-nav{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:10px 0 0}
.as-wrap .as-nav button{padding:6px 12px}
.as-wrap .as-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Change report */
.as-wrap .as-report{margin:18px 0 0;border:1px solid var(--as-line);border-radius:12px;background:#fff}
.as-wrap .as-report-body{padding:0 14px 14px}
.as-wrap .as-table-wrap{overflow-x:auto;max-height:480px;overflow-y:auto;border:1px solid var(--as-line);border-radius:8px;margin:8px 0}
.as-wrap .as-table{width:100%;border-collapse:collapse;font-size:14px}
.as-wrap .as-table th{position:sticky;top:0;background:var(--as-wash);text-align:left;font-weight:650;color:var(--as-ink);padding:8px 10px;border-bottom:1px solid var(--as-line)}
.as-wrap .as-table td{padding:8px 10px;border-bottom:1px solid var(--as-line);vertical-align:top}
.as-wrap .as-table tr:last-child td{border-bottom:0}
.as-wrap .as-rp-word{font-weight:600;color:var(--as-ink);overflow-wrap:anywhere}
.as-wrap .as-rp-n{font-variant-numeric:tabular-nums;white-space:nowrap}
.as-wrap .as-rp-acts{display:flex;flex-wrap:wrap;gap:6px}
.as-wrap .as-rp-acts button{min-height:44px;padding:6px 12px;font-size:14px}
.as-wrap .as-badge{display:inline-block;font-size:12px;font-weight:650;padding:0 6px;border-radius:999px;margin-right:2px}
.as-wrap .as-badge-spelling{background:var(--as-tint);color:var(--as-green-d)}
.as-wrap .as-badge-review{background:var(--as-amber-tint);color:#6b3a00}
.as-wrap .as-badge-vocab{background:var(--as-blue-tint);color:var(--as-blue)}
/* Popover */
.as-wrap .as-tool{position:relative}
.as-wrap .as-popover{position:absolute;z-index:20;width:min(360px,calc(100% - 16px));background:#fff;border:1px solid var(--as-line-2);border-radius:12px;padding:14px 16px;box-shadow:0 10px 30px rgba(19,37,30,.18)}
.as-wrap .as-popover h3{margin:0 40px 4px 0;font-size:17px;color:var(--as-ink);overflow-wrap:anywhere}
.as-wrap .as-pop-reason{margin:0 0 6px;font-weight:600;color:var(--as-green-d)}
.as-wrap .as-pop-note{margin:0 0 10px;font-size:14px}
.as-wrap .as-pop-note:empty{display:none}
.as-wrap .as-pop-actions{display:flex;flex-wrap:wrap;gap:8px}
.as-wrap .as-pop-close{position:absolute;top:6px;right:6px;min-height:44px;min-width:44px;padding:4px 8px;border-color:transparent;font-size:14px}
.as-wrap .as-pop-actions button[aria-pressed=true]{background:var(--as-green);color:#fff}
/* Review list */
.as-wrap .as-review{margin:18px 0 0;padding:14px 16px;border:1px solid #e6c68f;border-radius:12px;background:#fffaf0}
.as-wrap .as-review h2{font-size:18px;margin:0 0 2px;color:var(--as-ink);text-align:left}
.as-wrap .as-review-list{margin:10px 0 0;padding:0 0 0 1.4em;max-height:420px;overflow:auto}
.as-wrap .as-review-list li{padding:8px 0;border-bottom:1px solid #f0e2c6}
.as-wrap .as-review-list li:last-child{border-bottom:0}
.as-wrap .as-ctx{display:block;overflow-wrap:anywhere}
.as-wrap .as-ctx mark{background:var(--as-amber-tint);color:inherit;text-decoration:underline dashed var(--as-amber);text-underline-offset:3px;padding:0 2px}
.as-wrap .as-rv-note{display:block;font-size:13px;color:var(--as-muted);margin:2px 0 6px}
.as-wrap .as-rv-actions{display:flex;flex-wrap:wrap;gap:8px}
.as-wrap .as-rv-actions button{padding:6px 12px}
.as-wrap .as-rv-actions button[aria-pressed=true]{background:var(--as-green);color:#fff}
.as-wrap .as-actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 0}
.as-wrap .as-action-status{min-height:1.6em;margin:8px 0 0;font-size:14px}
.as-wrap .as-manual{margin:16px 0 0;padding:14px 16px;border:1px solid var(--as-line);border-radius:12px;background:var(--as-wash)}
.as-wrap .as-manual h2{font-size:18px;margin:0 0 6px;text-align:left}
.as-wrap .as-manual textarea{margin:6px 0 10px}
/* Guide comparison table */
.as-wrap .as-compare-wrap{overflow-x:auto;margin:10px 0 12px;border:1px solid var(--as-line);border-radius:10px}
.as-wrap .as-compare{width:100%;border-collapse:collapse;font-size:15px;line-height:1.4}
.as-wrap .as-compare caption{text-align:left;font-size:13px;color:var(--as-muted);padding:8px 10px 0}
.as-wrap .as-compare th,.as-wrap .as-compare td{padding:7px 10px;border-bottom:1px solid var(--as-line);text-align:left;vertical-align:top}
.as-wrap .as-compare thead th{background:var(--as-wash);color:var(--as-ink);font-weight:650}
.as-wrap .as-compare tbody th{font-weight:600;color:var(--as-ink)}
.as-wrap .as-compare tr:last-child>*{border-bottom:0}
@media (max-width:520px){.as-wrap .as-compare{font-size:13px}.as-wrap .as-compare th,.as-wrap .as-compare td{padding:6px 5px;overflow-wrap:anywhere}}
@media (max-width:860px){
 .as-wrap .as-options{grid-template-columns:minmax(0,1fr)}
 .as-wrap .as-dict-body{grid-template-columns:minmax(0,1fr)}
 .as-wrap .as-grid{grid-template-columns:minmax(0,1fr)}
 .as-wrap textarea#as-input,.as-wrap .as-result{min-height:200px}
}
@media (max-width:640px){
 /* The report table becomes stacked cards so nothing scrolls sideways on a phone. */
 .as-wrap .as-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
 .as-wrap .as-table,.as-wrap .as-table tbody,.as-wrap .as-table tr,.as-wrap .as-table td{display:block;width:100%}
 .as-wrap .as-table tr{padding:8px 10px;border-bottom:1px solid var(--as-line)}
 .as-wrap .as-table td{border:0;padding:2px 0}
 .as-wrap .as-table td.as-rp-word:first-child::after{content:" →";color:var(--as-muted);font-weight:400}
 .as-wrap .as-table td.as-rp-word{display:inline;width:auto}
 .as-wrap .as-table td.as-rp-word+td.as-rp-word{padding-left:6px}
 .as-wrap .as-table td.as-rp-n::before{content:"Count: ";color:var(--as-muted)}
 .as-wrap .as-table-wrap{overflow-x:hidden}
}
@media (max-width:420px){
 .as-wrap{padding-left:12px;padding-right:12px}
 .as-wrap .as-tool{padding:14px 12px}
 .as-wrap .as-actions button,.as-wrap .as-quick button,.as-wrap .as-nav button{flex:1 1 calc(50% - 10px)}
}
@media print{.as-wrap .as-options,.as-wrap .as-dict,.as-wrap .as-nav,.as-wrap .as-doc,.as-wrap .as-open-help,.as-wrap .as-actions,.as-wrap .as-legend,.as-wrap textarea#as-input{display:none}.as-wrap .as-result{max-height:none;border:0;background:none}}
