/* Kinline. The shared look (/_look/look.css) loads after this and sets the type, colours
   and buttons; this file lays out the landing page and the editor, and the printed page. */

* { box-sizing: border-box; }
body { margin: 0; }
header.top, main, .site-footer { max-width: 76rem; margin: 0 auto; padding: 0 1rem; }
header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1rem; padding-top: 1rem; padding-bottom: 0.5rem; }
header.top nav { font-size: 0.9375rem; }
.small { font-size: 0.875rem; color: var(--muted, #5a5f6b); }
img { max-width: 100%; height: auto; }

/* --- landing page ---------------------------------------------------------------------- */
.hero { display: grid; gap: 0.75rem 2rem; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "text" "fig" "act"; padding: 0.25rem 0 1rem; }
.hero-text { grid-area: text; }
.hero-act { grid-area: act; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0.25rem 0 0.4rem; }
.hero .sub { font-size: 1.125rem; line-height: 1.5; margin: 0; }
.hero .proof-fig { grid-area: fig; margin: 0; background: #fff; border: 1px solid var(--line, #e4dfd3);
  border-radius: 12px; padding: 0.5rem; }
.hero .proof-fig img { display: block; width: 100%; height: auto; }
.hero .proof-fig figcaption { font-size: 0.8125rem; color: #4d525c; margin-top: 0.35rem; }
.hero .actions { margin: 0 0 0.5rem; }
.look .hero .actions .cta { font-size: 1.125rem; }
.hero .priceline { margin: 0; font-size: 0.9375rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; }
.look .hero .priceline .buy-small { min-height: 40px; padding: 0.4rem 1rem; background: var(--surface, #fff); color: var(--accent); }
.look .hero .priceline .buy-small:hover { color: var(--accent-fg); }
.hero .behind-wrap { margin-top: 0.6rem; font-size: 0.875rem; }
@media (max-width: 959px) {
  /* On a phone the picture is short, so the call to action stays on the first screen. */
  .hero .proof-fig img { max-height: 15rem; object-fit: contain; }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-rows: auto 1fr;
    grid-template-areas: "text fig" "act fig"; align-items: start; }
  .hero .proof-fig img { max-height: 30rem; object-fit: contain; }
}
.objections { list-style: none; padding: 0; display: grid; gap: 1rem; margin: 1.5rem 0; }
@media (min-width: 860px) { .objections { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.objections li { background: var(--surface, #fff); border: 1px solid var(--line, #e4dfd3); border-radius: 12px; padding: 1rem 1.1rem; }
.objections strong { display: block; margin-bottom: 0.3rem; }
.offer { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); background: var(--surface, #fff);
  border: 1px solid var(--line, #e4dfd3); border-radius: 12px; padding: 1rem 1.25rem; }
@media (min-width: 760px) { .offer { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: center; } }
.cols { display: grid; gap: 0 2rem; }
@media (min-width: 860px) { .cols { grid-template-columns: 1fr 1fr; } }

/* --- the editor ------------------------------------------------------------------------ */
.editor-main { max-width: 96rem; }
.panel { background: var(--surface, #fff); border: 1px solid var(--line, #e4dfd3); border-radius: 12px;
  padding: 0.6rem 0.9rem 0.9rem; margin: 0 0 0.75rem; }
.look .panel h2 { margin: 0.2rem 0 0.5rem; font-size: 1.15rem; overflow-wrap: anywhere; }
.bar { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem 0.6rem; margin: 0.5rem 0; }
.bar label { display: grid; gap: 0.15rem; }
.bar .sep { flex: 0 0 0.5rem; }
label { font-size: 0.9375rem; }
input[type=text], select, textarea { font: inherit; font-size: 0.9375rem; padding: 0.3rem 0.45rem;
  border: 1px solid var(--line, #d8d2c4); border-radius: 6px; background: #fff; color: var(--fg, #1a1e26); max-width: 100%; }
textarea { width: 100%; }
.look .bar button, .look .file-button, .look .side button {
  min-height: 36px; padding: 0.3rem 0.75rem; font-size: 0.9rem; background: var(--surface, #fff); color: var(--accent); }
.look .bar button:hover, .look .side button:hover { color: var(--accent-fg); }
.look .bar button:disabled { opacity: 0.45; }
.look .side .paywall button { background: var(--accent); color: var(--accent-fg, #fff); }
.look button.quiet { border-color: var(--line, #d8d2c4); color: var(--muted, #5a5f6b); }
.file-button { position: relative; display: inline-flex; align-items: center; border: 1.5px solid var(--accent);
  border-radius: 10px; font-weight: 600; cursor: pointer; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.status { min-height: 1.4em; margin: 0.25rem 0; font-size: 0.9375rem; }
.problems { color: var(--wrong, #9b1c31); }
.access { padding: 0.6rem 0.9rem; border-radius: 10px; background: var(--wrong-bg, #fcefef); }
.access.ok { background: var(--right-bg, #ebf5ee); }
.workspace { display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .workspace { grid-template-columns: minmax(0, 1fr) 20rem; } }
.canvas-wrap { position: relative; overflow: auto; background: #fff; border: 1px solid var(--line, #e4dfd3);
  border-radius: 12px; height: min(72vh, 46rem); min-height: 22rem; touch-action: none;
  background-image: radial-gradient(#e6e1d6 1px, transparent 1px); background-size: 20px 20px; }
#canvas { display: block; user-select: none; -webkit-user-select: none; }
#canvas .node { cursor: grab; }
#canvas.line-mode .node { cursor: crosshair; }
#canvas g[data-kind=couple], #canvas g[data-kind=relation], #canvas g[data-kind=link], #canvas g[data-kind=household] { cursor: pointer; }
#canvas .selected > :not(.hit):not(text) { filter: drop-shadow(0 0 2px #e9a15f) drop-shadow(0 0 2px #e9a15f); }
#canvas .selected .hit { fill: rgba(233, 161, 95, 0.12); }
.inline-edit { position: absolute; width: 160px; z-index: 2; text-align: center; }
.side .field { display: grid; gap: 0.15rem; margin: 0 0 0.5rem; }
.side .row { display: flex; gap: 0.5rem; }
.side .row .field { flex: 1; min-width: 0; }
.side .row input { width: 100%; }
.side .check { display: block; margin: 0.2rem 0 0.4rem; }
.side fieldset { border: 1px solid var(--line, #e4dfd3); border-radius: 8px; margin: 0.4rem 0 0.6rem; padding: 0.3rem 0.6rem 0.5rem; }
.side legend { font-size: 0.875rem; padding: 0 0.25rem; }
.side .cond { display: flex; gap: 0.35rem; margin-bottom: 0.4rem; }
.side .cond input { flex: 1; min-width: 0; }
.export-buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.paywall { border-top: 1px solid var(--line, #e4dfd3); padding-top: 0.5rem; margin-top: 0.5rem; font-size: 0.9375rem; }
.narrow-note { display: none; }
@media (max-width: 760px) { .narrow-note { display: block; } }
#print-page, .print-hint { display: none; }

/* --- print: only an export's page, never the editor ------------------------------------ */
@media print {
  html body.look { background: #fff; }
  body > *, main > * { display: none !important; }
  body[data-print] main, body[data-print] #print-page { display: block !important; }
  body[data-print] main { padding: 0; margin: 0; max-width: none; }
  #print-page svg { display: block; width: 100%; height: auto; }
  body[data-print="portrait"] #print-page svg { width: 8.5in; height: 11in; }
  body[data-print="landscape"] #print-page svg { width: 11in; height: 8.5in; }
  body:not([data-print]) .print-hint { display: block !important; font-size: 14pt; }
}
