/* =========================================================================
 * Digital Life Cleanup Planner — styles. Adapted from the HEIC tool template.
 * Accent: warm brown #6d4c41 / deep #3e2723. Site: amber #f5a623,
 * ink #2a211b, 1200px container. Literal colours throughout, no CSS variables.
 * All motion disabled under prefers-reduced-motion.
 * ========================================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: #f6f5f2;
  color: #2a211b;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: #2a211b; color: #fff; padding: 10px 16px; border-radius: 10px;
  text-decoration: none; font-weight: 700; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e3ddd3;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #2a211b; font-weight: 800; font-size: 1.05rem; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #6d4c41, #3e2723);
  box-shadow: 0 10px 30px rgba(42, 33, 27, 0.08);
}
.brand-mark svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: #555555; text-decoration: none; font-weight: 600; font-size: 0.92rem;
  padding: 8px 12px; border-radius: 10px; transition: background 0.18s, color 0.18s;
}
.nav a:hover, .nav a:focus-visible { background: #f0ece6; color: #2a211b; outline: none; }

/* ---------------- hero ---------------- */
.hero {
  padding: 26px 0 10px;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(109, 76, 65, 0.12), transparent 60%),
    radial-gradient(700px 320px at 90% 10%, rgba(245, 166, 35, 0.12), transparent 60%);
}
.hero h1 {
  font-size: clamp(1.65rem, 3.4vw, 2.25rem);
  line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 6px; max-width: none;
}
.hero h1 .grad {
  background: linear-gradient(120deg, #6d4c41, #3e2723);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 1rem; color: #555555; max-width: none; margin: 0 0 12px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.trust-row li {
  display: inline-flex; align-items: center; gap: 7px;
  background: #ffffff; border: 1px solid #e3ddd3; border-radius: 999px;
  padding: 5px 11px; font-size: 0.82rem; font-weight: 600; color: #555555;
  box-shadow: 0 2px 8px rgba(42, 33, 27, 0.05);
}
.trust-row .dot { width: 7px; height: 7px; border-radius: 50%; background: #15803d; box-shadow: 0 0 0 3px #dcfce7; }

/* ---------------- tool card ---------------- */
.tool-section { padding: 8px 0 32px; }
.tool-card {
  background: #ffffff; border: 1px solid #e3ddd3;
  border-radius: 22px; box-shadow: 0 18px 50px rgba(109, 76, 65, 0.16);
  padding: clamp(18px, 3vw, 28px);
}
.step-title { font-weight: 800; margin: 0 0 10px; font-size: 1rem; }

/* score dashboard */
.score-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px; margin-bottom: 20px;
}
.score-cell {
  background: #f0ece6; border: 1px solid #e3ddd3;
  border-radius: 16px; padding: 14px 16px; min-width: 0;
}
.score-cell.hero-cell { background: #f3ece4; border-color: #d9c8b8; }
.score-cell dt { font-size: 0.8rem; font-weight: 700; color: #555555; margin: 0; }
.score-cell dd { font-size: 1.5rem; font-weight: 800; margin: 2px 0 0; overflow-wrap: anywhere; }
.score-cell.hero-cell dd { color: #3e2723; }
.score-cell .score-sub { font-size: 0.8rem; font-weight: 600; color: #8a8378; margin-top: 2px; }
.score-bar {
  height: 10px; border-radius: 99px; background: #e3ddd3;
  margin-top: 8px; overflow: hidden; min-width: 0;
}
.score-bar > span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #6d4c41, #3e2723);
  border-radius: 99px; transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 0.92rem; text-decoration: none;
  padding: 10px 18px; transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-primary { background: linear-gradient(135deg, #6d4c41, #3e2723); color: #fff; box-shadow: 0 6px 18px rgba(109, 76, 65, 0.35); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: #ffffff; border-color: #e3ddd3; color: #2a211b; }
.btn-ghost:hover:not(:disabled) { background: #f0ece6; }
.btn-ghost:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid rgba(109, 76, 65, 0.4); outline-offset: 2px; }
.action-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 20px;
}
.action-bar .action-note { font-size: 0.88rem; color: #15803d; font-weight: 700; margin-left: 4px; }

/* area sections */
.areas-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.area-card {
  background: #ffffff; border: 1px solid #e3ddd3; border-radius: 16px;
  padding: 16px 18px; min-width: 0;
}
.area-card.done-area { border-color: #bcd8c6; background: #f4faf5; }
.area-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.area-head h3 { font-size: 1.02rem; font-weight: 800; margin: 0; overflow-wrap: anywhere; }
.area-count { font-size: 0.85rem; font-weight: 800; color: #6d4c41; white-space: nowrap; }
.area-blurb { font-size: 0.88rem; color: #555555; margin: 4px 0 10px; }
.area-bar { height: 8px; border-radius: 99px; background: #f0ece6; overflow: hidden; margin: 0 0 12px; }
.area-bar > span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #6d4c41, #3e2723); border-radius: 99px; transition: width 0.4s; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.task { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.task input[type="checkbox"] {
  flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0;
  accent-color: #6d4c41; cursor: pointer;
}
.task label { cursor: pointer; min-width: 0; }
.task-title { font-weight: 700; font-size: 0.94rem; line-height: 1.4; overflow-wrap: anywhere; }
.task.done .task-title { text-decoration: line-through; color: #8a8378; }
.task-detail { font-size: 0.86rem; color: #555555; margin-top: 2px; overflow-wrap: anywhere; }
.task.done .task-detail { color: #8a8378; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  border-radius: 999px; padding: 2px 9px; border: 1px solid #e3ddd3;
  background: #f6f5f2; color: #555555; white-space: nowrap;
}
.chip-impact-high { background: #f3ece4; border-color: #d9c8b8; color: #3e2723; }
.chip-impact-medium { background: #fdf6e3; border-color: #f3d9a4; color: #713f12; }
.task-delete {
  margin-left: auto; flex: 0 0 auto; border: 1px solid #e3ddd3; background: #ffffff;
  color: #8a8378; border-radius: 8px; cursor: pointer; font: inherit;
  font-size: 0.8rem; font-weight: 700; padding: 2px 8px;
}
.task-delete:hover { color: #b91c1c; border-color: #f3c1c1; }

/* add-your-own form */
.add-form {
  margin-top: 20px; background: #f6f5f2; border: 1px solid #e3ddd3;
  border-radius: 16px; padding: 16px 18px;
}
.add-form h3 { margin: 0 0 4px; font-size: 1rem; }
.add-form p { margin: 0 0 12px; font-size: 0.88rem; color: #555555; }
.add-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.add-grid label { display: block; font-size: 0.8rem; font-weight: 700; color: #555555; margin-bottom: 4px; }
.add-grid input, .add-grid select {
  width: 100%; font: inherit; font-size: 0.92rem; color: #2a211b;
  border: 2px solid #e3ddd3; border-radius: 12px; padding: 9px 12px; background: #ffffff;
  min-width: 0;
}
.add-grid input:focus, .add-grid select:focus { border-color: #6d4c41; outline: none; box-shadow: 0 0 0 3px rgba(109, 76, 65, 0.18); }
.add-error { color: #b91c1c; font-size: 0.88rem; font-weight: 700; margin: 8px 0 0; }

/* queue */
.queue-section { margin-top: 24px; }
.queue-section h3 { margin: 0 0 4px; font-size: 1.05rem; }
.queue-section > p { margin: 0 0 12px; font-size: 0.9rem; color: #555555; }
.queue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: queue; }
.queue-item {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px;
  align-items: start; background: #ffffff; border: 1px solid #e3ddd3;
  border-radius: 12px; padding: 12px 14px; min-width: 0;
}
.queue-item:first-child { border-color: #6d4c41; background: #f3ece4; }
.queue-rank {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: #6d4c41; color: #fff; font-weight: 800; font-size: 0.9rem; flex: 0 0 auto;
}
.queue-item:first-child .queue-rank { background: #3e2723; }
.queue-title { font-weight: 700; font-size: 0.94rem; overflow-wrap: anywhere; }
.queue-sub { font-size: 0.85rem; color: #555555; overflow-wrap: anywhere; }
.queue-time { font-weight: 800; color: #3e2723; font-size: 0.9rem; white-space: nowrap; }
.queue-empty {
  background: #f4faf5; border: 1px solid #bcd8c6; border-radius: 12px;
  padding: 16px 18px; color: #15803d; font-weight: 700;
}
.queue-empty p { margin: 0; }

/* privacy */
.privacy { padding: 8px 0 44px; }
.privacy-card {
  background: linear-gradient(135deg, #241a15, #3e2723);
  color: #f7efe9; border-radius: 22px; padding: clamp(22px, 3vw, 36px);
  box-shadow: 0 18px 50px rgba(109, 76, 65, 0.16);
}
.privacy-card h2 { color: #fff; margin: 0 0 10px; font-size: 1.4rem; }
.privacy-card p { margin: 0 0 16px; }
.net-meter {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px; padding: 9px 16px; font-weight: 700; color: #fff;
}
.net-meter b { font-size: 1.15rem; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #34d399; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
}
.verify-steps { margin: 16px 0 0; padding-left: 20px; }
.verify-steps li { margin: 6px 0; }
kbd {
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px; padding: 1px 7px; font: inherit; font-size: 0.85em;
}
.tool-card kbd, .content kbd {
  background: #f0ece6; border-color: #e3ddd3; color: #2a211b;
}

/* content */
.content { padding: 20px 0 44px; }
.content h2 { font-size: 1.5rem; letter-spacing: -0.01em; margin: 0 0 12px; }
.content h3 { font-size: 1.08rem; margin: 26px 0 8px; }
.content p, .content li { color: #555555; }
.content ol, .content ul { padding-left: 22px; }
.content li { margin: 6px 0; }
.content table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.93rem; }
.table-wrap { overflow-x: auto; }
.content th, .content td { border: 1px solid #e3ddd3; padding: 8px 10px; text-align: left; }
.content th { background: #f0ece6; font-weight: 800; color: #2a211b; }
.prose-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.prose-card { background: #ffffff; border: 1px solid #e3ddd3; border-radius: 16px; padding: 16px 18px; }
.prose-card h3 { margin: 0 0 6px; }
.prose-card p { margin: 0; font-size: 0.93rem; }

.faq details {
  background: #ffffff; border: 1px solid #e3ddd3; border-radius: 14px;
  padding: 14px 18px; margin: 10px 0;
}
.faq summary { font-weight: 700; cursor: pointer; }
.faq summary:focus-visible { outline: 3px solid rgba(109, 76, 65, 0.35); outline-offset: 2px; border-radius: 6px; }
.faq details p { margin: 10px 0 2px; }

/* footer — one small, quiet line */
.site-footer { border-top: 1px solid #e3ddd3; padding: 18px 0 26px; color: #8a8378; font-size: 0.85rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer .footer-note { color: #8a8378; }
.site-footer a { color: #3e2723; }

/* print: only the plan itself */
.print-only { display: none; }
@media print {
  .site-header, .hero, .privacy, .content, .site-footer, .action-bar, .add-form { display: none !important; }
  body { background: #fff; }
  .tool-section { padding: 0; }
  .tool-card { box-shadow: none; border: none; padding: 0; }
  .areas-grid, .queue-section { display: none; }
  .print-only { display: block; }
  .print-only h2 { font-size: 1.3rem; margin: 0 0 8px; }
  .print-only ul { padding-left: 20px; }
  .print-only li { margin: 4px 0; }
}

/* responsive */
@media (max-width: 860px) {
  .areas-grid { grid-template-columns: 1fr; }
  .score-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .add-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .hero { padding: 20px 0 8px; }
  .action-bar { display: grid; grid-template-columns: 1fr; }
  .action-bar .btn { width: 100%; }
  .add-grid { grid-template-columns: minmax(0, 1fr); }
  .queue-item { grid-template-columns: 30px minmax(0, 1fr); }
  .queue-time { grid-column: 2; }
  .site-footer .wrap { flex-direction: column; gap: 2px; }
}
@media (max-width: 420px) {
  .score-board { grid-template-columns: minmax(0, 1fr); }
}

/* reduced motion: kill every animation */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
