:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #191c1c;
  background: #f4f4f0;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background-color: #f4f4f0;
  background-image: linear-gradient(#1c37390a 1px, transparent 1px),
    linear-gradient(90deg, #1c37390a 1px, transparent 1px);
  background-size: 32px 32px;
}

button, input, select { font: inherit; }

button { cursor: pointer; }

.skip-link {
  position: absolute;
  z-index: 10;
  top: -60px;
  left: 16px;
  padding: 12px 16px;
  color: #fff;
  background: #006a51;
}

.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid #006a51; outline-offset: 3px; }

.site-header, .page-layout { width: min(100% - 48px, 1180px); margin-inline: auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid #1b272530;
}

.brand, .header-badge, .eyebrow, .summary-label, .intro-note, .panel-topline,
.task-form label, .list-heading span, .panel-footer {
  font-family: "Courier New", Courier, monospace;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .075em;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: block; width: 34px; height: 34px; flex: none; }

.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }

.header-badge {
  padding: 9px 12px;
  border: 1px solid #c6e3d5;
  border-radius: 4px;
  color: #006248;
  background: #e6f4eb;
}

.header-badge span { margin-right: 4px; }

.auth-button {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #005f49;
  border-radius: 4px;
  color: #fff;
  background: #007459;
  font-weight: 700;
}
.auth-button:hover:not(:disabled) { background: #005f49; }
.auth-button:disabled { opacity: .65; cursor: wait; }
.auth-button[hidden], .user-button[hidden] { display: none; }
.user-button { min-width: 36px; min-height: 36px; }

.auth-dialog { width: 100%; margin-top: 16px; border: 1px solid #c8cfca; border-radius: 7px; background: #f8faf8; }
.auth-dialog[hidden] { display: none; }
.auth-form { display: grid; gap: 10px; padding: 20px; }
.auth-dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.auth-dialog-heading h2 { font-size: 1.9rem; }
.auth-dialog-heading button { width: 44px; height: 44px; border: 0; color: #484f4b; background: transparent; font-size: 1.8rem; }
.auth-form p { margin: 0 0 8px; color: #58615d; line-height: 1.5; }
.auth-form label { font-weight: 700; }
.auth-form input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #8e9993; border-radius: 5px; }
#auth-password-field { display: grid; gap: 10px; }
#auth-password-field[hidden] { display: none; }
.auth-submit { min-height: 44px; margin-top: 10px; border: 1px solid #005f49; border-radius: 5px; color: #fff; background: #007459; font-weight: 700; }
.auth-submit:disabled { opacity: .65; }
.auth-link { min-height: 44px; border: 0; color: #006b52; background: transparent; text-decoration: underline; }
.auth-link[hidden], .auth-form .error-status[hidden] { display: none; }

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding-block: clamp(42px, 7vw, 96px);
}

.intro { padding-top: clamp(8px, 4vw, 55px); }
.eyebrow { margin: 0 0 22px; color: #006b52; }

h1 {
  margin: 0;
  font-size: clamp(3.7rem, 6.6vw, 6.7rem);
  font-weight: 900;
  letter-spacing: -.085em;
  line-height: .98;
}

h1 span { color: #00785c; }

.intro-copy {
  max-width: 390px;
  margin: 28px 0 36px;
  color: #4b5451;
  font-size: 1.05rem;
  line-height: 1.65;
}

.summary-card {
  position: relative;
  max-width: 440px;
  padding: 22px 24px 24px;
  border: 1px solid #005f49;
  border-radius: 7px;
  color: #fff;
  background: #007459;
  box-shadow: 4px 4px 0 #1a2623;
}

.summary-label { color: #d5f3e7; }
.summary-content { display: flex; align-items: baseline; gap: 13px; margin-top: 10px; }
.summary-content strong { font-size: 3.5rem; line-height: 1; }
.summary-content span { font-size: .95rem; }
.summary-arrow { position: absolute; right: 22px; bottom: 19px; font-size: 1.5rem; }
.intro-note { margin-top: 26px; color: #68726e; }

.task-panel {
  overflow: hidden;
  border: 1px solid #222927;
  border-radius: 9px;
  background: #fff;
  box-shadow: 5px 5px 0 #1a2623;
}

.panel-topline, .panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.panel-topline { border-bottom: 1px solid #dfe3df; }
.panel-indicator { color: #007459; }
.panel-content { padding: 28px 24px 34px; }
.panel-heading { display: flex; justify-content: space-between; gap: 16px; }

h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: 1;
}

.panel-heading p { margin: 10px 0 0; color: #58615d; }
.storage-notice { margin: 18px 0 0; color: #484f4b; font-size: .83rem; line-height: 1.5; }
.import-button { margin-top: 8px; padding: 6px 0; border: 0; color: #006b52; background: transparent; font-weight: 700; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.import-button:hover { color: #004c3a; }
.import-button[hidden] { display: none; }
.auth-status { margin: 6px 0 0; color: #58615d; font-size: .8rem; line-height: 1.4; }
.error-status { margin: 12px 0 0; color: #a22929; font-size: .85rem; line-height: 1.5; }
.sign-up-button { margin-top: 8px; padding: 6px 0; border: 0; color: #006b52; background: transparent; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.sign-up-button:hover { color: #004c3a; }
.sign-up-button[hidden] { display: none; }

.task-total {
  align-self: start;
  padding: 8px 10px;
  border: 1px solid #d6ddd7;
  border-radius: 4px;
  color: #006b52;
  font-family: "Courier New", Courier, monospace;
  font-size: .85rem;
  font-weight: 700;
}

.task-form { margin-top: 36px; }
.task-form label { display: block; margin-bottom: 12px; color: #006b52; }
.form-row { display: flex; gap: 10px; }

.form-row input {
  width: 100%;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid #8e9993;
  border-radius: 5px;
  color: #191c1c;
  background: #fff;
}

.form-row input::placeholder { color: #65706a; }

.form-row button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex: none;
  min-height: 44px;
  padding: 15px 18px;
  border: 1px solid #005f49;
  border-radius: 5px;
  color: #fff;
  background: #007459;
  font-weight: 700;
}

.form-row button:hover { background: #005f49; }
.form-row button span { font-size: 1.2rem; }

.schedule-field { margin-top: 18px; }
.schedule-title { display: block; margin-bottom: 12px; color: #006b52; font-family: "Courier New", Courier, monospace; font-size: .75rem; font-weight: 700; letter-spacing: .075em; }
.calendar { width: min(100%, 310px); padding: 12px; border: 1px solid #c8cfca; border-radius: 7px; background: #fff; }
.calendar-caption { display: flex; gap: 8px; margin-bottom: 12px; }
.calendar-caption select { min-width: 0; min-height: 40px; padding: 7px; border: 1px solid #8e9993; border-radius: 4px; background: #fff; }
.calendar-caption select:first-of-type { flex: 1; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.calendar-weekdays { margin-bottom: 4px; color: #58615d; font-size: .75rem; font-weight: 700; }
.calendar-weekdays span { padding-block: 6px; }
.calendar-days button { aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid transparent; border-radius: 4px; color: #191c1c; background: transparent; }
.calendar-days button:hover { background: #e6f4eb; }
.calendar-days button.is-today { border-color: #007459; }
.calendar-days button[aria-pressed="true"] { color: #fff; background: #007459; }
.date-choice { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: min(100%, 310px); margin: 10px 0 16px; color: #484f4b; font-size: .82rem; }
.date-choice button { min-height: 40px; padding: 5px 8px; border: 1px solid #c8cfca; border-radius: 4px; color: #006b52; background: #fff; }
.date-choice button:disabled { color: #87908b; cursor: default; }
.schedule-field input[type="time"] {
  display: block;
  width: min(100%, 160px);
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #8e9993;
  border-radius: 5px;
  color: #191c1c;
  background: #fff;
}
.schedule-field input[type="time"]:disabled { color: #87908b; background: #f4f4f0; }
.schedule-field p { margin: 9px 0 0; color: #58615d; font-size: .82rem; line-height: 1.5; }

.list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 42px;
  padding-bottom: 12px;
  border-bottom: 1px solid #c8cfca;
}

.list-heading h3 { margin: 0; font-size: 1.05rem; }
.list-heading span { color: #006b52; }
.task-list { padding: 0; margin: 0; list-style: none; }

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #e1e6e1;
}

.task-item input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: #007459; }
.task-details { display: grid; flex: 1; min-width: 0; gap: 3px; }
.task-text { padding-block: 4px; overflow-wrap: anywhere; cursor: pointer; }
.task-date { color: #58615d; font-size: .8rem; line-height: 1.4; }
.task-item.is-complete .task-text { color: #66716c; text-decoration: line-through; }

.delete-button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #d7dcd8;
  border-radius: 4px;
  color: #484f4b;
  background: #fff;
}

.delete-button:hover { border-color: #943f3f; color: #943f3f; }

.empty-state { padding: 45px 16px 35px; text-align: center; }
.empty-state[hidden] { display: none; }

.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 49px;
  height: 49px;
  border: 1px solid #c6e3d5;
  border-radius: 7px;
  color: #006b52;
  background: #e6f4eb;
  font-size: 1.5rem;
}

.empty-state p { margin: 16px 0 6px; font-weight: 700; }
.empty-state > span:last-child { color: #58615d; font-size: .92rem; }

.panel-footer { border-top: 1px solid #dfe3df; color: #56625c; font-size: .65rem; }
.panel-footer span { color: #007459; }

.visually-hidden {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 840px) {
  .page-layout { grid-template-columns: 1fr; gap: 45px; }
  .intro { padding-top: 0; }
  h1 { font-size: clamp(3.6rem, 10vw, 5.8rem); }
  .intro-copy { margin-bottom: 24px; }
  .summary-card { max-width: none; }
}

@media (max-width: 520px) {
  .site-header, .page-layout { width: min(100% - 30px, 1180px); }
  .site-header { min-height: 66px; gap: 10px; }
  .header-actions { gap: 8px; }
  .header-badge { display: none; }
  .brand { font-size: .68rem; }
  .page-layout { padding-top: 46px; }
  h1 { font-size: clamp(3.1rem, 13vw, 4rem); }
  .panel-content { padding-inline: 17px; }
  .panel-topline, .panel-footer { padding-inline: 17px; }
  .form-row { flex-direction: column; }
  .form-row button { justify-content: space-between; }
}
