/* Eisenhower matrix template — tool-specific styles (MacPlus shared.css for chrome) */

.em-page .header-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 6px 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.em-page .header-back-link:hover {
  border-color: var(--text-secondary);
  text-decoration: none;
}

.em-page main {
  padding-top: 1.25rem;
}

.em-page .page-intro {
  max-width: 42rem;
  margin-bottom: 1rem;
}

.em-page .lead {
  margin: 0 0 0.75rem;
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

.em-page .privacy-line {
  margin: 0;
}

.em-tool {
  margin: 0 0 1.25rem;
}

.matrix-sheet {
  color-scheme: light;
  background: #fffcf7;
  color: #1d1d1f;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 0.9rem 1rem 1rem;
}

.matrix-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.matrix-sheet label,
.move-caption {
  color: #314152;
}

.field-title label,
.field-date label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.matrix-meta input {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid #c5d0dc;
  border-radius: 8px;
  background: #fff;
  color: #1d1d1f;
  font: inherit;
  font-size: 1rem;
}

.field-title input {
  font-weight: 650;
}

.field-date input {
  width: 11.5rem;
  max-width: 100%;
}

.matrix-hint {
  margin: 0 0 0.65rem;
  color: #314152;
  font-size: 0.8125rem;
}

.board {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(10.5rem, 1fr) minmax(10.5rem, 1fr);
  gap: 0.4rem 0.65rem;
  min-width: 0;
}

.axis-col,
.axis-row {
  color: #314152;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.axis-col {
  align-self: end;
  text-align: center;
  padding-bottom: 0.1rem;
}

.axis-row {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  align-self: center;
  justify-self: center;
  white-space: nowrap;
}

.quadrant {
  --q: #8aa0b8;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 10.5rem;
  padding: 0.65rem 0.7rem 0.7rem;
  border-radius: 10px;
  background: #f4f6f8;
  box-shadow: inset 0 3px 0 var(--q);
}

.q-do {
  --q: #c94b3a;
  background: #fdecea;
}

.q-schedule {
  --q: #1f8a4d;
  background: #e5f4eb;
}

.q-delegate {
  --q: #c4841d;
  background: #fff6df;
}

.q-eliminate {
  --q: #5c6b7a;
  background: #eef1f4;
}

.quadrant.is-drop {
  outline: 2px solid #005bb5;
  outline-offset: -2px;
}

.quadrant h2 {
  margin: 0;
  color: #1d1d1f;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.q-sub,
.empty {
  margin: 0.1rem 0 0.55rem;
  color: #314152;
  font-size: 0.8125rem;
}

.empty {
  margin-bottom: 0.45rem;
}

.quadrant:has(.task) .empty {
  display: none;
}

.task-list {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.task {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 0.4rem;
  align-items: center;
  min-width: 0;
  padding: 0.35rem;
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.task.is-dragging {
  opacity: 0.45;
}

.matrix-sheet button,
.matrix-sheet select {
  font: inherit;
  color: #1d1d1f;
  background: #fff;
  border: 1px solid #c5d0dc;
  border-radius: 8px;
  min-height: 40px;
  cursor: pointer;
}

.matrix-sheet button {
  padding: 0.35rem 0.65rem;
}

.matrix-sheet button:hover,
.matrix-sheet select:hover {
  border-color: #314152;
}

.drag-handle {
  display: grid;
  place-items: center;
  width: 40px;
  padding: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  color: #314152;
}

.drag-handle svg {
  display: block;
  fill: currentColor;
}

.task-text,
.add-form input {
  min-width: 0;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid #c5d0dc;
  border-radius: 8px;
  background: #fff;
  color: #1d1d1f;
  font: inherit;
  font-size: 1rem;
}

.task-text {
  width: 100%;
}

.task-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

@container (min-width: 440px) {
  .task {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  .task-text {
    grid-column: 2;
    grid-row: 1;
  }

  .task-actions {
    grid-column: 3;
    grid-row: 1;
    flex-wrap: nowrap;
  }

  .move-caption {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

.move {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.move select {
  min-width: 0;
  max-width: 11rem;
  padding: 0 0.45rem;
}

.add-form {
  position: relative;
  display: flex;
  gap: 0.35rem;
  margin-top: auto;
}

.add-form input {
  flex: 1 1 auto;
  width: auto;
}

.matrix-sheet input:focus-visible,
.matrix-sheet select:focus-visible,
.matrix-sheet button:focus-visible {
  outline: 2px solid #005bb5;
  outline-offset: 2px;
}

.matrix-sheet input::placeholder {
  color: #3d4c5c;
  opacity: 1;
}

.drag-ghost {
  position: fixed;
  z-index: 2000;
  max-width: min(280px, 70vw);
  padding: 0.45rem 0.65rem;
  border: 1px solid #8aa0b8;
  border-radius: 8px;
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 10px 28px rgba(29, 29, 31, 0.18);
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.3;
  pointer-events: none;
  transform: translate(-12px, -130%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.em-dragging,
body.em-dragging * {
  cursor: grabbing !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.em-page .downloads,
.em-page .seo,
.em-page .faq,
.em-page .cta {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem 1.15rem;
  margin: 0 0 1rem;
}

.em-page .seo,
.em-page .faq,
.em-page .cta {
  max-width: 44rem;
}

.em-page .downloads h2,
.em-page .seo h2,
.em-page .faq h2,
.em-page .cta h2 {
  margin: 0 0 0.4rem;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.em-page .downloads h3 {
  margin: 0.9rem 0 0.45rem;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.em-page .downloads p,
.em-page .seo p,
.em-page .faq p,
.em-page .cta p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

.dl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.em-page .downloads button {
  font: inherit;
  color: inherit;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  min-height: 40px;
  cursor: pointer;
}

.em-page .downloads button:hover {
  border-color: var(--text-secondary);
}

.em-page .downloads button.primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.save-status {
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.em-page .seo h3,
.em-page .faq h3 {
  margin: 1.25rem 0 0.35rem;
  font-size: 1rem;
}

.em-page .seo ol,
.em-page .seo ul {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}

.em-page .seo li {
  margin: 0.35rem 0;
  line-height: 1.5;
}

.em-page .faq details {
  border-top: 1px solid var(--border);
  padding: 0.7rem 0;
}

.em-page .faq details:last-of-type {
  border-bottom: 1px solid var(--border);
}

.em-page .faq summary {
  cursor: pointer;
  font-weight: 600;
}

.em-page .faq details p {
  margin: 0.45rem 0 0.2rem;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  font-weight: 650;
  text-decoration: none;
}

.cta-link:hover {
  color: var(--bg);
  text-decoration: none;
  opacity: 0.92;
}

.em-nav {
  margin: 0.85rem 0 0;
}

@media (max-width: 799px) {
  .matrix-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-date input {
    width: 100%;
  }

  .axis-corner,
  .axis-col,
  .axis-row {
    display: none;
  }

  .board {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .dl-row button {
    flex: 1 1 calc(50% - 0.5rem);
  }
}

@media (max-width: 420px) {
  .dl-row button {
    flex: 1 1 100%;
  }
}

@media print {
  body::before,
  .site-header,
  .site-footer,
  .page-intro,
  .downloads,
  .seo,
  .faq,
  .cta,
  .save-status,
  .skip-link,
  .matrix-hint,
  .drag-handle,
  .task-actions,
  .add-form,
  .empty,
  .axis-corner,
  .axis-col,
  .axis-row {
    display: none !important;
  }

  body,
  main {
    margin: 0;
    padding: 0;
    max-width: none;
    background: #fff;
  }

  .em-tool,
  .matrix-sheet {
    margin: 0;
    max-width: none;
  }

  .matrix-sheet {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .board {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 8px !important;
  }

  .quadrant {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #8aa0b8;
  }

  .task {
    background: transparent;
    border: 0;
    padding: 0;
  }

  .task-text {
    border: 0;
    padding: 0;
    background: transparent;
  }
}

@page {
  size: A4;
  margin: 12mm;
}
