/* Project Daylight — layout & components */
@import url("tokens.css");

.dl-wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* —————————————————————————————————————— MASTHEAD */
.dl-masthead {
  background: var(--paper);
  border-bottom: var(--rule-ink);
  position: sticky; top: 0; z-index: 50;
}
.dl-masthead-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.dl-wordmark { display: flex; align-items: center; gap: 12px; }
.dl-wm-sun { display: inline-flex; }
.dl-wm-text { display: flex; flex-direction: column; line-height: 1; }
.dl-wm-prefix { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 3px; }
.dl-wm-main { font-family: var(--serif); font-size: 28px; font-weight: 500; letter-spacing: -0.015em; }
.dl-nav { display: flex; gap: 28px; align-items: center; }
.dl-nav-link { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink-2); position: relative; padding-bottom: 4px; }
.dl-nav-link:hover { color: var(--ink); }
.dl-nav-link.is-active { color: var(--ink); }
.dl-nav-link.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -21px; height: 3px; background: var(--daylight);
}
.dl-mast-right { display: flex; align-items: center; gap: 16px; }
.dl-signin { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink); border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; }

/* live strap */
.dl-strap {
  background: var(--ink);
  color: var(--paper);
}
.dl-strap-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 32px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em;
  overflow: hidden; white-space: nowrap;
}
.dl-strap .meta { color: var(--paper); }
.dl-strap .meta-strong { color: var(--daylight); }
.dl-strap-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--daylight); animation: dl-pulse 1.6s ease-in-out infinite; flex-shrink: 0; }
.dl-strap-tick { flex: 1; text-overflow: ellipsis; overflow: hidden; color: var(--paper); }
.dl-strap-sep { color: var(--ink-4); }
@keyframes dl-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--daylight); }
  50% { opacity: 0.4; box-shadow: 0 0 0 6px transparent; }
}

/* —————————————————————————————————————— FOOTER */
.dl-footer { border-top: var(--rule-ink); margin-top: 80px; background: var(--paper); padding: 48px 0 24px; }
.dl-footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; align-items: start; }
.dl-footer-col { display: flex; flex-direction: column; gap: 10px; }
.dl-footer-col a { color: var(--ink-2); font-size: 14px; border-bottom: 1px solid transparent; padding-bottom: 1px; width: fit-content; }
.dl-footer-col a:hover { border-bottom-color: var(--ink-2); }
.dl-footer-motto { font-family: var(--serif); font-size: 16px; line-height: 1.5; color: var(--ink-2); max-width: 380px; margin: 4px 0 0; }
.dl-footer-note { font-size: 12px; color: var(--ink-3); line-height: 1.5; max-width: 320px; }
.dl-footer-rule { margin-top: 40px; padding-top: 20px; border-top: var(--rule); display: flex; justify-content: space-between; align-items: center; }

/* —————————————————————————————————————— MONOGRAM */
.mono { display: block; }
.dl-byline { display: inline-flex; align-items: center; gap: 10px; }
.dl-byline-text { display: flex; flex-direction: column; line-height: 1.25; }
.dl-byline-name { font-family: var(--serif); font-size: 15px; color: var(--ink); }

/* —————————————————————————————————————— ENTRY CARD */
.dl-entry {
  padding: 24px 0;
  border-top: var(--rule);
  display: grid;
  gap: 10px;
}
.dl-entry:first-child { border-top: 0; padding-top: 0; }
.dl-entry-chips { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dl-chip-sep { color: var(--ink-4); font-family: var(--mono); }
.dl-entry-time { margin-left: auto; color: var(--ink-3); }
.dl-new-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--daylight);
  animation: dl-pulse 1.6s ease-in-out infinite;
}
.dl-entry-title {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
}
.dl-entry-title:hover { color: var(--daylight-deep); }
.dl-entry-summary {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0;
  max-width: 720px;
  text-wrap: pretty;
}
.dl-entry-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 16px; flex-wrap: wrap; }
.dl-entry-tags { display: flex; gap: 8px; }
.dl-tag { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

/* —————————————————————————————————————— PLAN CARD */
.dl-plan {
  padding: 24px;
  border: 1px solid var(--paper-rule);
  background: var(--paper);
  display: grid;
  gap: 14px;
  position: relative;
}
.dl-plan::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--st-planned);
}
.dl-plan[data-st="in-progress"]::before { background: var(--st-progress); }
.dl-plan[data-st="planned"]::before { background: var(--st-planned); }
.dl-plan[data-st="proposed"]::before { background: var(--st-proposed); }
.dl-plan[data-st="blocked"]::before { background: var(--st-blocked); }
.dl-plan[data-st="done"]::before { background: var(--st-done); }
.dl-plan:target {
  outline: 2px solid var(--daylight-deep);
  outline-offset: 4px;
  animation: dl-plan-flash 1.6s ease-out 1;
}
@keyframes dl-plan-flash {
  0%   { background: color-mix(in oklab, var(--daylight) 30%, var(--paper)); }
  100% { background: var(--paper); }
}
.dl-plan-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.dl-plan-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dl-plan-date { text-align: right; }
.dl-plan-title { font-size: 22px; line-height: 1.15; margin: 0; text-wrap: balance; }
.dl-plan-owner strong { font-family: var(--serif); font-weight: 500; font-size: 17px; display: block; margin-top: 2px; }
.dl-plan-why p { margin: 2px 0 0; font-family: var(--serif); font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.dl-plan-answers { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding-top: 12px; border-top: var(--rule); margin-top: 4px; }
.dl-ans-link { font-family: var(--mono); font-size: 12px; border-bottom: 1px solid currentColor; color: var(--ink-2); }

/* —————————————————————————————————————— PERSONA TILE */
.dl-ptile {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  padding: 16px; border: 1px solid var(--paper-rule); background: var(--paper);
  transition: border-color 0.2s, transform 0.2s;
}
.dl-ptile:hover { border-color: var(--ink); transform: translateY(-1px); }
.dl-ptile-body { display: grid; gap: 3px; }
.dl-ptile-name { font-size: 18px; line-height: 1.1; }

/* —————————————————————————————————————— BUTTONS */
.dl-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 12px 22px;
  border: 2px solid var(--ink);
  background: var(--ink); color: var(--paper);
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.01em;
}
.dl-btn:hover { background: var(--daylight-deep); border-color: var(--daylight-deep); color: var(--paper); }
.dl-btn--ghost { background: transparent; color: var(--ink); }
.dl-btn--ghost:hover { background: var(--ink); color: var(--paper); }
.dl-btn--sun { background: var(--daylight); color: var(--ink); border-color: var(--daylight); }
.dl-btn--sun:hover { background: var(--daylight-deep); border-color: var(--daylight-deep); color: var(--paper); }

/* —————————————————————————————————————— MOBILE */
@media (max-width: 900px) {
  .dl-masthead-inner { grid-template-columns: 1fr auto; gap: 16px; padding: 12px 0; }
  .dl-nav { display: none; }
  .dl-wrap,
  section.dl-wrap,
  main.dl-wrap,
  div.dl-wrap { padding-left: 24px !important; padding-right: 24px !important; }
  .dl-strap-inner { padding: 8px 24px; }
  .dl-strap-tick { font-size: 10px; }
  .dl-wm-main { font-size: 22px; }
  .dl-footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .dl-entry-title { font-size: 22px; }
  .dl-entry-summary { font-size: 15px; }
  .dl-plan { padding: 18px; }
  .dl-plan-title { font-size: 18px; }
  .dl-plan-head { flex-direction: column; align-items: flex-start; }
  .dl-plan-date { text-align: left; }
}
