/* DEADWORK free tools (guide pages with "tool": true). Loads after guide.css.
   Mono text stays uppercase: the self-hosted JetBrains Mono is subset to capitals. */
.tc { margin-top: clamp(28px, 4vw, 44px); }
.tc-form { padding: clamp(20px, 3vw, 30px); background: #F4F1EA; border: 1px solid var(--line-2); }
.tc-field + .tc-field { margin-top: 18px; }
.tc-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.tc-label label { font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.tc-label label i { font-style: normal; color: var(--ink-3); }
.tc-n { font: 500 11px/1.4 var(--mono); letter-spacing: .1em; color: var(--ink-3); white-space: nowrap; }
.tc input[type="text"], .tc textarea {
  display: block; width: 100%; box-sizing: border-box; padding: 12px 14px;
  font: 400 16px/1.5 var(--sans); color: var(--ink); background: #fff;
  border: 1px solid var(--line-2); border-radius: 0; -webkit-appearance: none; appearance: none;
}
.tc textarea { resize: vertical; min-height: 96px; }
.tc #tc-kw { min-height: 132px; }
.tc input[type="text"]:focus, .tc textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.tc-sites { margin: 20px 0 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.tc-sites legend { float: left; margin-right: 6px; font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); padding: 0; }
.tc-sites label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 15px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; }
.tc-sites input { accent-color: #141412; width: 16px; height: 16px; margin: 0; }
.tc-actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.tc-btn { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 12px 16px; background: var(--ink); color: #EBE5D8; border: 0; cursor: pointer; }
.tc-btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.tc-private { font-size: 14px; color: var(--ink-3); }

.tc-out { margin-top: 22px; }
.tc-summary { padding: 18px 22px; background: var(--ink); color: #EBE5D8; }
.tc-summary strong { display: block; font: 800 clamp(22px, 3vw, 28px)/1.1 var(--sans); font-stretch: 85%; text-transform: uppercase; }
.tc-summary span { display: block; margin-top: 8px; font-size: 15px; color: #CFC8B8; }
.tc-block { margin-top: 18px; padding: 18px 22px; border: 1px solid var(--line-2); background: #F4F1EA; }
.tc-block h3, .tc-site h3 { font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.tc-out ul { margin-top: 10px; }
.tc-out li { position: relative; padding: 8px 0 8px 26px; font-size: 15.5px; line-height: 1.5; border-top: 1px solid var(--line); }
.tc-out li:first-child { border-top: 0; }
.tc-out li::before { position: absolute; left: 0; top: 8px; width: 18px; text-align: center; font: 700 13px/1.5 var(--sans); }
.tc-out li.tc-ok::before { content: '\2713'; color: #3D6E39; }
.tc-out li.tc-warn::before { content: '!'; color: #A86A00; }
.tc-out li.tc-fail::before { content: '\00D7'; color: #C8201A; font-size: 17px; top: 6px; }
.tc-out li.tc-info::before { content: 'i'; color: var(--ink-3); font-style: italic; font-family: Georgia, serif; }
.tc-out li b { font-weight: 650; }
.tc-out li i { font-style: normal; text-decoration: underline; text-underline-offset: 3px; }
.tc-sitelist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.tc-site { padding: 16px 18px; background: #fff; border: 1px solid var(--line-2); border-top: 3px solid var(--ink-3); }
.tc-site.tc-ok { border-top-color: #3D6E39; }
.tc-site.tc-warn { border-top-color: #A86A00; }
.tc-site.tc-fail { border-top-color: #C8201A; }
.tc-site header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tc-chip { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 6px 8px; color: #fff; background: var(--ink-3); }
.tc-ok .tc-chip { background: #3D6E39; }
.tc-warn .tc-chip { background: #A86A00; }
.tc-fail .tc-chip { background: #C8201A; }
.tc-site li { font-size: 14.5px; }

.tc-clean ol { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: k; }
.tc-clean ol li { counter-increment: k; padding: 6px 10px; border: 1px solid var(--line-2); background: #fff; font-size: 14.5px; line-height: 1.3; }
.tc-clean ol li::before { content: none; }
.tc-clean ol li.tc-top { background: var(--ink); color: #EBE5D8; border-color: var(--ink); }
.tc-clean ol li.tc-top::after { content: counter(k); margin-left: 7px; font: 500 10px/1 var(--mono); color: #E3B23D; }
.tc-clean-note { margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }
.tc-clean .tc-actions { margin-top: 14px; }

.tc-pitch { margin-top: 18px; padding: 18px 22px; border-left: 3px solid #C8201A; background: transparent; }
.tc-pitch p { font-size: 16px; line-height: 1.55; }
.tc-pitch p + p { margin-top: 10px; }
.tc-pitch a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; font-weight: 600; }

@media (max-width: 640px) {
  .tc-sitelist { grid-template-columns: 1fr; }
  .tc-form, .tc-block, .tc-summary { padding-left: 16px; padding-right: 16px; }
  .tc-sites legend { float: none; width: 100%; margin-bottom: 4px; }
}

/* Camera gear checklist maker (Loadout tool). */
.gl-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.gl-row .tc-field + .tc-field { margin-top: 0; }
.gl select, .gl input[type="number"] {
  display: block; width: 100%; box-sizing: border-box; padding: 12px 14px; font: 400 16px/1.5 var(--sans); color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: 0; -webkit-appearance: none; appearance: none;
}
.gl select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23141412' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
.gl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.gl-kit { padding: 16px 18px; background: #fff; border: 1px solid var(--line-2); }
.gl-kit h3 { font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.gl-out .gl-kit ul { margin-top: 8px; }
.gl-out li.gl-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.gl-out li.gl-item::before { content: none; }
.gl-item label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; line-height: 1.35; }
.gl-item input[type="checkbox"] { accent-color: #141412; width: 17px; height: 17px; margin: 0; flex: none; }
.gl-off label span { color: var(--ink-3); text-decoration: line-through; }
.gl input.gl-n { width: 58px; flex: none; padding: 6px 8px; font-size: 15px; text-align: center; -moz-appearance: textfield; }
.gl-add { display: flex; gap: 8px; margin-top: 10px; }
.gl .gl-add input { flex: 1; min-width: 0; padding: 8px 10px; font: 400 15px/1.4 var(--sans); border: 1px solid var(--line-2); border-radius: 0; }
.gl-add .tc-btn { padding: 10px 12px; }
.gl-print-title { display: none; }
.gl .tc-pitch { margin-top: 18px; }
@media (max-width: 640px) {
  .gl-row { grid-template-columns: 1fr 1fr; }
  .gl-row .tc-field:first-child { grid-column: 1 / -1; }
  .gl-list { grid-template-columns: 1fr; }
}
@media print {
  body * { visibility: hidden; }
  #gl-list, #gl-list *, #gl-print-title { visibility: visible; }
  #gl-print-title { display: block; position: absolute; left: 0; top: 0; font: 700 16px/1.3 sans-serif; }
  #gl-list { position: absolute; left: 0; top: 32px; width: 100%; display: block; columns: 2; column-gap: 24px; }
  .gl-kit { break-inside: avoid; border: 0; padding: 0 0 12px; }
  .gl-add, .gl-off, .gl-empty { display: none !important; }
  .gl-item input[type="checkbox"] { display: none; }
  .gl-item label::before { content: ''; width: 11px; height: 11px; border: 1px solid #000; flex: none; }
  .gl-item label::after { content: ''; width: 11px; height: 11px; border: 1px solid #000; flex: none; order: -1; }
  .gl input.gl-n { border: 0; width: 34px; padding: 0; }
  .gl-out li.gl-item { border-top: 1px solid #ccc; padding: 4px 0; }
}

/* Profit calculator (pc-*) */
.pc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.pc-grid .tc-field + .tc-field { margin-top: 0; }
.pc-in { position: relative; }
.pc-in input[type="text"] { font-variant-numeric: tabular-nums; }
.pc-in.pc-dollar input[type="text"] { padding-left: 28px; }
.pc-in.pc-dollar::before { content: '$'; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 16px; }
.pc-hint { margin-top: 6px; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }
.pc-range { margin-top: 20px; }
.pc-range input[type="range"] { width: 100%; accent-color: #141412; }
.pc-empty { margin-top: 22px; padding: 18px 22px; border: 1px dashed var(--line-2); color: var(--ink-2); font-size: 15.5px; }
.pc-now { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: #3a3833; border: 1px solid var(--ink); }
.pc-now div { padding: 16px 18px; background: var(--ink); color: #EBE5D8; min-width: 0; }
.pc-now b { display: block; font: 800 clamp(24px, 3.2vw, 32px)/1.05 var(--sans); font-stretch: 85%; font-variant-numeric: tabular-nums; }
.pc-now span { display: block; margin-top: 6px; font-size: 13.5px; line-height: 1.35; color: #CFC8B8; }
.pc-table td, .pc-table th { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-table td:first-child { font-weight: 600; }
.pc-table em { font-style: normal; font-weight: 400; color: #C8201A; font-size: 13px; margin-left: 4px; }
.pc-table tr.pc-mine td { background: #fff; }
.pc-note { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.pc-next { margin-top: 18px; padding: 20px 22px; border: 1px solid var(--ink); background: #fff; }
.pc-next h3 { font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #C8201A; }
.pc-next-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.pc-next-row div { min-width: 0; }
.pc-next-row b { display: block; font: 750 clamp(19px, 2.4vw, 22px)/1.15 var(--sans); font-stretch: 90%; font-variant-numeric: tabular-nums; }
.pc-next-row span { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.pc-next p { margin-top: 14px; font-size: 15.5px; line-height: 1.55; }
.pc-next .tc-actions { margin-top: 14px; }
.pc-next a.tc-btn { text-decoration: none; display: inline-block; }
@media (max-width: 640px) {
  .pc-grid, .pc-next-row { grid-template-columns: 1fr; }
}
.pc-how { margin-top: 14px; font-size: 14.5px; }
.pc-how summary { cursor: pointer; font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.pc-how ul { margin-top: 8px; }
.pc-how li { padding: 6px 0 6px 0; border-top: 0; font-variant-numeric: tabular-nums; }
.pc-how li::before { content: none; }
.pc-now-h { grid-column: 1 / -1; padding: 10px 18px 0; background: var(--ink); font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #E3B23D; }
.pc-per { display: inline-flex; border: 1px solid var(--line-2); background: #fff; }
.pc-per label { display: inline-flex; align-items: center; cursor: pointer; font: 500 10.5px/1 var(--mono) !important; letter-spacing: .12em; text-transform: uppercase; }
.pc-per input { position: absolute; opacity: 0; pointer-events: none; }
.pc-per span { padding: 7px 10px; color: var(--ink-2); }
.pc-per input:checked + span { background: var(--ink); color: #EBE5D8; }
.pc-per input:focus-visible + span { outline: 2px solid #C8201A; outline-offset: -2px; }
@media (max-width: 640px) { .pc-now { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pc-now div { padding: 12px 10px; } .pc-now b { font-size: 19px; } .pc-now-h { padding: 10px 10px 0; } }
.pc-ref { margin-top: 18px; padding: 16px 22px; border: 1px solid var(--line-2); background: #F4F1EA; }
.pc-ref summary { cursor: pointer; font-weight: 650; font-size: 16px; }
.pc-ref > p { margin-top: 10px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.pc-ref .g-table-wrap { margin-top: 12px; }
.pc-ref-table td { font-size: 14.5px; }
.pc-ref-table td:first-child { white-space: nowrap; }
.pc-ref-table a, .pc-ref .pc-note a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.pc-use { font: 600 14.5px/1 var(--sans); font-variant-numeric: tabular-nums; padding: 7px 10px; background: #fff; border: 1px solid var(--ink); cursor: pointer; }
.pc-use:hover, .pc-use:focus-visible { background: var(--ink); color: #EBE5D8; }
@media (max-width: 640px) { .pc-ref { padding: 14px 16px; } }
.pc-in--per input[type="text"] { padding-right: 172px; }
.pc-in--per .pc-per { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); }
@media (max-width: 380px) { .pc-in--per input[type="text"] { padding-right: 150px; } .pc-per span { padding: 7px 7px; } }

/* Clip spec checker. */
.cs-drop { position: relative; display: block; padding: clamp(28px, 5vw, 44px) 20px; text-align: center; background: #fff; border: 1.5px dashed var(--ink-3); cursor: pointer; }
.cs-drop.cs-over { border-color: var(--ink); background: #FBFAF6; }
.cs-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.cs-drop strong { display: block; font: 800 clamp(20px, 3vw, 26px)/1.1 var(--sans); font-stretch: 85%; text-transform: uppercase; }
.cs-drop span { display: block; margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.cs-drop .tc-btn { display: inline-block; margin-top: 16px; pointer-events: none; }
.cs-status { margin-top: 12px; font-size: 15px; color: var(--ink-2); min-height: 1px; }
.cs-file { margin-top: 12px; border: 1px solid var(--line-2); background: #F4F1EA; }
.cs-file > summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; padding: 14px 18px; cursor: pointer; list-style: none; }
.cs-file > summary::-webkit-details-marker { display: none; }
.cs-name { font-weight: 650; font-size: 16px; word-break: break-all; }
.cs-name::before { content: '+'; display: inline-block; width: 18px; font-weight: 700; }
.cs-file[open] .cs-name::before { content: '\2212'; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-chips i { font: 500 10.5px/1 var(--mono); font-style: normal; letter-spacing: .1em; text-transform: uppercase; padding: 6px 8px; color: #fff; background: var(--ink-3); }
.cs-chips i.tc-ok { background: #3D6E39; }
.cs-chips i.tc-warn { background: #A86A00; }
.cs-chips i.tc-fail { background: #C8201A; }
.cs-body { padding: 0 18px 18px; }
.cs-spec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); margin: 0; }
.cs-spec div { background: #fff; padding: 10px 12px; }
.cs-spec dt { font: 500 10.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.cs-spec dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
.cs-body .tc-sitelist { margin-top: 12px; }
.cs-all { margin-top: 12px; }
@media (max-width: 640px) {
  .cs-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-body { padding: 0 12px 14px; }
  .cs-file > summary { padding: 12px 14px; }
}

/* Upload sheet converter. */
.sc-drop { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; background: #fff; border: 1.5px dashed var(--ink-3); }
.sc-drop.cs-over { border-color: var(--ink); background: #FBFAF6; }
.sc-drop span { font-size: 15px; color: var(--ink-2); }
.sc-drop label { cursor: pointer; }
.sc-drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tc #sc-in { min-height: 170px; font: 400 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; overflow-x: auto; }
.sc-opts { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.sc-opts label { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.sc-opts input[type="checkbox"] { accent-color: #141412; width: 16px; height: 16px; margin: 0; }
.tc .sc-opts input[type="text"] { display: inline-block; width: 92px; padding: 8px 10px; }
.sc-msg { margin-top: 12px; font-size: 15px; color: #C8201A; min-height: 1px; }
.sc-peek { margin-top: 12px; overflow-x: auto; border: 1px solid var(--line-2); }
.sc-peek table { border-collapse: collapse; font-size: 12.5px; line-height: 1.35; min-width: 100%; }
.sc-peek th { font: 500 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-align: left; color: var(--ink-3); background: #F4F1EA; padding: 6px 8px; white-space: nowrap; }
.sc-peek td { padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; min-width: 120px; max-width: 220px; overflow-wrap: break-word; }
.sc-sitelist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sc-sitelist .tc-actions { margin-top: 14px; }
@media (max-width: 900px) { .sc-sitelist { grid-template-columns: minmax(0, 1fr); } }

/* Gamma shift checker. */
.gs-spec { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.gs-bars { margin-top: 14px; }
.gs-bars p { font: 500 10.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 10px 0 6px; }
.gs-bars div { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); height: 38px; border: 1px solid var(--line-2); }
.gs-bars i { display: block; }
.gs-bars span { display: block; margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }
@media (max-width: 640px) { .gs-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Archive cost calculator. */
.ac-h { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line-2); margin-bottom: 12px; font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.ac-h i { font-style: normal; color: var(--ink-3); }
.pc-grid.ac-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pc-grid.ac-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ac-years { margin-top: 0; }
.ac-select { display: block; width: 100%; box-sizing: border-box; padding: 12px 14px; font: 400 16px/1.5 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 0; }
.ac-rows { margin-top: 12px; }
.tc-out .ac-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.tc-out .ac-row:first-child { border-top: 0; }
.tc-out .ac-row::before { content: none; }
.ac-name b, .ac-num b { display: block; font-weight: 650; font-size: 16px; font-variant-numeric: tabular-nums; }
.ac-name span, .ac-num span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--ink-3); }
.ac-num { text-align: right; }
.ac-bar { height: 12px; background: #E6E0D2; }
.ac-bar i { display: block; height: 100%; background: var(--ink); }
.ac-row.ac-off { grid-template-columns: 1fr; opacity: .7; }
@media (max-width: 900px) { .pc-grid.ac-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .pc-grid.ac-grid3, .pc-grid.ac-grid4 { grid-template-columns: 1fr; }
  .tc-out .ac-row { grid-template-columns: 1fr; gap: 6px; }
  .ac-num { text-align: left; }
}
