/* /account: client area. Forms reuse form.contact from style.css. */
.account { padding-bottom: clamp(56px, 8vw, 104px); }
.account h2 { font-size: 24px; line-height: 1.2; margin: 40px 0 14px; font-weight: 650; }
.account [hidden] { display: none !important; }
.acc-form { max-width: 560px; }
.acc-form h2 { margin: 0; }
.acc-lead { margin: 0; color: var(--ink-soft); }
.acc-fine { margin: 0; font-size: 15px; color: var(--ink-soft); }
.acc-fine a, .acc-lead a { color: inherit; }
.acc-err { margin: 0; font-weight: 500; font-size: 15px; color: #B42318; }
.acc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.acc-form [aria-invalid="true"] { border-color: #B42318; }
.acc-choice { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.acc-choice legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: 16px; }
.acc-choice[aria-invalid="true"] legend { color: #B42318; }
.acc-box { margin: 0; padding: 22px; border-radius: 20px; background: var(--panel); border: 1px solid var(--mist); max-width: 74ch; }
.acc-muted { color: var(--ink-soft); font-weight: 400; }

.acc-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  padding: 16px 22px; border-radius: 20px; background: var(--panel); border: 1px solid var(--mist); }
.acc-top p { margin: 0; }

.acc-project { padding: 22px; margin-bottom: 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--mist); }
.acc-project-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.acc-project h3 { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 650; }
.acc-project h4 { margin: 20px 0 8px; font-size: 15px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.acc-progress { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.acc-progress progress { flex: 1; height: 10px; appearance: none; border: 0; border-radius: 999px; background: var(--mist); overflow: hidden; }
.acc-progress progress::-webkit-progress-bar { background: var(--mist); border-radius: 999px; }
.acc-progress progress::-webkit-progress-value { background: var(--blue); border-radius: 999px; }
.acc-progress progress::-moz-progress-bar { background: var(--blue); border-radius: 999px; }
.acc-pct { min-width: 4ch; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.acc-updated { margin: 6px 0 0; font-size: 14px; }

.acc-stages { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: stage; }
.acc-stages li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px; background: var(--paper); }
.acc-stages li::before { counter-increment: stage; content: counter(stage) "."; color: var(--ink-soft); min-width: 2ch; }
.acc-stage-title { flex: 1; }
.acc-stage-state { font-size: 14px; color: var(--ink-soft); }
.acc-stages li.is-done .acc-stage-title { color: var(--ink-soft); }
.acc-stages li.is-done .acc-stage-state::before { content: "✓ "; }
.acc-stages li.is-doing { box-shadow: inset 3px 0 0 var(--blue); }
.acc-stages li.is-doing .acc-stage-state { color: var(--blue); font-weight: 600; }

.acc-notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.acc-notes li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.acc-notes time { font-size: 14px; padding-top: 2px; }
.acc-notes p { margin: 0; white-space: pre-line; }

.acc-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--mist); color: var(--ink); }
.acc-chip.is-active, .acc-chip.is-due { background: var(--blue); color: var(--blue-ink); }
.acc-chip.is-done, .acc-chip.is-paid { background: #D7F0DF; color: #0B5130; }
.acc-chip.is-cancelled { text-decoration: line-through; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .acc-chip.is-done, :root:not([data-theme="light"]) .acc-chip.is-paid { background: #164A2E; color: #CFF3DC; } }
:root[data-theme="dark"] .acc-chip.is-done, :root[data-theme="dark"] .acc-chip.is-paid { background: #164A2E; color: #CFF3DC; }
.acc-due { font-size: 14px; }

.acc-table-wrap { border-radius: 20px; background: var(--panel); border: 1px solid var(--mist); overflow: hidden; }
.acc-table { width: 100%; border-collapse: collapse; }
.acc-table th, .acc-table td { padding: 12px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--mist); }
.acc-table tr:last-child td { border-bottom: 0; }
.acc-table th { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.acc-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.acc-pay { padding: 8px 16px; font-size: 15px; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.account .acc-table-wrap + .acc-fine, .account .acc-empty + .acc-fine { margin-top: 12px; max-width: 74ch; }

.acc-danger { margin-top: 40px; max-width: 74ch; }
.acc-danger summary { cursor: pointer; font-weight: 600; }
.acc-danger > p { margin: 14px 0; }
.acc-delete { margin-top: 8px; }
.acc-delete p { margin: 0; }
.acc-btn-danger { background: #B42318; color: #FFFFFF !important; }

@media (max-width: 720px) {
  .acc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .acc-table, .acc-table tbody, .acc-table tr, .acc-table td { display: block; }
  .acc-table tr { padding: 12px 16px; border-bottom: 1px solid var(--mist); }
  .acc-table tr:last-child { border-bottom: 0; }
  .acc-table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .acc-table td::before { content: attr(data-label); color: var(--ink-soft); font-size: 14px; }
  .acc-table td:last-child::before { content: none; }
  .acc-table .num { text-align: left; }
  .acc-notes li { grid-template-columns: 1fr; gap: 2px; }
}
