/*
 * content.css — tutto ciò che sta dentro #content: intestazioni di voce,
 * schede (.facts), briciole, risultati di ricerca, filtri (.chips),
 * riquadri diapositiva (.doc-box, .big-slide), schede (.cards, .stats, .hubs),
 * cronologia (ol.tl), gallerie (.gal), telaietti degli oggetti (.slide),
 * tabelle (table.t).
 */

.dedica {
  margin: -4px 0 14px;
  max-width: 62ch;
  font-family: "Caveat", cursive;
  font-size: 1.55rem;
  line-height: 1.3;
  color: var(--head);
}
.dedica a { color: inherit; }

.lede {
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 62ch;
}

/* scheda dei dati: riquadro "Dettagli" */
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 5px 16px;
  font-size: 13.5px;
  line-height: 1.45;
  margin: 14px 0 6px;
  padding: 10px 14px;
  max-width: 64ch;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
}

.chip {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: baseline;
  box-shadow: 0 0 0 1px rgba(0,0,0,.18);
}

.slide.archive .lab {
  font-size: 16px;
}

.trip-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  align-items: start;
  margin: 18px 0;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.crumbs {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 12px;
}

.crumbs a {
  color: var(--link);
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
}

.kind {
  display: inline-block;
  font-family: var(--ui);
  font-size: 11px;
  line-height: 16px;
  padding: 0 5px;
  margin-right: 6px;
  border: 1px solid var(--card-edge);
  background: var(--paper-2);
  color: var(--muted);
  border-radius: 2px;
  vertical-align: 1px;
}

mark {
  background: #ffe98a;
  color: #1c1f26;
  padding: 0 1px;
  border-radius: 1px;
}

.results li {
  margin: 0 0 14px;
  list-style: none;
}

.results ul {
  padding: 0;
}

.results li > a {
  font-family: var(--cap-font);
  font-size: 15px;
  font-weight: 700;
}

.results .snip {
  font-size: .98rem;
  color: var(--muted);
  margin: 3px 0 0;
}

/* filtri: pulsanti a pillola che restano premuti */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.chipbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--btn-ink);
  border: 1px solid var(--field-edge);
  border-radius: 16px;
  background: var(--btn);
  cursor: pointer;
  transition: box-shadow .12s,background-color .12s;
}

.chipbtn:hover {
  box-shadow: inset 0 0 0 1px #fdd889,inset 0 -2px 0 #f5b440;
}

.chipbtn:active {
  background: var(--btn-down);
}

.chipbtn[aria-pressed="true"] {
  padding-left: 10px;
  color: #fff;
  border-color: #0a3c9c;
  text-shadow: 0 1px 0 rgba(0,0,60,.45);
  background: linear-gradient(180deg,#4a88ec 0,#2463d4 45%,#1550c0 55%,#1f5fcf 100%);
  box-shadow: inset 0 1px rgba(255,255,255,.35);
}

.chipbtn[aria-pressed="true"]::before {
  content: "";
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.4 4.9 9.2 10 3' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.chipbtn[aria-pressed="true"]:hover {
  box-shadow: inset 0 1px rgba(255,255,255,.35),inset 0 -2px 0 #ffc73c;
}

.doc-box {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--card-edge);
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--card-shadow);
  padding: 10px;
  margin: 14px 0;
  max-width: 66ch;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .12s,box-shadow .12s;
}

.doc-box strong {
  color: var(--link);
}

.doc-box img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--rule);
}

.doc-box:hover {
  border-color: var(--sel);
  box-shadow: var(--card-lift);
}

.big-slide {
  display: block;
  width: 100%;
  max-width: 640px;
  background: var(--mount);
  padding: 22px 22px 40px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
  position: relative;
  cursor: zoom-in;
  border: 0;
}

.big-slide img {
  width: 100%;
  display: block;
  border-radius: 2px;
}

.big-slide .lab {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--hand);
  font-size: 22px;
  color: var(--mount-ink);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 26px 0 0;
  font-size: 13px;
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}

