:root{
  --bg:#f4f8f3;
  --card:#ffffff;
  --ink:#18352a;
  --muted:#60756a;
  --line:#d8e7dc;
  --brand:#2f7d57;
  --brand-2:#5ea778;
  --accent:#f3b34c;
  --accent-2:#f09a2a;
  --soft:#edf7f0;
  --notice:#fff6df;
  --shadow:0 14px 34px rgba(32,74,51,.10);
}

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

body{
  font-family:Arial,Helvetica,sans-serif;
  background:linear-gradient(180deg,#eef5ef 0%,#f8fbf7 100%);
  color:var(--ink);
  line-height:1.5;
}

img{
  max-width:100%;
  height:auto;
  display:block;
}

a{
  color:var(--brand);
  text-decoration:none;
}

a:hover{text-decoration:underline}

.page{
  max-width:1180px;
  margin:0 auto;
  padding:24px;
}

.page-wide{max-width:1460px}

.hero{margin-bottom:20px}

.comp-hero{
  background:linear-gradient(135deg,#1f4e39 0%,#2f7d57 60%,#5ea778 100%);
  color:#fff;
  border-radius:28px;
  padding:32px;
  box-shadow:var(--shadow);
}

.comp-title-row{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(300px,.7fr);
  gap:22px;
  align-items:start;
}

.comp-title-row > *,
.feature-grid > *,
.cols-2 > *,
.schedule-grid > *,
.top-columns > *,
.rank-columns > *{
  min-width:0;
}

.comp-kicker,
.hero-kicker{
  display:inline-block;
  font-size:12px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  margin-bottom:14px;
}

h1{
  font-size:44px;
  line-height:1.05;
  margin:0 0 12px;
}

h2{
  font-size:31px;
  line-height:1.15;
  margin:0 0 16px;
  color:#1f4e39;
}

h3{
  font-size:22px;
  line-height:1.2;
  margin:0 0 12px;
  color:#224e3b;
}

h4{
  font-size:18px;
  line-height:1.2;
  margin:0 0 12px;
  color:#224e3b;
}

.lead{
  font-size:19px;
  margin:0;
  color:rgba(255,255,255,.93);
}

.inline-links,
.button-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:18px;
  align-items:flex-start;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 18px;
  border-radius:999px;
  font-weight:800;
  text-decoration:none;
  box-shadow:0 10px 24px rgba(0,0,0,.14);
  transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease;
  max-width:100%;
}

.btn:hover{
  text-decoration:none;
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(0,0,0,.18);
}

.btn-primary{
  background:linear-gradient(135deg,#fff 0%,#f2f7f4 100%);
  color:#1f4e39;
}

.btn-secondary{
  background:linear-gradient(135deg,#f39a1f 0%,#e46f0b 100%);
  color:#fff;
}

.section{
  margin:26px 0;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:24px;
  padding:28px;
  box-shadow:var(--shadow);
  min-width:0;
}

.highlight-box,
.notice{
  background:var(--soft);
  border:1px solid var(--line);
  border-radius:20px;
  padding:20px;
  min-width:0;
}

.notice{
  background:var(--notice);
  border-color:#f3ddb0;
}

.feature-grid,
.cols-2,
.schedule-grid,
.top-columns,
.rank-columns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  align-items:stretch;
}

.callout-list,
.clean-list{
  margin:0;
  padding-left:20px;
}

.callout-list li,
.clean-list li{
  margin:0 0 10px;
}

.small-note{
  font-size:14px;
  color:var(--muted);
}

.badge{
  display:inline-block;
  background:#e6f3ea;
  color:#1f6a47;
  border:1px solid #cfe4d5;
  border-radius:999px;
  padding:5px 10px;
  font-weight:700;
  white-space:nowrap;
}

.data-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:16px;
  border:1px solid var(--line);
  background:#fff;
  table-layout:auto;
}

.data-table th,
.data-table td{
  padding:12px 14px;
  border-bottom:1px solid #e7f0ea;
  text-align:left;
  vertical-align:middle;
}

.data-table th{
  background:#f1f7f3;
  color:#224e3b;
  font-size:14px;
}

.data-table tr:last-child td{border-bottom:none}

.schedule-item{
  background:#f8fbf8;
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
  min-width:0;
}

.time{
  display:block;
  font-weight:800;
  color:#1f6a47;
  margin-bottom:10px;
}

.top-hint{
  margin:-6px 0 16px;
  color:var(--muted);
}

.sex-col{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width:0;
}

.sex-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:16px;
  padding:0 2px 2px;
  border-bottom:2px solid #dfece3;
}

.sex-head .title{
  font-size:24px;
  font-weight:800;
  color:#1f4e39;
}

.sex-head .sub{
  font-size:14px;
  font-weight:700;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.08em;
}

.top-mini-card,
.rank-mini-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  box-shadow:0 8px 18px rgba(32,74,51,.06);
  min-width:0;
}

.top-mini,
.rank-mini-table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}

.top-mini td,
.rank-mini-table td,
.rank-mini-table th{
  padding:6px 8px;
  text-align:left;
  white-space:nowrap;
  vertical-align:top;
  border-bottom:1px solid #edf3ef;
}

