.hours-page { overflow-x: hidden; }
.hours-intro { padding: clamp(56px, 8vw, 92px) 0 34px; }
.hours-intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: clamp(38px, 7vw, 90px); align-items: end; }
.hours-intro h1 { max-width: 830px; margin: 15px 0 20px; font-size: clamp(3rem, 6.2vw, 5.8rem); line-height: .94; letter-spacing: -.065em; text-wrap: balance; }
.hours-intro .lead { max-width: 780px; }
.hours-intro-note { display: grid; gap: 10px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, rgba(126,231,255,.07), rgba(255,255,255,.015)); }
.hours-intro-note strong { margin-bottom: 4px; font-size: 1.05rem; }
.hours-intro-note span { display: flex; gap: 9px; color: var(--muted-strong); font-size: .82rem; }
.hours-intro-note span::before { content: "✓"; color: var(--green); font-weight: 900; }

.hours-workspace { padding-top: 34px; }
.hours-project-panel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.018); box-shadow: var(--shadow); }
.hours-project-panel label { display: grid; min-width: 0; gap: 8px; color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .03em; }
.hours-project-panel label > span { display: flex; justify-content: space-between; gap: 8px; }
.hours-project-panel label small { color: var(--muted); font-size: .67rem; font-weight: 600; }
.hours-project-panel input,
.hours-project-panel select,
.hours-project-panel textarea,
.hours-entry input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 11px; outline: none; color: var(--text); background: #07111f; font: inherit; font-size: .88rem; font-weight: 600; transition: border-color 160ms ease, box-shadow 160ms ease; }
.hours-project-panel input,
.hours-project-panel select,
.hours-entry input { min-height: 46px; padding: 0 12px; }
.hours-project-panel textarea { min-height: 72px; padding: 11px 12px; resize: vertical; line-height: 1.45; }
.hours-project-panel input:focus,
.hours-project-panel select:focus,
.hours-project-panel textarea:focus,
.hours-entry input:focus { border-color: rgba(126,231,255,.75); box-shadow: 0 0 0 3px rgba(126,231,255,.1); }
.hours-notes { grid-column: span 2; }

.hours-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.hours-ledger { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.014); box-shadow: var(--shadow); }
.hours-ledger-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 28px; }
.hours-ledger-heading h2 { margin: 5px 0 7px; font-size: clamp(1.65rem, 3vw, 2.25rem); }
.hours-ledger-heading p:last-child { max-width: 650px; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.hours-entry-header,
.hours-entry { display: grid; grid-template-columns: 116px minmax(170px, 1fr) 102px 102px 84px 66px 66px; gap: 10px; align-items: center; }
.hours-entry-header { padding: 11px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); background: rgba(126,231,255,.035); font-size: .66rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.hours-entry { padding: 13px 18px; border-bottom: 1px solid var(--line); }
.hours-entry-field { display: grid; min-width: 0; }
.hours-entry-field > span { display: none; }
.hours-entry input { min-height: 42px; padding: 0 9px; font-size: .78rem; }
.hours-entry input[type="number"] { text-align: center; }
.hours-entry-output { justify-items: center; }
.hours-entry-total { color: var(--cyan); font-size: .9rem; font-weight: 850; }
.hours-remove,
.hours-clear,
.hours-add-row { border: 0; color: var(--muted); background: transparent; font: inherit; font-size: .72rem; font-weight: 760; cursor: pointer; }
.hours-remove:hover,
.hours-remove:focus-visible,
.hours-clear:hover,
.hours-clear:focus-visible { color: #fff; text-decoration: underline; }
.hours-add-row { width: 100%; padding: 18px; color: var(--cyan); }
.hours-add-row:hover,
.hours-add-row:focus-visible { background: rgba(126,231,255,.04); }

.hours-summary { position: sticky; top: 104px; display: grid; gap: 16px; padding: 27px; border: 1px solid rgba(126,231,255,.22); border-radius: var(--radius); background: linear-gradient(160deg, rgba(126,231,255,.075), rgba(255,255,255,.018) 45%); box-shadow: var(--shadow); }
.hours-summary h2 { margin: -5px 0 2px; font-size: 1.5rem; }
.hours-summary-grid { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--line); }
.hours-summary-grid > div { display: grid; gap: 4px; padding: 16px; background: #081321; }
.hours-summary-grid span { color: var(--muted); font-size: .7rem; font-weight: 780; letter-spacing: .05em; text-transform: uppercase; }
.hours-summary-grid strong { min-width: 0; overflow-wrap: anywhere; font-size: 1.55rem; line-height: 1.05; }
.hours-summary .button { width: 100%; }
.hours-summary .button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.hours-clear { justify-self: center; }
.hours-status { min-height: 2.7em; margin: 0; color: var(--cyan); font-size: .74rem; line-height: 1.45; }
.hours-privacy { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .7rem; line-height: 1.55; }

@media (max-width: 1180px) {
  .hours-project-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hours-notes { grid-column: span 2; }
  .hours-entry-header { display: none; }
  .hours-entry { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; padding: 20px; }
  .hours-entry-field:nth-child(2) { grid-column: span 3; }
  .hours-entry-field > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .64rem; font-weight: 820; letter-spacing: .05em; text-transform: uppercase; }
  .hours-entry-output { justify-items: start; align-content: center; }
  .hours-remove { grid-column: -2 / -1; justify-self: end; align-self: end; min-height: 42px; }
}

@media (max-width: 900px) {
  .hours-intro-grid,
  .hours-layout { grid-template-columns: 1fr; }
  .hours-intro-note { max-width: 520px; }
  .hours-summary { position: static; }
  .hours-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .hours-intro { padding-top: 54px; }
  .hours-intro h1 { font-size: clamp(2.65rem, 14vw, 4.1rem); }
  .hours-project-panel { grid-template-columns: 1fr; }
  .hours-notes { grid-column: auto; }
  .hours-ledger-heading { align-items: flex-start; flex-direction: column; padding: 22px; }
  .hours-ledger-heading .button { width: 100%; }
  .hours-entry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hours-entry-field:nth-child(2) { grid-column: 1 / -1; }
  .hours-entry-output { justify-items: start; }
  .hours-summary-grid { grid-template-columns: 1fr; }
  .hours-remove { grid-column: 1 / -1; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .hours-project-panel input,
  .hours-project-panel select,
  .hours-project-panel textarea,
  .hours-entry input { transition: none; }
}
