@import url("./tkle-sub.css");

/* Summary */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sum { border-radius: var(--radius-card); padding: 24px; background: var(--surface); border: 1px solid var(--line); }
.sum .ph-duotone { font-size: 28px; color: var(--accent); }
.sum b { display: block; margin-top: 14px; font-size: 15px; color: var(--text-3); font-weight: 600; }
.sum p { margin-top: 4px; font-size: 17px; font-weight: 700; line-height: 1.45; letter-spacing: -0.01em; }

/* Doc layout */
.doc { display: grid; grid-template-columns: 232px 1fr; gap: 56px; align-items: start; padding: 56px 0 96px; }
.toc { position: sticky; top: 92px; font-size: 14px; }
.toc summary { list-style: none; font-weight: 700; color: var(--text); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; cursor: default; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--text-3); text-decoration: none; line-height: 1.45; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 700; }

.body { max-width: 760px; }
.body .lead { font-size: 18px; color: var(--text); padding: 24px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.body section { padding-top: 48px; scroll-margin-top: 92px; }
.body h2 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.35; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.body h2 .n { color: var(--accent); font-variant-numeric: tabular-nums; }
.body p { margin-top: 14px; color: var(--text-2); font-size: 16px; }
.body p strong { color: var(--text); }
.body .note { margin-top: 16px; padding: 14px 18px; border-radius: var(--radius-detail); background: var(--surface-2); color: var(--text-2); font-size: 15px; display: flex; gap: 10px; }
.body .note .ph { color: var(--accent); margin-top: 4px; flex: none; }
.body .note.draft-note { background: var(--sun); color: var(--sun-ink); }
.body .note.draft-note .ph { color: var(--sun-ink); }

/* Tables */
.table { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius-detail); overflow: hidden; background: var(--surface); }
.table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 16px 18px; }
.table thead th { background: var(--surface-2); color: var(--text-3); font-size: 13px; font-weight: 700; }
.table tbody tr + tr td, .table tbody tr + tr th { border-top: 1px solid var(--line); }
.table tbody th { font-weight: 700; color: var(--text); width: 30%; }
.table td { color: var(--text-2); }
.where { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 600; color: var(--text); }
.where .ph { color: var(--accent); }

/* Remedy tiles */
.remedy { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.remedy a { display: block; padding: 18px 20px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s; }
.remedy a:hover { border-color: var(--accent); }
.remedy b { display: block; font-size: 16px; }
.remedy span { color: var(--text-3); font-size: 14px; font-variant-numeric: tabular-nums; }

.owner { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.owner div { padding: 18px 20px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); }
.owner b { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-3); font-weight: 600; }
.owner p { margin-top: 4px; color: var(--text); font-weight: 700; font-size: 17px; }
.owner a { color: var(--accent); text-decoration: none; }

@media (max-width: 960px) {
  .summary { grid-template-columns: 1fr 1fr; }
  .doc { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px 20px; }
  .toc summary { margin: 0; cursor: pointer; }
  .toc summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform .2s; }
  .toc[open] summary::after { transform: rotate(-135deg); }
  .toc[open] ol { margin-top: 12px; }
}
@media (max-width: 560px) {
  .summary { gap: 10px; }
  .sum { padding: 16px; border-radius: var(--radius-card); }
  .sum .ph-duotone { font-size: 22px; }
  .sum b { margin-top: 8px; font-size: 13px; }
  .sum p { font-size: 15px; }
  .remedy, .owner { grid-template-columns: 1fr; }
  .body .lead { padding: 20px; font-size: 17px; }
  .table thead { display: none; }
  .table table, .table tbody, .table tr, .table th, .table td { display: block; width: 100%; }
  .table tbody tr { padding: 14px 16px; }
  .table tbody tr + tr { border-top: 1px solid var(--line); }
  .table tbody tr + tr td, .table tbody tr + tr th { border-top: 0; }
  .table th, .table td { padding: 2px 0; }
  .table tbody th { width: 100%; }
  .table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--text-3); margin-top: 8px; }
}
