html { scroll-behavior: smooth; }
:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #192332; background: #f7f9fc; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.site-header { padding: .85rem max(5vw, 1.5rem); border-bottom: 1px solid #dce3ed; background: #fff; position: sticky; top: 0; z-index: 10; }
.header-inner { width: min(1180px, 94vw); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.brand { color: #102a43; font-size: 1.25rem; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.top-nav { display: flex; align-items: center; }
.contact-nav-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .9rem; border-radius: .45rem; background: #176b87; color: #fff; text-decoration: none; font-size: .85rem; font-weight: 700; transition: background .15s ease; }
.contact-nav-btn:hover { background: #104e63; }
main { width: min(1180px, 94vw); margin: 0 auto; padding: 2.2rem 0 4rem; }
.hero { max-width: 100%; }
.eyebrow { margin: 0 0 .5rem; color: #176b87; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .75rem; }
h1 { margin: 0 0 1.5rem; color: #102a43; font-size: clamp(1.4rem, 2.4vw, 2.25rem); line-height: 1.25; letter-spacing: -.03em; white-space: nowrap; }
@media (max-width: 900px) { h1 { white-space: normal; } }
h2 { color: #17324d; }
.url-form { padding: 1.4rem; border: 1px solid #dce3ed; border-radius: .8rem; background: #fff; box-shadow: 0 12px 32px rgb(17 40 68 / 7%); }
label { display: block; margin-bottom: .6rem; color: #29465f; font-weight: 700; }
.input-row { display: flex; gap: .7rem; }
input { min-width: 0; flex: 1; padding: .85rem 1rem; border: 1px solid #b8c7d8; border-radius: .45rem; font: inherit; }
button { padding: .85rem 1.15rem; border: 0; border-radius: .45rem; background: #176b87; color: #fff; font: inherit; font-weight: 700; cursor: pointer; transition: background .15s ease; white-space: nowrap; }
button:hover { background: #104e63; }
button:disabled { opacity: .55; cursor: not-allowed; }
button.btn-secondary { background: #e9f5f8; color: #176b87; border: 1px solid #b8e1ec; }
button.btn-secondary:hover { background: #d0e6ec; }
.form-message { min-height: 1.2em; margin: .65rem 0 0; color: #a52929; font-size: .9rem; }
.processing { display: flex; align-items: center; gap: .8rem; margin: 1rem 0 0; padding: .9rem 1rem; border-radius: .5rem; background: #e9f5f8; color: #164a5d; }
.processing[hidden] { display: none; }
.processing p { margin: 0; animation: appear .45s ease-out; }
.pulse { width: .72rem; height: .72rem; border-radius: 50%; background: #176b87; animation: pulse 1.3s ease-in-out infinite; }
.inspection-workspace { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 1.7fr); gap: 1rem; margin-top: 1.5rem; align-items: start; }
.inspection-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.panel { border: 1px solid #dce3ed; border-radius: .7rem; background: #fff; padding: 1.2rem; }
.panel h2 { margin: 0 0 1rem; color: #17324d; font-size: 1.05rem; }
.commit-panel { overflow: hidden; display: flex; flex-direction: column; }
.commit-panel-header h2 { margin-bottom: .3rem; }
.commit-selector-hint { margin: 0 0 .8rem; color: #176b87; font-size: .78rem; font-weight: 600; }
.commit-list { display: grid; align-content: start; gap: .55rem; max-height: 220px; overflow-y: auto; overflow-x: hidden; padding-right: .25rem; }
.commit-card { padding: .65rem; border: 1px solid #d9e2ec; border-radius: .45rem; background: #fbfcfe; transition: border-color .15s, box-shadow .15s; }
.commit-card:hover { border-color: #176b87; }
.commit-select { display: grid; width: 100%; gap: .24rem; padding: 0; border: 0; border-radius: .3rem; background: transparent; color: #243c55; text-align: left; font-weight: 400; cursor: pointer; }
.commit-select.is-selected { outline: 2px solid #176b87; outline-offset: .2rem; background: #e9f5f8; padding: .35rem .45rem; border-radius: .35rem; }
.commit-meta-row { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.commit-meta { color: #607084; font-size: .69rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.commit-status-tag { font-size: .65rem; font-weight: 700; padding: .15rem .45rem; border-radius: .25rem; background: #eef4f8; color: #486581; text-transform: uppercase; }
.commit-select.is-selected .commit-status-tag { background: #176b87; color: #fff; }
.commit-message { color: #243c55; font-size: .88rem; line-height: 1.35; word-break: break-word; white-space: pre-wrap; }
.statistics-panel { overflow: auto; }.statistics-panel [data-statistics] { min-height: 90px; }

.inspection-main { display: flex; flex-direction: column; gap: 1rem; }
.download-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.download-status { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .9rem; border-radius: .45rem; background: #e9f5f8; border: 1px solid #b8e1ec; color: #104e63; font-size: .86rem; font-weight: 600; line-height: 1.35; max-width: 100%; word-break: break-word; }
.download-status:empty { display: none; }

.download-progress-box { margin-top: .9rem; padding: .85rem 1rem; border-radius: .5rem; background: #f0f7f9; border: 1px solid #d0e6ec; display: flex; flex-direction: column; gap: .5rem; }
.download-progress-box[hidden] { display: none; }
.progress-track { width: 100%; height: .65rem; border-radius: .4rem; background: #dce7eb; overflow: hidden; position: relative; }
.progress-fill { height: 100%; border-radius: .4rem; background: linear-gradient(90deg, #176b87, #10b981); transition: width .15s ease-out; }
.progress-info-row { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; font-weight: 700; color: #244957; flex-wrap: wrap; gap: .5rem; }


.context-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.context-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.context-heading h2 { margin-bottom: 0; display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.context-meta { font-size: .82rem; font-weight: 500; color: #607084; }
.context-actions { display: flex; gap: .5rem; }
.context-panel pre { max-height: 640px; min-height: 360px; margin: 1rem 0 0; padding: 1rem; overflow-x: auto; overflow-y: auto; border-radius: .4rem; background: #fbfcfe; color: #334e68; border: 1px solid #e2e8f0; font: .85rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }


.stat-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.stat-box { padding: .65rem; border-radius: .4rem; background: #f0f4f8; text-align: center; }
.stat-box .val { font-size: 1.1rem; font-weight: 800; color: #102a43; }
.stat-box .lbl { font-size: .72rem; color: #607084; text-transform: uppercase; font-weight: 700; margin-top: .2rem; }
.badge-list { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 1rem; }
.badge { padding: .25rem .55rem; border-radius: 1rem; background: #e9f5f8; color: #164a5d; font-size: .76rem; font-weight: 700; }
.badge-lang { background: #eaeef3; color: #243c55; }
.alert-banner { padding: .75rem 1rem; border-radius: .4rem; background: #fdf2f2; border: 1px solid #f8b4b4; color: #9b1c1c; font-size: .85rem; font-weight: 600; margin-bottom: 1rem; }
.file-list { margin: .5rem 0 0; padding-left: 1.2rem; font-size: .82rem; color: #334e68; font-family: monospace; max-height: 180px; overflow-y: auto; }
.file-list li { margin-bottom: .25rem; }
.toggle-btn { background: transparent; color: #176b87; font-size: .8rem; padding: 0; text-decoration: underline; margin-top: .5rem; }

.site-footer { margin-top: 5rem; padding: 2.5rem 0; background: #0b1320; border-top: 1px solid #1e293b; color: #94a3b8; }
.footer-inner { width: min(1180px, 94vw); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.footer-brand-col { display: flex; flex-direction: column; gap: .3rem; }
.footer-brand { color: #f8fafc; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.footer-tagline { margin: 0; font-size: .85rem; color: #64748b; }
.footer-links-col { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.portfolio-footer-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; border-radius: .5rem; background: #176b87; color: #fff; text-decoration: none; font-size: .88rem; font-weight: 700; transition: background .15s ease, transform .15s ease; }
.portfolio-footer-btn:hover { background: #104e63; transform: translateY(-1px); }
.footer-social-links { display: flex; gap: 1rem; }
.footer-social-links a { color: #cbd5e1; text-decoration: none; font-size: .88rem; font-weight: 600; transition: color .15s ease; }
.footer-social-links a:hover { color: #38bdf8; text-decoration: underline; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.85); }
}
@keyframes appear {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

