/* Rewrite · sistema visual de trujillomingorance.com (zinc + menta, Inter: baseline ATM) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2'); }
:root { --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; --mono: ui-monospace, "SFMono-Regular", Menlo, monospace; --radius: 16px; --radius-sm: 12px; --ease: cubic-bezier(.22,1,.36,1); --shadow-card: 0 1px 2px 0 rgb(0 0 0 / .04), 0 1px 1px -1px rgb(0 0 0 / .03); }
html[data-theme="light"] { color-scheme: light; --bg:#FAFAFA; --card:#FFFFFF; --subtle:#F4F4F5; --hover:#F4F4F5; --border:#E4E4E7; --border-strong:#D4D4D8; --text:#18181B; --text-2:#52525B; --muted:#63636B; --accent:#047857; --accent-btn:#047857; --accent-btn-text:#FFFFFF; --accent-soft:#ECFDF5; --header:rgba(250,250,250,.85); --overlay:rgba(9,9,11,.35); --shadow-lift:0 8px 24px -12px rgb(0 0 0 / .18); }
html[data-theme="dark"]  { color-scheme: dark;  --bg:#09090B; --card:#18181B; --subtle:#111113; --hover:#27272A; --border:#27272A; --border-strong:#3F3F46; --text:#FAFAFA; --text-2:#A1A1AA; --muted:#8B8B94; --accent:#34D399; --accent-btn:#10B981; --accent-btn-text:#052E1F; --accent-soft:rgba(16,185,129,.12); --header:rgba(9,9,11,.85); --overlay:rgba(0,0,0,.6); --shadow-lift:0 8px 24px -12px rgb(0 0 0 / .6); }
*, *::before, *::after { box-sizing: border-box; }
html { accent-color: var(--accent); -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
a:visited { color: var(--accent); }
::selection { background: rgba(16,185,129,.28); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Cabecera (idéntica a ATM Docs) */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--header); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1120px; margin: 0 auto; height: 56px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text) !important; font-weight: 600; font-size: .9rem; letter-spacing: .02em; }
.brand-logo { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: #000; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
html[data-theme="dark"] .i-moon, html[data-theme="light"] .i-sun { display: none; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; border: 1px solid transparent; font-weight: 500; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, opacity .15s; white-space: nowrap; }
.btn-sm { height: 36px; padding: 0 14px; font-size: .88rem; }
.btn-lg { height: 48px; padding: 0 28px; font-size: 1rem; }
.btn-block { width: 100%; height: 46px; }
.btn-primary { background: var(--accent-btn); color: var(--accent-btn-text) !important; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-outline { background: var(--card); border-color: var(--border); color: var(--text) !important; }
.btn-outline:hover { background: var(--hover); border-color: var(--border-strong); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }
kbd { font-family: var(--font); font-size: .72rem; opacity: .9; border: 1px solid currentColor; border-radius: 6px; padding: 1px 6px; }

/* Cuenta: pastilla + menú */
.account-wrap { position: relative; }
.account-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; font-size: .88rem; font-weight: 500; }
.account-chip:hover { background: var(--hover); }
.account-photo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--subtle); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 600; color: var(--text-2); }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lift); padding: 6px; z-index: 50; }
.account-menu-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: flex; flex-direction: column; }
.account-menu-head span { color: var(--muted); font-size: .82rem; }
.account-menu a, .account-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; border: 0; background: none; color: var(--text) !important; text-decoration: none; font-size: .9rem; cursor: pointer; }
.account-menu a:hover, .account-menu button:hover { background: var(--hover); }

