/* ============================================================
   Readable type scale — clean sans-serif, comfortable sizes.
   Loads after the theme SCSS bundle, overrides its variables.
   OJO: el root del tema es 10px (html 62.5%), asi que 1rem = 10px.
   Por eso los cuerpos van en rem altos (1.8rem = 18px) y no en rem
   de raiz 16px como dicta la costumbre.
   ============================================================ */

/* --- Article spacing overrides (loads after theme, wins by cascade) --- */

.article-content > p {
    margin: 0.8em 0;
}

.article-content h1 {
    margin: 1.8em 0 0.5em;
}

.article-content h2 {
    margin: 1.6em 0 0.5em;
}

.article-content h3 {
    margin: 1.4em 0 0.4em;
}

.article-content h4,
.article-content h5,
.article-content h6 {
    margin: 1.2em 0 0.4em;
}

.article-content blockquote {
    margin: 1em 0;
}

.article-content ul,
.article-content ol {
    margin: 0.8em 0;
}

/* --- Base typography --- */

body {
    font-size: 1.8rem;                /* 18px @ root 10px */
    line-height: 1.65;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans", sans-serif,
                 "Apple Color Emoji", "Segoe UI Emoji";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* --- Article content --- */

:root {
    --article-font-size: 1.8rem;       /* 18px mobile */
    --article-line-height: 1.75;
}

@media (min-width: 768px) {
    :root { --article-font-size: 1.9rem; }  /* 19px desktop */
}

@media (min-width: 1200px) {
    :root { --article-font-size: 2rem; }     /* 20px wide */
}

/* --- Sidebar --- */

.left-sidebar .site-name {
    font-size: 2rem;
}
.left-sidebar .site-description {
    font-size: 1.5rem;
    line-height: 1.45;
}

/* --- Navigation --- */

#main-menu {
    font-size: 1.4rem;
}
#main-menu li svg {
    width: 20px;
    height: 20px;
}

/* --- Article header --- */

.article-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}
.article-subtitle {
    font-size: 1.55rem;
}
.article-meta,
.article-meta time,
.article-meta a,
.article-meta span {
    font-size: 1.3rem;
}

/* --- Article lists --- */

.article-list--compact .article-title {
    font-size: 1.4rem;
}
.article-list--compact .article-preview {
    font-size: 1.4rem;
}

/* --- Tags --- */

.tag {
    font-size: 1.2rem;
}

/* --- Footer --- */

.footer {
    font-size: 1.2rem;
}

/* --- Search --- */

.search-input {
    font-size: 1.4rem;
}

/* --- TOC --- */

.toc .toc-link {
    font-size: 1.2rem;
}

/* --- Tool workspace stack (single-column on narrow screens) --- */

.tool-workspace {
    grid-template-columns: 1fr;
}
.tool-workspace > .tool-column {
    display: contents;
}
.tool-workspace > .tool-column > .tool-panel {
    width: 100%;
}
.tool-upload-panel { order: 1; }
.tool-download-panel { order: 2; }
.tool-inspector-panel { order: 3; }

/* --- Metadata report --- */

.metadata-report-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
}
.metadata-report-summary span {
    padding: 9px 8px;
    border: 1px solid var(--card-border-color);
    border-radius: 9px;
    color: var(--card-text-color-secondary);
    font-size: 1.2rem;
    text-align: center;
}
.metadata-report-summary b {
    display: block;
    color: var(--card-text-color-main);
    font-size: 1.35rem;
}
.metadata-report-summary .is-removed b { color: #ff8d9d; }
.metadata-report-summary .is-preserved b { color: #63f3ff; }

.metadata-section {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--card-separator-color);
}
.metadata-section h3 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 9px;
    color: var(--card-text-color-main);
    font-size: 1.35rem;
}
.metadata-section h3 span {
    color: var(--card-text-color-tertiary);
    font: 600 1.2rem/1 var(--mono-font);
}
.metadata-section-empty {
    margin: 0;
    color: var(--card-text-color-tertiary);
    font-size: 1.2rem;
}
.metadata-removed h3 { color: #ff8d9d; }
.metadata-preserved h3 { color: #63f3ff; }

.metadata-value-details summary {
    cursor: pointer;
    color: #63f3ff;
    font-size: 1.25rem;
}
.metadata-value-details pre {
    max-height: 220px;
    margin: 8px 0 0;
    padding: 8px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border-radius: 6px;
    background: rgba(0, 0, 0, .18);
    color: var(--card-text-color-secondary);
    font: 1.2rem/1.5 var(--mono-font);
}
.metadata-report-note {
    margin: 18px 0 0;
    color: var(--card-text-color-tertiary);
    font-size: 1.25rem;
    line-height: 1.5;
}

@media (max-width: 560px) {
    .metadata-report-summary { grid-template-columns: 1fr; }
}
