.match-page {
  --match-ink: #23223b;
  --match-muted: #575369;
  --match-line: #e3dff1;
  --match-pale: #f0ebff;
  max-width: 1160px;
  padding-block: clamp(2.5rem, 6vw, 5rem);
  color: var(--match-ink);
}
.match-page [hidden] { display: none !important; }
.match-heading { max-width: 47rem; margin-bottom: 1.65rem; }
.match-heading h1 { margin: 0 0 .7rem; font-size: clamp(2.15rem, 5vw, 3.5rem); line-height: 1.05; letter-spacing: -.045em; }
.match-heading p { margin: 0; color: var(--match-muted); }
.match-mode { display: inline-flex; gap: .3rem; padding: .3rem; margin-bottom: 1.25rem; border: 1px solid var(--match-line); border-radius: 1rem; background: #f9f7fe; }
.match-mode button { border: 0; border-radius: .75rem; background: transparent; padding: .68rem .9rem; color: var(--match-muted); font: inherit; font-weight: 650; cursor: pointer; }
.match-mode button[aria-pressed="true"] { color: #382473; background: #e7deff; }
.match-page :focus-visible { outline: 2px solid #6e48bd; outline-offset: 3px; }
.match-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); gap: clamp(1.25rem, 4vw, 3rem); align-items: start; }
.match-form { padding: clamp(1rem, 3vw, 1.7rem); border: 1px solid var(--match-line); border-radius: 1.35rem; background: white; }
.match-fields { margin: 0 0 1rem; padding: 0; border: 0; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem; }
.match-wide { grid-column: 1 / -1; }
.match-field { display: grid; align-content: start; gap: .3rem; min-width: 0; font-size: .92rem; font-weight: 650; }
.match-field :is(input, select, textarea) { width: 100%; min-width: 0; border: 1px solid #d6cee7; border-radius: .6rem; padding: .65rem .62rem; color: var(--match-ink); background: white; font: inherit; font-weight: 400; }
.match-field input[type="file"] { font-size: .83rem; }
.match-field textarea { resize: vertical; }
.match-help { margin: .55rem 0 0; color: var(--match-muted); font-size: .83rem; line-height: 1.45; }
.match-fields > .match-help { margin: 0; }
.match-import, .match-languages { padding: .7rem .8rem; border: 1px solid var(--match-line); border-radius: .7rem; background: #faf8fd; }
.match-page summary { cursor: pointer; font-weight: 650; }
.match-import[open] summary, .match-languages[open] summary { margin-bottom: .65rem; }
.match-import p { margin: .4rem 0; color: var(--match-muted); font-size: .84rem; }
.match-import button { margin-top: .25rem; }
.match-languages > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .32rem; font-size: .86rem; }
.match-output { min-width: 0; }
.match-status { margin: .55rem 0 .85rem; color: var(--match-muted); }
.match-status:empty { display: none; }
.match-output h2 { font-size: clamp(1.16rem, 2.2vw, 1.5rem); margin: 0 0 .65rem; }
.match-group, .match-training { margin-bottom: 1.45rem; }
.match-cards { display: grid; gap: .7rem; }
.match-result { padding: 1rem 1.15rem; min-width: 0; border: 1px solid var(--match-line); border-radius: 1rem; background: white; overflow-wrap: anywhere; }
.match-result h3 { margin: 0; font-size: 1.08rem; line-height: 1.35; }
.match-result h3 a { color: inherit; }
.match-result p { margin: .35rem 0; }
.match-place { color: var(--match-muted); font-size: .9rem; }
.match-amount { color: #452b89; font-weight: 700; }
.match-caption { font-size: .9rem; font-weight: 650; }
.match-reasons, .match-unknown { margin: .35rem 0 .55rem; padding-left: 1.15rem; font-size: .87rem; }
.match-reasons { color: #325245; }
.match-unknown { color: var(--match-muted); }
.match-training > p { font-size: .88rem; color: var(--match-muted); }
.match-training > article { margin: .6rem 0; }
.match-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .85rem; }
.match-result .match-actions { margin-top: .65rem; }
.match-actions > .match-help { flex-basis: 100%; margin: 0; }
.home-match-link { width: fit-content; margin: .9rem auto 1.05rem; text-align: center; }
.coach-plan-steps { margin: 1.15rem 0; }
.coach-plan-steps ul { padding-left: 0; list-style: none; display: grid; gap: .55rem; }
.coach-plan-steps li { padding: .75rem; border: 1px solid #e3dff1; border-radius: .75rem; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; }
.coach-plan-steps li label { display: inline-flex; gap: .35rem; align-items: center; }
@media (max-width: 740px) { .match-layout { grid-template-columns: 1fr; } }
@media (max-width: 360px) {
  .match-fields { grid-template-columns: 1fr; }
  .match-mode button { padding-inline: .5rem; }
}
