:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --muted-strong: #475569;
    --line: #e2e8f0;
    --green: #059669;
    --green-dark: #047857;
    --green-soft: #ecfdf5;
    --red: #dc2626;
    --red-soft: #fef2f2;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.035);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 8%, rgba(5, 150, 105, 0.045), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.shell {
    width: min(896px, calc(100% - 40px));
    margin: 0 auto;
    padding: 52px 0 32px;
}

.topbar {
    padding: 0 0 24px;
    border-bottom: 1px solid var(--line);
}

.brand {
    margin-bottom: 7px;
    color: var(--green-dark);
    direction: ltr;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-align: right;
}

.title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.title-row > div {
    flex: 1;
    min-width: 0;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 7px;
    direction: ltr;
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.035em;
    text-align: right;
}

.subtitle {
    max-width: 650px;
    margin-bottom: 0;
    color: var(--muted);
    direction: ltr;
    font-size: 14px;
    line-height: 1.7;
    text-align: right;
}

.lookup-badge,
.live-status {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green-dark);
    direction: ltr;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.lookup-badge {
    padding: 7px 10px;
}

.search-card {
    margin-top: 32px;
    padding: 30px 32px 26px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.search-card form > label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted-strong);
    direction: ltr;
    font-size: 13px;
    font-weight: 750;
    text-align: right;
}

.search-row {
    display: flex;
    gap: 12px;
}

.input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.input-wrap > svg {
    position: absolute;
    top: 50%;
    left: 14px;
    pointer-events: none;
    transform: translateY(-50%);
    fill: none;
    stroke: #94a3b8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 14px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-wrap input::placeholder {
    color: #94a3b8;
}

.input-wrap input:focus {
    border-color: rgba(5, 150, 105, 0.65);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

.search-row > button {
    display: inline-flex;
    height: 52px;
    padding: 0 24px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    background: var(--green);
    box-shadow: 0 8px 18px rgba(5, 150, 105, 0.15);
    color: #fff;
    cursor: pointer;
    direction: ltr;
    font-weight: 750;
    transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.search-row > button:hover {
    background: var(--green-dark);
    box-shadow: 0 10px 22px rgba(5, 150, 105, 0.2);
    transform: translateY(-1px);
}

.search-row > button:focus-visible,
.copy-button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(5, 150, 105, 0.28);
    outline-offset: 2px;
}

.search-row > button svg,
.notice svg,
.accuracy-note svg,
.copy-button svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.form-help {
    margin: 10px 0 0;
    color: #94a3b8;
    direction: ltr;
    font-size: 12px;
    line-height: 1.55;
    text-align: right;
}

.notice {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding: 16px 18px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: var(--red-soft);
    color: #991b1b;
    direction: ltr;
    text-align: left;
}

.notice svg {
    flex: none;
    margin-top: 1px;
}

.notice strong {
    font-size: 14px;
}

.notice p {
    margin: 3px 0 0;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.55;
}

.result-section {
    margin-top: 38px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    direction: rtl;
}

.eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--green-dark);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

h2 {
    margin-bottom: 0;
    font-size: 21px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.live-status {
    padding: 6px 10px;
}

.live-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.result-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.result-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--line);
    direction: rtl;
    text-align: right;
}

.flag {
    display: grid;
    width: 54px;
    height: 54px;
    flex: none;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface-soft);
    font-size: 28px;
}

.result-summary span,
.permalink-row span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.result-summary strong {
    display: block;
    font-size: 21px;
    letter-spacing: -0.015em;
}

.result-summary p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.permalink-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 28px;
    border-bottom: 1px solid var(--line);
    background: #fbfdfc;
    direction: rtl;
    text-align: right;
}

.permalink-row > div {
    min-width: 0;
}

.permalink-row a {
    display: block;
    overflow: hidden;
    color: var(--green-dark);
    font-size: 13px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permalink-row a:hover {
    text-decoration: underline;
}

.copy-button {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid #bbf7d0;
    border-radius: 9px;
    background: var(--green-soft);
    color: var(--green-dark);
    cursor: pointer;
    direction: ltr;
    font-size: 12px;
    font-weight: 750;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.result-row {
    display: grid;
    min-height: 76px;
    padding: 17px 28px;
    align-content: center;
    border-bottom: 1px solid var(--line);
    direction: ltr;
    text-align: left;
}

.result-row:nth-child(odd) {
    border-right: 1px solid var(--line);
}

.result-row:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.result-row dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.result-row dd {
    overflow-wrap: anywhere;
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.accuracy-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 13px 4px 0;
    color: var(--muted);
    direction: ltr;
    font-size: 12px;
    line-height: 1.55;
    text-align: left;
}

.accuracy-note svg {
    flex: none;
    margin-top: 1px;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 44px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: #94a3b8;
    direction: rtl;
    font-size: 11px;
    line-height: 1.5;
    text-align: right;
}

footer span:first-child {
    color: var(--muted-strong);
    font-weight: 800;
}

@media (max-width: 680px) {
    .shell {
        width: min(100% - 24px, 896px);
        padding-top: 30px;
    }

    .title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .search-card {
        margin-top: 22px;
        padding: 22px 18px 19px;
    }

    .search-row {
        flex-direction: column;
    }

    .search-row > button {
        width: 100%;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .result-summary,
    .permalink-row,
    .result-row {
        padding-right: 18px;
        padding-left: 18px;
    }

    .permalink-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .result-row:nth-child(odd) {
        border-right: 0;
    }

    .result-row:nth-last-child(2) {
        border-bottom: 1px solid var(--line);
    }

    footer {
        flex-direction: column;
        gap: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
