:root {
    --page-bg: #f4f6f8;
    --panel: #ffffff;
    --ink: #18212b;
    --muted: #607081;
    --accent: #b11f2a;
    --border: #d7dee6;
    --header-height: 66px;
    --content-gap: 16px;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(177, 31, 42, 0.08), transparent 26%),
        linear-gradient(180deg, #fbfcfd 0%, var(--page-bg) 100%);
}

body {
    min-height: 100vh;
}

.site-shell {
    box-sizing: border-box;
    width: 80vw;
    max-width: 1360px;
    margin: 0 auto;
}

main.site-shell {
    margin-top: var(--content-gap);
    padding-bottom: 24px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--header-height);
}

.brand {
    display: inline-block;
    padding: 12px 0;
    text-decoration: none;
}

.brand__logo {
    display: block;
    width: auto;
    height: 42px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-user__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.site-user__meta strong {
    font-size: 14px;
}

.site-user__meta span {
    color: var(--muted);
    font-size: 12px;
}

.site-nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #e4b4b8;
    border-radius: 10px;
    background: #fff8f9;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.site-nav__link--ghost {
    border-color: #ccd5df;
    background: #fbfcfe;
    color: var(--ink);
}

.site-nav__link:hover,
.site-nav__link:focus {
    border-color: var(--accent);
}

.login-shell {
    display: flex;
    justify-content: center;
    padding: 56px 0 24px;
}

.login-card {
    width: min(100%, 420px);
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 18px 42px rgba(24, 33, 43, 0.08);
}

.login-card__header {
    margin-bottom: 18px;
}

.login-card__header h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.login-card__header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
}

.login-actions {
    padding-top: 8px;
}

.hero {
    margin: 56px 0;
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--panel);
    box-shadow: 0 12px 40px rgba(28, 26, 23, 0.06);
}

.eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.05;
}

.lead {
    max-width: 640px;
    margin: 20px 0 0;
    font-size: 20px;
    line-height: 1.6;
}