/* Contenido */
.wrap { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px 20px 24px; }
.hero { text-align: center; max-width: 640px; margin: 0 auto 28px; }
.kicker { margin: 0 0 8px; color: var(--accent); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.12; font-weight: 650; letter-spacing: -.01em; }
.lede { margin: 12px auto 0; color: var(--text-2); font-size: 1.02rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-card); }
.workspace { overflow: hidden; }
.ws-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--subtle); border: 1px solid var(--border); border-radius: 12px; }
.seg-btn { border: 0; background: none; padding: 6px 14px; border-radius: 9px; font-size: .9rem; font-weight: 500; color: var(--text-2); cursor: pointer; }
.seg-btn.is-active { background: var(--card); color: var(--text); box-shadow: var(--shadow-card); }
html[data-theme="dark"] .seg-btn.is-active { background: var(--hover); }
.ws-tools { display: flex; align-items: center; gap: 8px; }
.select { height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); padding: 0 10px; font-size: .88rem; }
.panes { display: grid; grid-template-columns: 1fr 1fr; min-height: 380px; }
.pane { position: relative; display: flex; flex-direction: column; min-width: 0; }
.pane-out { border-left: 1px solid var(--border); background: var(--subtle); }
textarea { flex: 1; width: 100%; min-height: 320px; border: 0; background: transparent; resize: none; padding: 18px 20px; font-size: 1rem; line-height: 1.65; color: var(--text); caret-color: var(--accent); }
textarea::placeholder { color: var(--muted); }
textarea:focus { outline: none; }
.output { flex: 1; padding: 18px 20px; font-size: 1rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; overflow-y: auto; max-height: 60vh; }
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); text-align: center; padding: 24px; }
.empty p { margin: 0; font-size: .92rem; }
.pane-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 8px 14px 10px 20px; color: var(--muted); font-size: .8rem; }
.ws-cta { display: flex; justify-content: center; padding: 14px; border-top: 1px solid var(--border); }
.note { text-align: center; color: var(--muted); font-size: .82rem; margin: 16px auto 0; max-width: 560px; }
.foot { text-align: center; color: var(--text-2); font-size: .82rem; padding: 8px 0 0; }
.foot a { color: var(--text-2); }
.cursor::after { content: '▍'; color: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Panel de acceso: modal en escritorio, hoja inferior en móvil */
.modal { position: fixed; inset: 0; z-index: 60; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-card { position: relative; width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lift); padding: 28px 24px 22px; }
.auth-card { text-align: center; display: flex; flex-direction: column; gap: 10px; }
.auth-card h2 { margin: 4px 0 0; font-size: 1.35rem; font-weight: 650; }
.auth-logo { margin: 0 auto; border-radius: 12px; background: #000; border: 1px solid var(--border); }
.muted { color: var(--text-2); margin: 0 0 8px; font-size: .92rem; }
.fine { color: var(--muted); font-size: .78rem; margin: 6px 0 0; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; font-size: .9rem; box-shadow: var(--shadow-lift); max-width: calc(100% - 32px); }

@media (max-width: 760px) {
  .wrap { padding-top: 28px; }
  .panes { grid-template-columns: 1fr; }
  .pane-out { border-left: 0; border-top: 1px solid var(--border); min-height: 220px; }
  textarea { min-height: 220px; }
  .ws-cta .btn { width: 100%; }
  kbd { display: none; }
  .account-first { display: none; }
  .account-chip { padding: 0 4px; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-card { max-width: none; border-radius: 22px 22px 0 0; border-bottom: 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); animation: sheet .32s var(--ease) both; }
  .modal-card::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--border-strong); margin: -14px auto 10px; }
}
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }

/* Traducir */
.lang-pair { display: inline-flex; align-items: center; gap: 6px; }
.lang-arrow { color: var(--muted); }
.select:disabled { color: var(--muted); opacity: 1; }

/* Cambios en el estilo */
.stats { border-top: 1px solid var(--border); padding: 16px 20px; }
.stats h3 { margin: 0 0 12px; font-size: .92rem; font-weight: 600; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--subtle); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.stat-label { color: var(--muted); font-size: .78rem; }
.stat-value { font-size: 1.05rem; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-value small { color: var(--muted); font-weight: 400; font-size: .8rem; }
.stats-note { color: var(--muted); font-size: .75rem; margin: 10px 0 0; }
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: 1fr; }
  .ws-tools { flex-wrap: wrap; }
}

