/* Shared styles for the free tool pages (/tools/*). Classes used by markup that
   JavaScript builds live here, because tailwind.css only scans .html files. */
body { font-family: 'DM Sans', system-ui, sans-serif; background: #f9f8f5; color: #0a0f1a; }
h1, h2, h3 { font-family: 'Newsreader', 'Newsreader Fallback', Georgia, serif; }
.card { background: #fff; border-radius: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06); }

.ft-label { display: block; font-size: .875rem; font-weight: 500; color: #374151; margin-bottom: .375rem; }
.ft-help { font-size: .75rem; color: #6b7280; margin-top: .25rem; }
.ft-input, .ft-select, .ft-textarea {
  width: 100%; border: 1px solid #e5e7eb; border-radius: .75rem; padding: .7rem .9rem;
  font-size: 16px; /* 16px stops iOS zooming into the field */ color: #0a0f1a; background: #fff;
}
.ft-input:focus, .ft-select:focus, .ft-textarea:focus { outline: none; border-color: transparent; box-shadow: 0 0 0 2px #4ade80; }
.ft-textarea { min-height: 5.5rem; resize: vertical; }
.ft-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: #374151; }
.ft-check input { margin-top: .2rem; width: 1.1rem; height: 1.1rem; accent-color: #166534; flex-shrink: 0; }
.ft-seg { display: flex; border: 1px solid #e5e7eb; border-radius: .75rem; overflow: hidden; }
.ft-seg label { flex: 1; text-align: center; font-size: .875rem; padding: .6rem .5rem; cursor: pointer; background: #fff; color: #374151; }
.ft-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ft-seg input:checked + span { color: #fff; }
.ft-seg label:has(input:checked) { background: #166534; color: #fff; }
.ft-seg input:focus-visible + span { outline: 2px solid #4ade80; outline-offset: 2px; }

.ft-btn {
  display: block; width: 100%; background: #166534; color: #fff; font-weight: 600; font-size: 1rem;
  padding: .95rem 1.25rem; border-radius: .75rem; border: 0; cursor: pointer; text-align: center;
}
.ft-btn:hover { background: #14532d; }
.ft-btn:disabled { opacity: .7; cursor: wait; }
.ft-btn-ghost { background: #fff; color: #166534; border: 1px dashed #86d9ab; font-weight: 500; font-size: .875rem; padding: .55rem .9rem; border-radius: .6rem; cursor: pointer; }
.ft-btn-ghost:hover { background: #f0faf4; }
.ft-remove { background: none; border: 0; color: #9ca3af; font-size: .8rem; cursor: pointer; padding: .25rem .5rem; min-height: 44px; min-width: 44px; }
.ft-remove:hover { color: #dc2626; }

.ft-warnings { margin: 0 0 1rem; padding: .75rem 1rem .75rem 2rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: .75rem; color: #92400e; font-size: .875rem; list-style: disc; }
.ft-warnings[hidden] { display: none; }

/* The document preview: a sheet of paper. */
.doc-sheet { background: #fff; border: 1px solid #e5e7eb; border-radius: .5rem; padding: 1.5rem 1.25rem; font-family: 'Times New Roman', Times, Georgia, serif; font-size: .95rem; line-height: 1.55; color: #111827; overflow-wrap: anywhere; }
@media (min-width: 640px) { .doc-sheet { padding: 2.25rem 2.5rem; } }
.doc-sheet p { margin: 0 0 .7rem; }
.doc-title { text-align: center; font-weight: 700; letter-spacing: .03em; font-size: 1.05rem; margin-bottom: .25rem !important; }
.doc-subtitle { text-align: center; font-weight: 700; margin-bottom: .2rem !important; }
.doc-heading { font-weight: 700; margin-top: 1rem !important; }
.doc-center { text-align: center; }
.doc-clause { display: flex; gap: .6rem; }
.doc-n { flex-shrink: 0; min-width: 1.25rem; }
.doc-note { font-style: italic; color: #6b7280; font-size: .85rem; }
.doc-gap { height: .6rem; }
.doc-sig { margin-top: 1.6rem; max-width: 16rem; }
.doc-sig-line { border-top: 1px solid #111827; margin-bottom: .25rem; }
.doc-sig p { font-size: .85rem; margin: 0; }
.doc-kv, .doc-table { width: 100%; border-collapse: collapse; margin: .25rem 0 .9rem; font-size: .85rem; }
.doc-kv th, .doc-kv td, .doc-table th, .doc-table td { border: 1px solid #9ca3af; padding: .35rem .5rem; vertical-align: top; text-align: left; }
.doc-kv th { background: #f3f4f6; width: 42%; font-weight: 600; }
.doc-table th { background: #f3f4f6; }
.doc-table td { height: 1.6rem; }
mark.ph { background: #fef3c7; color: #92400e; border-radius: .2rem; padding: 0 .15rem; }

/* A share certificate gets a framed, centred look. */
.doc-sheet.is-certificate { border: 6px double #14532d; text-align: center; }
.doc-sheet.is-certificate .doc-title { font-size: 1.5rem; letter-spacing: .12em; }
.doc-sheet.is-certificate .doc-kv { max-width: 22rem; margin-left: auto; margin-right: auto; }
.doc-sheet.is-certificate .doc-sig { margin-left: auto; margin-right: auto; text-align: center; }
.doc-sheet.is-certificate p:not(.doc-title):not(.doc-subtitle) { text-align: left; }
.doc-sheet.is-certificate p.doc-center { text-align: center; }

/* ISC summary list */
.isc-person { border: 1px solid #e5e7eb; border-radius: .75rem; padding: .75rem .9rem; margin-bottom: .6rem; background: #fff; }
.isc-person.is-isc { border-color: #86d9ab; background: #f0faf4; }
.isc-badge { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .15rem .5rem; border-radius: 999px; background: #e5e7eb; color: #374151; }
.isc-person.is-isc .isc-badge { background: #166534; color: #fff; }
.isc-person ul { margin: .4rem 0 0 1.1rem; list-style: disc; font-size: .85rem; color: #4b5563; }
.holder { border: 1px solid #e5e7eb; border-radius: .75rem; padding: .9rem; margin-bottom: .75rem; background: #fcfcfb; }
.holder-owners { margin-top: .75rem; padding-left: .75rem; border-left: 3px solid #bbead1; }

details.faq { background: #fff; border: 1px solid #f3f4f6; border-radius: .9rem; padding: 1rem 1.15rem; margin-bottom: .6rem; }
details.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; color: #166534; font-weight: 700; }
details.faq[open] summary::after { content: '\2212'; }
details.faq p, details.faq ul { margin-top: .6rem; color: #4b5563; font-size: .95rem; line-height: 1.6; }
details.faq ul { list-style: disc; padding-left: 1.2rem; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* The on-screen preview is for reading, not lifting: it carries a repeating
   "PREVIEW · minutekeep.ca" watermark, its text cannot be selected or copied
   (free-tool-page.js also cancels copy and drag), and it does not print. The
   clean copy is the PDF, which needs a free account. */
#toolPreview { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#toolPreview::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='190'%3E%3Ctext x='150' y='105' text-anchor='middle' transform='rotate(-28 150 95)' font-family='Arial,Helvetica,sans-serif' font-size='22' font-weight='700' fill='%23166534' fill-opacity='0.13'%3EPREVIEW %C2%B7 minutekeep.ca%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
}
@media print {
  #toolPreview > * { display: none !important; }
  #toolPreview::before { content: 'Download the PDF to print this document.'; display: block; }
}
