/* Ownership tools: additions to /zone-tools/zone-tools.css, shared by
   /renewal-runway/ and /site-handover/. */
select.zt-field, input.zt-field, textarea.zt-field { font-family: var(--sans); font-size: 0.92rem; min-height: 2.6rem; }
textarea.zt-field { resize: vertical; }
.zt-field[aria-invalid="true"] { border-color: var(--fix); }
.ot-hint { display: block; margin: 0.25rem 0 0; font-size: 0.76rem; line-height: 1.5; color: var(--muted); }
.ot-label { display: block; font-size: 0.8rem; font-weight: 600; margin: 0 0 0.25rem; }
.ot-warn { display: block; margin: 0.25rem 0 0; font-size: 0.8rem; font-weight: 600; color: var(--fix); }
.ot-panel { margin: 0 0 1.2rem; padding: 1.2rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface, #fff); }
.ot-panel > h2 { font-family: var(--serif); font-size: 1.25rem; line-height: 1.25; margin: 0 0 0.3rem; }
.ot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.ot-grid .is-wide { grid-column: 1 / -1; }
.ot-confirm { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.8rem 0 0; font-size: 0.86rem; }
.ot-confirm p { margin: 0; flex: 1 1 240px; }
.btn-ghost.is-danger { color: var(--fix); }
.btn-ghost.is-small { font-size: 0.78rem; padding: 0.4rem 0.8rem; }
main table { border-collapse: collapse; }
.ot-table-wrap { overflow-x: auto; }
.ot-table { width: 100%; font-size: 0.84rem; line-height: 1.5; }
.ot-table th, .ot-table td { padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.ot-table thead th { border-top: 0; font-size: 0.76rem; color: var(--muted); overflow-wrap: normal; }
.ot-table small { display: block; color: var(--muted); font-size: 0.78rem; }
.ot-table small { font-weight: 400; }
.ot-day { white-space: nowrap; }
.rr-edit > summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--accent); padding: 0.3rem 0; }
.ot-state { font-weight: 600; white-space: nowrap; }
.ot-state.is-expired, .ot-state.is-due { color: var(--fix); }
.ot-state.is-soon, .ot-state.is-nodate { color: var(--warn); }
.ot-state.is-later { color: var(--ok); }

/* Renewal rows */
.rr-rows { display: grid; gap: 0.8rem; margin: 0.8rem 0; }
.rr-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr) minmax(0, 1.1fr); gap: 0.6rem; padding: 0.9rem; border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.rr-row .is-notes { grid-column: span 2; }
.rr-row .rr-remove { align-self: end; justify-self: end; }

/* Handover assets */
.sh-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; margin: 0 0 1.1rem; }
.sh-mode { position: relative; display: block; padding: 0.8rem 0.9rem 0.8rem 2.4rem; border: 1px solid var(--border); border-radius: 8px; background: var(--input-bg, #f8f8fb); cursor: pointer; }
.sh-mode input { position: absolute; left: 0.8rem; top: 1rem; margin: 0; width: 1rem; height: 1rem; accent-color: var(--accent); }
.sh-mode strong { display: block; font-size: 0.92rem; line-height: 1.4; }
.sh-mode span { display: block; font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
.sh-mode:has(input:checked) { border-color: var(--accent); background: var(--badge-bg, #eef4fc); }
.sh-mode:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.sh-assets { display: grid; gap: 0.5rem; margin: 0.8rem 0; }
.sh-asset { border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.sh-asset > summary { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; align-items: baseline; padding: 0.7rem 0.9rem; cursor: pointer; font-weight: 600; font-size: 0.92rem; }
.sh-asset > summary::before { content: '\25B8'; color: var(--accent); }
.sh-asset[open] > summary::before { content: '\25BE'; }
.sh-asset > summary { list-style: none; }
.sh-asset > summary::-webkit-details-marker { display: none; }
.sh-chip { margin-left: auto; font-size: 0.76rem; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.sh-chip.is-yes { color: var(--ok); }
.sh-chip.is-gap { color: var(--fix); }
.sh-body { padding: 0 0.9rem 0.9rem; }
.sh-used { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.9rem; }
.sh-option { display: inline-flex; gap: 0.4rem; align-items: center; padding: 0.35rem 0.7rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.84rem; cursor: pointer; }
.sh-option input { margin: 0; accent-color: var(--accent); }
.sh-option:has(input:checked) { border-color: var(--accent); background: var(--badge-bg, #eef4fc); font-weight: 600; }
.sh-option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.sh-phase { margin: 1.2rem 0 0.3rem; font-size: 0.98rem; }
.sh-steps { margin: 0; padding: 0; list-style: none; counter-reset: none; }
.sh-record { overflow-wrap: anywhere; }
.sh-record h2 { font-family: var(--serif); font-size: 1.25rem; margin: 0 0 0.6rem; }
.sh-record h3 { margin: 1.4rem 0 0.4rem; font-size: 1rem; }
.sh-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.2rem 1rem; margin: 0; font-size: 0.86rem; }
.sh-facts dt { color: var(--muted); }
.sh-facts dd { margin: 0; }
.sh-record ul { margin: 0; padding-left: 1.2rem; font-size: 0.86rem; }
.sh-limits { font-size: 0.8rem; color: var(--muted); }
.sh-sign td { height: 2.6rem; }

@media (max-width: 720px) {
  .sh-modes { grid-template-columns: minmax(0, 1fr); }
  .rr-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rr-row .is-name, .rr-row .is-notes { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .ot-grid { grid-template-columns: minmax(0, 1fr); }
  .ot-panel { padding: 1rem; }
  .sh-facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sh-facts dd { margin: 0 0 0.4rem; }
  .ot-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .ot-stack, .ot-stack tbody, .ot-stack tr, .ot-stack th, .ot-stack td { display: block; }
  .ot-stack tr { border-top: 1px solid var(--border); padding: 0.6rem 0; }
  .ot-stack tbody th, .ot-stack td { border: 0; padding: 0.1rem 0; }
  .ot-stack td::before { content: attr(data-label) ': '; color: var(--muted); }
}

@media print {
  nav, footer, .skip-link, .about, .ot-noprint, .tool > h1, .tool > .intro { display: none !important; }
  body, main, .ot-panel, .zt-card, .zt-summary { background: #fff !important; color: #000 !important; }
  main { max-width: none; padding: 0; }
  .ot-print, .ot-print * { color: #000 !important; border-color: #999 !important; }
  .ot-panel.ot-print { border: 0 !important; padding: 0; margin: 0; }
  .ot-table { font-size: 8.5pt; line-height: 1.35; }
  .ot-table small { font-size: 8pt; }
  .ot-table tr, .zt-card { break-inside: avoid; }
  .ot-print h3 { break-after: avoid; }
  .zt-results { margin: 0; }
}