/* Selector de idioma (pastilla como en ATM Docs) */
.lang-wrap { position: relative; }
.lang-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text-2); font-size: .82rem; font-weight: 600; letter-spacing: .03em; cursor: pointer; }
.lang-pill:hover { background: var(--hover); color: var(--text); }
.lang-menu { min-width: 180px; }
.lang-menu button { display: flex !important; align-items: center; gap: 10px; }
.lang-menu button[aria-checked="true"] { color: var(--accent) !important; font-weight: 600; }
.lang-code-sm { display: inline-block; width: 24px; font-size: .72rem; font-weight: 600; color: var(--muted); }
.lang-flag { display: inline-flex; align-items: center; }
.flag-svg { width: 20px; height: 14px; border-radius: 3px; box-shadow: 0 0 0 1px rgb(0 0 0 / .12); display: block; }

/* Resultados de Motores Especializados */
.tool-result { padding: 18px 20px; font-size: .92rem; overflow-y: auto; max-height: 62vh; display: flex; flex-direction: column; gap: 14px; }
.tool-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.tool-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid var(--border); background: var(--subtle); color: var(--text); }
.tool-badge-green { background: rgba(16,185,129,.15); color: #10B981; border-color: rgba(16,185,129,.3); }
.tool-badge-yellow { background: rgba(245,158,11,.15); color: #F59E0B; border-color: rgba(245,158,11,.3); }
.tool-badge-red { background: rgba(239,68,68,.15); color: #EF4444; border-color: rgba(239,68,68,.3); }
.progress-bar-wrap { width: 100%; height: 8px; border-radius: 999px; background: var(--subtle); overflow: hidden; border: 1px solid var(--border); margin: 6px 0; }
.progress-bar-fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width .4s var(--ease); }
.version-tab { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--subtle); font-size: .82rem; font-weight: 500; cursor: pointer; color: var(--text-2); }
.version-tab.is-active { background: var(--card); color: var(--text); border-color: var(--accent); }


/* ATM Software Labs: shared network footer strip (v1, 2026-10-20).
   Copy this file into each site; it has no runtime dependency on another origin.
   Theme-agnostic: inherits the site's text colour and background (works in light and dark). */
.atm-net{border-top:1px solid color-mix(in srgb,currentColor 14%,transparent);margin-top:0;padding:18px 0 22px;font-family:var(--atm-font-sans,Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif);font-size:13px;line-height:1.5;text-align:left}
.atm-net__in{box-sizing:border-box;width:min(70rem,calc(100% - 2.5rem));margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;gap:6px 20px}
.atm-net a{color:inherit;text-decoration:none}
.atm-net__brand{font-family:var(--atm-font-mono,"JetBrains Mono","IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace);font-size:12px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;padding:6px 0}
.atm-net__sites{display:flex;flex-wrap:wrap;gap:0 2px;margin:0;padding:0;list-style:none;flex:1 1 auto}
.atm-net__sites a{display:inline-block;padding:6px 8px;border-radius:6px;color:color-mix(in srgb,currentColor 78%,transparent)}
.atm-net__sites a:hover,.atm-net__sites a:focus-visible,.atm-net__sites a[aria-current]{color:inherit;background:color-mix(in srgb,currentColor 8%,transparent)}
.atm-net__legal{margin:0;color:color-mix(in srgb,currentColor 78%,transparent);white-space:nowrap}
.atm-net__legal a{text-decoration:underline;text-underline-offset:2px}
.atm-net a:focus-visible{outline:2px solid currentColor;outline-offset:2px}
@media (max-width:640px){.atm-net__in{flex-direction:column;align-items:flex-start}.atm-net__sites{margin-left:-8px}.atm-net__legal{white-space:normal}}
@media print{.atm-net{display:none}}
.foot .atm-net a,.foot .atm-net__legal{color:inherit}.foot .atm-net__sites a{color:color-mix(in srgb,currentColor 86%,transparent)}
