.shell { max-width: 1180px; }
.main-content { padding-bottom: 32px; }
.brand-mark { transform: rotate(-5deg); font-size: 1.05rem; }
.checklist-section { margin-bottom: 38px; }
.section-caption { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.run-grid, .template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.run-card { display: block; padding: 23px 25px; color: var(--ink); text-decoration: none; border-color: #b9ccbd; box-shadow: 0 3px 0 #e5ebe0; }
.run-card:hover { color: var(--ink); background: #fbfdf8; border-color: #729884; }
.run-card h3 { font-size: 1.17rem; line-height: 1.4; margin: 18px 0 7px; overflow-wrap: anywhere; }
.run-card-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 30px; background: var(--teal-soft); color: var(--teal-dark); padding: 5px 10px; font-size: .69rem; font-weight: 550; white-space: nowrap; }
.status-pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #539378; }
.status-cancelled { background: #e9ece6; color: #677064; }
.status-cancelled::before { background: #879180; }
.card-arrow { font-size: 1.2rem; color: var(--teal); }
.card-meta { display: block; color: var(--muted); font-size: .73rem; font-weight: 400; }
.card-progress { display: flex; align-items: center; gap: 14px; margin-top: 25px; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-progress span { flex-shrink: 0; }
progress { appearance: none; display: block; width: 100%; height: 7px; border: 0; border-radius: 20px; overflow: hidden; background: #e5eade; color: var(--teal); accent-color: var(--teal); }
progress::-webkit-progress-bar { background: #e5eade; border-radius: 20px; }
progress::-webkit-progress-value { background: var(--teal); border-radius: 20px; }
progress::-moz-progress-bar { background: var(--teal); border-radius: 20px; }
.template-card { padding: 26px; display: flex; flex-direction: column; align-items: flex-start; }
.template-icon { width: 40px; height: 44px; border: 1px solid #cbd9ca; border-radius: 9px; padding: 10px 8px; display: grid; gap: 5px; margin-bottom: 22px; background: #f5f8f0; }
.template-icon span { height: 2px; margin-left: 6px; position: relative; background: #809b82; border-radius: 3px; }
.template-icon span::before { content: ''; position: absolute; left: -6px; width: 2px; height: 2px; background: #809b82; }
.template-card h3 { font-size: 1.17rem; line-height: 1.4; }
.template-description { color: var(--muted); font-size: .83rem; margin: 10px 0 17px; line-height: 1.65; }
.template-card > .card-meta { margin-top: auto; }
.template-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 24px; width: 100%; }
.template-actions .button { width: 100%; justify-content: space-between; padding-inline: 15px; }
.text-link { font-size: .76rem; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.template-empty { grid-column: 1 / -1; }
.completed-row { display: flex; align-items: center; gap: 18px; padding: 20px 24px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); font-size: .84rem; }
.completed-row:last-child { border-bottom: 0; }
.completed-row:hover { background: #fbfdf8; }
.completed-mark { color: var(--teal); font-size: 1rem; }
.completed-row strong { font-weight: 600; }
.completed-row .card-meta { margin-top: 4px; }
.completed-date { margin-left: auto; color: var(--muted); font-size: .74rem; white-space: nowrap; }
.empty-history { border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); font-size: .85rem; }
.cancelled-history { border-top: 1px solid var(--line); padding-top: 20px; }
.cancelled-history > summary { cursor: pointer; color: var(--muted); font-size: .94rem; font-weight: 600; }
.cancelled-count { font-size: .73rem; font-weight: 400; margin-left: 8px; }
.cancelled-history > .section-caption { margin: 12px 0 18px; line-height: 1.65; }
.cancelled-mark { color: var(--muted); }
.cancelled-title { min-width: 0; overflow-wrap: anywhere; }
.detail-heading { align-items: flex-start; margin-bottom: 30px; }
.detail-heading h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); overflow-wrap: anywhere; }
.detail-heading .button { margin-top: 23px; flex-shrink: 0; }
.trip-duration { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; margin: -10px 0 26px; color: var(--muted); font-size: .79rem; }
.trip-duration strong { color: var(--ink); font-weight: 600; }
.trip-duration a { font-size: .74rem; text-decoration: none; }
.trip-duration a:hover { text-decoration: underline; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }
.packing-main, .packing-sidebar { min-width: 0; }
.progress-panel { padding: 24px 27px; margin-bottom: 24px; background: #f0f4e9; border-color: #d7e1cf; }
.progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.progress-value { font-size: 1.9rem; font-weight: 620; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.progress-divider { color: #7c8e77; font-size: 1.15rem; font-weight: 400; }
.progress-label { font-size: .74rem; color: #677960; margin-left: 10px; }
.progress-help { color: #677960; font-size: .71rem; margin-top: 13px; }
.packing-group { overflow: hidden; margin-bottom: 20px; }
.packing-group-heading { display: flex; align-items: center; justify-content: space-between; padding: 19px 25px; border-bottom: 1px solid var(--line); background: #fcfcf8; }
.packing-group-heading h2 { font-size: .94rem; }
.group-count { color: var(--muted); font-size: .7rem; }
.packing-items { list-style: none; margin: 0; padding: 0; }
.packing-item { border-bottom: 1px solid #e9ece6; padding: 0 24px 11px; }
.packing-item:last-child { border-bottom: 0; }
.item-controls, [data-checklist-form] fieldset { min-inline-size: 0; border: 0; padding: 0; margin: 0; }
.item-controls { display: flex; align-items: center; gap: 8px; }
.check-toggle, .item-static { display: flex; align-items: flex-start; gap: 13px; padding: 19px 0 8px; text-align: left; color: var(--ink); }
.check-toggle { background: transparent; border: 0; flex: 1; min-width: 0; }
.check-box { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 23px; height: 23px; margin-top: 1px; border: 1.5px solid #b7c6b8; border-radius: 7px; background: #fff; font-size: .87rem; font-weight: 600; }
.check-toggle:hover .check-box { border-color: var(--teal); background: #f0f6ee; }
.item-title { font-size: .94rem; line-height: 1.65; overflow-wrap: anywhere; }
.status-done .check-box { background: var(--teal); border-color: var(--teal); color: #fff; }
.status-done .item-title { color: #748175; text-decoration: line-through; text-decoration-color: #aab8a9; }
.status-skipped .check-box { border-color: #d5dcce; background: #f1f4ed; color: #8b9785; }
.status-skipped .item-title { color: #8b9785; }
.skip-item { padding: 12px 0 5px 10px; border: 0; background: transparent; color: #778270; font-size: .69rem; flex-shrink: 0; }
.skip-item:hover { color: var(--teal); text-decoration: underline; }
.item-state-label { margin-left: auto; padding-top: 4px; font-size: .67rem; color: var(--muted); white-space: nowrap; }
.item-quantity { padding: 0 0 5px 36px; }
.quantity-summary, .quantity-editor > summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; margin: 0; padding-block: 3px 5px; font-size: .72rem; }
.quantity-editor > summary { cursor: pointer; list-style: none; }
.quantity-editor > summary::-webkit-details-marker { display: none; }
.quantity-value { color: var(--teal-dark); font-variant-numeric: tabular-nums; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.quantity-unknown { color: var(--muted); font-size: .7rem; }
.quantity-source { color: #778270; font-size: .69rem; }
.quantity-edit-label { color: var(--teal); font-size: .66rem; margin-left: auto; }
.quantity-editor > summary:hover .quantity-edit-label { text-decoration: underline; }
.quantity-editor[open] { padding-bottom: 8px; }
.quantity-editor form { border-left: 2px solid var(--line); padding: 12px 0 2px 14px; margin-top: 5px; }
.quantity-input-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.quantity-input-row .field { width: 136px; }
.quantity-input-row .field label { font-size: .7rem; }
.quantity-input-row .field input { min-height: 38px; padding: 8px 10px; font-size: .78rem; }
.quantity-input-row .button { font-size: .72rem; }
.quantity-editor .field-help { max-width: 400px; font-size: .69rem; line-height: 1.65; }
.quantity-editor .unsaved-label { display: block; margin-top: 7px; }
.item-note { padding-left: 36px; }
.item-note summary { display: inline-block; color: #7a8574; font-size: .69rem; padding: 3px 0 7px; cursor: pointer; }
.item-note summary::-webkit-details-marker { display: none; }
.item-note summary:hover { color: var(--teal); }
.item-note details[open] summary span { display: none; }
.item-note form { padding-top: 4px; padding-bottom: 7px; }
.item-note .field textarea { min-height: 78px; font-size: .79rem; background: #fcfdf9; }
.note-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 10px; }
.note-actions .button { font-size: .72rem; min-height: 34px; }
.unsaved-label { color: var(--amber); font-size: .65rem; }
.saved-item-note { font-size: .78rem; color: var(--muted); padding-bottom: 8px; overflow-wrap: anywhere; }
.note-caption { display: block; font-size: .63rem; margin-bottom: 3px; }
.trip-note, .previous-notes { padding: 24px; margin-bottom: 20px; }
.packing-sidebar .eyebrow { font-size: .61rem; margin-bottom: 8px; }
.packing-sidebar h2 { font-size: 1.02rem; }
.sidebar-intro { color: var(--muted); font-size: .75rem; margin: 9px 0 18px; line-height: 1.65; }
.trip-note textarea { font-size: .8rem; background: #fdfdf9; min-height: 155px; }
.sidebar-empty { color: var(--muted); font-size: .78rem; line-height: 1.65; margin-top: 16px; }
.sidebar-tip { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .75rem; color: #7d876f; line-height: 1.65; }
.sidebar-footnote { color: #85907d; font-size: .7rem; padding-inline: 8px; line-height: 1.7; }
.previous-note { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.previous-note h3 { font-size: .85rem; margin-bottom: 4px; }
.previous-note h3 a { text-decoration: none; }
.saved-note { font-size: .82rem; color: #526650; line-height: 1.75; margin-top: 14px; overflow-wrap: anywhere; }
.previous-item-note { font-size: .74rem; color: var(--muted); margin-top: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.previous-item-note strong, .previous-item-note span { display: block; }
.previous-item-note strong { font-size: .72rem; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.finish-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 2px 22px; }
.finish-panel h2 { font-size: .93rem; }
.finish-panel p { color: var(--muted); font-size: .75rem; margin-top: 6px; }
.finish-panel button:disabled { cursor: default; background: #d7dfd0; border-color: #d7dfd0; color: #738369; opacity: 1; }
.cancel-link { display: inline-block; margin-top: 14px; color: var(--muted); }
.cancel-link:hover { color: var(--ink); }
.cancel-confirmation .eyebrow { overflow-wrap: anywhere; }
.form-request-error { color: var(--red); font-size: .73rem; line-height: 1.6; padding: 9px 0; }
.template-form-page { max-width: 960px; margin-inline: auto; }
.template-fields { gap: 20px; }
.template-fields textarea { min-height: 85px; }
.item-editor-heading { margin: 28px 0 13px; }
.template-item-row { display: grid; grid-template-columns: minmax(105px, 1fr) minmax(145px, 1.6fr) minmax(70px, .5fr) minmax(130px, 1fr) auto; align-items: start; gap: 12px; padding-block: 17px; border-top: 1px solid var(--line); }
.item-delete-field { padding-top: 37px; }
.item-delete-field .checkbox-field { font-size: .73rem; }
.template-editor .field label { font-size: .73rem; }
.template-editor .field input { min-height: 44px; }
.template-editor .field select { min-width: 0; font-size: .8rem; }
.template-editor .field .field-help { font-size: .73rem; }
.days-field input { max-width: 150px; }
.add-item-button { margin: 8px 0 24px; }
.template-help, .start-explanation { color: var(--muted); font-size: .79rem; line-height: 1.7; margin-bottom: 24px; }
.checklists-login .login-intro h1 { max-width: 500px; }

@media (max-width: 1020px) {
  .template-grid, .run-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 20px; }
  .progress-label { display: block; margin: 9px 0 0; }
  .progress-panel { padding: 22px; }
  .trip-note, .previous-notes { padding: 21px; }
  .packing-item { padding-inline: 20px; }
  .packing-group-heading { padding-inline: 21px; }
  .finish-panel { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; gap: 0; padding-block: 18px 12px; }
  .brand { font-size: 1.55rem; }
  .account-nav { width: 100%; justify-content: flex-start; gap: 22px; margin-top: 14px; font-size: .74rem; }
  .account-nav form { margin-left: auto; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; }
  .detail-heading .button { margin-top: 0; }
  .detail-layout { grid-template-columns: 1fr; gap: 12px; }
  .packing-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .trip-note, .previous-notes { margin: 0; }
  .sidebar-footnote { grid-column: 1 / -1; }
  .finish-panel { flex-direction: row; align-items: center; }
  .progress-label { display: inline; margin: 0 0 0 9px; }
  .section-heading > .section-caption { display: none; }
  .measurement-form { padding: 24px; }
  .template-item-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
  .item-delete-field { padding-top: 2px; grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .template-grid, .run-grid { grid-template-columns: 1fr; gap: 14px; }
  .template-card { padding: 24px; }
  .template-icon { margin-bottom: 16px; }
  .template-actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; }
  .template-actions .button { width: auto; }
  .template-actions .text-link { max-width: 85px; }
  .packing-sidebar { grid-template-columns: 1fr; }
  .check-toggle, .item-static { gap: 11px; }
  .packing-item { padding-inline: 17px; }
  .item-title { font-size: .86rem; }
  .check-box { width: 22px; height: 22px; }
  .item-note, .item-quantity { padding-left: 33px; }
  .quantity-edit-label { margin-left: 0; }
  .skip-item { font-size: .64rem; }
  .progress-panel { padding: 20px; }
  .progress-label { display: block; margin: 8px 0 0; }
  .progress-help { line-height: 1.7; }
  .detail-heading h1 { font-size: 1.95rem; }
  .finish-panel { flex-direction: column; align-items: stretch; gap: 17px; }
  .finish-panel form, .finish-panel button { width: 100%; }
  .finish-panel h2 { margin-top: 5px; }
  .template-item-row { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding-block: 19px; }
  .item-group-field, .item-title-field { grid-column: 1 / -1; }
  .item-delete-field { padding-top: 2px; }
  .template-editor .form-actions .button { width: 100%; }
  .completed-row { padding: 18px; gap: 12px; }
  .completed-date { font-size: .66rem; }
  .site-footer { align-items: flex-start; padding-top: 25px; }
  .site-footer > :first-child { font-size: .73rem; max-width: 180px; }
}