.pager a {
  display: inline-block;
  padding: 6px 2px;
}

/* slide mounts */
.tray {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(210px,1fr));
  gap: 14px;
  margin: 14px 0;
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: box-shadow .12s,border-color .12s;
}

.card:hover {
  border-color: var(--sel);
  box-shadow: var(--card-lift);
}

.card:hover strong {
  text-decoration: underline;
}

.card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.card .ph {
  aspect-ratio: 3/2;
  background: #111;
  overflow: hidden;
  border-bottom: 1px solid var(--card-edge);
}

.card .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card.pers .ph {
  aspect-ratio: 4/3;
}

.card .cb {
  flex: 1;
  padding: 9px 11px 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card strong {
  font-family: var(--cap-font);
  font-size: 15px;
  color: var(--head);
}

.card .dt {
  font-size: 12.5px;
  color: var(--muted);
}

.card .mt {
  font-size: 12px;
  color: var(--muted);
}

/* cifre della Home: riquadri come le categorie del Pannello di controllo */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.stats a {
  flex: 1;
  min-width: 120px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--card-edge);
  border-radius: 4px;
  padding: 9px 13px 10px;
  font-size: 12.5px;
  background: var(--card);
  box-shadow: var(--card-shadow),inset 0 3px 0 var(--sel);
  transition: box-shadow .12s,border-color .12s;
}

.stats a:hover {
  border-color: var(--sel);
  box-shadow: var(--card-lift),inset 0 3px 0 var(--accent);
}

.stats b {
  display: block;
  font-family: var(--cap-font);
  font-size: 26px;
  line-height: 1.15;
  color: var(--head);
}

.hubs {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(230px,1fr));
  gap: 10px;
  margin: 12px 0;
}

.hub {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 10px 12px 11px;
  box-shadow: var(--card-shadow);
  transition: background-color .12s,border-color .12s;
}

.hub strong {
  display: block;
  font-family: var(--cap-font);
  font-size: 14.5px;
  margin-bottom: 3px;
  color: var(--link);
}

.hub span {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}

.hub:hover {
  background: var(--hov-bg);
  border-color: var(--hov-edge) var(--hov-edge) var(--hov-edge) var(--accent);
}

.hub:hover strong {
  text-decoration: underline;
}

ol.tl {
  list-style: none;
  padding: 0;
  margin: 10px 0 10px 6px;
  border-left: 3px solid var(--card-edge);
}

ol.tl li {
  padding: 6px 0 12px 16px;
  position: relative;
}

ol.tl li::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 10px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#ffe2a8 0,var(--accent) 60%,#b8620f 100%);
  box-shadow: 0 0 0 2px var(--paper);
}

ol.tl .when {
  display: block;
  font-family: var(--cap-font);
  font-size: 13px;
  color: var(--gold-ink);
  font-weight: bold;
}

ol.tl a {
  font-size: 15px;
}

ol.tl .why {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 70ch;
}

/* Home: riquadri a caso ("widget"), con il pulsante ↻ per cambiarne il contenuto */
.widgets {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(230px,1fr));
  gap: 14px;
  margin: 18px 0 8px;
}

