/* Loop's free tools (NDA Template first). Built on site.css: same tokens, two-tone headings,
   cards and buttons as the landing page. The document itself is drawn as paper, light in both
   themes, because that is what downloads. */

.tool-page { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.tool-hero { padding: clamp(128px, 15vh, 168px) var(--gutter) 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.tool-hero h1 { font-size: clamp(42px, 6.6vw, 72px); font-weight: 400; line-height: 1.03; letter-spacing: -0.04em; color: var(--ink1); text-wrap: balance; }
.tool-hero h1 .soft { display: block; }
.tool-hero .sub { max-width: 25em; }

/* ---------- The tool: form beside the paper ---------- */
.tool-sec { margin-top: var(--s8); }
.nda { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: var(--s6); align-items: start; }

.nda-form { position: sticky; top: 96px; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); container-type: inline-size; }
/* The sample line fills the form's width at every size (its text is 16.9 times its font size wide). */
#sampleNote { font-size: 5.85cqi; line-height: 1.3; margin-bottom: 2px; }
.form-note { font-size: 14px; line-height: 1.45; color: var(--accent-text); }
.form-note[hidden] { display: none; }

.kind-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 11px; background: var(--tabs-bar-bg); }
.kind-seg input { position: absolute; opacity: 0; pointer-events: none; }
.kind-seg label { position: relative; z-index: 1; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 9px;
  font-size: 14.5px; font-weight: 500; color: var(--tabs-text-muted); cursor: pointer; transition: color var(--tabs-dur) var(--tabs-ease); }
.kind-seg input:checked + label { color: var(--tabs-text-active); }
.kind-seg .seg-pill { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 9px; background: var(--tabs-pill-bg);
  box-shadow: 0 1px 2px rgba(17, 22, 32, .08), 0 0 0 .5px rgba(17, 22, 32, .06); transition: transform var(--tabs-dur) var(--tabs-ease); }
.kind-seg:has(#k-oneway:checked) .seg-pill { transform: translateX(100%); }
.kind-seg input:focus-visible + label { outline: 2px solid var(--blue); outline-offset: -2px; }

.f { display: flex; flex-direction: column; gap: 6px; }
.f > span { font-size: 13.5px; font-weight: 500; color: var(--ink-strong); }
.f input, .f select, .f textarea { appearance: none; width: 100%; height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--well);
  font: inherit; font-size: 15px; color: var(--ink1); transition: box-shadow var(--quick) ease-out, background-color var(--quick) ease-out; }
.f input::placeholder { color: var(--ink3); }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; background: var(--card); box-shadow: 0 0 0 2px var(--blue); }
.f select { padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23868B95' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
.f select.is-empty { color: var(--ink3); }
.f input[type="date"] { line-height: 42px; }
.f textarea { height: auto; min-height: 66px; padding: 10px 12px; line-height: 1.4; resize: vertical; field-sizing: content; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }

.acts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); margin-top: var(--s1); }
.acts .btn { width: 100%; height: 46px; padding: 0 8px; font-size: 14.5px; font-weight: 600; }
button.btn { border: 0; font-family: inherit; cursor: pointer; }
.btn-white { background: var(--card); color: var(--ink1); box-shadow: var(--shadow-card); }
.btn-white:hover { box-shadow: var(--shadow-lift); }
.privacy { font-size: clamp(10.5px, 3.7cqi, 12px); line-height: 1.45; color: var(--ink3); text-align: center; text-wrap: balance; }

/* ---------- The paper ---------- */
.paper { position: relative; padding: clamp(28px, 5vw, 64px) clamp(22px, 5.4vw, 68px); border-radius: 14px; background: #FFFFFF; color: #16171B;
  box-shadow: var(--shadow-frame); font-family: "Times New Roman", Times, "Liberation Serif", serif; font-size: 15.5px; line-height: 1.55; }
