/* plaintask.css - page rules the three Plaintask sites share (packages/site-css, synced into each site's
   assets/ by scripts/sync-shared.mjs). Only what sits inside a visual, plus the plain fact and plan lists. */

/* code reads as typed: no ligatures turning -- into a dash */
code, pre, .ed { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
code { font-family: var(--font-mono); font-size: 0.92em; }
/* the official Markdown mark is 208 x 128: never squared into an icon box */
img[src$="/md.svg"], img[src*="markdown-mark"] { aspect-ratio: 208 / 128; height: auto !important; object-fit: contain; }
.mini li > img, .ed__bar > img[src$="/md.svg"] { width: 16px !important; }

/* plain facts under a split's text: ruled lines on the left line */
.facts { list-style: none; margin: 0; padding: 0; display: grid; }
.facts li { padding-block: var(--s-3); border-top: 1px solid var(--line); font-size: var(--t-body); line-height: 1.5; }
.plan-list { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.plan-list li { padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: var(--t-body); line-height: 1.5; }
.card--plan .btn { margin-top: var(--s-5); width: 100%; }
.card > .plan-panel { --p-h: 144px; min-height: 144px; height: 144px; flex: none; display: flex; align-items: center; justify-content: center; gap: var(--s-4); }
.plan-panel .ic-tile { width: 72px; height: 72px; display: grid; place-items: center; border-radius: var(--r-md); background: #fff; box-shadow: 0 1px 2px rgb(11 12 14 / .08), 0 12px 24px -14px rgb(11 12 14 / .3); }
.plan-panel .ic { width: 40px; height: 40px; }
.plan-panel .mark { width: 34px; height: 34px; }
.plan-panel .ui-icon, .plan-panel svg { width: 34px; height: 34px; color: #0b0c0e; }

/* the app window recipe (sections-library.md, app-frame) */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > .ui-panel { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}

/* a checkbox as Plaintask draws it */
.tk { width: 14px; height: 14px; flex: none; border: 1.5px solid color-mix(in oklab, var(--u-ink, var(--ink)) 40%, transparent); border-radius: 4px; display: inline-block; position: relative; }
.tk.is-done { background: var(--accent); border-color: var(--accent); }
.tk.is-done::after { content: ""; position: absolute; left: 28%; top: 10%; width: 28%; height: 52%; border: solid var(--p-accent-ink, #fff); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* a small Plaintask view on a panel */
.ui.mini { background: var(--u-bg); color: var(--u-ink); border: 1px solid var(--u-border); border-radius: 12px; box-shadow: var(--u-shadow); font: 400 13px/1.45 var(--font-text); padding: 16px 18px; }
.mini__h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.mini__h b { font: 500 15px/1.2 var(--font-display); }
.mini__h span { color: var(--u-muted); font-size: 12px; }
.mini ul { list-style: none; margin: 0; padding: 0; }
.mini li { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--u-line); }
.mini li small { color: var(--u-muted); font-size: 12px; }
.mini li small.is-due, .mini .is-on { color: var(--accent); font-weight: 500; }
.mini code { font: 400 12px/1.5 var(--font-mono); }
.mini .rule { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.mini .rule dt { color: var(--u-muted); }
.mini .rule dd { margin: 0; }
.mini .cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; text-align: center; font-size: 12px; }
.mini .cal i { font-style: normal; padding: 6px 0; border-radius: 6px; background: var(--u-fill-2); }
.mini .cal i.is-on { background: var(--accent); color: var(--p-accent-ink, #fff); font-weight: 400; }
.mini .cal i.is-dim { color: var(--u-muted); background: transparent; }
.mini--tree { margin-top: var(--s-7); max-width: 460px; }
.mini--tree li.is-sub { padding-left: 24px; }

/* the open project in the app window */
.proj { padding: 28px 32px; font: 400 13px/1.45 var(--font-text); color: var(--u-ink); }
.proj__crumb { color: var(--u-muted); font-size: 12px; display: flex; gap: 6px; align-items: center; }
.proj__title { font: 500 24px/1.15 var(--font-display); letter-spacing: -0.02em; margin: 10px 0 8px; }
.proj__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.proj__meta span { border: 1px solid var(--u-line-2); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--u-muted); }
.proj__meta span.is-due { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 40%, transparent); }
.proj__note { color: var(--u-muted); max-width: 54ch; margin: 0 0 18px; }
.proj h4 { font: 500 13px/1.3 var(--font-text); margin: 18px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--u-line); }
.proj .ui-checks { border: 0; box-shadow: none; padding: 0; background: transparent; }
.proj .ui-checks__head { display: none; }
.proj__rows { list-style: none; margin: 0; padding: 0; }
.proj__rows li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--u-line); }
.proj__rows small { color: var(--u-muted); font-size: 12px; }
.proj__rows small.is-rep::before { content: "↻ "; }

/* an editor or terminal pane: a Markdown file or a shell session, highlighted token by token */
.ed { font: 400 13px/1.7 var(--font-mono); }
.ed__bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--u-line); font-family: var(--font-text); font-size: 13px; }
.ed__bar img { width: 18px; height: 18px; }
.ed__bar span { color: var(--u-muted); }
.ed pre { margin: 0; padding: 18px 20px 60px; white-space: pre; color: var(--u-ink); font: inherit; }
.ed .d, .ed .p { color: var(--u-muted); } .ed .a { color: var(--accent); } .ed .h { font-weight: 500; }
.ed .ok { color: #3fb27f; } .ed .ad { color: #3fb27f; } .ed .rm { color: #e5675d; } .ed .pr { color: var(--accent); }
@media (max-width: 639px) { .ed pre { white-space: pre-wrap; } }
