/* Itagora classic portal — 1999–2004 directory look, responsive, no webfonts, no trackers */
:root {
  --brand: #cc0000;
  --header: #003399;
  --header-2: #3366cc;
  --search: #ffcc33;
  --search-edge: #e6b800;
  --link: #0000cc;
  --visited: #551a8b;
  --text: #000000;
  --muted: #444444;
  --line: #6699cc;
  --box: #cccccc;
  --news: #663399;
  --discover: #2e7d32;
  --oggi: #c60;
  --bg: #ffffff;
  --shade: #f3f3f7;
  --beige: #ece9d8;
  --max: max(980px, 70vw);
}

* { box-sizing: border-box; }
html { font-size: 13px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.35;
}
a { color: var(--link); text-decoration: none; }
a:visited { color: var(--visited); }
a:hover { text-decoration: underline; }
img { max-width: 100%; border: 0; }
ul { margin: 0; padding: 0 0 0 16px; }

.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 8px; background: #ff0; padding: 4px; z-index: 9; }

.portal {
  max-width: var(--max);
  margin: 0 auto;
  padding: 6px 8px 24px;
}

/* Header */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 2px 0 4px;
}
.topbar a { margin-left: 8px; }
.brand-wrap { text-align: center; padding: 10px 0 4px; }
.brand {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 42px;
  font-weight: bold;
  color: var(--brand);
  letter-spacing: -1px;
  text-decoration: none;
  line-height: 1;
}
.brand:visited { color: var(--brand); }
.brand:hover { text-decoration: none; }
.brand i { font-style: italic; color: var(--brand); }
.tagline {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.icons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 11px;
  margin: 8px 0 10px;
}
.icons a { color: var(--link); text-align: center; text-decoration: none; }
.icons a:hover { text-decoration: underline; }
.ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 auto 2px;
  border: 1px solid #99c;
  background: #eef4ff;
  color: var(--header);
}
.ico svg {
  display: block;
  width: 22px;
  height: 22px;
}