:root[data-theme="dark"] .paper { background: #F4F4F1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .paper { background: #F4F4F1; } }
.paper .doc-title { margin: 6px 0 22px; text-align: center; font-size: 22px; font-weight: 700; letter-spacing: 0; line-height: 1.25; color: #16171B; }
.paper p { margin: 0 0 11px; text-wrap: pretty; }
.paper p.gap { margin-top: 20px; }
.paper b { font-weight: 700; }
.fld { padding: 0 2px; margin: 0 -2px; border-radius: 3px; background: rgba(75, 123, 227, .13); transition: background-color var(--quick) ease-out; }
.fld.is-sample { color: #4A5DA0; background: rgba(75, 123, 227, .09); }
.fld.flash { background: rgba(75, 123, 227, .28); }
.doc-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 18px; }
.sig-h { font-weight: 700; margin-bottom: 4px !important; }
.sig-l { display: flex; align-items: flex-end; gap: 10px; height: 34px; margin: 0 !important; font-size: 13.5px; }
.sig-l span { width: 62px; flex: none; }
.sig-l i { flex: 1; height: 1px; margin-bottom: 5px; background: rgba(22, 23, 27, .45); }

.sample-tag { position: absolute; top: 16px; right: 16px; height: 26px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 7px;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: #3B62B8; background: rgba(75, 123, 227, .12);
  transition: opacity var(--fast) var(--ease); }
.paper:not(.is-sample) .sample-tag { opacity: 0; }


/* ---------- One call to action, under the result ---------- */
.tool-cta { display: flex; align-items: center; gap: var(--s4); margin: var(--s6) auto 0; padding: var(--s4) var(--s4) var(--s4) var(--s5); }
.tool-cta img { width: 52px; height: 52px; flex: none; }
.tool-cta .tc-text { flex: 1; min-width: 0; }
.tool-cta h2 { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; color: var(--ink1); text-wrap: balance; }
.tool-cta p { margin-top: 3px; font-size: 15px; line-height: 1.45; color: var(--ink2); text-wrap: balance; }
.tool-cta .btn { flex: none; height: 44px; font-weight: 600; }
.tool-cta .apple-mark { width: 14px; height: auto; fill: currentColor; margin-top: -2px; }

/* ---------- Meet Loop: the landing page's own lines ---------- */
.meet-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); max-width: 860px; margin: var(--s7) auto 0; }
.meet-row { padding: var(--s5); }
.meet-row .label { display: block; }
.meet-row p { margin-top: var(--s2); font-size: 21px; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink1); }
.meet-more { margin-top: var(--s6); display: flex; justify-content: center; }
.meet-more .btn { height: 46px; padding: 0 22px; font-weight: 600; }

.tool-page .faq { margin-top: var(--s7); }
.tool-page .closer { padding-bottom: var(--s9); }

