* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --fg: #000000;
    --border: 1px solid #000000;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

header {
    margin-bottom: 2rem;
    border-bottom: var(--border);
    padding-bottom: 1rem;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

main {
    flex: 1;
}

.input-section {
    margin-bottom: 2rem;
}

.url-input {
    display: flex;
    gap: 0;
}

.url-input input {
    flex: 1;
    padding: 0.75rem;
    border: var(--border);
    border-right: none;
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
}

.url-input input:focus {
    background: var(--fg);
    color: var(--bg);
}

.url-input input::placeholder {
    color: var(--fg);
    opacity: 0.5;
}

.url-input input:focus::placeholder {
    color: var(--bg);
    opacity: 0.5;
}

button {
    padding: 0.75rem 1.5rem;
    border: var(--border);
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}

button:hover {
    background: var(--fg);
    color: var(--bg);
}

button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

button:disabled:hover {
    background: var(--bg);
    color: var(--fg);
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: var(--border);
}

.divider span {
    padding: 0 1rem;
    font-size: 0.875rem;
    text-transform: lowercase;
}

.file-input {
    position: relative;
}

.file-input input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-label {
    display: block;
    padding: 0.75rem;
    border: var(--border);
    text-align: center;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}

.file-label:hover {
    background: var(--fg);
    color: var(--bg);
}

.error-section {
    display: none;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    border: var(--border);
}

.error-section.visible {
    display: block;
}

.map-section {
    display: none;
    margin-bottom: 1.5rem;
}

.map-section.visible {
    display: block;
}

#map {
    width: 100%;
    height: 400px;
    border: var(--border);
}

.download-section {
    display: none;
}

.download-section.visible {
    display: block;
}

#download-btn {
    width: 100%;
}

header .tagline {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

.answer-block {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: var(--border);
    background: var(--fg);
    color: var(--bg);
}

.answer-block h2 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.answer-block p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

.how-to {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: var(--border);
}

.how-to h2 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.steps {
    list-style: none;
    counter-reset: step;
}

.steps li {
    counter-increment: step;
    margin-bottom: 1.5rem;
    padding-left: 2.5rem;
    position: relative;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    border: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.steps li strong {
    display: block;
    margin-bottom: 0.25rem;
}

.steps li p {
    font-size: 0.875rem;
    opacity: 0.8;
}

.faq {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: var(--border);
}

.faq h2 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.faq details {
    margin-bottom: 0;
    border: var(--border);
    border-bottom: none;
}

.faq details:last-of-type {
    border-bottom: var(--border);
}

.faq summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    font-size: 1.25rem;
    font-weight: 300;
}

.faq details[open] summary::after {
    content: "-";
}

.faq details[open] summary {
    border-bottom: var(--border);
}

.faq details p {
    padding: 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    opacity: 0.85;
}

footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: var(--border);
    font-size: 0.75rem;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-nav a {
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.footer-nav a:hover {
    border-bottom-color: var(--fg);
}

footer p {
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

footer .copyright {
    margin-top: 1rem;
    opacity: 0.7;
}

.header-link {
    color: inherit;
    text-decoration: none;
}

.content-page h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: var(--border);
}

.content-page .last-updated {
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    opacity: 0.6;
}

.content-page section {
    margin-bottom: 2rem;
}

.content-page h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.content-page p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.content-page ul,
.content-page ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-page li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.content-page a {
    color: var(--fg);
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .url-input {
        flex-direction: column;
    }

    .url-input input {
        border-right: var(--border);
        border-bottom: none;
    }

    h1 {
        font-size: 1.25rem;
    }

    .answer-block {
        padding: 1rem;
    }

    .answer-block h2 {
        font-size: 1rem;
    }

    .steps li {
        padding-left: 2rem;
    }

    .steps li::before {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.75rem;
    }

    .footer-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