.meta {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.page-intro {
    margin: 40px 0 24px;
}

.page-title {
    margin-bottom: 12px;
}

.page-subtitle {
    max-width: 840px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.panel {
    box-sizing: border-box;
    margin: 0 0 16px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: 0 18px 42px rgba(24, 33, 43, 0.06);
}

.top-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
    width: 100%;
    max-width: none;
    margin: 0 auto 10px;
}

.panel--half {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.panel--result {
    width: 100%;
    margin: 16px auto 0;
}

.panel-heading {
    margin-bottom: 12px;
}

.panel-heading__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.panel-heading__copy {
    min-width: 0;
}

.panel-heading h2 {
    margin: 0 0 4px;
    font-size: 22px;
}

.panel-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.35;
    font-size: 13px;
}

.panel-heading__actions {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-shrink: 0;
}

.panel-heading__actions--company {
    min-width: 420px;
}

.panel-heading__actions--below {
    margin-top: 12px;
}

.panel-heading__actions--questionnaire {
    min-width: 180px;
}

.field--heading {
    min-width: 0;
}

.field--heading .input {
    min-height: 40px;
    padding-top: 9px;
    padding-bottom: 9px;
}

.field--heading-wide {
    min-width: 180px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-grid--company {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: 1;
    grid-template-rows: repeat(5, auto);
    align-content: stretch;
}

.form-grid--compact {
    gap: 8px 12px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.field--secondary {
    opacity: 0.82;
}

.field--search-action {
    display: flex;
    align-items: center;
}

.field label,
.question-card label {
    font-size: 14px;
    font-weight: 700;
}

.input {
    width: 100%;
    box-sizing: border-box;
    min-height: 43px;
    padding: 10px 12px;
    border: 1px solid #ccd5df;
    border-radius: 10px;
    background: #fbfcfe;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    line-height: 1.35;
}

.scoring-select {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.scoring-select--0 {
    background: #fbfcfe;
    border-color: #ccd5df;
    color: var(--ink);
}

.scoring-select--1 {
    background: #fff1f1;
    border-color: #df9a9a;
    color: #18212b;
}

.scoring-select--2 {
    background: #ffe2bf;
    border-color: #e09a52;
    color: #18212b;
}

.scoring-select--3 {
    background: #fff6cc;
    border-color: #d9be54;
    color: #18212b;
}

.scoring-select--4 {
    background: #edf8ef;
    border-color: #8cc293;
    color: #18212b;
}

.form-grid--company .input:not(.input--textarea) {
    min-height: 42px;
    padding-top: 9px;
    padding-bottom: 9px;
}

.form-grid--company .input[readonly] {
    background: #f3f7fb;
    color: #405264;
    cursor: default;
}

.company-subsectors {
    margin-top: -2px;
}

.company-subsectors__label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.company-subsectors__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.company-subsectors__action {
    margin-top: 10px;
}

.company-subsectors__action--hidden {
    display: none;
}

.company-subsectors__radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.company-subsectors__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #d8dee6;
    border-radius: 10px;
    background: #f8fafc;
    color: #405264;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.company-subsectors__radio:checked + .company-subsectors__button {
    border-color: var(--accent);
    background: #fff1f3;
    color: var(--accent);
    box-shadow: 0 0 0 2px rgba(177, 31, 42, 0.1);
}

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(177, 31, 42, 0.12);
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.question-card {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}

.question-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}

.score-chip {
    min-width: 30px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #fdecef;
    color: var(--accent);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
}

.question-card label {
    font-size: 13px;
    line-height: 1.25;
}

.question-result {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.question-result--standalone {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.question-result__heading {
    margin-bottom: 10px;
}

.question-result__heading h3 {
    margin: 0;
    font-size: 20px;
}

.question-result__heading p {
    margin: 0;
    color: var(--muted);
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
}

.legend-grid--questionnaire {
    margin: 10px 0 0;
    gap: 6px;
}

.seller-evaluation {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.seller-evaluation h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.seller-evaluation__buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.seller-evaluation__radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.seller-evaluation__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid #ccd5df;
    border-radius: 10px;
    background: #fbfcfe;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.seller-evaluation__radio:checked + .seller-evaluation__button {
    border-color: var(--accent);
    background: #fff1f3;
    color: var(--accent);
    box-shadow: 0 0 0 3px rgba(177, 31, 42, 0.12);
}

.seller-date-field {
    margin-top: 10px;
    width: 50%;
    max-width: 50%;
}

.seller-date-field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.seller-date-field--hidden {
    display: none;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcfe;
    font-size: 11px;
    line-height: 1.25;
}

.legend-item strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
}

.legend-item--class1 strong {
    background: #d45353;
}

.legend-item--class2 strong {
    background: #d58435;
}

.legend-item--class3 strong {
    background: #c8a12a;
}

.legend-item--class4 strong {
    background: #4e9a54;
}

.lead-result {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #f8fafc;
}

.lead-result--neutral {
    border-color: var(--border);
}

.lead-result--class1 {
    border-color: #d45353;
    background: #fff0f0;
}

.lead-result--class2 {
    border-color: #d58435;
    background: #fff5ea;
}

.lead-result--class3 {
    border-color: #c8a12a;
    background: #fffbe9;
}

.lead-result--class4 {
    border-color: #4e9a54;
    background: #eef9ef;
}

.result-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-metric--wide {
    grid-column: 1 / -1;
}

.result-metric__label {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.result-metric strong {
    font-size: 24px;
    line-height: 1.2;
}

.result-metric--wide strong {
    font-size: 17px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.lead-form {
    padding-bottom: 8px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button--primary {
    background: var(--accent);
    color: #fff;
}

.button--primary:hover,
.button--primary:focus {
    background: #8e1821;
}

.button--secondary {
    border-color: #e4b4b8;
    background: #fff8f9;
    color: var(--accent);
}

.button--secondary:hover,
.button--secondary:focus {
    border-color: #b11f2a;
    color: var(--accent);
}

.button--search {
    min-width: 120px;
}

.button--disabled,
.button--disabled:hover,
.button--disabled:focus,
.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.validation-summary {
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid #d45353;
    border-radius: 10px;
    background: #fff2f2;
    color: #922f2f;
    font-size: 13px;
}

.save-feedback {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.save-feedback--success {
    border: 1px solid #72b37e;
    background: #edf8ef;
    color: #2f6a38;
}

.save-feedback--info {
    border: 1px solid #bfd0e1;
    background: #f3f7fb;
    color: #31506b;
}

.validation-summary ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.field-validation {
    color: #922f2f;
    font-size: 12px;
}

.lookup-feedback {
    margin: -4px 0 0;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.lookup-feedback--error {
    border: 1px solid #d45353;
    background: #fff2f2;
    color: #922f2f;
}

.lookup-feedback--success {
    border: 1px solid #72b37e;
    background: #edf8ef;
    color: #2f6a38;
}

.lookup-feedback--hidden {
    display: none;
}

.login-error {
    margin: 0 0 8px;
    padding: 10px 12px;
    border: 1px solid #d45353;
    border-radius: 10px;
    background: #fff2f2;
    color: #922f2f;
    font-size: 13px;
    font-weight: 600;
}

.summary-panel {
    margin-top: 4px;
}

.summary-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin: 0 0 16px;
}

.summary-filters__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.summary-filters__group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}

.summary-filters__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.summary-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}

.summary-table th,
.summary-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.summary-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f8fafc;
}

.summary-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
}

.summary-sort-link__arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}

.summary-sort-link__arrow--up {
    border-bottom: 7px solid var(--accent);
}

.summary-sort-link__arrow--down {
    border-top: 7px solid var(--accent);
}

.summary-table tbody tr:hover {
    background: #fbfcfe;
}

.summary-empty {
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: #fbfcfe;
    color: var(--muted);
}

.statistics-context {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fbfcfe;
    color: var(--ink);
    font-size: 14px;
}

.statistics-grid {
    display: grid;
    gap: 16px;
}

.summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}

.summary-badge--class1 {
    background: #d45353;
}

.summary-badge--class2 {
    background: #d58435;
}

.summary-badge--class3 {
    background: #c8a12a;
}

.summary-badge--class4 {
    background: #4e9a54;
}

.summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.summary-actions__form {
    margin: 0;
}

.setup-shell {
    padding-bottom: 8px;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-actions--top {
    margin: 0 0 28px;
    padding-top: 0;
    border-top: 0;
    padding-bottom: 8px;
}

.panel-heading--toggle {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.setup-question-list[hidden] {
    display: none !important;
}

.setup-details {
    margin-bottom: 18px;
}

.setup-details__summary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    list-style: none;
    margin-bottom: 0;
}

.setup-details__summary::-webkit-details-marker {
    display: none;
}

.setup-details__heading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.setup-details__title {
    display: inline-block;
    margin: 0;
    line-height: 1.2;
    font-size: 22px;
    font-weight: 700;
}

.setup-details__arrow {
    display: inline-block;
    flex: 0 0 auto;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid var(--accent);
    transition: transform 0.18s ease;
    margin-top: 0;
    vertical-align: middle;
}

.setup-details[open] .setup-details__arrow {
    transform: rotate(90deg);
}

.setup-details__body {
    margin-top: 14px;
}

.setup-question-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.setup-question-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.setup-question-card__header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.setup-options-grid {
    display: grid;
    gap: 10px;
}

.setup-option-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 10px;
}

.setup-score-input {
    text-align: center;
}

.setup-table td .input {
    min-width: 0;
}

.setup-table__order {
    width: 110px;
}

.setup-table__check {
    width: 72px;
    text-align: center;
}

.setup-table__remove {
    width: 110px;
    text-align: right;
}

.setup-table-actions {
    display: flex;
    justify-content: flex-start;
    margin: 0 0 12px;
}

.hero--compact {
    margin-bottom: 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.home-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.home-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: calc(var(--header-height) + var(--content-gap));
    align-self: start;
}

.home-content {
    min-width: 0;
}

.home-content__panel {
    min-height: 100%;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    min-height: 220px;
    background:
        linear-gradient(135deg, rgba(177, 31, 42, 0.06), rgba(255, 255, 255, 0.96)),
        #ffffff;
}

.dashboard-card__copy h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.dashboard-card__copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.dashboard-card__eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.page-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setup-grid-hockey {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.setup-hockey-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setup-admin-table th:last-child,
.setup-admin-table td:last-child {
    width: 1%;
    white-space: nowrap;
}

.setup-action-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.setup-inline-form {
    margin: 0;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-metrics--stacked {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0;
}

.metric-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
}

.metric-card__label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-card strong {
    font-size: 34px;
    line-height: 1;
}

.button--wide {
    width: auto;
    min-width: 170px;
    min-height: 40px;
    padding: 8px 14px;
    align-self: flex-start;
}

.import-panel__path {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcfe;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    word-break: break-all;
}

.standings-table th,
.standings-table td,
.matches-table th,
.matches-table td {
    text-align: center;
}

.matches-table__row {
    cursor: pointer;
}

.matches-table__row:hover {
    background: #f8fafc;
}

.matches-table__month-start td {
    border-top: 3px solid #cfd8e2;
}

.matches-table__link {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}

.month-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.trend-table th,
.trend-table td,
.points-table th,
.points-table td {
    text-align: center;
}

.standings-table {
    min-width: 980px;
}

.points-table td:nth-child(2) {
    text-align: left;
}

.standings-table td:nth-child(2),
.matches-table td:nth-child(3),
.matches-table td:nth-child(5) {
    text-align: center;
}

.standings-table td:nth-child(2) {
    text-align: left;
}

.button--small {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 13px;
}

.button--danger {
    background: #fff1f1;
    border-color: #df9a9a;
    color: #8c2323;
}

.button--danger:hover,
.button--danger:focus {
    background: #ffe6e6;
    border-color: #c96f6f;
}

.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;
}

@media (max-width: 640px) {
    :root {
        --header-height: 66px;
        --content-gap: 12px;
    }

    .site-shell {
        width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .site-header__inner {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 14px 0;
    }

    .site-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .site-user {
        width: 100%;
        flex-direction: column;
        align-items: center;
    }

    .site-user__meta {
        align-items: center;
        text-align: center;
    }

    .brand {
        padding: 0;
    }

    .brand__logo {
        height: 38px;
    }

    .hero {
        margin: 32px 0;
        padding: 24px;
        border-radius: 16px;
    }

    main.site-shell {
        margin-top: 18px;
    }

    .lead {
        font-size: 18px;
    }

    .page-intro {
        margin-top: 32px;
    }

    .login-shell {
        padding-top: 28px;
    }

    .panel {
        padding: 16px;
    }

    .panel-heading h2,
    .dashboard-card__copy h2 {
        font-size: 24px;
    }

    .panel-heading__row {
        flex-direction: column;
    }

    .panel-heading__actions,
    .panel-heading__actions--company,
    .panel-heading__actions--questionnaire {
        width: 100%;
        min-width: 0;
    }

    .panel-heading__actions--company {
        display: grid;
        grid-template-columns: 1fr;
    }

    .field--heading-wide {
        width: 100%;
    }

     .form-grid,
     .form-grid--company,
     .company-subsectors__grid,
     .question-grid,
     .setup-question-list,
     .legend-grid,
    .seller-evaluation__buttons,
    .lead-result {
        grid-template-columns: 1fr;
    }

    .setup-option-row {
        grid-template-columns: 1fr;
    }

    .top-panels {
        grid-template-columns: 1fr;
    }

    .summary-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-filters__group {
        min-width: 0;
    }

    .dashboard-grid,
    .dashboard-metrics,
    .dashboard-metrics--stacked,
    .home-shell,
    .setup-grid-hockey {
        grid-template-columns: 1fr;
    }

    .home-sidebar {
        position: static;
        top: auto;
    }

    .home-content__panel {
        overflow: hidden;
    }

    .page-actions {
        gap: 8px;
    }

    .button--wide,
    .button--small,
    .site-nav__link {
        width: auto;
        min-width: 0;
        align-self: flex-start;
        text-align: center;
    }

    .month-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .month-actions .button {
        width: 100%;
        min-width: 0;
    }

    .metric-card {
        min-height: 96px;
    }

    .metric-card strong {
        font-size: 28px;
    }

    .summary-table {
        font-size: 13px;
    }

    .matches-table,
    .trend-table,
    .points-table {
        min-width: 0;
    }

    .matches-table thead,
    .trend-table thead,
    .points-table thead {
        display: none;
    }

    .matches-table,
    .trend-table,
    .points-table,
    .matches-table tbody,
    .trend-table tbody,
    .points-table tbody {
        display: block;
    }

    .matches-table tr,
    .trend-table tr,
    .points-table tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: #fbfcfe;
        overflow: hidden;
    }

    .matches-table__month-start td {
        border-top: 0;
    }

    .matches-table td,
    .trend-table td,
    .points-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        text-align: right;
        border-bottom: 1px solid #e8edf2;
    }

    .matches-table td:last-child,
    .trend-table td:last-child,
    .points-table td:last-child {
        border-bottom: 0;
    }

    .matches-table td::before,
    .trend-table td::before,
    .points-table td::before {
        content: attr(data-label);
        flex: 0 0 44%;
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        text-align: left;
    }

    .matches-table td strong,
    .trend-table td strong,
    .points-table td strong {
        text-align: right;
    }

    .question-card__top {
        flex-direction: column;
        align-items: flex-start;
    }

    .seller-date-field {
        width: 100%;
        max-width: 100%;
    }

    .result-metric strong {
        font-size: 22px;
    }
}
