/* Resolution cards. The card is drawn on a canvas; this lays out the tool around it: the controls on
   the left, the card on the right with Share and Save under it. One panel, in the site's own colours.
   Loaded after night.css. */
.product-legal .card-page [hidden] { display:none !important; }
.product-legal .card-tool { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,320px); gap:32px; align-items:start; margin:28px 0 8px; padding:28px; border:1px solid var(--m-border-strong); border-radius:var(--r-lg); background:var(--m-surface); }

/* Controls */
.product-legal .card-controls { display:flex; flex-direction:column; min-width:0; }
.product-legal .card-modes { margin:0 0 22px; padding:0; border:0; min-width:0; }
.product-legal .card-seg { display:grid; grid-template-columns:1fr 1fr; gap:2px; padding:3px; border:1px solid var(--m-border-strong); border-radius:999px; background:var(--m-frame); }
.product-legal .tool-form .card-seg label { position:relative; display:flex; align-items:center; justify-content:center; min-height:44px; margin:0; padding:0 14px; border-radius:999px; color:var(--m-muted); font-size:14.5px; font-weight:500; letter-spacing:-.01em; text-align:center; cursor:pointer; transition:color .16s ease,background-color .2s ease; }
.product-legal .card-seg input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.product-legal .tool-form .card-seg label:hover { color:var(--m-text); }
.product-legal .tool-form .card-seg label:has(input:checked) { background:var(--m-text); color:var(--m-bg); font-weight:600; }
.product-legal .card-seg label:has(input:focus-visible) { outline:2px solid var(--m-accent); outline-offset:2px; }
.product-legal .tool-form .card-controls > label,
.product-legal .tool-form .card-life label { margin-bottom:8px; color:var(--m-text); font-size:15px; font-weight:500; }
.product-legal .card-field { position:relative; }
.product-legal .tool-form .card-field input { display:block; width:100%; min-height:52px; margin:0; padding:12px 64px 12px 16px; border:1px solid var(--m-border-strong); border-radius:14px; background:var(--m-frame); color:var(--m-text); font:inherit; font-size:17px; transition:border-color .16s ease; }
.product-legal .tool-form .card-field input::placeholder { color:var(--m-dim); }
.product-legal .tool-form .card-field input:hover { border-color:#4a5650; }
.product-legal .tool-form .card-field input:focus-visible { outline:2px solid var(--m-accent); outline-offset:2px; border-color:transparent; }
.product-legal .card-count { position:absolute; right:16px; top:50%; transform:translateY(-50%); color:var(--m-dim); font-size:12.5px; font-variant-numeric:tabular-nums; pointer-events:none; }
.product-legal .card-controls .tool-hint { margin:8px 0 0; color:var(--m-muted); font-size:13.5px; }
.product-legal .card-life { margin-top:20px; }
.product-legal .tool-form .card-life select { display:block; width:100%; min-height:48px; padding:10px 14px; border:1px solid var(--m-border-strong); border-radius:14px; background:var(--m-frame); color:var(--m-text); font:inherit; font-size:15.5px; }
.product-legal .card-quiet { display:flex; flex-wrap:wrap; gap:4px 20px; margin-top:16px; }
.product-legal .card-link { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0; border:0; background:none; color:var(--m-secondary); font:inherit; font-size:14.5px; font-weight:500; cursor:pointer; }
.product-legal .card-link svg { color:var(--m-accent); }
.product-legal .card-link:hover:not(:disabled) { color:var(--m-text); }
.product-legal .card-link:disabled { opacity:.4; cursor:default; }
.product-legal .card-link:focus-visible { outline:2px solid var(--m-accent); outline-offset:4px; border-radius:6px; }

/* The card, centred in its column, with its two actions under it. */
.product-legal .card-stage { min-width:0; text-align:center; }
.product-legal .card-stage canvas { display:block; width:100%; height:auto; margin-inline:auto; border-radius:16px; box-shadow:0 0 0 1px var(--m-border-strong),0 30px 60px -28px rgba(0,0,0,.7); }
.product-legal .card-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; }
.product-legal .card-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:48px; padding:0 16px; border:1px solid var(--m-border-strong); border-radius:999px; background:transparent; color:var(--m-text); font:inherit; font-size:15px; font-weight:600; white-space:nowrap; cursor:pointer; transition:background-color .16s ease,border-color .16s ease,transform .12s cubic-bezier(.23,1,.32,1); }
.product-legal .card-btn:hover:not(:disabled) { border-color:#4a5650; background:rgba(243,241,235,.04); }
.product-legal .card-btn.primary { border-color:transparent; background:var(--m-accent); color:var(--m-accent-ink); }
.product-legal .card-btn.primary:hover:not(:disabled) { background:var(--m-accent-hover); }
.product-legal .card-btn:active:not(:disabled) { transform:scale(.98); }
.product-legal .card-btn:disabled { opacity:.4; cursor:default; }
.product-legal .card-btn:focus-visible { outline:2px solid var(--m-accent); outline-offset:3px; }
.product-legal .card-note { min-height:1.5em; margin:10px 0 0; color:var(--m-muted); font-size:13.5px; }
.product-legal .card-note:empty { min-height:0; margin:0; }
/* When the words can't make a card (care words or a slur), a short line takes the card's place. */
.product-legal .card-message:empty { display:none; }
.product-legal .card-message { margin:0; padding:24px 20px; border:1px dashed var(--m-border-strong); border-radius:16px; color:var(--m-secondary); font-size:15px; line-height:1.6; text-align:left; }

@media (max-width:760px) {
  .product-legal .card-tool { grid-template-columns:1fr; gap:24px; padding:20px; }
  .product-legal .card-stage { width:100%; max-width:360px; margin-inline:auto; }
}
@media (max-width:440px) {
  .product-legal .card-actions { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) {
  .product-legal .card-btn,.product-legal .card-seg label { transition:none; }
}