.widget {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 6px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.widget h3 {
  margin: 0;
  padding: 7px 40px 7px 12px;
  font-family: var(--cap-font);
  font-size: 13.5px;
  color: #fff;
  background: linear-gradient(#3a80e8,#1c5bd0);
  border-bottom: 1px solid #13419f;
}

.widget .w-body {
  padding: 0 0 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.widget .w-body > p {
  margin: 8px 12px 0;
  font-size: 14px;
  line-height: 1.4;
}

.widget .w-img {
  all: unset;
  display: block;
  cursor: zoom-in;
  background: #111;
  aspect-ratio: 3/2;
  overflow: hidden;
}

.widget a.w-img { cursor: pointer; }
.widget .w-obj { background: var(--mount, #efe8d6); }

.widget .w-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.widget .w-obj img { object-fit: contain; }

.widget .w-img:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.widget .w-more {
  margin-top: auto !important;
  padding-top: 8px;
  font-size: 13px !important;
}

.widget .w-quote {
  font-size: 16px !important;
  line-height: 1.5 !important;
  font-style: italic;
  padding: 6px 0 0;
}

.w-curiosita { background: linear-gradient(var(--card), color-mix(in srgb, var(--card) 85%, #f7d774)); }

.w-shuffle {
  position: absolute;
  top: 4px;
  right: 6px;
  z-index: 1;
  width: 28px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.w-shuffle:hover { background: rgba(255,255,255,.35); }
.w-shuffle:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }

/* nel tema scuro le testate dei riquadri seguono le testate dei gruppi del pannello */
@media (prefers-color-scheme: dark) {
  .widget h3 { background: var(--grp-head); color: var(--grp-ink); border-bottom-color: rgba(0,0,0,.45); }
  .w-shuffle { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.08); }
}
:root[data-theme="dark"] .widget h3 { background: var(--grp-head); color: var(--grp-ink); border-bottom-color: rgba(0,0,0,.45); }
:root[data-theme="dark"] .w-shuffle { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.08); }

/* "Tutte le diapositive del viaggio": miniature da archive.org */
.allgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(110px,1fr));
  gap: 8px;
  margin: 12px 0;
}

.allgrid a {
  display: block;
  background: #111;
  border: 1px solid var(--line, #9db0c8);
  border-radius: 3px;
  overflow: hidden;
  text-decoration: none;
}

.allgrid img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
}

.allgrid span {
  display: block;
  font-size: 11px;
  color: #ddd;
  padding: 2px 5px;
}

.allgrid a:hover,
.allgrid a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.gal {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(150px,1fr));
  gap: 14px;
  margin: 16px 0 8px;
}

.gal figure {
  margin: 0;
  background: var(--mount);
  border-radius: 6px;
  padding: 8px 8px 6px;
  box-shadow: 0 2px 0 rgba(0,0,0,.15),0 6px 14px rgba(0,0,0,.2);
}

.gal button {
  all: unset;
  cursor: zoom-in;
  display: block;
  width: 100%;
  aspect-ratio: 3/2;
  overflow: hidden;
  border-radius: 2px;
  background: #111;
}

.gal button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.gal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gal figcaption {
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--mount-ink);
  margin-top: 6px;
}

.gal figcaption a {
  font-size: 11.5px;
  white-space: nowrap;
  color: #0a49c2;
}

.slide {
  all: unset;
  cursor: pointer;
  width: 170px;
  aspect-ratio: 1/1;
  background: var(--mount);
  border-radius: 6px;
  box-shadow: 0 2px 0 rgba(0,0,0,.15),0 6px 14px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: box-shadow .12s;
}

.slide:hover {
  box-shadow: 0 2px 0 rgba(0,0,0,.15),0 8px 18px rgba(0,0,0,.32);
}

.slide:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.slide .win35 {
  width: 76%;
  aspect-ratio: 3/2;
  background: #111;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide .lab {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  font-family: var(--hand);
  font-size: 17px;
  color: var(--mount-ink);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.slide .num {
  position: absolute;
  top: 7px;
  left: 10px;
  font-family: var(--hand);
  font-size: 16px;
  color: var(--mount-ink);
}

.hero-slide {
  float: right;
  margin: 0 0 14px 22px;
  width: 230px;
}

.see {
  margin: 10px 0 0;
  font-size: 13px;
}

.see a {
  margin-right: 10px;
}

/* nota: riquadro informativo */
.note {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 3px;
  padding: 8px 14px;
  background: var(--paper-2);
  max-width: 70ch;
}

/* tabelle: intestazioni come le colonne di Esplora risorse */
table.t {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  margin: 12px 0;
  width: 100%;
  border: 1px solid var(--card-edge);
  border-radius: 3px;
}

table.t th, table.t td {
  border-bottom: 1px solid var(--rule);
  text-align: left;
  padding: 6px 9px;
  vertical-align: top;
}

table.t tr:last-child td {
  border-bottom: 0;
}

table.t th {
  background: var(--th);
  font-weight: 400;
  color: var(--ink);
  border-bottom: 3px solid var(--th-edge);
  box-shadow: inset -1px 0 var(--th-edge),inset 1px 0 var(--face-hi);
  white-space: nowrap;
}

table.t tbody tr:hover td {
  background: var(--hov-bg);
}

.tw {
  overflow-x: auto;
}

/* ---------- #strumenti, "Tools & TODO" (pages/strumenti.js) ---------- */
.tools h2 { margin-top: 28px; }
.tbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--card-edge); border-radius: 3px; background: var(--paper-2); }
.tbase { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-family: var(--ui); font-size: 12.5px; }
.tbase .tin { flex: 1; max-width: 420px; }
.plink { flex-basis: 100%; margin: 0; font-size: 12.5px; }
.plink code { user-select: all; }
.tsave { flex: 1; font-family: var(--ui); font-size: 12.5px; color: var(--muted); }
.tools .tin, .tools select, .tools textarea, .pmain input {
  font: inherit; font-size: 13.5px; color: var(--ink); background: var(--field);
  border: 1px solid var(--field-edge); border-radius: 2px; padding: 4px 7px;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,.08);
}
.tools textarea { width: 100%; resize: vertical; font-family: var(--ui); line-height: 1.45; }
.tools .tin:focus-visible, .tools select:focus-visible, .tools textarea:focus-visible, .pmain input:focus-visible { outline: none; border-color: var(--sel); box-shadow: 0 0 0 2px var(--focus); }
.todo { list-style: none; padding: 0; margin: 8px 0; max-width: 900px; }
.todo li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.todo li .tin { flex: 1; }
.todo li.done .tin { text-decoration: line-through; color: var(--muted); }
.todo input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--sel); }
.tadd { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; max-width: 900px; }
.tadd .tin { flex: 1; min-width: 200px; }
.tx { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 2px; padding: 2px 8px; cursor: pointer; }
.tx:hover { color: #b3261e; border-color: var(--rule); }
.tips { max-width: 900px; font-size: 14px; }
.posts { display: grid; gap: 8px; margin: 10px 0; }
.post { border: 1px solid var(--card-edge); border-left: 5px solid var(--muted); border-radius: 3px; background: var(--card); box-shadow: var(--card-shadow); }
.post.st-pronto { border-left-color: var(--accent); }
.post.st-postato { border-left-color: var(--sel); }
.post.st-risolto { border-left-color: #2e8b57; }
.post.st-scartato { opacity: .65; }
.post summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 12px; cursor: pointer; font-family: var(--ui); font-size: 14px; }
.post summary .subs { color: var(--muted); font-size: 12.5px; }
.post summary .pst { margin-left: auto; font-size: 12px; padding: 0 7px; border: 1px solid var(--rule); border-radius: 9px; }
.prio { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 700; color: #fff; background: var(--muted); }
.prio.p1 { background: #c0392b; }
.prio.p2 { background: var(--accent); }
.pbody { display: grid; grid-template-columns: 230px 1fr; gap: 16px; padding: 4px 14px 14px; }
.pside img { width: 100%; border-radius: 2px; }
.pfoto { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.pfoto img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; border: 1px solid var(--rule); }
.pmain { display: flex; flex-wrap: wrap; gap: 8px 14px; align-content: start; font-family: var(--ui); font-size: 12.5px; }
.pmain label { display: flex; flex-direction: column; gap: 3px; }
.pmain label.w { flex-basis: 100%; min-width: 0; }
.pmain { min-width: 0; }
.pmain input, .pmain textarea { width: 100%; box-sizing: border-box; }
.pmain .cnt { float: right; color: var(--muted); }
.pact { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.pact a.tbtn { text-decoration: none; }
.pdel { flex-basis: 100%; margin: 0; text-align: right; }