/* Search — AltaVista yellow */
.searchbox {
  background: var(--search);
  border: 2px solid var(--search-edge);
  padding: 10px 12px 8px;
  text-align: center;
}
.searchbox form { margin: 0; }
.searchbox .tabs {
  font-size: 11px;
  margin-bottom: 6px;
}
.searchbox .tabs label { margin: 0 8px; cursor: pointer; }
.searchbox input[type="search"],
.searchbox input[type="text"] {
  width: min(70%, 420px);
  font-family: Verdana, sans-serif;
  font-size: 14px;
  padding: 3px 4px;
  border: 2px inset #fff;
}
.btn-go {
  background: #fff8d0;
  border: 2px outset #ffe680;
  font-family: Verdana, sans-serif;
  font-size: 13px;
  font-weight: bold;
  padding: 3px 14px;
  cursor: pointer;
  color: #000;
}
.btn-go:active { border-style: inset; }
.btn-add-search {
  display: inline-block;
  background: #fff8d0;
  border: 2px outset #ffe680;
  font-family: Verdana, sans-serif;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 10px;
  color: #000;
  text-decoration: none;
}
.search-add { margin-top: 8px; }
.btn-add-search:visited { color: #000; }
.btn-add-search:hover { text-decoration: none; background: #fff; }
.btn-add-search:active { border-style: inset; }
.search-opts { font-size: 11px; margin-top: 6px; }
.search-opts label { margin: 0 8px; }
.engine-url {
  display: block;
  margin: 6px 0;
  padding: 6px 8px;
  background: var(--beige);
  border: 1px inset #ccc;
  font-size: 12px;
  word-break: break-all;
}

.channels {
  text-align: center;
  font-size: 12px;
  padding: 7px 4px;
  border-bottom: 3px double var(--header);
  margin-bottom: 10px;
}
.channels b { color: var(--header); margin-right: 6px; font-size: 11px; }
.channels a { margin: 0 3px; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: 200px 1fr 210px;
  gap: 10px;
  align-items: start;
}

.box {
  border: 1px solid var(--box);
  background: #fff;
  margin-bottom: 10px;
}
.box-h {
  background: var(--header);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 7px;
}
.box-h a { color: #fff; }
.box-b { padding: 6px 8px 8px; overflow: hidden; }
.box-b h2 {
  font-size: 13px;
  color: var(--header);
  margin: 10px 0 4px;
}
.box-b ol { margin: 0 0 8px; padding-left: 22px; }
.box-b li { margin: 0 0 5px; }
.box-h.news { background: var(--news); }
.box-h.green { background: var(--discover); }
.box-h.oggi { background: var(--oggi); }

.dir-group { margin-bottom: 10px; }
.dir-group dt {
  font-weight: bold;
  color: var(--brand);
  margin: 0 0 2px;
  font-size: 12px;
}
.dir-group dd { margin: 0 0 2px 0; font-size: 11px; }
.dir-group dd a { margin-right: 4px; }
.linkroll .dir-group:last-child { margin-bottom: 0; }
.linkroll dd .src { display: block; color: var(--muted); font-size: 10px; }

.hero h2 { font-size: 16px; margin: 0 0 4px; font-family: Georgia, serif; color: #930; }
.hero .meta { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.hero p { margin: 0 0 6px; }
.hero::after { content: ""; display: table; clear: both; }

.thumb {
  border: 1px solid #666;
  background: #eee;
  display: block;
}
.thumb-hero {
  float: left;
  width: 130px;
  height: auto;
  margin: 2px 10px 8px 0;
}
.thumb-mix {
  float: left;
  width: 72px;
  height: auto;
  margin: 1px 8px 6px 0;
}
.mix-item:nth-child(even) .thumb-mix {
  float: right;
  margin: 1px 0 6px 8px;
}
.thumb-day {
  float: left;
  width: 64px;
  height: auto;
  margin: 4px 8px 4px 0;
}
.thumb-voce {
  float: left;
  width: 180px;
  max-width: 46%;
  height: auto;
  margin: 0 12px 10px 0;
}
.mix-edition { margin: 0; }
.mix-item {
  overflow: hidden;
  border-bottom: 1px dotted #ccc;
  padding: 7px 0 8px;
  font-size: 12px;
}
.mix-item:last-child { border-bottom: 0; }
.mix-item .src { font-size: 10px; color: var(--muted); margin-top: 2px; }

.sidebox-b::after { content: ""; display: table; clear: both; }

.bullets { margin: 0; padding-left: 16px; clear: both; }
.bullets li { margin: 3px 0; font-size: 12px; }

.mix-list { list-style: square; margin: 0; padding-left: 16px; }
.mix-list li { margin: 5px 0; }
.mix-list .src { font-size: 10px; color: var(--muted); }

.sidebox {
  display: flex;
  border: 1px solid #999;
  margin-bottom: 10px;
  background: #fff;
}
.vlabel {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: var(--news);
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 8px 3px;
  text-align: center;
  flex: 0 0 22px;
}
.vlabel.green { background: var(--discover); }
.vlabel.oggi { background: var(--oggi); }
.sidebox-b { padding: 6px 8px; flex: 1; min-width: 0; font-size: 12px; }
.sidebox-b ul { padding-left: 14px; margin: 0; }
.sidebox-b li { margin: 4px 0; }

.feed-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  padding: 0 4px;
  margin-right: 4px;
  background: var(--header);
}

.lang { font-size: 10px; color: #666; border: 1px solid #bbb; padding: 0 3px; }

.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-top: 8px;
}
.cat-cell { border-top: 1px dashed #aaa; padding-top: 6px; }
.cat-cell h3 { margin: 0 0 3px; font-size: 13px; }
.cat-cell .subs { font-size: 11px; color: var(--muted); }
.cat-cell .subs a { margin-right: 2px; }

.crumb { font-size: 11px; margin: 0 0 8px; color: var(--muted); }
h1.page {
  font-size: 18px;
  color: var(--header);
  margin: 0 0 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
}

.item-row { border-bottom: 1px dotted #ccc; padding: 7px 0; overflow: hidden; }
.item-row h3 { margin: 0 0 2px; font-size: 14px; font-weight: normal; }
.item-row .meta { font-size: 11px; color: var(--muted); }
.item-row .item-body { min-width: 0; overflow: hidden; }
.item-row .item-body p { margin: 3px 0 0; }
.thumb-link { float: left; margin: 1px 10px 6px 0; }
.item-news {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.news-thumb {
  flex: 0 0 64px;
  width: 64px;
  margin: 1px 0 0;
}
.news-thumb img {
  display: block;
  width: 64px;
  height: 48px;
  object-fit: cover;
  border: 1px solid #666;
  background: #eee;
}

.search-cats {
  margin: 0 0 12px;
  border-bottom: 2px solid var(--header);
  font-size: 12px;
  line-height: 1.2;
}
.search-cats a,
.search-cats span {
  display: inline-block;
  padding: 4px 11px 3px;
  margin: 0 3px 0 0;
  border: 1px solid var(--header);
  border-bottom: 0;
  background: #dce6f5;
  color: var(--header);
  text-decoration: none;
}
.search-cats a:visited { color: var(--header); }
.search-cats a:hover { background: #fff; text-decoration: none; }
.search-cats .on {
  background: #fff;
  font-weight: bold;
  color: #000;
  position: relative;
  top: 2px;
  padding-bottom: 5px;
}

.thumb-web {
  display: block;
  width: 92px;
  height: 70px;
  object-fit: cover;
}

.img-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 10px;
  margin: 8px 0 14px;
}
.img-cell {
  min-width: 0;
  text-align: center;
  font-size: 11px;
}
.img-cell a { color: var(--link); text-decoration: none; }
.img-cell a:hover { text-decoration: underline; }
.img-cell img,
.img-cell .img-ph {
  display: block;
  width: 100%;
  height: 118px;
  object-fit: cover;
  border: 1px solid #666;
  background: #eee;
  margin-bottom: 4px;
}
.img-cell .img-ph { box-sizing: border-box; }
.img-cell .img-title {
  display: block;
  max-height: 2.7em;
  overflow: hidden;
}
.img-cell .src { color: var(--muted); font-size: 10px; margin-top: 2px; }

.article h1 { font-size: 20px; font-family: Georgia, serif; color: #333; margin: 0 0 6px; }
.article .lede { font-size: 14px; }
.article::after { content: ""; display: table; clear: both; }
.outlink {
  display: inline-block;
  margin-top: 10px;
  background: var(--search);
  border: 2px outset #ffe680;
  padding: 4px 10px;
  font-weight: bold;
  color: #000;
  text-decoration: none;
}
.outlink:visited { color: #000; }

.prose p { margin: 0 0 10px; }
.prose h2 { font-size: 15px; color: var(--header); }

.foot {
  margin-top: 16px;
  border-top: 3px double var(--header);
  padding-top: 8px;
  font-size: 11px;
  text-align: center;
  color: var(--muted);
}
.foot nav a { margin: 0 6px; }

.empty {
  background: var(--beige);
  border: 1px dashed #999;
  padding: 10px;
  font-size: 12px;
}

/* AltaVista / Yahoo-style pager */
.pager {
  margin: 12px 0;
  padding: 8px 10px 7px;
  background: var(--shade);
  border: 1px solid var(--line);
  font-size: 12px;
  text-align: center;
}
.pager-range {
  color: var(--muted);
  margin-bottom: 6px;
}
.pager-nav {
  line-height: 1.8;
}
.pager-nav a,
.pager-nav span {
  display: inline-block;
  margin: 1px 2px;
  padding: 1px 6px;
  min-width: 1.3em;
  text-decoration: none;
}
.pager-nav a {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--link);
}
.pager-nav a:visited { color: var(--link); }
.pager-nav a:hover {
  background: var(--search);
  border-color: var(--search-edge);
  text-decoration: none;
}
.pager-cur {
  font-weight: bold;
  background: var(--search);
  border: 1px solid var(--search-edge);
  color: #000;
}
.pager-gap { color: var(--muted); border: 0; background: none; }
.pager-dir { font-weight: bold; }
.pager-dir.off {
  color: #999;
  border: 0;
  background: none;
  font-weight: normal;
}

code { font-size: 12px; }

@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr 200px; }
  .col-dir { order: 3; grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .brand { font-size: 34px; }
  .img-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  html { font-size: 15px; }
  .grid {
    display: grid;
    grid-template-columns: 1fr;
  }
  .col-main { order: 1; }
  .col-side { order: 2; }
  .col-dir {
    order: 3;
    display: block;
    grid-column: auto;
  }
  .cat-grid { display: block; }
  .searchbox input[type="search"],
  .searchbox input[type="text"] { width: 94%; display: block; margin: 0 auto 6px; }
  .brand { font-size: 32px; }
  .portal { padding: 4px 6px 20px; }
  .icons { gap: 8px 12px; }
  .thumb-hero, .thumb-voce { width: 110px; max-width: 42%; }
  .mix-item:nth-child(even) .thumb-mix { float: left; margin: 1px 8px 6px 0; }
  .img-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-cats a, .search-cats span { padding: 5px 8px 4px; font-size: 12px; }
}

/* Prima pagina del motore (/motore, cerca.itagora.it) */
body.motore-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}
.motore {
  width: min(560px, 92vw);
  margin: 0 auto;
  text-align: center;
  padding: 0 0 14vh;
}
.motore-brand {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 48px;
  font-weight: bold;
  color: var(--brand);
  letter-spacing: -1px;
  margin: 0 0 28px;
  line-height: 1;
}
.motore-form { margin: 0; }
.motore-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.motore-row input[type="search"] {
  flex: 1;
  min-width: 0;
  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  font-size: 16px;
  padding: 7px 8px;
  border: 2px inset #fff;
  background: #fff;
  box-shadow: 0 0 0 1px #999;
  appearance: none;
  -webkit-appearance: none;
}
.motore-insight {
  position: relative;
  flex: 0 0 auto;
}
.motore-insight summary {
  list-style: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--header);
  color: var(--header);
  background: #fff;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 15px;
  font-style: italic;
  font-weight: bold;
  line-height: 26px;
  text-align: center;
  user-select: none;
}
.motore-insight summary::-webkit-details-marker { display: none; }
.motore-insight summary::marker { content: none; }
.motore-insight[open] summary {
  background: var(--header);
  color: #fff;
}
.motore-insight-box {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(300px, 86vw);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 2px 2px 0 #d0d0d8;
  z-index: 2;
}
.motore-insight-box p { margin: 0 0 8px; }
.motore-insight-box p:last-child { margin: 0; }
.motore-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  margin: 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 520px) {
  .motore-brand { font-size: 36px; }
  .motore-row { flex-wrap: wrap; }
  .motore-row input[type="search"] { flex: 1 1 100%; }
  .motore-insight-box { left: 0; right: auto; }
}