.rank-mini-table th{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted);
  background:#f7faf8;
}

.top-mini tr:last-child td,
.rank-mini-table tr:last-child td{
  border-bottom:none;
}

.top-mini td:first-child,
.rank-mini-table td:first-child{
  width:42px;
  font-weight:700;
}

.top-mini td:last-child,
.rank-mini-table td:last-child,
.rank-mini-table th:last-child{
  text-align:right;
}

.top-mini td:nth-child(3),
.rank-mini-table td:nth-child(3){
  color:#456355;
}

.rank-mini-wrap{
  overflow-x:auto;
}

.sponsor-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  align-items:stretch;
}

.sponsor{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:110px;
  min-width:0;
}

.sponsor img{
  max-width:100%;
  max-height:72px;
  object-fit:contain;
  display:block;
}

.footer{
  text-align:center;
  color:var(--muted);
  padding:12px 8px 4px;
  font-size:13px;
}

.sticky-register{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:9999;
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:54px;
  padding:14px 18px;
  border-radius:999px;
  text-decoration:none;
  font-weight:800;
  font-size:15px;
  line-height:1;
  color:#fff;
  background:linear-gradient(135deg,#f39a1f 0%,#e46f0b 100%);
  box-shadow:0 14px 34px rgba(0,0,0,.26);
  transition:transform .18s ease,box-shadow .18s ease;
}

.sticky-register:hover{
  text-decoration:none;
  transform:translateY(-2px);
  box-shadow:0 18px 38px rgba(0,0,0,.30);
}

.sticky-register-icon{
  width:28px;
  height:28px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.18);
  font-size:16px;
  flex:0 0 28px;
}

.rank-hero .highlight-box,
.comp-hero .highlight-box{
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.16);
  color:#fff;
}

.rank-hero .highlight-box a,
.comp-hero .highlight-box a{
  color:#fff;
}

.rank-hero .callout-list strong,
.comp-hero .callout-list strong{
  color:#fff;
}

.section-break{page-break-before:always}

/* --- Lisatud parandused --- */

.btn-logo{
  height:24px;
  width:auto;
  display:block;
  flex:0 0 auto;
}

.btn-stebby{
  gap:10px;
  padding-left:16px;
  padding-right:16px;
}

.notice a:not(.btn),
.highlight-box a:not(.btn),
.section a:not(.btn),
.data-table a:not(.btn){
  color:#1f4e39;
  font-weight:700;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.notice,
.highlight-box,
.section{
  color:#18352a;
}

.link-table{
  width:100%;
  border-collapse:collapse;
}

.link-table td{
  color:#18352a;
  vertical-align:top;
  padding:8px 0;
}

.link-table td:first-child{
  width:140px;
  padding-right:16px;
  font-weight:700;
  white-space:nowrap;
}

.route-card,
.results-card{
  width:100%;
  min-width:0;
}

.route-map-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  align-items:start;
}

.route-map-item{
  min-width:0;
}

.route-map-link{
  display:block;
  width:100%;
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--line);
  background:#fff;
  box-shadow:0 8px 18px rgba(32,74,51,.06);
}

.route-map-link:hover{
  text-decoration:none;
}

.route-map-link img{
  width:100%;
  height:auto;
  display:block;
}

.route-map-caption{
  padding:12px 14px;
  font-weight:700;
  color:#1f4e39;
  background:#f8fbf8;
  border-top:1px solid var(--line);
}

.results-links{
  display:grid;
  gap:12px;
}

.results-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  color:#18352a !important;
  font-weight:700;
  min-width:0;
}

.results-link:hover{
  text-decoration:none;
  background:#f8fbf8;
}

.results-link span:last-child{
  color:var(--brand);
  font-weight:800;
  flex:0 0 auto;
}

@media screen and (max-width: 1100px){
  .comp-title-row,
  .feature-grid,
  .cols-2,
  .schedule-grid,
  .top-columns,
  .rank-columns,
  .route-map-grid{
    grid-template-columns:1fr;
  }

  .page{padding:18px}
  h1{font-size:36px}
}

@media screen and (max-width: 720px){
  .section{
    padding:20px;
    border-radius:20px;
  }

  .comp-hero{
    padding:24px;
    border-radius:22px;
  }

  h1{font-size:30px}
  h2{font-size:26px}

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

  .sticky-register{
    right:12px;
    bottom:12px;
    min-height:50px;
    padding:12px 16px;
    font-size:14px;
  }

  .link-table td:first-child{
    width:110px;
  }

  .results-link{
    align-items:flex-start;
    flex-direction:column;
  }
}

@media print{
  body{background:#fff}

  .page,
  .page-wide{
    max-width:none;
    padding:0;
  }

  .section{
    box-shadow:none;
    break-inside:avoid-page;
  }

  .top-mini-card,
  .rank-mini-card,
  .comp-hero,
  .highlight-box,
  .notice,
  .sponsor{
    box-shadow:none;
  }

  .sticky-register{display:none !important}

  a{
    color:inherit;
    text-decoration:none;
  }
}