/* =========================================================
   Desk Board (Home Office hub, version 38)
   Loaded after theme.css on the tool pages. Same frame as Shift Tasks (.tk), with the Home Office blue where the
   other tools use safety yellow, and the wallpaper's columns: Inbox, 1 Do Now, 2 In Progress, 3 Done.
   On a PC the board and the week sit side by side (the week drops under the board on narrow windows); on phones
   the Board and This week tabs switch panes, and a row of tabs picks the one column that shows.
   ========================================================= */
@media screen {

#panel-desk {
  --mascot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 60'%3E%3Cellipse cx='26' cy='56' rx='20' ry='3' fill='%231B2125' opacity='.15'/%3E%3Cg transform='translate(1 6)'%3E%3Cpath d='M17 9c-2-2 2-4 0-6M25 9c-2-2 2-4 0-6' fill='none' stroke='%231B2125' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M37 19h3a6 6 0 0 1 0 12h-3' fill='none' stroke='%231B2125' stroke-width='3'/%3E%3Cpath d='M8 12h30v26a7 7 0 0 1-7 7H15a7 7 0 0 1-7-7z' fill='%2363B3ED' stroke='%231B2125' stroke-width='2.4' stroke-linejoin='round'/%3E%3Ccircle cx='18' cy='23' r='2.2' fill='%231B2125'/%3E%3Ccircle cx='28' cy='23' r='2.2' fill='%231B2125'/%3E%3Cpath d='M20 28q3 3 6 0' fill='none' stroke='%231B2125' stroke-width='2' stroke-linecap='round'/%3E%3Cellipse cx='13.5' cy='28' rx='2.6' ry='1.6' fill='%23F4B6B0'/%3E%3Cellipse cx='32.5' cy='28' rx='2.6' ry='1.6' fill='%23F4B6B0'/%3E%3C/g%3E%3C/svg%3E"); --mascot-w: 58px; --mascot-h: 62px; --note: "your week on one board";
  /* the tool's accent: Home Office blue (ink text on it is 7:1) */
  --yel: #63b3ed; --yel-hover: #84c3f1; --yel-soft: #dceefb; --yel-line: #a9d4f5; --yel-ink: #1d4f78; --on-yel: #1b2125; --hl: #63b3ed;
  --db-inbox: #4d5960; --db-do: #63b3ed; --db-doing: #a9d4f5; --db-done: #d7e8f5;
}
:root:lang(es) #panel-desk { --note: "su semana en un solo tablero"; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-tc-theme="light"]) #panel-desk { --yel-soft: #14293a; --yel-line: #24476a; --yel-ink: #9fd0f5; --hl: #1f5a86; }
}
:root[data-theme="dark"]:not([data-tc-theme="light"]) #panel-desk, :root[data-tc-theme="dark"] #panel-desk { --yel-soft: #14293a; --yel-line: #24476a; --yel-ink: #9fd0f5; --hl: #1f5a86; }

/* ---------- the frame: board on the left, the week on the right ---------- */
.db .tk-main { grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); }
.db-week { background: var(--canvas); }
@media (min-width: 921px) {
  .db-week { border-left: 2px solid var(--edge); border-radius: 0 16px 16px 0; }
}
/* a narrower PC window: the week goes under the board, its three boxes side by side */
@media (min-width: 921px) and (max-width: 1159px) {
  .db .tk-main { display: block; }
  .db-week { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; align-items: start;
    border-left: 0; border-top: 2px solid var(--edge); border-radius: 0 0 16px 16px; }
  .db-week > .tk-pane-h { grid-column: 1 / -1; }
}
.db .tk-try, .db .notice, .db .warn { margin: 6px 0 0; }
.db-add { max-width: 640px; margin: 12px 0 16px; }

