/* Shared base for the small Taskly apps: the reset, forms, buttons, lists, footer and legal page.
   Each app sets its own colours in app.css (:root) and adds its one signature element there.
   Contract: --page --card --ink --soft --line --field --act --on-act --stop */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 17px/1.5 "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
main { max-width: var(--wide, 600px); margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom)); display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
section { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--act); outline-offset: 2px; }
h1 { font-size: 30px; letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
h2 { font-size: 20px; margin: 0; }
h3 { font-size: 17px; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
.soft, .hint { color: var(--soft); font-size: 15px; }
.lead { color: var(--soft); max-width: 54ch; }
.error { color: var(--stop); font-weight: 600; }
.note { color: var(--act); font-weight: 600; } .note:empty { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.row { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.grow { flex: 1 1 180px; }
label { display: grid; gap: 4px; font-weight: 600; font-size: 15px; min-width: 0; flex: 1 1 130px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea { width: 100%; min-width: 0; min-height: 46px; border: 0; border-bottom: 2px solid var(--ink); border-radius: 4px 4px 0 0; background: var(--field); padding: 9px 10px; font-size: 16px; font-weight: 400; }
textarea { resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 16px; min-height: 44px; cursor: pointer; flex: none; }
.check input { width: 22px; height: 22px; accent-color: var(--act); flex: none; }
button { cursor: pointer; border: 0; border-radius: 999px; min-height: 48px; padding: 0 22px; font-weight: 700; background: var(--act); color: var(--on-act); flex: none; }
button:disabled { opacity: .5; cursor: default; }
.quiet { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.small { min-height: 44px; padding: 0 14px; font-size: 14px; font-weight: 600; border-color: var(--line); }
.danger { background: transparent; border: 1.5px solid var(--stop); color: var(--stop); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font-weight: 600; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--page); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: 15px; padding: 0; margin: 0 0 8px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.list li > :first-child { flex: 1; min-width: 0; }
.big { font-size: clamp(34px, 9vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
footer { font-size: 14px; color: var(--soft); display: grid; gap: 8px; }
footer a { display: inline-block; padding: 4px 0; }
.noscript { padding: 16px; }
.doc { max-width: 68ch; display: block; } .doc h1 { margin: 16px 0; } .doc h2 { margin: 24px 0 8px; } .doc p, .doc ul { margin: 0 0 12px; }
@media (max-width: 760px), (pointer: coarse) { input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; } }