/* ---------- Smaller screens ---------- */
@media (max-width: 900px) {
  .nda { grid-template-columns: minmax(0, 1fr); }
  .nda-form { position: static; }
}
@media (max-width: 620px) {
  .tool-hero .sub { font-size: 18px; }
  .tool-cta { flex-direction: column; text-align: center; padding: var(--s5); }
  .meet-rows { grid-template-columns: minmax(0, 1fr); }
  .meet-row p { font-size: 19px; text-wrap: nowrap; }
  .paper { font-size: 14.5px; }
  .doc-sign { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .sample-tag { position: static; display: flex; width: max-content; margin: -6px auto 10px; }
}
@media (max-width: 360px) {
  .meet-row p { font-size: 17px; }
  .pair, .acts { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .kind-seg .seg-pill, .fld, .sample-tag { transition: none; }
}

/* ---------- Every clause, in plain words ---------- */
.clauses { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin: var(--s7) auto 0; max-width: var(--wide); }
.clause { padding: var(--s5); }
.clause-n { display: block; font-size: 13px; font-weight: 500; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.clause h3 { margin-top: var(--s1); font-size: 17px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; color: var(--ink1); text-wrap: balance; }
/* Every box line runs to exactly two lines: the same measure in every card, at every width. */
.clause p { max-width: 232px; margin-top: var(--s2); font-size: 15px; line-height: 1.5; color: var(--ink2); text-wrap: balance; }
@media (max-width: 900px) { .clauses { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .clauses { grid-template-columns: minmax(0, 1fr); } }

/* ---------- The card after a download (transitions.dev toast, verbatim below) ---------- */
:root {
  --toast-open: 350ms;
  --toast-close: 250ms;
  --toast-distance: 16px;
  --toast-blur: 2px;
  --toast-scale: 0.97;
  --toast-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
.t-toast {
  opacity: 0;
  transform: translateY(var(--toast-distance)) scale(var(--toast-scale));
  filter: blur(var(--toast-blur));
  will-change: transform, opacity, filter;
  transition:
    opacity var(--toast-close) var(--toast-ease),
    transform var(--toast-close) var(--toast-ease),
    filter var(--toast-close) var(--toast-ease);
}
.t-toast.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    opacity var(--toast-open) var(--toast-ease),
    transform var(--toast-open) var(--toast-ease),
    filter var(--toast-open) var(--toast-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-toast { transition: none !important; }
}

.nudge-pos { position: fixed; left: 0; right: 0; bottom: 20px; z-index: 40; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
.nudge { pointer-events: none; display: flex; align-items: center; gap: var(--s3); width: min(640px, 100%); padding: 12px 12px 12px 14px; border-radius: 18px; box-shadow: var(--shadow-lift); }
.nudge.is-open { pointer-events: auto; }
.nudge img { width: 40px; height: 40px; flex: none; }
.nudge-text { flex: 1; min-width: 0; }
.nudge-text p { font-size: 14px; line-height: 1.4; color: var(--ink2); text-wrap: balance; }
.nudge-text .nudge-h { font-size: 15px; font-weight: 500; color: var(--ink1); text-wrap: balance; }
.nudge .btn { flex: none; height: 40px; font-weight: 600; }
.nudge-x { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--ink3); cursor: pointer; }
.nudge-x:hover { background: var(--quiet); color: var(--ink1); }
.nudge-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (max-width: 620px) {
  .nudge { flex-wrap: wrap; }
  .nudge-text { flex-basis: calc(100% - 92px); }
  .nudge .btn { flex: 1; order: 3; }
  .nudge { position: relative; }
  .nudge-x { position: absolute; top: 8px; right: 8px; }
  .nudge-text { padding-right: 28px; }
}

/* ---------- PDF Watermark ---------- */
.tseg { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding: 3px; border-radius: 11px; background: var(--tabs-bar-bg); }
.tseg input { position: absolute; opacity: 0; pointer-events: none; }
.tseg label { position: relative; z-index: 1; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 9px;
  font-size: 14px; font-weight: 500; color: var(--tabs-text-muted); cursor: pointer; transition: color var(--tabs-dur) var(--tabs-ease); }
.tseg input:checked + label { color: var(--tabs-text-active); }
.tseg input:focus-visible + label { outline: 2px solid var(--blue); outline-offset: -2px; }
.tseg .seg-pill { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); border-radius: 9px; background: var(--tabs-pill-bg);
  box-shadow: 0 1px 2px rgba(17, 22, 32, .08), 0 0 0 .5px rgba(17, 22, 32, .06); transition: transform var(--tabs-dur) var(--tabs-ease); }
.tseg:has(input:nth-of-type(2):checked) .seg-pill { transform: translateX(100%); }
.tseg:has(input:nth-of-type(3):checked) .seg-pill { transform: translateX(200%); }
.tseg label.c-red, .tseg input:checked + label.c-red { color: #C42B2B; }
.tseg label.c-blue, .tseg input:checked + label.c-blue { color: var(--accent-text); }
:root[data-theme="dark"] .tseg label.c-red { color: #F07B7B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tseg label.c-red { color: #F07B7B; } }

.wm .choose, .wm .download { width: 100%; height: 46px; font-weight: 600; }
.file-line { margin-top: -6px; font-size: 13.5px; line-height: 1.4; color: var(--ink2); overflow-wrap: anywhere; }
.form-error { font-size: 14px; line-height: 1.45; color: #C42B2B; }
:root[data-theme="dark"] .form-error { color: #F07B7B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .form-error { color: #F07B7B; } }
.form-note.centred { text-align: center; }
/* The quick words: the same chooser as Style and Size, two by two so every word fits. */
.tseg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -6px; }
.tseg-grid .seg-pill { width: calc((100% - 6px) / 2); height: calc((100% - 6px) / 2); bottom: auto; transition: transform var(--tabs-dur) var(--tabs-ease), opacity var(--quick) ease-out; }
.tseg-grid:not(:has(input:checked)) .seg-pill { opacity: 0; }
.tseg-grid:has(input:nth-of-type(1):checked) .seg-pill { transform: none; }
.tseg-grid:has(input:nth-of-type(2):checked) .seg-pill { transform: translateX(100%); }
.tseg-grid:has(input:nth-of-type(3):checked) .seg-pill { transform: translateY(100%); }
.tseg-grid:has(input:nth-of-type(4):checked) .seg-pill { transform: translate(100%, 100%); }

/* The page is drawn at US Letter proportions, sized from its own width, so the HTML sample sits
   where the PDF's words do and the watermark lands in the same place on both. */
.wm-paper { padding: 0; aspect-ratio: 612 / 792; overflow: hidden; container-type: inline-size; }
.wm-doc { padding: 11.76cqi; font-size: 1.8cqi; line-height: 1.41; }
.wm-doc .doc-title { margin: 0 0 3.6cqi; font-size: 2.62cqi; }
.wm-doc p { margin: 0 0 1.15cqi; }
.wm-doc p.gap { margin-top: 2cqi; }
.wm-page, .wm-marks { position: absolute; inset: 0; width: 100%; height: 100%; }
.wm-page { display: none; background: #FFFFFF; }
.wm-paper.has-file .wm-page { display: block; }
.wm-paper.has-file .wm-doc { visibility: hidden; }
.wm-marks { pointer-events: none; }
.wm-paper .sample-tag { z-index: 2; }
body.is-dropping .wm-paper { box-shadow: 0 0 0 3px var(--blue), var(--shadow-frame); }

.wm-pager { display: flex; align-items: center; justify-content: center; gap: var(--s3); margin-top: var(--s4); font-size: 14px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.wm-pager[hidden] { display: none; }
.wm-pager button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--card); box-shadow: var(--shadow-card); color: var(--ink1); cursor: pointer; }
.wm-pager button:disabled { opacity: .4; cursor: default; }
.wm-pager svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.clauses.steps3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 860px; }
.clauses.words4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; }
/* Plain text, no cards, so it reads apart from the Loop cards below it (Theo, 2026-10-23, MOV to MP4). */
.clauses.plain { row-gap: var(--s6); }
.clauses.plain .clause { padding: 0 var(--s2); background: none; box-shadow: none; }
.clauses.plain .clause h3 { font-size: 21px; letter-spacing: -0.02em; }
@media (max-width: 900px) { .clauses.steps3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) {
  .clauses.steps3, .clauses.words4 { grid-template-columns: minmax(0, 1fr); }
  .wm-paper .sample-tag { position: absolute; display: inline-flex; margin: 0; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .tseg .seg-pill, .tseg label { transition: none; }
}

/* ---------- More free tools ---------- */
.tool-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 420px)); justify-content: center; gap: var(--s4); margin-top: var(--s7); }
.tool-link { position: relative; display: grid; grid-template-columns: 1fr auto; column-gap: var(--s4); align-items: center; padding: var(--s5); color: inherit;
  transition: box-shadow var(--quick) ease-out, transform var(--quick) ease-out; }
.tool-link:hover { box-shadow: var(--shadow-lift); }
.tool-link:active { transform: scale(.985); }
.tl-name { grid-column: 1; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink1); }
.tl-line { grid-column: 1; max-width: 232px; margin-top: 4px; font-size: 15px; line-height: 1.45; color: var(--ink2); text-wrap: balance; }
.tl-arrow { grid-column: 2; grid-row: 1 / span 2; width: 18px; height: 18px; fill: none; stroke: var(--ink3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--fast) var(--ease); }
.tool-link:hover .tl-arrow { transform: translateX(2px); stroke: var(--ink1); }
@media (max-width: 620px) { .tool-links { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .tool-link, .tl-arrow { transition: none; } }

/* ---------- MOV to MP4 ---------- */
/* The form and the stage share one height; the stage holds the drop area, then the video at its own shape. */
.nda.mv { align-items: stretch; }
.mv .nda-form { position: static; }
.mv .privacy { margin-top: auto; }
.mv .choose, .mv .download { width: 100%; height: 46px; font-weight: 600; }
.tool-page .btn:disabled { opacity: .45; cursor: default; pointer-events: none; }
.seg-note { margin-top: -6px; font-size: 13.5px; line-height: 1.45; color: var(--ink3); text-wrap: balance; }
.mv .file-line { display: flex; flex-direction: column; gap: 2px; }
.mv .file-line[hidden] { display: none; }
.mv-details { font-size: 13px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.mv-stage { position: relative; width: 100%; min-width: 0; min-height: 0; aspect-ratio: 16 / 10; border-radius: 18px; background: var(--well); container-type: size; display: grid; place-items: center; transition: box-shadow var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.mv-drop { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: inherit; background: none; color: var(--ink1); font: inherit; cursor: pointer; }
.mv-drop:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--blue); }
.mv-drop-icon { width: 56px; height: 56px; margin-bottom: 10px; display: grid; place-items: center; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-card); color: var(--blue); transition: transform var(--fast) var(--ease); }
.mv-drop-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mv-drop-title { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.mv-drop-sub { font-size: 14px; color: var(--ink3); }
.mv-drop:hover .mv-drop-icon, body.is-dropping .mv-drop-icon { transform: translateY(-2px); }
body.is-dropping .mv-stage { box-shadow: 0 0 0 2px var(--blue); background: color-mix(in srgb, var(--blue) 8%, var(--well)); }
.mv-stage.has-video .mv-drop { display: none; }
.mv-stage video { display: block; aspect-ratio: var(--ar, 16 / 10); width: min(100cqw - 32px, (100cqh - 32px) * var(--ar, 1.6)); height: auto; border-radius: 10px; background: transparent; box-shadow: var(--shadow-card); }
.mv-stage video[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .mv-stage, .mv-drop-icon { transition: none; } }
