/* Shared styles for tool pages, templates, planners and service pages (v11).
   Builds on style.css and guides.css; adds no navigation rules. */
.tool-ui { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.tool-ui * { min-width: 0; }
.tool-ui label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--dark, #12444b); }
.tool-ui input[type="text"], .tool-ui input[type="number"], .tool-ui input[type="date"], .tool-ui input[type="time"],
.tool-ui input[type="file"], .tool-ui input[type="search"], .tool-ui select, .tool-ui textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border, #dce9e4); border-radius: 10px;
  background: #fff; color: var(--text, #1c3b3e); font: inherit; font-weight: 400;
}
.tool-ui textarea { min-height: 170px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.5; }
.tool-ui input[type="range"] { width: 100%; }
.tool-ui input:focus-visible, .tool-ui select:focus-visible, .tool-ui textarea:focus-visible,
.tool-ui button:focus-visible, .tool-ui a:focus-visible { outline: 3px solid #76a2f4; outline-offset: 2px; }
.t-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.t-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.t-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.t-check { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.t-check input { width: auto; }
.t-btn { padding: 10px 16px; border: 1px solid var(--primary, #087f78); border-radius: 10px; background: var(--primary, #087f78); color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; }
.t-btn:hover { background: var(--primary-strong, #08665f); }
.t-btn.alt { background: #fff; color: var(--primary, #087f78); }
.t-btn.alt:hover { background: var(--primary-soft, #e5f4ef); }
.t-btn.danger { border-color: #dc2626; background: #fff; color: #dc2626; }
.t-btn.sm { padding: 5px 10px; font-size: .85rem; }
.t-status { min-height: 1.4em; color: var(--muted, #647a79); font-size: .92rem; }
.t-status.err { color: #b91c1c; }
.t-status.ok { color: #166534; }
.t-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.t-stat { padding: 14px; border: 1px solid var(--border, #dce9e4); border-radius: 12px; background: var(--bg, #f6faf8); }
.t-stat span { display: block; color: var(--muted, #647a79); font-size: .85rem; }
.t-stat strong { display: block; margin-top: 2px; color: var(--dark, #12444b); font-size: 1.25rem; overflow-wrap: anywhere; }
.t-stat.good strong { color: #166534; }
.t-stat.bad strong { color: #b91c1c; }
.t-out { margin: 0; padding: 14px; border: 1px solid var(--border, #dce9e4); border-radius: 12px; background: #f8fbfa; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; font: .88rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.t-preview { max-width: 100%; height: auto; border: 1px solid var(--border, #dce9e4); border-radius: 12px; background: repeating-conic-gradient(#f1f5f4 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.t-canvas { max-width: 100%; touch-action: none; cursor: crosshair; border: 1px solid var(--border, #dce9e4); border-radius: 12px; }
.t-files { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.t-files li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border, #dce9e4); border-radius: 10px; background: #fff; overflow-wrap: anywhere; }
.t-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.t-thumbs li { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--border, #dce9e4); border-radius: 12px; background: #fff; text-align: center; }
.t-thumbs img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border, #dce9e4); }
.t-bar { display: flex; height: 14px; overflow: hidden; border-radius: 99px; background: #e5ece9; }
.t-bar i { display: block; height: 100%; }
.t-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .88rem; color: var(--muted, #647a79); }
.t-legend b { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; }
.t-table-wrap { position: relative; overflow-x: auto; max-width: 100%; border: 1px solid var(--border, #dce9e4); border-radius: 12px; background: #fff; }
.t-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.t-table th, .t-table td { padding: 8px 10px; border-bottom: 1px solid var(--border, #dce9e4); text-align: left; vertical-align: middle; }
.t-table th { background: var(--bg, #f6faf8); color: var(--dark, #12444b); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.t-table td.num, .t-table th.num { text-align: right; white-space: nowrap; }
.t-table tr:last-child td { border-bottom: 0; }
.t-table td input, .t-table td select { min-width: 90px; padding: 6px 8px; font-size: .9rem; border-radius: 8px; }
.t-table td.wide input { min-width: 170px; }
.t-empty { padding: 18px; color: var(--muted, #647a79); text-align: center; }
.t-mark { background: #fde68a; color: #422006; border-radius: 3px; }
.t-gantt { display: block; width: 160px; height: 10px; border-radius: 99px; background: #e5ece9; position: relative; overflow: hidden; }
.t-gantt i { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: var(--primary, #087f78); }
.t-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.t-col { padding: 12px; border: 1px solid var(--border, #dce9e4); border-radius: 12px; background: var(--bg, #f6faf8); }
.t-col h3 { margin: 0 0 10px; font-size: .95rem; }
.t-card { display: grid; gap: 4px; margin-bottom: 8px; padding: 10px; border: 1px solid var(--border, #dce9e4); border-radius: 10px; background: #fff; font-size: .9rem; overflow-wrap: anywhere; }
.t-card .t-row { margin-top: 6px; }
.t-card select { padding: 5px 8px; font-size: .85rem; }

/* printable business documents */
.doc-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.doc-wrap > * { min-width: 0; }
@media (min-width: 1280px) { .doc-wrap.has-preview { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.doc-preview { position: relative; padding: 26px; border: 1px solid var(--border, #dce9e4); border-radius: 12px; background: #fff; color: #111; font-size: .92rem; overflow-x: auto; }
.doc-preview h2 { margin: 0 0 4px; font-size: 1.6rem; letter-spacing: .02em; text-transform: uppercase; }
.doc-preview .doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.doc-preview table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.doc-preview th, .doc-preview td { padding: 7px 8px; border-bottom: 1px solid #ddd; text-align: left; }
.doc-preview th { background: #f3f6f5; font-size: .8rem; text-transform: uppercase; }
.doc-preview .r { text-align: right; }
.doc-preview .tot { margin-left: auto; width: min(100%, 300px); }
.doc-preview .tot div { display: flex; justify-content: space-between; padding: 4px 0; }
.doc-preview .tot .grand { border-top: 2px solid #111; margin-top: 4px; padding-top: 8px; font-weight: 800; font-size: 1.05rem; }
#print-area { display: none; }
@media print {
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block; padding: 0; }
  body.printing .doc-preview { border: 0; padding: 0; }
}

/* article / service page helpers */
.svc-hero { padding: 22px; border: 1px solid var(--border, #dce9e4); border-radius: 18px; background: linear-gradient(125deg, rgba(8,127,120,.1), #fff 60%); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; margin: 14px 0; }
.svc-grid > div { padding: 16px; border: 1px solid var(--border, #dce9e4); border-radius: 14px; background: #fff; }
.svc-grid h3 { margin: 0 0 6px; font-size: 1.05rem; }
.svc-grid p { margin: 0; color: var(--muted, #647a79); font-size: .94rem; }
.cta-box { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 22px 0; padding: 20px; border-radius: 16px; background: var(--dark, #12444b); color: #fff; }
.cta-box strong { display: block; font-size: 1.1rem; }
.cta-box span { color: #cfe6e1; font-size: .94rem; }
.cta-box .t-btn { background: #fff; color: var(--dark, #12444b); border-color: #fff; }
.faq-list details { margin: 8px 0; padding: 12px 14px; border: 1px solid var(--border, #dce9e4); border-radius: 12px; background: #fff; }
.faq-list summary { font-weight: 700; cursor: pointer; color: var(--dark, #12444b); }
.faq-list p { margin: 8px 0 0; }
.sheet-cols { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sheet-cols li { padding: 10px 12px; border: 1px solid var(--border, #dce9e4); border-radius: 10px; background: #fff; }
.guide-article table.plain { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .94rem; }
.guide-article table.plain th, .guide-article table.plain td { padding: 8px 10px; border: 1px solid var(--border, #dce9e4); text-align: left; vertical-align: top; }
.guide-article table.plain th { background: var(--bg, #f6faf8); }
.guide-article pre.code { margin: 12px 0; padding: 14px; border-radius: 12px; background: #0f172a; color: #e2e8f0; overflow-x: auto; font: .88rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.guide-article { overflow-wrap: anywhere; }
.guide-article .table-scroll { overflow-x: auto; max-width: 100%; }
