/* The inside of the www.greb.app boxes (public/www/render.js), scoped under .www so it can
   live in two places: the static page (scripts/www/plantilla.html) and Flow's `www` nodes
   (the WwwNode display binding). The page's own frame, canvas and cables are in the template. */
.www { --ink: #000; --yellow: #F9DB57; --pink: #F27BC4; --paper: #F5F0E3; --white: #fff; --muted: #4a463a; --brown: #2a1d12;
  --mono: 'JetBrains Mono', ui-monospace, monospace; --serif: 'Newsreader', Georgia, serif;
  font: 400 15px/1.5 var(--mono); color: var(--ink); }
.www a { color: inherit; }
.www img { display: block; max-width: 100%; height: auto; }
.www .btn {
  display: inline-flex; align-items: center; gap: 10px; background: var(--yellow); border: 3px solid var(--ink); border-radius: 8px;
  box-shadow: 5px 5px 0 var(--ink); font: 700 14px/1.1 var(--mono); padding: 8px 12px; text-decoration: none; color: var(--ink);
  transition: transform .08s, box-shadow .08s; }
.www .btn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
  .www .head {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    border-bottom: 3px solid var(--ink); border-radius: 7px 7px 0 0;
    cursor: grab; user-select: none; touch-action: none;
    font-weight: 700; font-size: 15px; background: var(--paper);
  }
  .www .dragging .head { cursor: grabbing; }
  .www .head svg { width: 20px; height: 20px; flex: none; }
  .www .head .kind { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--muted); text-align: right; }
  .www .body { padding: 14px; }
  .www .body p { margin: 0 0 10px; font-size: 13.5px; }
  .www .open { display: inline-block; font-weight: 700; font-size: 13.5px; text-decoration: none; border-bottom: 3px solid var(--yellow); }
  .www .open:hover { background: var(--yellow); }

  /* idioma */
  .www .k-idioma .head { background: var(--yellow); }
  .www .langs { display: flex; flex-wrap: wrap; gap: 8px; }
  .www .lang {
    font: 600 13px/1 var(--mono); padding: 7px 9px; cursor: pointer; color: var(--ink);
    background: var(--white); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 3px 3px 0 var(--ink);
  }
  .www .lang:hover { background: var(--paper); }
  .www .lang.on { background: var(--yellow); }

  /* nota */
  .www .k-nota .head { background: var(--yellow); }
  .www .k-nota .body { padding: 22px; background: var(--paper); border-radius: 0 0 7px 7px; }
  .www .k-nota h1 { font: 400 40px/1.12 var(--serif); margin: 0 0 16px; letter-spacing: -0.01em; }
  .www .k-nota p { font-size: 14px; }
  .www .k-nota .abierto { background: var(--yellow); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 4px 4px 0 var(--ink); padding: 10px 12px; margin: 16px 0 4px; }
  .www .libro { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 3px solid var(--ink); }
  .www .libro img { width: 88px; border: 3px solid var(--ink); border-radius: 4px; box-shadow: 4px 4px 0 var(--ink); }
  .www .libro .btn { font-size: 13px; padding: 7px 10px; box-shadow: 4px 4px 0 var(--ink); }

  /* quién soy */
  .www .k-quien .body { display: grid; grid-template-columns: 108px 1fr; gap: 14px; }
  .www .k-quien .foto { width: 108px; aspect-ratio: 4 / 5; object-fit: cover; border: 3px solid var(--ink); border-radius: 6px; }
  .www .k-quien h2 { font: 400 22px/1.15 var(--serif); margin: 0 0 4px; }
  .www .k-quien .role { color: var(--muted); font-size: 12.5px; }
  .www .k-quien p { font-size: 13px; }
  .www .k-quien .more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }

  /* origen */
  .www .k-origen .head { background: #cfe8c4; }
  .www .k-origen h2 { font: 400 26px/1.15 var(--serif); margin: 0 0 12px; }

  /* hoja de ruta */
  .www .k-ruta .head { background: #bcd4f5; }
  .www .ruta { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
  .www .ruta h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
  .www .ruta h3 svg { width: 18px; height: 18px; }
  .www .hitos { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 3px solid var(--ink); }
  .www .hitos li { position: relative; padding: 0 0 12px 12px; font-size: 13px; }
  .www .hitos li::before { content: ''; position: absolute; left: -24px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); }
  .www .hitos time { display: block; font-weight: 700; font-size: 12px; color: var(--muted); }
  .www .prox { margin: 0; padding: 0 0 0 18px; font-size: 13px; }
  .www .prox li { margin-bottom: 8px; }

  /* apps */
  .www .k-app[data-color="yellow"] .head { background: var(--yellow); }
  .www .k-app[data-color="brown"] .head { background: var(--brown); color: #e8d3a2; }
  .www .k-app[data-color="brown"] .head .kind { color: #b49a6a; }
  .www .k-app .shot { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 3px solid var(--ink); background: #222; }
  .www .k-app .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
  .www .k-app .shot:hover img { transform: scale(1.03); }
  .www .k-app .text { padding: 12px 14px 14px; }
  .www .k-app .text p { margin: 0 0 10px; font-size: 13.5px; }
  .www .abrir { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
  .www .abrir .btn { font-size: 13.5px; padding: 8px 12px; box-shadow: 4px 4px 0 var(--ink); }
  .www .abrir .dominio { font-size: 12px; color: var(--muted); }

  /* tienda */
  .www .k-tienda .head { background: var(--pink); }
  .www .k-tienda .head .kind { color: #3a1230; }
  .www .productos { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .www .productos a { display: block; text-decoration: none; font-size: 12.5px; line-height: 1.35; }
  .www .productos img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 3px solid var(--ink); border-radius: 6px; margin-bottom: 6px; background: var(--paper); transition: transform .08s, box-shadow .08s; }
  .www .productos a:hover img { box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
  .www .productos .precio { font-weight: 700; }
  .www .k-tienda .pie { padding: 0 14px 14px; }

  /* sitio */
  .www .links { list-style: none; margin: 0; padding: 12px 14px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .www .links a {
    display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: 13px;
    padding: 6px 8px; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); box-shadow: 3px 3px 0 var(--ink);
  }
  .www .links a:hover { background: var(--yellow); }
  .www .links svg { width: 17px; height: 17px; flex: none; }


/* the old site's pages: a section, a collection (scripts/www/paginas.js) */
.www .pagina h2 { font: 400 26px/1.15 var(--serif); margin: 4px 0 12px; }
.www .pagina h3 { font-size: 15px; margin: 14px 0 8px; }
.www .pagina img { width: 100%; border: 3px solid var(--ink); border-radius: 6px; margin: 6px 0 12px; }
.www .pagina .video { position: relative; display: block; margin: 6px 0 12px; }
.www .pagina .video img { margin: 0; aspect-ratio: 16 / 9; object-fit: cover; }
.www .pagina .video span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: #fff; text-shadow: 0 2px 8px #000; }
.www .k-pagina .head { background: var(--paper); }
.www .k-lista .head { background: var(--yellow); }
.www .tarjetas { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.www .tarjetas a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; font-size: 12.5px; }
.www .tarjetas img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 3px solid var(--ink); border-radius: 6px; background: var(--paper); }
.www .tarjetas a:hover img { box-shadow: 4px 4px 0 var(--ink); }
.www .tarjetas b { font-size: 13.5px; }
.www .tarjetas span { color: var(--muted); }
.www .k-lista .pie { padding: 0 14px 14px; }

  /* charlas: the deck and the history */
  .www .diap h2 { font: 400 26px/1.15 var(--serif); margin: 0 0 8px; }
  .www .slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 14px 0 10px; border: 3px solid var(--ink); border-radius: 6px; background: #111; overscroll-behavior-x: contain; }
  .www .slides figure { flex: 0 0 100%; margin: 0; scroll-snap-align: start; position: relative; }
  .www .slides img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
  .www .slides figcaption { position: absolute; right: 8px; bottom: 8px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 4px; font-size: 12px; font-weight: 700; padding: 1px 6px; }
  .www .flechas { display: flex; align-items: center; gap: 10px; }
  .www .flechas .btn { padding: 6px 12px; font-size: 16px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
  .www .flechas .open { margin-left: auto; }
  .www .charlas { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 3px solid var(--ink); display: grid; gap: 14px; }
  .www .charlas li { position: relative; display: grid; grid-template-columns: 1fr; gap: 10px; }
  .www .charlas li.con { grid-template-columns: 132px 1fr; }
  .www .charlas li::before { content: ''; position: absolute; left: -24px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); }
  .www .charlas time { display: block; font-weight: 700; font-size: 12px; color: var(--muted); }
  .www .charlas b { display: block; font: 400 17px/1.2 var(--serif); }
  .www .charlas .lugar { display: block; font-size: 12.5px; color: var(--muted); margin: 2px 0 4px; }
  .www .charlas .sin { font-size: 12px; color: var(--muted); font-style: italic; }
  .www .cara { position: relative; display: block; border: 3px solid var(--ink); border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 9; background: #222; }
  .www .cara img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .www .cara span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 22px; text-shadow: 0 0 6px #000; }
  .www .k-historia .nav { margin: 18px 0 0; }
  .www .k-historia .nav .btn svg { width: 18px; height: 18px; }

  /* the computing shelf */
  .www .k-libros .head { background: var(--brown); color: #e8d3a2; }
  .www .libros { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; gap: 6px; }
  .www .libros a { display: block; text-decoration: none; color: var(--ink); padding: 6px 9px; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); box-shadow: 3px 3px 0 var(--ink); }
  .www .libros a:hover { background: var(--yellow); }
  .www .libros b { display: block; font: 400 15.5px/1.2 var(--serif); }
  .www .libros span { display: block; font-size: 11.5px; color: var(--muted); }
  .www .k-libros .head .kind, .www .k-app[data-color="brown"] .head .kind { color: #c9b48a; }

/* Flow on a `www` graph (app.www/grafo?): the page's canvas, cables and ports
   (scripts/www/plantilla.html) instead of Flow's grey ones */
.www-lienzo .react-flow, .www-lienzo .greb-flow-root, .www-lienzo .react-flow__background { background-color: #3b3a33 !important; }
.www-lienzo .react-flow__background path { stroke: #1f1e1a !important; stroke-width: 1 !important; }
/* cables: app.www/WwwEdge draws them (black under yellow, a dot at each end); the ports hide —
   an admin sees them on the box under the mouse, to connect */
.www-lienzo .react-flow__handle.icon-handle { opacity: 0 !important; }
.www-lienzo .react-flow__node:hover .react-flow__handle.icon-handle { opacity: 1 !important; }
.www-lienzo .react-flow__edge.selected .www-cable path:nth-child(2) { stroke: #fff; }
.www-lienzo .react-flow__handle.icon-handle {
  width: 15px !important; height: 15px !important; box-sizing: border-box;
  top: 50% !important; margin-top: -7.5px; background: #F9DB57 !important; border: 3px solid #000 !important;
}
.www-lienzo .react-flow__handle.icon-handle > * { display: none !important; }
.www-lienzo .react-flow__handle.icon-handle-left { left: -8px !important; }
.www-lienzo .react-flow__handle.icon-handle-right { right: -8px !important; }
.www-lienzo .react-flow__handle.icon-handle:hover { transform: none !important; box-shadow: none !important; }

  /* estante: the docs shelf, book spines on a wooden board */
  .www .k-estante .head { background: var(--brown); color: #e8d3a2; }
  .www .k-estante .head .kind { color: #c9b48a; }
  .www .estante { display: flex; align-items: flex-end; gap: 4px; height: 300px; margin: 10px 0 12px; padding: 0 8px;
    background: linear-gradient(#1a130d, #120d09); border-radius: 6px; border-bottom: 10px solid #3a2a1c; overflow-x: auto; }
  .www .estante .seccion, .www .estante .lomo { writing-mode: vertical-rl; transform: rotate(180deg); flex: none; }
  .www .estante .seccion { position: relative; height: 92%; width: 44px; display: flex; align-items: center; justify-content: center;
    background: #1c140e; color: #e8d3a2; font: 600 11px/1 var(--serif); letter-spacing: .2em; text-transform: uppercase; }
  .www .estante .seccion i { position: absolute; bottom: 12px; width: 13px; height: 13px; transform: rotate(45deg);
    background: var(--rombo); opacity: .8; border: 1px solid #0006; }
  .www .estante .lomo { height: var(--alto); width: 44px; display: flex; gap: 8px; align-items: center; justify-content: center;
    padding: 12px 0; background: var(--lomo); color: var(--tinta); text-decoration: none; border-radius: 2px 2px 0 0;
    box-shadow: inset -3px 0 0 #0004, inset 3px 0 0 #fff1; transition: transform .15s; }
  .www .estante .lomo:hover { transform: rotate(180deg) translateY(10px); }
  .www .estante .lomo b { font: 400 14px/1.05 var(--serif); max-height: 82%; overflow: hidden; }
  .www .estante .lomo small { font: 400 8.5px/1 var(--serif); letter-spacing: .12em; text-transform: uppercase; opacity: .75; white-space: nowrap; }
