body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #1f2937;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
}

h1 {
    text-align: center;
    color: #333;
}

h2 {
    margin: 0 0 10px;
    color: #222;
    font-size: 22px;
    line-height: 1.25;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    padding: 10px;
    font-size: 16px;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

#error-message {
    color: red;
    font-weight: bold;
    margin-top: 10px;
}

#results {
    margin-top: 20px;
}

.design-container {
    max-width: 980px;
    margin-top: 18px;
    margin-bottom: 40px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.hero-section {
    padding: 34px 34px 28px;
    border: 1px solid #d7e1ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.lead {
    max-width: 800px;
    margin: 0 auto 24px;
    color: #374151;
    font-size: 17px;
    line-height: 1.45;
    text-align: center;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    max-width: 820px;
    margin: 0 auto;
    padding: 8px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.search-panel input {
    min-height: 48px;
    padding: 0 16px;
    border-color: transparent;
    background: #fff;
    font-size: 18px;
    outline: none;
}

.search-panel input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.16);
}

.search-panel button {
    min-height: 48px;
    padding: 0 24px;
    font-size: 17px;
    font-weight: bold;
    white-space: nowrap;
}

.service-note {
    max-width: 720px;
    margin: 12px auto 0;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.content-section {
    margin-top: 18px;
    border: 1px solid #dce3ea;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.content-row {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
    gap: 28px;
    padding: 22px 26px;
    border-top: 1px solid #edf1f5;
}

.content-row:first-child {
    border-top: 0;
}

.section-label {
    margin: 0 0 6px;
    color: #51677d;
    font-size: 13px;
    font-weight: bold;
    text-transform: none;
}

.content-section p,
.api-section p {
    margin: 0;
    color: #374151;
    line-height: 1.5;
}

.simple-content {
    padding: 26px 30px;
}

.simple-content article {
    max-width: 760px;
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid #edf1f5;
}

.simple-content article:first-child {
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
}

.simple-content h2,
.api-section h2 {
    margin-bottom: 8px;
    font-size: 21px;
}

.api-section {
    margin-top: 18px;
    padding: 22px 26px;
    border: 1px solid #dce3ea;
    border-radius: 8px;
    background: #fff;
}

.api-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.api-section > div {
    max-width: 720px;
}

.docs-link {
    flex: 0 0 auto;
    display: inline-block;
    padding: 10px 14px;
    border-radius: 4px;
    background: #007bff;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

.docs-link:hover {
    background: #0056b3;
}

.site-footer {
    padding: 18px 8px 4px;
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

.site-footer a {
    color: #005ecb;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.result-item {
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
}

.share-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid #dce3ea;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 14px;
}

.share-panel span {
    flex: 0 0 auto;
    font-weight: bold;
}

.share-panel a {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.share-panel button {
    flex: 0 0 auto;
    padding: 7px 10px;
    font-size: 13px;
}

.result-item h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 16px;
    padding: 12px;
    border: 1px solid #e2e5e9;
    border-radius: 4px;
    background: #fff;
}

.details-title {
    margin: 20px 0 10px;
    color: #333;
}

.hit-entry {
    margin-top: 12px;
    border: 1px solid #d7dce2;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.hit-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #edf0f3;
}

.hit-title {
    min-width: 0;
}

.list-label {
    display: block;
    margin-bottom: 3px;
    color: #6b7280;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.hit-header h5 {
    margin: 0;
    font-size: 18px;
    color: #222;
    overflow-wrap: anywhere;
}

.maintainer-line {
    margin-top: 5px;
    color: #555;
    font-size: 14px;
    line-height: 1.35;
}

.status-badge {
    flex: 0 0 auto;
    margin-top: 2px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e9ecef;
    color: #333;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-present {
    background: #d9f7e8;
    color: #11633a;
}

.hit-details {
    padding: 12px 16px;
}

.match-explanation {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    background: #eef6ff;
    color: #1f2937;
    line-height: 1.35;
}

.match-explanation strong {
    color: #174ea6;
}

.field-row {
    margin: 9px 0;
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
}

.field-row strong {
    display: inline;
    margin-right: 4px;
    color: #555;
    font-size: inherit;
    text-transform: none;
}

.field-wide {
    grid-column: 1 / -1;
}

.hit-links {
    padding: 12px 16px 14px;
    border-top: 1px solid #edf0f3;
    background: #fafafa;
}

.hit-entry a {
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .container:not(.design-container) {
        padding: 16px;
        border-radius: 0;
    }

    .design-container {
        margin-top: 0;
        margin-bottom: 0;
    }

    .hero-section {
        padding: 24px 16px 20px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    h1 {
        font-size: 28px;
        line-height: 1.15;
    }

    .lead {
        font-size: 16px;
        text-align: left;
    }

    .search-panel {
        grid-template-columns: 1fr;
        padding: 7px;
    }

    .search-panel button {
        width: 100%;
    }

    .content-section {
        margin: 14px 12px 0;
    }

    .simple-content {
        padding: 18px;
    }

    .simple-content article {
        padding-top: 18px;
        margin-top: 18px;
    }

    .api-section {
        align-items: stretch;
        flex-direction: column;
        margin-right: 12px;
        margin-left: 12px;
        padding: 18px;
    }

    .docs-link {
        text-align: center;
    }

    .result-summary,
    .hit-links,
    .share-panel {
        grid-template-columns: 1fr;
    }

    .share-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .hit-header {
        flex-direction: column;
    }

    .field-wide {
        grid-column: auto;
    }
}
