/* Grammar Check: warm proofreading paper and an orange pencil, on the web iOS kit (src/ioskit/ios.css). */
:root { --canvas: #f7f3ec; --tint: #e8590c; --forest: #e8590c; --coral: #e8590c; --paper: #fffdf9; --ink: #1d1b18; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --canvas: #121110; --tint: #ff8a4c; --forest: #ff8a4c; --coral: #ff8a4c; --paper: #1c1b19; --ink: #f2efe9; } }
:root[data-theme="dark"] { --canvas: #121110; --tint: #ff8a4c; --forest: #ff8a4c; --coral: #ff8a4c; --paper: #1c1b19; --ink: #f2efe9; }
.screen.home, .screen.editor { background: var(--canvas); }
.screen.home, .screen.editor { --bar-fade: color-mix(in srgb, var(--canvas) 85%, transparent); }

/* home */
.hero { display: flex; flex-direction: column; gap: 6px; padding: 6px 4px 2px; }
.hero h2 { font: 700 34px/1.1 var(--sys); letter-spacing: -0.02em; }
.hero p { color: var(--text2); font-size: 15px; line-height: 20px; }
.doc-snip { display: block; color: var(--text2); font-size: 15px; line-height: 20px; margin-top: 2px; }
.issue-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--tint) 13%, transparent); color: var(--tint); white-space: nowrap; }
.issue-pill.clean { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.row .doc-title { font-weight: 600; }

/* editor: a textarea over a mirror that draws the underlines */
.sheet-paper { background: var(--paper); border-radius: 26px; box-shadow: 0 4px 16px rgba(0,0,0,.05); margin: 2px 0 12px; position: relative; }
.ed { position: relative; }
.ed-mirror, .ed-ta { font: 400 18px/1.62 var(--serif-ed, var(--sys)); padding: 20px 22px 28px; margin: 0; border: 0; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; letter-spacing: -0.003em; tab-size: 4; }
.ed-mirror { color: transparent; pointer-events: none; min-height: 52vh; }
.ed-ta { position: absolute; inset: 0; width: 100%; height: 100%; resize: none; overflow: hidden; background: transparent; color: var(--ink); outline: none; caret-color: var(--tint); border-radius: 26px; }
.ed-ta::placeholder { color: var(--text3); }
.ed-mirror mark { color: transparent; background: none; border-radius: 2px; text-decoration: underline wavy var(--u); text-decoration-thickness: 1.6px; text-underline-offset: 4px; text-decoration-skip-ink: none; }
.ed-mirror mark.sel { background: color-mix(in srgb, var(--u) 18%, transparent); }
.status { display: flex; align-items: center; gap: 8px; padding: 4px 6px 2px; color: var(--text2); font-size: 13px; line-height: 18px; min-height: 26px; flex-wrap: wrap; }
.status .dots { display: inline-flex; gap: 10px; }
.status .dots span { display: inline-flex; align-items: center; gap: 4px; }
.status .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; }
.loading-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--fill); border-top-color: var(--tint); animation: spin .8s linear infinite; }
.issues-btn .n { font-variant-numeric: tabular-nums; }
.issues-btn.clean { color: var(--green); }
.glass .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tint); display: inline-block; }

/* the suggestion card */
.pop { position: fixed; z-index: 45; width: min(340px, calc(100vw - 24px)); border-radius: 22px; padding: 14px 14px 10px; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 0 0 .5px var(--glass-edge), 0 18px 50px rgba(0,0,0,.22); }
.pop-k { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--u); }
.pop-k i { width: 8px; height: 8px; border-radius: 50%; background: var(--u); }
.pop-m { font-size: 15px; line-height: 20px; margin: 6px 0 10px; }
.pop-m code, .iss-m code { font-family: inherit; font-weight: 600; background: none; }
.pop-s { display: flex; flex-wrap: wrap; gap: 8px; }
.pop-s button { min-height: 40px; padding: 0 16px; border-radius: 20px; background: var(--tint); color: #fff; font-weight: 600; font-size: 16px; }
.pop-s button.alt { background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint); }
.pop-a { display: flex; gap: 4px; margin-top: 8px; border-top: .5px solid var(--sep); padding-top: 4px; }
.pop-a button { flex: 1; min-height: 40px; color: var(--tint); font-size: 15px; border-radius: 12px; }
.pop-a button:active { background: var(--fill2); }
.strike { text-decoration: line-through; color: var(--text2); }

/* the issues sheet */
.iss-row { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.iss-cx { font-size: 15px; line-height: 21px; overflow-wrap: anywhere; }
.iss-cx mark { background: color-mix(in srgb, var(--u) 16%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; text-decoration: underline wavy var(--u); text-underline-offset: 3px; }
.iss-m { font-size: 13px; line-height: 18px; color: var(--text2); }
.iss-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.iss-acts .btn-bordered { --btn: var(--tint); }
.group-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 8px; vertical-align: 0; }
.empty-ok { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 20px; text-align: center; color: var(--text2); }
.empty-ok .sf { font-size: 44px; color: var(--green); }
.empty-ok b { color: var(--text); font-size: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
/* the first visit's type-or-paste box */
.quick { background: var(--row); border-radius: 26px; padding: 16px 18px 12px; margin-top: 14px; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.quick-ta { display: block; width: 100%; min-height: 150px; border: 0; outline: none; background: none; color: var(--text); font: 17px/1.5 var(--sys); padding: 0; resize: none; }
.quick-ta::placeholder { color: var(--text3); }
.quick-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 0.5px solid var(--sep); padding-top: 10px; margin-top: 6px; }
