:root {
  color-scheme: light;
  --paper: #f5f4ee;
  --ink: #252b24;
  --muted: #667162;
  --line: #dce0d5;
  --green: #355b40;
  --cream: #e8eddf;
  --white: #fffef9;
  --amber: #856029;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.6;
}
.masthead,
main,
footer {
  max-width: 1280px;
  margin: auto;
  padding: 0 40px;
}
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 38px;
  padding-bottom: 28px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin: 0 0 10px;
  color: var(--muted);
}
h1,
h2,
h3,
h4 {
  font-family: Manrope, system-ui, sans-serif;
  line-height: 1.25;
  margin: 0;
}
h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.06em;
}
h1 span {
  color: var(--green);
}
h2 {
  font-size: 24px;
  letter-spacing: -0.035em;
}
h3 {
  font-size: 17px;
}
h4 {
  font-size: 15px;
}
.header-meta {
  text-align: right;
  font-size: 13px;
  color: var(--muted);
}
.read-only {
  border: 1px solid var(--line);
  padding: 8px 13px;
  border-radius: 30px;
  font-size: 12px;
}
main {
  padding-top: 32px;
  padding-bottom: 40px;
}
.section-title {
  margin-bottom: 20px;
}
.section-title p {
  margin: 8px 0 0;
  font-size: 13px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.overview-hero {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 20px;
}
.overview-hero h2 {
  font-size: 32px;
  max-width: 850px;
}
.overview-hero p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}
.series-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  background: var(--cream);
  border: 1px solid #d5deca;
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 20px;
}
.series-value {
  display: flex;
  gap: 10px;
  align-items: baseline;
  line-height: 1.05;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 64px;
  letter-spacing: -0.06em;
  font-weight: 700;
}
.series-value .unit {
  font-size: 22px;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 400;
}
.series-hero p:last-child {
  margin: 10px 0 0;
  font-size: 13px;
}
.progress-area h3 {
  font-size: 23px;
}
progress {
  display: block;
  width: 100%;
  height: 10px;
  margin-top: 20px;
  accent-color: var(--green);
  border: 0;
  border-radius: 10px;
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: #d5decb;
}
progress::-webkit-progress-value {
  background: var(--green);
}
progress::-moz-progress-bar {
  background: var(--green);
}
.progress-label {
  color: var(--green);
  text-align: right;
}
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}
.card h2 {
  font-size: 20px;
}
.plan-item {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
summary {
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
.plan-item > .item-heading {
  display: flex;
  align-items: start;
  gap: 10px;
}
.item-title {
  flex: 1;
  min-width: 0;
}
.item-title h3 {
  font-size: 14px;
  line-height: 1.4;
}
.item-title p {
  font-size: 11px;
  margin: 5px 0 0;
}
.item-emoji {
  font-size: 18px;
}
.badge {
  display: inline-block;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  background: #eef0e9;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
}
.warning {
  color: var(--amber);
  background: #f6eedc;
}
.complete {
  color: var(--green);
  background: #e1ebdf;
}
.item-detail,
.activity-description {
  padding: 10px 0 0 28px;
  font-size: 14px;
  white-space: pre-wrap;
}
.source {
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.warning-text {
  font-size: 13px;
  color: var(--amber);
}
.series-name {
  margin: 25px 0 20px;
}
.activity {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.activity > .activity-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.activity h4 {
  flex: 1;
  min-width: 180px;
}
.activity-icon {
  color: var(--green);
  font-size: 16px;
  width: 14px;
}
.activity.locked,
.activity.ended {
  color: var(--muted);
}
.activity.completed h4 {
  text-decoration: line-through;
  text-decoration-color: #afbcab;
}
.activity-description p {
  margin: 5px 0 8px;
}
.stages {
  margin: 30px 0;
}
.stage {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 12px;
}
.stage.current {
  border-color: var(--green);
}
.stage > .stage-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.stage-date {
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0;
}
.filters {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
input,
select {
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 7px;
  padding: 11px 14px;
  font-size: 14px;
}
input {
  min-width: 280px;
}
.month {
  padding: 22px 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 20px;
}
.month > h2 {
  text-transform: capitalize;
  margin-bottom: 20px;
}
.error {
  border: 1px solid #d8a18f;
  background: #fbede5;
  padding: 28px;
  border-radius: 14px;
}
.error p {
  overflow-wrap: anywhere;
}
footer {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  padding-bottom: 30px;
  font-size: 12px;
  color: var(--muted);
}
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #789268;
  outline-offset: 5px;
}
@media (max-width: 1000px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .overview-grid .card {
    margin-bottom: 0;
  }
  .overview-grid {
    margin-bottom: 20px;
  }
}
@media (max-width: 650px) {
  .masthead,
  main,
  footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  .masthead {
    align-items: start;
    gap: 16px;
  }
  h1 {
    font-size: 34px;
  }
  .header-meta {
    font-size: 11px;
  }
  .read-only {
    font-size: 10px;
    padding: 7px;
  }
  .series-hero {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 20px;
  }
  .series-value {
    font-size: 54px;
  }
  .overview-hero {
    padding: 24px;
  }
  .overview-hero h2 {
    font-size: 26px;
  }
  .card,
  .month,
  .stage {
    padding: 20px;
  }
  .filters {
    flex-direction: column;
  }
  input {
    min-width: 0;
    width: 100%;
  }
  .activity > .activity-heading {
    gap: 8px;
  }
  .activity h4 {
    min-width: calc(100% - 35px);
  }
  .plan-item > .item-heading {
    flex-wrap: wrap;
  }
  .item-title {
    flex-basis: 75%;
  }
  .stage > .stage-heading h3 {
    font-size: 16px;
  }
}

.motivation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 30px;
  align-items: start;
}
.motivation-panel {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}
.now-panel {
  border-top: 4px solid var(--green);
}
.next-panel {
  border-top: 4px solid #997143;
  background: #f5efe5;
}
.motivation-panel .section-title {
  margin-bottom: 22px;
}
.motivation-panel .activity {
  margin-top: 16px;
}
.motivation-panel .activity h4 {
  font-size: 17px;
}
.motivation-panel .activity-description {
  padding: 12px 0 0 24px;
  font-size: 15px;
  line-height: 1.8;
}
.motivation-panel .activity.locked {
  color: var(--ink);
}
.next-panel .activity-icon {
  color: #997143;
}
@media (max-width: 850px) {
  .motivation-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .motivation-panel {
    padding: 22px 20px;
  }
}

.series-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 28px;
}
.series-selector button {
  font: inherit;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
  border-radius: 30px;
  padding: 10px 18px;
  cursor: pointer;
}
.series-selector button.selected {
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
}
.task-type {
  border: 1px solid var(--line);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.task-explanation {
  max-width: min(360px, calc(100vw - 40px));
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--white);
  font-size: 14px;
  line-height: 1.7;
  box-shadow: 0 10px 40px #252b2422;
}
.task-explanation::backdrop {
  background: transparent;
}

.theme-romantico {
  --green: #a83f6d;
  --cream: #f9e9f0;
  --line: #ead0dc;
  --muted: #765d6a;
}
.theme-romantico .series-hero {
  background: linear-gradient(120deg, #fce9f1, #f7eaf6);
  border-color: #eac9da;
}
.theme-romantico .now-panel {
  background: #fff9fc;
}
.theme-romantico .next-panel {
  background: #f9eef8;
  border-top-color: #b776a2;
}
.theme-romantico .next-panel .activity-icon {
  color: #a85786;
}
.theme-romantico progress::-webkit-progress-bar {
  background: #efd4e1;
}
.theme-romantico .badge {
  background: #f6e7ee;
  color: #8a3e61;
}
.carry-over {
  white-space: normal;
  background: #f7ecd9;
  color: #765520;
}
.theme-romantico .carry-over {
  background: #f8dfeb;
  color: #8a3e61;
}

.task-progress {
  padding: 12px 0 0 24px;
}
.task-progress progress {
  margin-top: 6px;
  height: 7px;
}
.task-progress-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.task-explanation {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(360px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow: auto;
}

.brand {
  color: inherit;
  text-decoration: none;
}
.header-right {
  max-width: 760px;
}
.header-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 20px;
}
.header-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  padding: 5px 0;
}
.header-links a[aria-current] {
  color: var(--green);
  border-bottom: 2px solid var(--green);
}
.header-date {
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}
.overview-block {
  margin-bottom: 34px;
}
.linked-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}
.more-link,
.back-link {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}
.more-link:hover,
.back-link:hover {
  text-decoration: underline;
}
.back-link {
  display: inline-block;
  margin-bottom: 22px;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.location-card,
.project-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 28px;
  background: var(--white);
}
.current-location {
  border-top: 4px solid var(--green);
}
.location-card h3 {
  font-size: 28px;
}
.location-description {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 15px;
}
.location-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.location-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.location-metric strong {
  font-size: 15px;
}
.location-grid,
.location-timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.item-description {
  font-size: 13px;
  margin: 5px 0;
  color: var(--muted);
}
.project-link {
  text-decoration: none;
  color: var(--ink);
}
.project-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.project-card h3 {
  font-size: 24px;
}
.project-value {
  font-size: 36px;
  font-weight: 700;
  margin: 16px 0 0;
}
.project-card .more-link {
  margin-top: 20px;
}
.project-card.theme-romantico {
  background: #fff8fc;
  border-color: #efd2df;
}
.urgency-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.task-filter {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
}
.task-item {
  border-left: 4px solid #c4cbbf;
  padding-left: 14px;
  margin-bottom: 8px;
}
.task-item.urgency-overdue,
.task-item.urgency-critical {
  border-left-color: #ac4242;
}
.task-item.urgency-soon {
  border-left-color: #b7772b;
}
.task-item.urgency-upcoming {
  border-left-color: #9d8b37;
}
.task-item.urgency-done {
  border-left-color: #688662;
}
.urgency-badge.overdue,
.urgency-badge.critical {
  background: #f8e3e0;
  color: #913d37;
}
.urgency-badge.soon {
  background: #f8ecd9;
  color: #906022;
}
.urgency-badge.upcoming {
  background: #f3efda;
  color: #7e6e27;
}
.urgency-badge.done {
  background: #e1ebdf;
  color: var(--green);
}
a:focus-visible {
  outline: 3px solid #789268;
  outline-offset: 5px;
}
@media (max-width: 850px) {
  .masthead {
    flex-wrap: wrap;
    gap: 20px;
  }
  .header-links {
    justify-content: flex-start;
  }
  .header-date {
    text-align: left;
  }
}
@media (max-width: 650px) {
  .location-grid,
  .project-grid,
  .location-timeline {
    grid-template-columns: 1fr;
  }
  .location-card,
  .project-card {
    padding: 24px 20px;
  }
  .location-card h3 {
    font-size: 24px;
  }
}

.project-card {
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow 150ms ease, transform 150ms ease;
}
.project-card:hover {
  box-shadow: 0 6px 20px #233d3914;
  transform: translateY(-2px);
}
.project-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.project-icon { font-size: 34px; }
.theme-nautical { --green: #387ca5; --line: #c9e2ee; }
.project-card.theme-nautical,
.theme-nautical .card {
  background: #f0f9ff;
  border-color: #c9e2ee;
}
.task-item .item-detail:empty { display: none; }

/* Shared row rhythm; longer descriptions remain fully visible. */
.task-list {
  display: grid;
  grid-auto-rows: 1fr;
  gap: 14px;
}
.task-item {
  min-height: 150px;
  margin: 0;
  padding: 20px 22px;
  border-top: 0;
  border-radius: 10px;
  background: #f7f8fa;
}
.task-item > .item-heading { align-items: flex-start; }
.task-item .item-emoji {
  color: #667180;
  font-size: 32px;
  line-height: 24px;
  width: 32px;
  flex-shrink: 0;
}
.task-item .item-title h3 {
  color: #171b22;
  font-size: 17px;
  line-height: 1.45;
}
.task-item .item-title p,
.task-item .item-detail {
  color: #737d89;
  font-size: 14px;
  line-height: 1.65;
}
.task-item.urgency-critical,
.task-item.urgency-overdue { background: #fff5f3; }
.task-item.urgency-soon { background: #fff8ef; }
.task-item.urgency-upcoming { background: #fcfaef; }
.task-item.urgency-done { background: #f1f7f0; }
.project-syllabus {
  display: grid;
  gap: 18px;
  width: 100%;
}
.project-syllabus .plan-item {
  padding: 28px 32px;
  min-height: 120px;
  background: #f0f9ff;
  border: 1px solid #c9e2ee;
  border-radius: 14px;
}
.project-syllabus .plan-item > .item-heading { align-items: center; }
.project-syllabus .item-title h3 {
  color: #163d55;
  font-size: 23px;
  line-height: 1.4;
}
.project-syllabus .item-title p {
  color: #688495;
  font-size: 14px;
  margin-top: 8px;
}
.project-syllabus .item-emoji { font-size: 30px; }
.project-syllabus .item-detail { color: #688495; }
@media (max-width: 650px) {
  .task-list { grid-auto-rows: auto; }
  .task-item { padding: 18px 14px; }
  .task-item > .item-heading { flex-wrap: wrap; }
  .task-item .item-title { flex-basis: calc(100% - 42px); }
  .project-syllabus .plan-item { padding: 24px 20px; }
  .project-syllabus .item-title h3 { font-size: 20px; }
}

.location-progress-label {
  margin: 8px 0 0;
  font-size: 13px;
}

.login-page { min-height: 100vh; display: grid; place-items: center; }
.login-container { width: 100%; max-width: 480px; padding: 28px; }
.login-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 36px; box-shadow: 0 12px 48px #252b240a; }
.login-card h1 { font-size: 34px; margin: 0; }
.login-card h1 span { color: var(--green); }
.login-card form { display: grid; gap: 12px; margin-top: 28px; }
.login-card label { font-weight: 600; font-size: 14px; }
.login-card input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; font: inherit; margin-bottom: 8px; }
.login-card button { background: var(--green); color: white; border: 0; border-radius: 8px; padding: 13px; font: inherit; font-weight: 600; cursor: pointer; }
.login-card button:disabled { opacity: .6; cursor: wait; }
#login-error { color: #913d37; font-size: 14px; }
.logout-button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; padding: 5px 0; cursor: pointer; }
