/* HP-Collection: leichte, kompakte Datentabellen auf allen Seiten.
   Weisser Hintergrund, feine graue Trennlinien, ca. 22-23 px Zeilenhoehe.
   Kopfbereich, Seitengitter und die 175px-Navigation sind ausgenommen. */

/* Gemeinsame Basiseinstellungen: nur von JS erkannte Inhaltstabellen. */
html :is(.hp-data-overview,.hp-spec-table,.hp-notes-table,.hp-model-head,
         .hp-photo-table,.hp-record-data,.hp-content-table,.hp-content-photo) {
    border: 1px solid #e3e3e3 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 3px;
    background: #fff !important;
    box-shadow: none !important;
    font: 13px/1.25 Arial, Helvetica, sans-serif;
    color: #333;
}
html :is(.hp-data-overview,.hp-spec-table,.hp-record-data,.hp-content-table) > tbody > tr,
html :is(.hp-data-overview,.hp-spec-table,.hp-record-data,.hp-content-table) > tr {
    height: auto !important;
}
html :is(.hp-data-overview,.hp-spec-table,.hp-record-data,.hp-content-table) > tbody > tr > :is(td,th),
html :is(.hp-data-overview,.hp-spec-table,.hp-record-data,.hp-content-table) > tr > :is(td,th) {
    height: auto !important;
    min-height: 0 !important;
    padding: 3px 7px !important;
    vertical-align: middle;
    border: 0 !important;
    border-bottom: 1px solid #ededed !important;
    background: #fff !important;
    color: #333 !important;
    font: 13px/1.25 Arial, Helvetica, sans-serif;
}
html :is(.hp-data-overview,.hp-spec-table,.hp-record-data,.hp-content-table) > tbody > tr:nth-child(even) > :is(td,th) {
    background: #fafafa !important;
}
html :is(.hp-data-overview,.hp-spec-table,.hp-record-data,.hp-content-table) > tbody > tr:last-child > :is(td,th) {
    border-bottom: 0 !important;
}
html :is(.hp-data-overview,.hp-spec-table,.hp-record-data,.hp-content-table) > tbody > tr > :is(td,th) + :is(td,th) {
    border-left: 1px solid #ededed !important;
}

