:root {
  color-scheme: light;
  font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  background: #eef6f5;
  color: #15353a;
  font-variant-numeric: lining-nums;
  --ink: #15353a;
  --muted: #648087;
  --brand: #155e75;
  --brand-dark: #104e61;
  --mint: #d9f0eb;
  --line: #dce9e7;
  --danger: #b53b45;
  --surface: #fff;
  --shadow: 0 18px 55px rgba(24, 72, 76, .12);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #eef6f5; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 90% 0, rgba(64, 173, 153, .16), transparent 35%),
    linear-gradient(180deg, #f5fbfa 0%, #edf5f4 100%);
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(21, 94, 117, .26); outline-offset: 2px; }
.app-shell {
  width: min(100%, 680px);
  margin-inline: auto;
  padding: max(24px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}
.hero { display: flex; align-items: center; gap: 14px; margin: 8px 4px 24px; }
.brand-mark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; color: #fff; font-size: 29px; font-weight: 900; background: linear-gradient(145deg, #1b7a82, #155e75); box-shadow: 0 10px 24px rgba(21,94,117,.25); }
.eyebrow { margin: 0 0 2px; color: #2b7a78; font-size: .84rem; font-weight: 700; }
h1 { margin: 0; font-size: clamp(2rem, 8vw, 2.65rem); line-height: 1; letter-spacing: -.04em; }
.tagline { margin: 7px 0 0; color: var(--muted); }
.composer, .tasks-card { background: rgba(255,255,255,.95); border: 1px solid rgba(255,255,255,.85); border-radius: 24px; box-shadow: var(--shadow); }
.composer { padding: 18px; margin-bottom: 16px; }
.composer label { display: block; margin-bottom: 10px; font-weight: 800; }
.input-row { display: flex; gap: 9px; }
input[type="text"] { min-width: 0; width: 100%; min-height: 48px; border: 1px solid #c8dcda; border-radius: 14px; padding: 10px 14px; color: var(--ink); background: #fbfefd; }
input[type="text"]::placeholder { color: #8ba0a4; }
.primary { min-height: 48px; border: 0; border-radius: 14px; padding: 0 20px; color: #fff; background: var(--brand); font-weight: 800; box-shadow: 0 6px 16px rgba(21,94,117,.2); }
.primary:active { background: var(--brand-dark); transform: translateY(1px); }
.tasks-card { padding: 18px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h2 { margin: 0; font-size: 1.15rem; }
#summary { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.text-button { border: 0; background: transparent; color: var(--danger); padding: 9px; border-radius: 10px; font-size: .84rem; font-weight: 700; }
.text-button:disabled { color: #a8b7b9; cursor: default; }
.filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 18px 0 10px; padding: 5px; border-radius: 14px; background: #edf5f3; }
.filters button { min-height: 40px; border: 0; border-radius: 10px; color: #58747a; background: transparent; font-weight: 700; }
.filters button[aria-pressed="true"] { color: var(--brand-dark); background: #fff; box-shadow: 0 3px 12px rgba(37,86,88,.1); }
.todo-list { list-style: none; padding: 0; margin: 0; }
.todo-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 62px; border-bottom: 1px solid var(--line); }
.todo-item:last-child { border-bottom: 0; }
.check-wrap { min-width: 0; flex: 1; display: flex; align-items: center; gap: 11px; padding: 10px 0; cursor: pointer; }
.toggle { position: absolute; opacity: 0; pointer-events: none; }
.custom-check { flex: 0 0 auto; display: grid; place-items: center; width: 25px; height: 25px; border: 2px solid #9ab8b5; border-radius: 9px; color: transparent; font-size: 16px; transition: .16s ease; }
.toggle:focus-visible + .custom-check { outline: 3px solid rgba(21,94,117,.26); outline-offset: 2px; }
.toggle:checked + .custom-check { color: #fff; border-color: #258577; background: #258577; }
.todo-text { overflow-wrap: anywhere; line-height: 1.6; }
.todo-item.completed .todo-text { color: #7d9296; text-decoration: line-through; }
.actions { flex: 0 0 auto; display: flex; gap: 3px; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; color: #58747a; background: transparent; font-size: 1.2rem; }
.icon-button:hover { background: #edf5f3; }
.delete { color: var(--danger); }
.edit-input { min-height: 42px !important; }
.empty-state { text-align: center; color: var(--muted); padding: 36px 14px 28px; }
.empty-state span { display: block; margin-bottom: 8px; color: #d49b35; font-size: 2.1rem; }
.empty-state strong { color: var(--ink); }
.empty-state p { margin: 5px 0 0; }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 560px) { .app-shell { padding-inline: 24px; } .composer, .tasks-card { padding: 22px; } }
@media (max-width: 380px) { .input-row { flex-direction: column; } .primary { width: 100%; } .section-heading { align-items: flex-start; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