/* ---------- columns ---------- */
.db-cols { display: none; }
.db-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.db-inbox { grid-column: 1 / -1; }
.db-lane { --lane: var(--db-do); display: flex; flex-direction: column; min-width: 0; min-height: 230px; border: 2px solid var(--edge);
  border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.db-inbox { --lane: var(--db-inbox); min-height: 0; }
.db-lane[data-col="doing"] { --lane: var(--db-doing); }
.db-lane[data-col="done"] { --lane: var(--db-done); }
/* the head keeps its fill in both themes, so its text is ink (white on the Inbox's slate) */
.db-lh { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px 10px; border-bottom: 2px solid var(--edge); background: var(--lane); color: #1b2125; }
.db-inbox .db-lh { color: #fff; }
.db-lh-t { flex: 1; min-width: 0; }
.db-lh h3 { margin: 0; color: inherit; font: 700 20px/1.1 var(--f-cond); }
.db-lh p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.3; }
.db-lh-i { flex: none; width: 24px; height: 24px; margin-top: 1px; }
.db-num { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: 1px; border: 2px solid #1b2125; border-radius: 50%;
  background: #fff; color: #1b2125; font: 800 13px/1 var(--f-ui); }
.db-lc { flex: none; margin-left: auto; min-width: 18px; text-align: right; font: 700 15px/26px var(--f-ui); font-variant-numeric: tabular-nums; }
.db-list { list-style: none; margin: 0; padding: 10px; display: grid; gap: 8px; align-content: start; }
.db-list:empty { display: none; }
.db-inbox .db-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.db-empty { margin: 10px; padding: 14px 12px; border: 2px dashed var(--line-2); border-radius: 10px; color: var(--muted); font-size: 14px; line-height: 1.35; text-align: center; }
.db-lane .db-empty:last-of-type { margin-bottom: auto; }
.tk .db-clear-done { align-self: flex-start; min-height: 40px; margin: 0 12px 6px; font-size: 14px; }

/* ---------- a card ---------- */
.db-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 2px; min-height: 52px;
  padding: 3px 3px 3px 12px; border: 2px solid var(--edge); border-radius: 10px; background: var(--surface); view-transition-class: db-card; }
.db-t { padding-block: 6px; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.db-card.done .db-t { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.db-acts { display: flex; align-items: center; }
.db-go, .db-sort, .db-card .tk-more { flex: none; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px;
  background: none; color: var(--ink); cursor: pointer; }
.db-go svg { width: 20px; height: 20px; }
.db-go:hover, .db-sort:hover { background: var(--surface-2); }
.db-sort span { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid #1b2125; border-radius: 50%; background: var(--sc);
  color: #1b2125; font: 800 13px/1 var(--f-ui); }
.db-sort[data-n="1"] { --sc: var(--db-do); }
.db-sort[data-n="2"] { --sc: var(--db-doing); }
.db-sort[data-n="3"] { --sc: var(--db-done); }
.db-sort:hover span { box-shadow: 2px 2px 0 var(--drop); }
.db-card .tk-more { color: var(--muted); }
.db-card .tk-more:hover, .db-card .tk-more[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }
.db .db-more { grid-column: 1 / -1; padding: 2px 0 7px; }
/* Inbox cards: on a narrow column the sort buttons get their own row under the task, with a small label */
.db-list { container-type: inline-size; }
.db-sort-l { display: none; }
@container (max-width: 420px) {
  .db-inbox .db-card { grid-template-columns: minmax(0, 1fr); padding: 3px 3px 3px 12px; }
  .db-inbox .db-t { padding-bottom: 0; }
  .db-inbox .db-acts { gap: 0; }
  .db-inbox .db-sort-l { display: block; flex: 1; font-size: 13px; color: var(--muted); }
}
@media (pointer: coarse) { .db-go, .db-sort, .db-card .tk-more { width: 44px; height: 44px; } }

/* ---------- the week ---------- */
.db-week > .tk-pane-h { justify-content: space-between; }
.db-box { margin-top: 14px; padding: 12px 14px 14px; border: 2px solid var(--edge); border-radius: 12px; background: var(--surface); }
.db-box .tk-sec-h h3 { font-size: 21px; }
.db-box > .tk-hint { margin: 2px 0 4px; }
.db-top-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.db-top-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.db-print-btn svg { width: 18px; height: 18px; flex: none; }
.db-tn { display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid #1b2125; border-radius: 50%; background: var(--db-do);
  color: #1b2125; font: 800 13px/1 var(--f-ui); }
.tk .tk-in.db-top-in { field-sizing: content; width: 100%; height: auto; min-height: 44px; max-block-size: 5lh; padding: 10px 2px 8px; border: 0;
  border-bottom: 2px solid var(--line-2); border-radius: 0; background: transparent; font-size: 15.5px; line-height: 1.35; resize: none; }
@supports not (field-sizing: content) { .tk .tk-in.db-top-in { min-height: 4.4em; } }   /* older browsers: room for two lines */
.tk .tk-in.db-top-in:focus { border-bottom-color: var(--focus); box-shadow: none; }
.db-top-row.done .db-top-in { color: var(--muted); text-decoration: line-through; }
.db-top-row .tk-ck:disabled { opacity: .35; cursor: default; }
.db-park-list .db-park-row { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 2px; min-height: 46px; padding: 2px 0; }
.db-park-t { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.db-park-list .tk-empty { padding: 8px 0; }
.db-park-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }
.db-reset-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; }
.db-reset-row { display: flex; min-height: 42px; color: var(--ink); line-height: 1.3; }
.db-reset-row.done span { color: var(--muted); text-decoration: line-through; }
.db-newweek-hint { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--yel-soft); color: var(--ink); font-size: 13.5px; line-height: 1.35; }
.db-newweek { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.db-newweek .tk-hint { flex: 1 1 160px; }
@media (min-width: 921px) and (max-width: 1159px) { .db-week .db-box { margin-top: 10px; } }

/* ---------- phones: one pane, one column at a time ---------- */
@media (max-width: 920px) {
  .db .tk-main { display: block; }
  .db[data-pane="board"] .db-week, .db[data-pane="week"] .db-board { display: none; }
  .db-week { background: var(--surface); min-height: 60vh; padding-top: 4px; }
  .db-add { max-width: none; margin: 4px 0 12px; }
  /* the column tabs: one row; on a very narrow screen it scrolls sideways and fades at the edge with more */
  .db-cols { --fade-size: 2rem; display: flex; gap: 6px; margin: 0 calc(-1 * var(--gutter)) 10px; padding: 11px var(--gutter) 4px;
    overflow-x: auto; scrollbar-width: none; scroll-padding-inline: var(--fade-size); }
  .db-cols::-webkit-scrollbar { display: none; }
  .db-cols button { position: relative; flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center;
    min-height: 46px; padding: 0 10px; border: 2px solid var(--edge); border-radius: 10px; background: var(--surface); color: var(--ink);
    font: 600 14px/1.1 var(--f-ui); white-space: nowrap; cursor: pointer; }
  .db-cols button:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
  /* the picked column: hub fill plus an underline (a border, so it still shows in forced colors); same size either way */
  .db-cols button[aria-selected="true"] { background: var(--yel); color: #1b2125; }
  .db-cols button[aria-selected="true"]::after { content: ""; position: absolute; inset: auto 10px 5px; border-bottom: 3px solid currentColor; border-radius: 2px; }
  /* the count sits on the tab's top right corner, so all four tabs fit on a phone */
  .db-ct-c { position: absolute; top: -10px; right: -5px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
    border: 2px solid var(--surface); border-radius: 99px; background: var(--ink); color: var(--surface); font: 700 12px/1 var(--f-ui); font-variant-numeric: tabular-nums; }
  .db-ct-c:empty { display: none; }
  .db-ct-c.zero { background: var(--surface-2); color: var(--muted); border-color: var(--surface); box-shadow: 0 0 0 1px var(--line-2); }
  .db-lanes { display: block; }
  .db-lanes .db-lane { display: none; min-height: 0; }
  .db-lanes[data-col="inbox"] .db-lane[data-col="inbox"], .db-lanes[data-col="do"] .db-lane[data-col="do"],
  .db-lanes[data-col="doing"] .db-lane[data-col="doing"], .db-lanes[data-col="done"] .db-lane[data-col="done"] { display: flex; }
  /* the tab already names the column: the head keeps its color and the hint */
  .db-lh { padding: 8px 12px; }
  .db-lh h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .db-lh p { margin: 0; font-size: 13.5px; }
  .db-lc { display: none; }
  .db-num, .db-lh-i { width: 22px; height: 22px; margin-top: 0; font-size: 11.5px; }
  .db-inbox .db-list { grid-template-columns: minmax(0, 1fr); }
  .db-list { padding: 10px; }
  .db-box { margin-top: 12px; }
}
} /* end screen */

/* the column tabs fade out at an edge with more past it (scroll-driven, where the browser has it; the
   --fade-start / --fade-end properties and their keyframes are in hubs.css, shared with Action Items and Class Schedule) */
@supports (animation-timeline: scroll()) {
  @media (max-width: 920px) {
    .db-cols { mask: linear-gradient(black, black) no-clip subtract,
        linear-gradient(to right, black, transparent) 0 0 / var(--fade-start) 100% no-repeat no-clip,
        linear-gradient(to right, transparent, black) 100% 0 / var(--fade-end) 100% no-repeat no-clip;
      animation: db-fade-start linear both, db-fade-end linear both; animation-timeline: scroll(self inline);
      animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%; }
  }
}

/* a card moving between columns (view transitions; desk-board.js skips them when the device asks for less motion) */
::view-transition-group(.db-card) { animation-duration: .24s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; }
}


/* ---------- the printed board (screen preview and paper) ---------- */
.st-paper .db-sheet { width: 816px; padding: 48px; box-shadow: 0 1px 2px rgba(17, 22, 24, .14), 0 10px 26px rgba(17, 22, 24, .14); }
.db-s-top { margin-top: 14px; }
.db-s-toplist li { align-items: center; padding: 4px 0; }
.db-s-tn { flex: none; width: 12px; font: 700 13px/1 var(--f-cond); color: var(--pt-head); }
.db-s-toplist .cs-line, .db-s-row .cs-line, .db-s-col .cs-line { flex: 1; height: 15px; border-bottom: 1px solid var(--pt-line); }
.db-s-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; border: 1.5px solid var(--pt-head); border-radius: 6px; overflow: hidden; }
.db-s-col { min-width: 0; padding: 0 10px 8px; }
.db-s-col + .db-s-col { border-left: 1px solid var(--pt-rule); }
.db-s-ch { display: flex; align-items: center; gap: 7px; margin: 0 -10px 6px; padding: 6px 10px; border-bottom: 1.5px solid var(--pt-head);
  background: var(--pt-band); font: 700 14px/1.2 var(--f-cond); color: var(--pt-head); }
.db-s-num { display: grid; place-items: center; width: 17px; height: 17px; border: 1.5px solid var(--pt-head); border-radius: 50%; background: #fff; font: 700 10px/1 var(--f-ui); }
.db-s-col .cs-list li { padding: 4px 0; }
.db-s-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 22px; margin-top: 16px; }
.db-s-row > section { min-width: 0; break-inside: avoid; page-break-inside: avoid; }
.db-sheet .ss-foot { margin-top: 16px; }

/* Ctrl+P on the Desk Board: the board and the week, without the buttons */
@media print {
  .db-cols, .db-add, .db-acts, .db-more, .db-clear-done, .db-print-btn, .db-park-add, .db-newweek, .db-park-row .tk-ib { display: none !important; }
  .db-lanes .db-lane { display: flex !important; }
  .db-week { display: block !important; }
  .db-lane, .db-card, .db-box { break-inside: avoid; }
}
