:root {
  --navy: #c0507f;
  --plum: #8a2f5c;
  --head: #3d2737;
  --soft: #fbe9f0;
  --soft-2: #f7dbe6;
  --navy-2: #a83f6c;
  --paper: #fdf6f8;
  --card: #ffffff;
  --line: #f0dde5;
  --ink: #3a3038;
  --muted: #6b7280;
  --red: #c62828;
  --green: #2e7d4f;
  --green-bg: #e8f5ec;
  --red-bg: #fdecec;
  --sun: #f3b6cb;
  --radius: 16px;
  --shadow: 0 2px 0 rgba(192, 80, 127, .04), 0 6px 20px rgba(192, 80, 127, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 Nunito, system-ui, sans-serif;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: var(--navy); }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* top bar */
.topbar {
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.logo {
  background: var(--sun); color: var(--navy); font-weight: 800; letter-spacing: .5px;
  border-radius: 10px; padding: 4px 8px; font-size: 15px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 17px; }
.brand-text small { opacity: .75; font-size: 12px; }
#nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
#nav a, #nav button {
  color: #fff; background: rgba(255,255,255,.1); border: 0; border-radius: 999px;
  padding: 6px 12px; text-decoration: none; font-weight: 700; font-size: 14px;
}
#nav a:hover, #nav button:hover { background: rgba(255,255,255,.2); }
.who { font-size: 14px; opacity: .85; margin-right: 4px; }
.demo { background: #fff4d1; color: #7a5a00; text-align: center; font-size: 14px; padding: 6px 12px; }

#fb, #sc { scroll-margin-top: 80px; }
main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 24px 16px 48px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 16px; }

h1, h2, h3 { color: var(--head); line-height: 1.25; margin: 0 0 8px; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 21px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 800; }
.sub { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--navy); color: #fff; border: 0; border-radius: 12px;
  padding: 11px 18px; font-weight: 800; text-decoration: none;
}
.btn:hover { background: var(--navy-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.light { background: var(--soft); color: var(--navy); }
.btn.light:hover { background: var(--soft-2); }
.btn.sun { background: var(--sun); color: var(--navy); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.back { display: inline-block; margin-bottom: 14px; font-weight: 700; text-decoration: none; }

/* auth */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: stretch; }
.hero { border-radius: var(--radius); overflow: hidden; background: #f3ead8; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.hero img { width: 100%; display: block; object-fit: cover; flex: 1; min-height: 220px; }
.hero .proof { padding: 16px 20px 20px; background: var(--soft); }
.proof-line { font: 600 24px/1 Lora, serif; color: var(--ink); padding-top: 26px; }
.tabs { display: flex; gap: 6px; background: var(--soft); padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; font-weight: 800; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
label { display: block; font-weight: 700; font-size: 14px; margin: 10px 0 4px; }
.field {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff;
}
.field:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(192,80,127,.15); }
.msg { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.msg.err { background: var(--red-bg); color: var(--red); }
.msg.ok { background: var(--green-bg); color: var(--green); }

/* level grid */
.levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.level {
  position: relative; display: block; text-decoration: none; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  border-top: 6px solid var(--c); transition: transform .12s;
}
.level:hover { transform: translateY(-2px); }
.level .cefr { display: inline-block; font-size: 12px; font-weight: 800; background: color-mix(in srgb, var(--c) 22%, #fff); color: var(--navy); padding: 2px 8px; border-radius: 999px; }
.level h3 { margin: 8px 0 2px; }
.level p { margin: 0; color: var(--muted); font-size: 14px; }
.level .bar { height: 6px; background: #eef0f3; border-radius: 6px; margin-top: 12px; overflow: hidden; }
.level .bar i { display: block; height: 100%; background: var(--c); }
.mine { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 800; background: var(--navy); color: #fff; border-radius: 999px; padding: 2px 8px; }

/* path of stages */
.path { display: grid; gap: 18px; }
.stage-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.stage-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--c); color: var(--navy); font: 700 17px Lora, serif; flex: none;
}
.stage-head .n { font-size: 12px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }
.ex-list { display: grid; gap: 8px; }
.ex {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  text-decoration: none; color: var(--ink);
}
.ex:hover { border-color: var(--navy); }
.ex .t { font-weight: 700; }
.ex .k { font-size: 13px; color: var(--muted); }
.badge { font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--navy); white-space: nowrap; }
.badge.good { background: var(--green-bg); color: var(--green); }
.badge.mid { background: #fff4d1; color: #8a6200; }

/* exercise */
.ex-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.instr { background: var(--soft); border-left: 4px solid var(--navy); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.items { display: grid; gap: 12px; }
.item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.item.right { border-color: #9fd3b2; background: #f6fcf8; }
.item.wrong { border-color: #f1b1b1; background: #fffafa; }
.qn { font-weight: 800; color: var(--navy); margin-right: 6px; }
.q { white-space: pre-line; font: 500 18px/1.5 Lora, serif; }
.item .field { margin-top: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.opt { border: 1.5px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.opt.sel { border-color: var(--navy); background: var(--soft); color: var(--navy); }
.opt.ok { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.opt.no { border-color: var(--red); background: var(--red-bg); color: var(--red); }
.key { margin-top: 8px; font-size: 14px; }
.key b { color: var(--green); }
.key .bad { color: var(--red); }

/* order tiles */
.built { min-height: 52px; border: 2px dashed var(--line); border-radius: 12px; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font: 500 18px Lora, serif; }
.built:empty::before { content: 'Tap the words below…'; color: #b5ad9d; font: 15px Nunito, sans-serif; padding-left: 4px; }
.pool { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tile { border: 1.5px solid var(--line); background: #fff; border-bottom-width: 3px; border-radius: 10px; padding: 6px 12px; font: 500 17px Lora, serif; }
.tile.used { visibility: hidden; }
.built .tile { background: var(--soft); border-color: #eab8cb; }

/* fix (proofreading) */
.proof-s { font: 500 22px/1 Lora, serif; display: flex; flex-wrap: wrap; gap: 6px 8px; padding-top: 28px; align-items: flex-end; }
.w {
  position: relative; border: 0; background: transparent; padding: 2px 2px; border-radius: 6px;
  font: inherit; color: var(--ink); border-bottom: 2px solid transparent;
}
.w:hover { background: #f3efe5; }
.w.marked { color: var(--ink); }
.w.marked .orig { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2.5px; }
.w .corr {
  position: absolute; left: 0; bottom: 100%; white-space: nowrap;
  font: 700 21px/1 Caveat, cursive; color: var(--red); padding-bottom: 3px;
}
.w.marked.del .corr { font-size: 16px; }
.w.r-ok .corr, .w.r-ok .orig { text-decoration-color: var(--green); }
.w.r-ok .corr { color: var(--green); }
.w.r-miss { border-bottom-color: var(--red); background: var(--red-bg); }
.pop { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; background: #f6f3ec; border-radius: 12px; padding: 10px; }
.pop .field { width: auto; flex: 1; min-width: 140px; margin: 0; }
.count { font-size: 13px; color: var(--muted); font-weight: 700; margin-top: 10px; }

/* score */
.score {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--navy); color: #fff; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 16px;
}
.score .big { font-size: 40px; font-weight: 800; line-height: 1; }
.score .big small { font-size: 18px; opacity: .75; }
.score p { margin: 0; opacity: .9; }
.score .btn.light { background: rgba(255,255,255,.15); color: #fff; }

/* writing */
.task { white-space: pre-line; font: 500 17px/1.6 Lora, serif; }
.tips { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 15px; }
table.data { border-collapse: collapse; margin: 14px 0 4px; width: 100%; max-width: 560px; font-size: 15px; background: #fff; }
table.data caption { text-align: left; font-weight: 800; color: var(--navy); padding-bottom: 6px; }
table.data th, table.data td { border: 1px solid var(--line); padding: 7px 10px; text-align: center; }
table.data th { background: var(--soft); color: var(--navy); }
table.data td:first-child, table.data th:first-child { text-align: left; }
.write-area {
  width: 100%; min-height: 300px; resize: vertical; padding: 16px 18px; border-radius: 14px;
  border: 1.5px solid var(--line); background:
    repeating-linear-gradient(#fff, #fff 31px, #eef0f4 31px, #eef0f4 32px);
  font: 500 18px/32px Lora, serif; margin-top: 14px;
  background-position: 0 16px; background-attachment: local;
}
.write-area:focus { outline: none; border-color: var(--navy); }
.wc { font-size: 14px; color: var(--muted); font-weight: 700; }
.wc.low { color: var(--red); }
.wc.good { color: var(--green); }
.checklist { display: grid; gap: 6px; margin: 12px 0; font-size: 15px; }
.checklist label { font-weight: 600; margin: 0; display: flex; gap: 8px; align-items: center; }
.crit { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 14px 0; }
.crit .c { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.crit .c .s { font-size: 26px; font-weight: 800; color: var(--navy); }
.crit .c .s small { font-size: 14px; color: var(--muted); }
.crit .c .nm { font-weight: 800; font-size: 14px; }
.crit .c p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.marked-text { font: 500 19px/2.4 Lora, serif; white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.marked-text .e { position: relative; display: inline-block; line-height: 1.2; }
.marked-text .e s { text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.marked-text .e ins { position: absolute; left: 0; bottom: 100%; white-space: nowrap; text-decoration: none; font: 700 19px/1 Caveat, cursive; color: var(--red); }
.errs { display: grid; gap: 6px; margin-top: 12px; }
.errs .er { font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.errs .er s { color: var(--red); }
.errs .er b { color: var(--green); }
.errs .type { font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--muted); margin-left: 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two ul { margin: 6px 0 0; padding-left: 20px; }
.improved { font: 500 17px/1.7 Lora, serif; white-space: pre-wrap; }
details summary { cursor: pointer; font-weight: 800; color: var(--navy); }
.spinner { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* results */
table.hist { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; font-size: 15px; }
table.hist th, table.hist td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.hist th { background: var(--soft); color: var(--navy); font-size: 13px; text-transform: uppercase; letter-spacing: .4px; }

@media (max-width: 760px) {
  .auth, .two { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
  .who { display: none; }
  main { padding: 16px 12px 40px; }
  h1 { font-size: 24px; }
  .proof-s { font-size: 20px; }
  table.hist .hide-m { display: none; }
}

/* paper mode */
.steps { display: grid; gap: 18px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--sun); color: var(--navy); font-weight: 800; display: grid; place-items: center; }
.step p { margin: 2px 0 10px; color: var(--muted); font-size: 15px; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.thumb { position: relative; width: 110px; }
.thumb img { width: 110px; height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.thumb span { font-size: 12px; color: var(--muted); font-weight: 700; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; }
.hl { background: #fff4d1; padding: 0 4px; border-radius: 4px; font-weight: 700; }
.pts { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.pts .y { color: var(--green); font-weight: 700; }
.pts .n { color: var(--red); font-weight: 700; }

/* printed task sheet */
#printSheet { display: none; }
@media print {
  @page { size: A4; margin: 14mm 14mm 12mm; }
  body > * { display: none !important; }
  body { background: #fff; display: block; }
  body > #printSheet { display: block !important; color: #000; font: 11pt/1.45 Nunito, Arial, sans-serif; }
  #printSheet h2 { color: #000; font-size: 15pt; margin: 8px 0 4px; }
  #printSheet .task { font: 11.5pt/1.5 Lora, Georgia, serif; }
  #printSheet table.data { max-width: none; width: auto; font-size: 10pt; margin: 8px 0; }
  #printSheet table.data th { background: #eee !important; color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ps-head { display: flex; justify-content: space-between; border-bottom: 2px solid #c0507f; padding-bottom: 4px; font-size: 10pt; color: #c0507f; }
  .ps-info { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0 4px; font-size: 10.5pt; }
  .ps-aim { font-size: 10pt; margin: 6px 0 4px; }
  .ps-lines .pl { height: 9.5mm; border-bottom: 1px solid #9aa4b2; break-inside: avoid; }
  .ps-foot { font-size: 9pt; color: #555; margin-top: 8px; }
}


/* =================== NET Writing Studio (pink) =================== */
body { background: var(--paper); }
.serif, .brand-text b { font-family: Lora, Georgia, serif; }
.topbar {
  background: #fff; color: var(--ink); border-bottom: 1px solid var(--line);
  padding: 10px 24px; gap: 20px; box-shadow: 0 1px 0 rgba(192,80,127,.04);
}
.brand { color: var(--plum); gap: 12px; flex: none; }
.brand-ico { width: 46px; height: 40px; color: var(--navy); }
.brand-text b { font-size: 25px; color: var(--plum); font-weight: 700; letter-spacing: -.2px; }
.brand-text small { font-size: 12.5px; letter-spacing: 2.2px; color: var(--navy); opacity: 1; font-weight: 700; }
.topnav { display: flex; gap: 6px; flex: 1; justify-content: center; }
.topnav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: 18px 16px 16px; border-bottom: 3px solid transparent; margin-bottom: -11px; }
.topnav a:hover { color: var(--navy); }
.topnav a.on { color: var(--navy); border-bottom-color: var(--navy); }
.user { flex: none; }
.umenu { position: relative; }
.umenu summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; }
.umenu summary::-webkit-details-marker { display: none; }
.ava { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #f3b6cb, #c0507f); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.caret { color: var(--muted); font-size: 12px; }
.umenu-box { position: absolute; right: 0; top: 50px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; min-width: 210px; display: grid; gap: 6px; z-index: 30; }
.umenu-box span { color: var(--muted); font-size: 14px; }
.demo { background: var(--soft); color: var(--plum); }

.shell { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; display: flex; gap: 22px; padding: 22px 22px 40px; align-items: flex-start; }
body.guest .shell { max-width: 1100px; }
.shell main { flex: 1; min-width: 0; max-width: none; margin: 0; padding: 0; }
.side { width: 230px; flex: none; position: sticky; top: 88px; }
.side-nav { display: grid; gap: 4px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; }
.side-nav a:hover { background: #fff; }
.side-nav a.on { background: var(--soft-2); color: var(--plum); font-weight: 800; }
.side-nav .ico { width: 22px; height: 22px; color: var(--navy); }
.side-quote { width: 100%; border-radius: 18px; margin-top: 26px; display: block; }

.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn .ico { width: 18px; height: 18px; }
.btn { border-radius: 10px; }
.btn.big { padding: 13px 24px; font-size: 16px; }
.btn.soft { background: var(--soft); color: var(--navy); }
.btn.soft:hover { background: var(--soft-2); }
.btn.line { background: #fff; color: var(--navy); border: 1.5px solid var(--soft-2); }
.btn.line:hover { background: var(--soft); }
.card { border-radius: 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }

/* welcome / login */
.welcome {
  background: linear-gradient(160deg, #fdeef4, #f8dbe7); border-radius: 22px; padding: 14px 14px 26px; display: flex; flex-direction: column; gap: 18px;
}
.welcome > div { padding: 0 14px; }
.welcome-hero { width: 100%; border-radius: 16px; display: block; aspect-ratio: 3 / 2; object-fit: cover; }
.welcome h1 { font-size: 28px; color: var(--plum); line-height: 1.2; margin-bottom: 12px; }
.welcome p { margin: 0 0 18px; color: #5a4553; }
.feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.feat li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: #5a4553; }
.feat li .ico { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: #fff; color: var(--navy); }
.feat b { display: block; color: var(--head); }
.welcome-img { width: 190px; border-radius: 16px; flex: none; }

/* practice page */
.pbar { display: flex; align-items: center; gap: 0; padding: 18px 22px; margin-bottom: 18px; }
.pb { flex: 1; display: flex; align-items: center; gap: 12px; padding: 0 18px; border-right: 1px solid var(--line); min-width: 0; }
.pb:first-child { padding-left: 0; }
.pb:nth-child(3) { border-right: 0; }
.pb > .ico { width: 36px; height: 36px; color: var(--navy); }
.pb label { margin: 0; font-weight: 600; font-size: 14px; color: var(--ink); flex: 1; min-width: 0; }
.pb select { margin-top: 6px; padding: 8px 10px; font-size: 15px; }
.pgrid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.pmain, .pside { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.ch { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ch h2 { margin: 0; font-size: 21px; }
.ci { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--navy); display: grid; place-items: center; flex: none; }
.ci .ico { width: 22px; height: 22px; }
.ci.sun { background: #fff6e0; color: #e0a020; }
.more { margin-left: auto; color: var(--navy); font-weight: 700; text-decoration: none; font-size: 15px; }
.dot { width: 14px; height: 14px; border-radius: 50%; }
.pill { display: inline-block; font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.pill.green { background: #dcf3e5; color: #22764a; }
.pill.blue { background: #e1edfb; color: #2a5d9c; }
.pill.amber { background: #fff1d6; color: #8a6200; }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.grey { background: #f1ecef; color: #6e6169; }
.taskbox { background: linear-gradient(120deg, #fdf0f5, #fbe3ec); border-radius: 14px; padding: 20px 22px; display: flex; gap: 14px; align-items: flex-start; }
.taskbox > div { flex: 1; min-width: 0; }
.taskbox .tt { font-family: Lora, serif; margin-bottom: 6px; color: var(--plum); }
.taskbox .task { font: 500 16.5px/1.65 Nunito, sans-serif; color: var(--ink); }
.notepad { width: 104px; flex: none; margin-top: 18px; }
.must { margin: 6px 0 0; padding-left: 20px; }
.must li { margin: 2px 0; }
.wcx { margin-left: auto; color: var(--muted); font-size: 15px; }
.wcx b { color: var(--ink); font-size: 17px; margin: 0 4px; }
.wcx b.low { color: var(--red); } .wcx b.good { color: var(--green); } .wcx b.over { color: #b26a00; }
.timer { background: var(--soft); color: var(--plum); font-weight: 800; border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.timer.up { background: var(--red-bg); color: var(--red); }
#paneT .write-area { margin-top: 0; min-height: 260px; background: #fff; border-radius: 12px; font: 500 17px/1.7 Lora, serif; }
.wbtns { margin-top: 14px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; }
.checks .ico { color: #2e9e6a; width: 21px; height: 21px; margin-top: 1px; }
.plan { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 15.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 12px; font: 600 14.5px Nunito, sans-serif; color: var(--ink); }
button.chip:hover { border-color: var(--navy); color: var(--navy); background: var(--soft); }
.tscroll { overflow-x: auto; }
table.hist { border: 1px solid var(--line); border-radius: 12px; border-collapse: separate; border-spacing: 0; }
table.hist th { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--head); background: #fbf3f6; }
table.hist tr:last-child td { border-bottom: 0; }
.vbtn { display: inline-block; border: 1.5px solid var(--soft-2); color: var(--navy); border-radius: 8px; padding: 3px 14px; text-decoration: none; font-weight: 700; font-size: 14px; }
.vbtn:hover { background: var(--soft); }
.tabs { background: var(--soft); }
.tabs button.on { color: var(--plum); }
.step .num { background: var(--soft-2); color: var(--plum); }
.score { background: linear-gradient(120deg, #c0507f, #a83f6c); }
.marked-text .e s, .w.marked .orig { text-decoration-color: var(--red); }

/* other pages */
.cta { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); margin-bottom: 18px; background: linear-gradient(120deg, #fff, #fdeef4); }
.cta > .ico { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--soft); color: var(--navy); }
.cta span:not(.btn) { flex: 1; }
.cta b { display: block; color: var(--head); font-size: 17px; }
.level { border-top-width: 6px; }
.mine { background: var(--navy); }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vgroup { padding: 10px 0; border-top: 1px solid var(--line); }
.vgroup:first-of-type { border-top: 0; }
.vtitle { display: block; font-weight: 800; text-decoration: none; color: var(--head); margin-bottom: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.stat { display: grid; padding: 16px 18px; }
.stat b { font-size: 28px; color: var(--plum); }
.stat span { color: var(--muted); font-size: 14px; font-weight: 700; }

@media (max-width: 1150px) {
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .side { width: 200px; }
}
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
  .topnav { order: 3; flex: 1 1 100%; justify-content: flex-start; overflow-x: auto; }
  .topnav a { padding: 8px 12px; margin-bottom: -11px; white-space: nowrap; }
  .brand-text b { font-size: 20px; }
  .brand-text small { display: block; font-size: 10px; letter-spacing: 1.5px; }
  .uname, .caret { display: none; }
  .user { margin-left: auto; }
  .shell { flex-direction: column; padding: 14px 12px 32px; gap: 14px; }
  .side { position: static; width: 100%; }
  .side-nav { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .side-nav a { white-space: nowrap; background: #fff; border: 1px solid var(--line); padding: 8px 12px; }
  .side-quote { display: none; }
  .pbar { flex-wrap: wrap; gap: 12px; }
  .pb { flex: 1 1 100%; border-right: 0; padding: 0; }
  .pbar .btn { width: 100%; }
  .welcome { flex-direction: column; align-items: stretch; padding: 22px; }
  .welcome-img { display: none; }
  .notepad { display: none; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat b { font-size: 22px; }
  .wcx { margin-left: 0; width: 100%; }
  .wbtns .btn.big { width: 100%; }
  .wbtns .grow { display: none; }
}

/* home hero */
.homehero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); align-items: center; gap: 10px; background: linear-gradient(120deg, #fff, #fdeef4); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.hh-text { padding: 28px 10px 28px 32px; }
.hh-text h1 { font-size: 34px; color: var(--plum); margin-bottom: 10px; }
.hh-text p { color: #5a4553; margin: 0 0 20px; font-size: 16.5px; }
.hh-img { width: 100%; height: 100%; max-height: 360px; object-fit: cover; display: block; }
@media (max-width: 900px) {
  .homehero { grid-template-columns: 1fr; }
  .hh-img { order: -1; max-height: 230px; }
  .hh-text { padding: 18px 20px 22px; }
  .hh-text h1 { font-size: 26px; }
  .welcome-hero { aspect-ratio: auto; max-height: 220px; }
}

/* paragraph check */
.pcheck td { vertical-align: top; }
.pcheck .ts { font: italic 500 14px/1.45 Lora, serif; color: var(--muted); margin-top: 4px; max-width: 280px; }
.pc { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; font-size: 14px; }
.pc.y { background: #dcf3e5; color: #22764a; }
.pc.n { background: var(--red-bg); color: var(--red); }
.pc.na { background: #f1ecef; color: #8a7d85; }

/* full-width home hero */
.hero-wrap:empty { display: none; }
.hero-wrap { max-width: 1360px; width: 100%; margin: 0 auto; padding: 22px 22px 0; }
.bighero { position: relative; border-radius: 26px; overflow: hidden; min-height: 420px; aspect-ratio: 2.25 / 1; display: flex; align-items: center; box-shadow: var(--shadow); background: #fbeef3; }
.bh-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 62%; }
.bighero::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(255,250,252,.97) 0%, rgba(255,248,251,.9) 30%, rgba(255,246,250,.55) 45%, rgba(255,246,250,0) 60%); }
.bh-text { position: relative; z-index: 2; max-width: 470px; padding: 40px 44px; }
.bh-text h1 { font-size: 42px; color: var(--plum); margin-bottom: 12px; }
.bh-text p { color: #5a4553; font-size: 18px; margin: 0 0 24px; }
@media (max-width: 900px) {
  .hero-wrap { padding: 14px 12px 0; }
  .bighero { min-height: 0; aspect-ratio: auto; flex-direction: column; align-items: stretch; background: #fff; }
  .bighero::before { display: none; }
  .bh-img { position: static; height: 220px; object-position: 60% 40%; }
  .bh-text { padding: 18px 20px 22px; max-width: none; }
  .bh-text h1 { font-size: 28px; }
  .bh-text p { font-size: 16px; }
}
