/* Styles for /tools. Uses the site tokens from /styles.css. No inline styles are used anywhere (CSP). */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tool-page { padding-bottom: 5rem; font-size: 1.05rem; }
.tool-header { max-width: 860px; padding-top: 3rem; padding-bottom: 2rem; }
.tool-header h1 { margin-bottom: 1.2rem; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.06; color: var(--burgundy-dark); }
.tool-intro { max-width: 760px; margin: 0; font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.55; }
.tool-page .breadcrumbs { margin-bottom: 1.6rem; }
.tool-page .breadcrumbs span:first-child { margin-left: 0; }
.tool-page .breadcrumbs a + span { margin-inline: .55rem; }

.tool-card { margin-top: 1.5rem; padding: 1.5rem; border: 1px solid var(--rule); background: var(--paper); font-family: var(--sans); }
.tool-card h3, .tool-card h4 { font-family: var(--serif); }
.tool-section { margin-top: 3rem; max-width: 860px; }
.tool-section h2 { margin-bottom: 1rem; font-size: clamp(1.6rem, 4vw, 2.3rem); color: var(--burgundy-dark); }
.tool-section h3 { margin: 1.6rem 0 .4rem; font-size: 1.2rem; color: var(--burgundy); line-height: 1.25; }
.tool-section p { margin: 0 0 1rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }
.steps { padding-left: 1.3rem; }
.steps li { margin-bottom: .7rem; padding-left: .2rem; }
.link-list { padding-left: 1.1rem; }
.link-list li { margin-bottom: .45rem; }
.review-line { margin-top: 1.5rem; color: var(--muted); font-family: var(--sans); font-size: .85rem; }