/* Rechner- und Organizeruebersichten: rundum Abstand, wie besprochen. */
html .hp-table-scroll {
    width: calc(100% - 60px);
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    margin: 6px auto 12px;
}
html .hp-data-overview {
    width: 100% !important;
    min-width: 550px;
    margin: 0 auto !important;
}
html .hp-data-overview > tbody > tr:first-child > td {
    background: #f3f3f3 !important;
    color: #444 !important;
    font: 600 12px/1.25 Arial, Helvetica, sans-serif;
    padding: 4px 7px !important;
    text-align: left !important;
}
html .hp-data-overview td a {
    display: block;
    width: 100%;
    font: 400 13px/1.25 Arial, Helvetica, sans-serif;
    color: #424242 !important;
    text-decoration: none !important;
}
html .hp-data-overview td a i { font-style: normal; }
html .hp-data-overview td a:is(:hover,:focus-visible) {
    text-decoration: underline !important;
    color: #111 !important;
}
html .hp-data-overview > tbody > tr:not(:first-child) > td:hover { background: #f1f1f1 !important; }

/* Einzelne technische Daten; alte HTML-Hoehen (z.B. 305px) aufheben. */
html .hp-spec-table { height: auto !important; width: 100% !important; }
html .hp-spec-table > tbody > tr > td:first-child,
html .hp-record-data > tbody > tr > td:first-child {
    font-weight: 600 !important;
    color: #505050 !important;
}
html .hp-spec-table > tbody > tr > td:last-child { text-align: left !important; }
html .hp-model-head { height: auto !important; background: #f7f7f7 !important; }
html .hp-model-head > tbody > tr { height: auto !important; }
html .hp-model-head > tbody > tr > td {
    height: auto !important;
    padding: 3px 6px !important;
    background: #f7f7f7 !important;
    border: none !important;
    color: #333 !important;
}
html .hp-model-head font[size="6"] { font-family: Arial, Helvetica, sans-serif; font-size: 22px; }
html .hp-model-meta { height: auto !important; }
html .hp-model-meta > tbody > tr > td {
    height: auto !important;
    padding: 2px 4px !important;
    font: 12px/1.2 Arial, Helvetica, sans-serif;
}

/* Das bisher noch unveraenderte Foto bekommt denselben duennen Rand
   wie die technischen Daten; keine festen Bild- oder Tabellenhoehen. */
html .hp-photo-table,
html .hp-content-photo {
    width: 100% !important;
    height: auto !important;
    background: white !important;
}
html :is(.hp-photo-table,.hp-content-photo) > tbody > tr,
html :is(.hp-photo-table,.hp-content-photo) > tbody > tr > td {
    height: auto !important;
    background: white !important;
}
html :is(.hp-photo-table,.hp-content-photo) > tbody > tr > td {
    padding: 6px 5px !important;
    border: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
}
html :is(.hp-photo-table,.hp-content-photo) img { max-width: 100%; height: auto; object-fit: contain; }
html .hp-device-columns { border-spacing: 6px 2px !important; }
html .hp-device-columns > tbody > tr > td { padding: 0 2px !important; vertical-align: top !important; }

/* Notizen unter den Geraetefotos bleiben in einer Zeile mit Datenbereich. */
html .hp-notes-table { width: 100% !important; }
html .hp-notes-table > tbody > tr > td {
    background: white !important;
    padding: 5px 7px !important;
    border: 0 !important;
    vertical-align: top !important;
    font: 13px/1.35 Arial, Helvetica, sans-serif;
    color: #333 !important;
}
html .hp-notes-table > tbody > tr > td:first-child {
    border-right: 1px solid #ededed !important;
    background: #fafafa !important;
    font-weight: 600;
}

/* Zubehoer, Batteriepakete, Etuis, Drucker etc.: Bild neben Daten. */
html .hp-main-content table.hp-record-grid {
    width: calc(100% - 60px) !important;
    max-width: calc(100% - 60px);
    margin: 8px auto 12px !important;
    border-spacing: 0 7px !important;
    border-collapse: separate !important;
}
html .hp-record-grid > tbody > tr > td {
    padding: 5px 9px !important;
    border-bottom: 1px solid #ededed !important;
    vertical-align: middle !important;
    background: white !important;
}
html .hp-record-grid > tbody > tr > td.hp-record-photo { text-align: center !important; }
html .hp-record-photo > br { display: none; }
html .hp-record-photo img { max-width: 100%; height: auto; object-fit: contain; }
html .hp-record-data { width: 100% !important; height: auto !important; }
html .hp-content-table { max-width: 100%; }
html .hp-main-content table.hp-content-table:not(.hp-record-data) { margin-top: 6px; margin-bottom: 10px; }
html :is(.hp-record-data,.hp-content-table) a { color: #424242 !important; }
html :is(.hp-record-data,.hp-content-table) a:hover { text-decoration: underline !important; }

@media(max-width:700px) {
    html .hp-table-scroll { width: calc(100% - 24px); }
    html .hp-main-content table.hp-record-grid { width: calc(100% - 24px) !important; max-width: calc(100% - 24px); }
    html .hp-record-grid > tbody > tr > td { padding: 4px 5px !important; }
}

/* Bei Modellen ohne Originalfoto wird auch der Hinweisrahmen vereinheitlicht. */
html .hp-photo-empty > tbody > tr > td {
    min-height: 115px;
    padding: 18px 8px !important;
    text-align: center !important;
    background: #fff !important;
    color: #555 !important;
    font: 13px/1.3 Arial, Helvetica, sans-serif;
}

/* Startseite: die alten, teils nicht korrekt geschlossenen <b>/<i>-Elemente
   sollen die ganze Neuigkeitenliste nicht schwer und gross darstellen. */
html.hp-modern-home .hp-main-content td.template {
    font: 13px/1.45 Arial, Helvetica, sans-serif;
    color: #3b3b3b;
}
html.hp-modern-home .hp-main-content td.template > i,
html.hp-modern-home .hp-main-content td.template > i > i,
html.hp-modern-home .hp-main-content td.template > i > i > i {
    font: inherit !important;
}
html.hp-modern-home .hp-main-content td.template font[size="4"] {
    font-size: 15px !important;
    font-weight: 600 !important;
}
html.hp-modern-home .hp-main-content .hp-home-news {
    width: calc(100% - 60px) !important;
    max-width: calc(100% - 60px);
    margin: 8px auto 12px !important;
    font: 12px/1.35 Arial, Helvetica, sans-serif !important;
}
html.hp-modern-home .hp-home-news :is(td, th, div, i, b, strong, font, a) {
    font: 12px/1.35 Arial, Helvetica, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
}
html.hp-modern-home .hp-home-news > tbody > tr > td:first-child {
    width: 108px;
    white-space: nowrap;
    color: #626262 !important;
}
html.hp-modern-home .hp-home-news > tbody > tr > td {
    padding: 4px 7px !important;
    vertical-align: top !important;
}
html.hp-modern-home .hp-home-news > tbody > tr > td > table {
    border: 0 !important;
}
html.hp-modern-home .hp-home-news td a { color: #444 !important; text-decoration: underline; }

/* Mechanical Calculators: dieselben hellen Zellen wie die Modelluebersichten. */
html.hp-modern-mechanical .hp-main-content .hp-mechanical-comparison {
    width: calc(100% - 60px) !important;
    max-width: calc(100% - 60px);
    margin: 9px auto 12px !important;
    border: 1px solid #e3e3e3 !important;
}
html.hp-modern-mechanical .hp-mechanical-comparison > tbody > tr > td {
    height: auto !important;
    padding: 4px 8px !important;
    font: 13px/1.3 Arial, Helvetica, sans-serif !important;
    color: #333 !important;
    text-align: center !important;
    background: #fff !important;
    border: none !important;
    border-bottom: 1px solid #ededed !important;
}
html.hp-modern-mechanical .hp-mechanical-comparison > tbody > tr:first-child > td {
    background: #f4f4f4 !important;
    font-weight: 600 !important;
    color: #4b4b4b !important;
}
html.hp-modern-mechanical .hp-mechanical-comparison > tbody > tr:nth-child(even) > td {
    background: #fafafa !important;
}
html.hp-modern-mechanical .hp-mechanical-comparison > tbody > tr:last-child > td {
    border-bottom: none !important;
}
html.hp-modern-mechanical .hp-mechanical-comparison > tbody > tr > td + td {
    border-left: 1px solid #ededed !important;
}
html.hp-modern-mechanical .hp-main-content .hp-content-photo {
    border: 1px solid #e3e3e3 !important;
    border-spacing: 0 !important;
    height: auto !important;
    background: #fff !important;
}
html.hp-modern-mechanical .hp-content-photo > tbody > tr > td {
    padding: 6px !important;
    border: 0 !important;
    text-align: center !important;
    background: #fff !important;
}
html.hp-modern-mechanical .hp-content-photo img {
    display: inline-block;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
}
html.hp-modern-mechanical .hp-main-content > table[width="100%"] {
    max-width: 100%;
}
/* Rechnerbilder: JS gleicht die Mindesthoehe des Rahmens an Modellkopf + Daten an. */
html.hp-modern-detail .hp-device-columns .hp-photo-table {
    box-sizing: border-box;
    width: 100% !important;
}
html.hp-modern-detail .hp-device-columns .hp-photo-table > tbody > tr > td {
    vertical-align: middle !important;
}
@media (max-width: 700px) {
    html.hp-modern-home .hp-main-content .hp-home-news,
    html.hp-modern-mechanical .hp-main-content .hp-mechanical-comparison {
        width: calc(100% - 24px) !important;
        max-width: calc(100% - 24px);
    }
}
/* Die historischen HTML-News enthalten ungeschlossene Formatierungen.
   Deshalb die Schriftgewichtung innerhalb des Startseiteninhalts explizit setzen. */
html.hp-modern-home .hp-main-content td.template :is(i, b, strong) {
    font-weight: 400 !important;
    font-style: normal !important;
}
html.hp-modern-home .hp-main-content td.template > i :is(p, div) {
    font-size: 13px;
    line-height: 1.4;
}

/* Curta I / II: identische Rahmen, natuerliche Bildproportionen.
   Die historischen HTML-Breiten/Hoehen der IMG-Tags werden nur fuer die
   Anzeige uebersteuert. Die Originaldateien bleiben unangetastet. */
html.hp-modern-mechanical .hp-main-content table.hp-content-photo:has(img[src$="Curtai.jpg"]),
html.hp-modern-mechanical .hp-main-content table.hp-content-photo:has(img[src$="Curtaii.jpg"]) {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 270px !important;
    min-height: 270px !important;
    table-layout: fixed;
}
html.hp-modern-mechanical .hp-main-content table.hp-content-photo:has(img[src$="Curtai.jpg"]) > tbody > tr > td,
html.hp-modern-mechanical .hp-main-content table.hp-content-photo:has(img[src$="Curtaii.jpg"]) > tbody > tr > td {
    height: 256px !important;
    vertical-align: middle !important;
    text-align: center !important;
}
html.hp-modern-mechanical .hp-main-content img[src$="Curtai.jpg"],
html.hp-modern-mechanical .hp-main-content img[src$="Curtaii.jpg"] {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 245px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}
@media (max-width: 700px) {
    html.hp-modern-mechanical .hp-main-content table.hp-content-photo:has(img[src$="Curtai.jpg"]),
    html.hp-modern-mechanical .hp-main-content table.hp-content-photo:has(img[src$="Curtaii.jpg"]) {
        height: 184px !important;
        min-height: 184px !important;
    }
    html.hp-modern-mechanical .hp-main-content table.hp-content-photo:has(img[src$="Curtai.jpg"]) > tbody > tr > td,
    html.hp-modern-mechanical .hp-main-content table.hp-content-photo:has(img[src$="Curtaii.jpg"]) > tbody > tr > td {
        height: 170px !important;
    }
    html.hp-modern-mechanical .hp-main-content img[src$="Curtai.jpg"],
    html.hp-modern-mechanical .hp-main-content img[src$="Curtaii.jpg"] {
        max-height: 159px !important;
    }
}

/* Software-Datenbanken: alle vier verwenden exakt dieselbe Einbettung.
   Keine Inline-Hoehen, keine dynamische Groessenberechnung. */
html.hp-modern-software .hp-database-container {
    box-sizing: border-box;
    margin: 16px 30px 12px;
    padding: 0;
    width: calc(100% - 60px);
}
html.hp-modern-software .hp-software-frame {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 694px;
    border: 0;
    padding: 0;
    margin: 0;
    background: white;
}
@media (max-width: 700px) {
    html.hp-modern-software .hp-database-container {
        margin-left: 12px;
        margin-right: 12px;
        width: calc(100% - 24px);
    }
}

/* Einheitliche Hoehe des Beschriftungsbereichs ueber jeder Softwaretabelle. */
html.hp-modern-software .hp-main-content td.template {
    height: 180px;
    vertical-align: middle !important;
}

/* New records added through the protected administration: in the original overviews. */
.hp-new-models{margin:18px 30px;padding:12px 15px;text-align:left;background:#fff;border:1px solid #e3e3e3;border-radius:3px;font:13px/1.3 Arial,Helvetica,sans-serif}
.hp-new-models h2{font:600 14px/1.3 Arial,Helvetica,sans-serif;margin:0 0 8px}
.hp-new-models ul{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));margin:0;padding-left:18px;gap:6px}
.hp-new-models a{color:#333;text-decoration:none}.hp-new-models a:hover{text-decoration:underline}
@media(max-width:600px){.hp-new-models{margin:12px}}

/* New information pages: same introductory typography as the public home page.
   The old inline-style selectors also normalize pages already created with
   the first version of the manager. Other information pages are unaffected. */
html.hp-modern-content .hp-main-content td.template > :is(
    h1.hp-created-page-title,
    h1[style*="font: bold 22px Arial"]
) {
    font: 600 15px/1.4 Arial, Helvetica, sans-serif !important;
    text-align: center !important;
    color: #3b3b3b !important;
    margin: 28px 20px 20px !important;
}
html.hp-modern-content .hp-main-content td.template > :is(
    p.hp-created-page-intro,
    p[style*="font: 14px/1.5 Arial"]
) {
    font: 13px/1.45 Arial, Helvetica, sans-serif !important;
    text-align: left !important;
    color: #3b3b3b !important;
    margin: 0 22px 28px !important;
}