/* Controls */
.tool-btn { min-height: 44px; min-width: 44px; padding: .6rem 1rem; border: 1px solid var(--burgundy); background: transparent; color: var(--burgundy); font-family: var(--sans); font-size: .92rem; font-weight: 700; cursor: pointer; }
.tool-btn:hover { background: #f1e5d3; }
.tool-btn-primary { background: var(--burgundy); color: white; }
.tool-btn-primary:hover { background: var(--burgundy-dark); }
.tool-btn-quiet { border-color: var(--rule); color: var(--ink); }
.date-bar, .year-form, .action-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; }
.action-bar { margin-top: 1.2rem; }
.date-field { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 700; flex: 1 1 10rem; max-width: 16rem; }
.date-field input, .field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: .6rem .7rem; border: 1px solid var(--rule); border-radius: 0; background: white; color: var(--ink); font-family: var(--sans); font-size: 1rem; }
.field textarea { min-height: 5.5rem; resize: vertical; line-height: 1.45; }
.field { margin-bottom: 1rem; }
.field label, .mode-set legend { display: block; margin-bottom: .3rem; font-size: .85rem; font-weight: 700; }
.field-hint { margin: 0 0 .4rem; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.mode-set { margin: 0 0 1rem; padding: 0; border: 0; }
.segmented { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.segment { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--burgundy); background: transparent; color: var(--burgundy); font-family: var(--sans); font-size: .9rem; font-weight: 700; cursor: pointer; text-align: center; }
.segment input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
button.segment[aria-pressed="true"], .segment:has(input:checked) { background: var(--burgundy); color: white; }
.segment:has(input:focus-visible) { outline: 3px solid var(--peach); outline-offset: 3px; }
.form-error { margin: .8rem 0 0; padding: .7rem .9rem; border-left: 4px solid var(--burgundy); background: #f6e3de; font-family: var(--sans); font-size: .92rem; }
.status-line { min-height: 1.4rem; margin: .7rem 0 0; color: var(--muted); font-family: var(--sans); font-size: .85rem; }
.privacy-note { margin: .4rem 0 0; padding: .8rem 1rem; background: #efe5d3; font-family: var(--sans); font-size: .85rem; line-height: 1.5; }
[hidden] { display: none !important; }

/* Results */
.result-panel { margin-top: 1.4rem; font-family: var(--serif); }
.result-date { margin: 0; font-family: var(--sans); font-size: .9rem; font-weight: 700; }
.result-season { margin: .2rem 0 .8rem; color: var(--muted); font-family: var(--sans); font-size: .85rem; }
.result-title { margin: 0 0 .4rem; font-size: clamp(2rem, 7vw, 3rem); line-height: 1.05; color: var(--burgundy-dark); }
.result-reason { margin: 0 0 1.2rem; font-size: 1.05rem; }
.mystery-list { margin: 0; padding: 0; list-style: none; }
.mystery-list li { display: grid; grid-template-columns: 2.4rem 1fr; gap: .8rem; padding: .9rem 0; border-top: 1px solid var(--rule); }
.mystery-list h3, .mystery-list h4 { margin: 0 0 .2rem; font-size: 1.15rem; line-height: 1.25; color: var(--ink); }
.mystery-list p { margin: 0 0 .3rem; font-size: .98rem; }
.mystery-ref { font-family: var(--sans); font-size: .85rem !important; color: var(--muted); }
.mystery-ref .dot { margin-inline: .35rem; }
.mystery-number { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid var(--burgundy); border-radius: 50%; color: var(--burgundy); font-family: var(--sans); font-size: .9rem; font-weight: 700; }
.mystery-list.compact { margin-top: 1rem; }
.stat-grid, .today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 0 0 1rem; }
.stat-grid div, .today-grid div { padding: .8rem .9rem; background: white; border: 1px solid var(--rule); font-family: var(--sans); }
.stat-grid dt, .today-grid dt { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.stat-grid dd, .today-grid dd { margin: .25rem 0 0; font-family: var(--serif); font-size: 1.2rem; line-height: 1.25; color: var(--burgundy-dark); }

/* Tables scroll inside their wrapper, never the page */
.table-wrap { max-width: 100%; margin: 1.2rem 0; overflow-x: auto; }
.tool-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .9rem; }
.tool-table caption { padding-bottom: .6rem; text-align: left; font-weight: 700; }
.tool-table th, .tool-table td { padding: .65rem .6rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.tool-table thead th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tool-table tbody th { font-weight: 700; }
.tool-table .is-selected { background: #f1e5d3; }
.note-cell { color: var(--muted); }

.sequence { padding-left: 1.3rem; }
.sequence li { margin-bottom: .45rem; }
.prayer { border-top: 1px solid var(--rule); }
.prayer:last-child { border-bottom: 1px solid var(--rule); }
.prayer summary { display: flex; align-items: center; min-height: 48px; padding: .4rem 0; cursor: pointer; font-family: var(--sans); font-size: 1rem; font-weight: 700; color: var(--burgundy-dark); }
.prayer p { margin: 0 0 1rem; }
.prayer div { padding-bottom: .8rem; }

.saved-list { padding: 0; margin: 0; list-style: none; font-family: var(--sans); }
.saved-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem 0; border-top: 1px solid var(--rule); }
.saved-list .empty { color: var(--muted); }
.structure-summary { margin: 0 0 1rem; font-family: var(--serif); }

.tool-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; margin-top: 2.5rem; padding: 1.6rem; background: var(--burgundy); color: white; }
.tool-cta h2 { margin: 0 0 .4rem; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.1; color: white; }
.tool-cta p { margin: 0; max-width: 520px; }
.tool-cta .button { border-color: var(--paper); background: var(--paper); color: var(--burgundy-dark); min-height: 44px; }

.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.hub-card { display: flex; flex-direction: column; padding: 1.4rem; border: 1px solid var(--rule); background: var(--paper); }
.hub-card h2 { margin: .3rem 0 .6rem; font-size: 1.5rem; line-height: 1.15; }
.hub-card h2 a { color: var(--burgundy-dark); text-decoration: none; }
.hub-card p { flex: 1; margin: 0 0 1rem; }
.hub-card .text-link { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--sans); }
.hub-number { color: var(--burgundy); font-family: var(--sans); font-size: .75rem; font-weight: 700; letter-spacing: .12em; }

.print-sheet { display: none; }

@media (max-width: 760px) {
  .tool-header { padding-top: 2rem; padding-bottom: 1rem; }
  .tool-card { padding: 1rem; margin-inline: -.25rem; }
  .date-bar .date-field { flex: 1 1 100%; max-width: none; order: -1; }
  .date-bar .tool-btn, .year-form .tool-btn, .action-bar .tool-btn { flex: 1 1 auto; }
  .year-form .date-field { flex: 1 1 100%; max-width: none; }
  .tool-cta { flex-direction: column; align-items: flex-start; padding: 1.2rem; }
  .tool-cta .button { width: 100%; text-align: center; padding-block: .95rem; }
  .segment { flex: 1 1 auto; }
  .note-cell { display: none; }
  .tool-table th, .tool-table td { padding: .55rem .4rem; }
}

@media print {
  body.tool-page-body > *:not(main), .site-header, .site-footer, .skip-link { display: none !important; }
  body.tool-page-body main > .tool-page > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: block !important; color: black; font-family: var(--serif); }
  .print-sheet h1 { margin: 0 0 .3rem; font-size: 22pt; }
  .print-sheet .print-date { margin: 0 0 1rem; font-size: 11pt; }
  .print-sheet h2 { margin: 1rem 0 .2rem; font-size: 12pt; }
  .print-sheet .print-lines { min-height: 4.2rem; border-bottom: 1px solid #999; white-space: pre-wrap; font-size: 11pt; line-height: 1.6; }
  .print-sheet .print-foot { margin-top: 1.2rem; font-size: 9pt; color: #555; }
  html { background: white; }
}
