	body {
		font-family: Arial, sans-serif;
		margin: 0;
		padding: 0;
        background-color: silver;
	}

	.title {
		overflow: hidden;
		white-space: nowrap;
		height: 2.5em;
		line-height: 2.5em;
		margin: 0 0 0 200px;
		padding: 0 0 0 .5em;
	}
	.title h1 {
		font-weight: normal;
		font-size: 100%;
		margin: 0;
	}
	.content {
		margin: 0 0 0 200px;
		padding: .5em;
        background-color: white;
        border-top: 1px solid white;
	}
	.nav {
		width: 200px;
		position: absolute;
		top: 0;
		left: 0;
	}
	.adv {
		margin: 2em 0 1em 200px;
	}

	.title {
		background-color: darkred;
		color: white;
        border-bottom: 1px solid #f7b5b5;
	}

	.content > h2 {
		margin: 0 0 .2em;
		font-size: 125%;
		font-weight: bold;
	}

	.content > .long-name,
	.content > .course {
		margin: .2em 0;
	}
	.content > .course:before {
		content: "Параметры дистанции: ";
	}

	.content p {
		text-align: justify;
	}

	.nav {
		background-color: gray;
	}
	.nav a {
		display: block;
		padding: .5em;
		border-bottom: 1px solid silver;
		color: white;
		overflow: hidden;
		white-space: nowrap;
		text-decoration: none;
	}
	.nav a.top {
		height: 2.5em;
		background-color: #404040;
		color: #ffffff;
		padding: 0 0 0 .5em;
		line-height: 2.5em;
	}
	.nav a.current {
		background-color: white;
		color: black;
		text-decoration: none;
	}
	.nav a:hover {
		background-color: #e0a000;
		color: black;
		text-decoration: underline;
	}

	.nav-trigger {
		display: none;
	}

	.team-results {
		overflow-x: auto;
	}

	.results table,
	.team-results table {
		border-collapse: collapse;
		border-top: 1px solid black;
		border-bottom: 3px solid black;
		margin: .4em 0;
	}
	.results th,
	.team-results th {
		border-bottom: 3px solid black;
		padding: .2em .5em;
		font-size: 80%;
	}
	.results td,
	.team-results td {
		padding: .1em .5em;
	}
	.team-results td {
		vertical-align: top;
	}
	.results tr:first-child td {
		padding-top: .2em;
	}

	.results td.line,
	.results td.number,
	.results td.place,
	.results td.points,
	.results td.length,
	.results td.stage,
	.team-results td.line,
	.team-results td.number,
	.team-results td.points,
	.team-results td.team-points,
	.results td.radio-place
	{
		text-align: right;
	}
	.results th.team,
	.results td.team,
	.results th.name,
	.results td.name,
	.team-results th.team,
	.team-results td.team,
	.team-results th.name,
	.team-results td.name
	{
		text-align: left;
	}
    .results td.start,
	.results th.result,
	.results td.result,
	.results th.pursiut,
	.results td.pursiut,
	.team-results th.result,
	.team-results td.result,
	.team-results td.team-place
	{
		text-align: center;
	}
	.results td.place {
		padding-left: 0;
		padding-right: 1em;
	}
	.results th.number {
		padding-left: 0;
		padding-right: 0;
	}
    .results td.start,
	.results td.result,
	.results td.pursiut {
		padding-right: 1em;
		padding-left: 1em;
	}
    .results td.start {
        color: darkgray;
    }

	.results tr.updated {
		background-color: #bbffaa;
	}

	.results tr.r0 {
		border-top: 1px solid black;
	}
	.results tr.r0 .line,
	.results tr.r0 .team,
	.results tr.r0 .place {
		vertical-align: top;
	}
	.results .radio {
		border-left: 1px solid black;
	}
	.results .radio-place {
		border-right: 1px solid black;
	}
	.log {
		font-size: 70%;
	}
	.results .stage-label {
		text-align: center;
		/*border-top: 1px solid black;*/
		/*border-bottom: 1px solid black;*/
		font-size: 80%;
		font-weight: bold;
		color: white;
		background-color: #808080;
	}
/*******************************************************************/

@media only screen and (max-width: 800px) {

	.wrap {
		overflow: hidden;
		width: 100%;
	}

	.content {
		width: 100%;
		margin-left: 0;
	}
	.nav {
		width: 80%;
		margin-left: -80%;
		position: absolute;
		top: 0;
	}
	.title {
		margin: 0;
		overflow: hidden;
		white-space: nowrap;
		height: 2.5em;
		line-height: 2.5em;
	}

	.nav-active .content {
		margin-left: 80%;
	}
	.nav-active .nav {
		margin-left: 0;
	}
	.nav-active .title {
		margin-left: 80%;
		width: 100%;
	}

	.nav {
		background-color: gray;
	}
	.nav a {
		display: block;
		padding: .5em;
		border-bottom: 1px solid silver;
		color: white;
	}
	.nav a.top {
		height: 2.5em;
		background-color: #404040;
		color: #ffffff;
		padding: 0 0 0 .5em;
		line-height: 2.5em;
	}

	h1  {
		font-size: 100%;
	}

	.nav-trigger {
		display: block;

		width: 2.5em;
		height: 2.5em;
		float: left;
		margin-right: .5em;

		background: transparent url(menu.png) no-repeat .5em 50%;
		background-size: 1.5em 1.2em;
	}
	.title {
		margin: 0;
		background-color: darkred;
		color: white;
		overflow: hidden;
		white-space: nowrap;
		height: 2.5em;
		line-height: 2.5em;
        padding: 0;
	}

	.nav-active .wrap {
		left: 80%;
		transition: left .5s;
	}
}

/*******************************************************************/
/**** smartphone mode 600px width ****/

@media only screen and (max-width: 600px) {
    .content {
        padding: 0;
    }
    .content > h2{
        margin: .2em 0 .2em .4em;
    }
    .content > .course,
	.content > .long-name,
	.content > .params,
	.content > p {
        margin: .2em 0 .2em .5em;
    }

    .results table,
    .results thead,
    .results tbody,
    .results tr,
    .results th,
    .results td {
        display: block;
        padding: 0;
    }
    .results tr:first-child td {
        padding-top: 0;
    }
    .results .number,
    .results .line,
    .results .leg,
	.results .radio,
	.results .radio-place {
        display: none;
    }
    .results tbody tr {
        border-bottom: 1px solid #404040;
        position: relative;
        font-size: 125%;
        line-height: 1.7em;
    }

	.results td.start,
    .results td.result,
	.results td.pursiut {
        position: absolute;
        right: 0;
        top: 0;
        padding: 0 .2em 0 .3em;
		width: 4.2em;
		background-color: white;
		text-align: right;
		z-index: 90;
    }
	.results td.points,
	.results td.length,
	.results td.stage {
		position: absolute;
		right: 4.5em;
		top: 0;
		padding: 0 0.2em 0 0.3em;
		background-color: white;
		z-index: 100;
	}
    .results td.name {
        font-size: 80%;
        margin: 0 5em 0 2.75em;
        line-height: 120%;
		white-space: nowrap;
		overflow: hidden;
    }
    .results td.team {
        font-size: 60%;
        margin: 0 5em 0 3.66em;
        line-height: 130%;
		min-height: 1.3em;
		white-space: nowrap;
		overflow: hidden;
    }
	.results td.place {
		position: absolute;
		left: 0;
		top: 0;
		width: 2em;
		margin: 0;
		padding: 0;
		text-align: center;
	}
	.results.finish-recently td.place {
		font-size: 80%;
		width: 2.5em;
		font-weight: bold;
		line-height: 120%;
	}
    .results td.group {
        font-size: 60%;
        line-height: 130%;
        position: absolute;
        bottom: 0;
        left: 0;
		width: 3.3em;
		overflow: hidden;
		text-align: center;
		z-index: 110;
		white-space: nowrap;
    }

    .results th {
        border: 0;
        font-size: 75%;
    }
    .results thead tr {
        border-bottom: 1px solid #404040;
        position: relative;
    }
	.results th.points,
	.results th.length,
	.results th.stage {
		position: absolute;
		right: 7.5em;
		top: 0;
		text-align: right;
	}
    .results th.result,
	.results th.pursiut {
        position: absolute;
        right: 0;
        top: 0;
        padding-right: 1em;
    }
	.results.pursiut .result {
		display: none;
	}
    .results th.place {
        position: absolute;
        left: 0;
        top: 0;
        padding: 0 0 0 0.2em;
    }
    .results th.name {
        margin: 0 0 0 3.7em;
    }
    .results th.group,
    .results th.team,
	.results th.leg {
        display: none;
    }

	/***** teams and relays ******/
	.results .teams tbody tr {
		border-bottom: 0 none;
		line-height: normal;
	}
	.results .teams td.length {
		font-size: 70%;
		color: white;
		background-color: black;
		border-radius: .7em;
		min-width: 2.7em;
		text-align: center;
		position: absolute;
		bottom: .1em;
		right: 5.5em;
		padding: 0 !important;
		top: auto;
	}
	.results .teams td.result,
	.results .teams td.start {
		font-size: 80%;
		background-color: transparent;
	}
	.results .teams .r0 td {
		padding-top: 1em;
	}
	.results .r0 td.team {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		/*border-bottom: 1px solid black;*/
		padding: 0;
		margin: 0;
		text-align: center;
	}
	.results .teams .r0 .line {
		display: block;
		position: absolute;
		left: 0;
		top: 0;
		width: 2em;
		margin: 0;
		padding: .6em 0 0 0;
		text-align: center;
	}
	.results .teams .place {
		display: none;
	}
	.results .stage-label {
		font-size: 75%;
	}

} /**** smartphone mode 600px width ****/


@media only print {
	.nav,
	.adv,
	.log {
		display: none;
	}
	.title,
	.content {
		margin-left: 0;
	}
}
/***************************** events page ************************/
.events a {
    float: left;
    clear: both;
    padding: 0;
    margin: .4em 0;
    text-decoration: none;
    color: inherit;
}
.events .datetime {
    float: left;
    background-color: gray;
    color: white;
    font-size: 90%;
    margin: 0;
    padding: 0 .5em;
}
.events a:hover .datetime {
    background-color: #e0a000;
    color: black;
}
.events .weekday:after {
    content: ",";
}
.events .name {
    clear: both;
    float: left;
    font-size: 120%;
    text-decoration: underline;
}
.events .place {
    clear: both;
    float: left;
    font-size: 90%;
    line-height: 1em;
    padding: 0 0 0 .05em;
}

/*Time*/
.events .time {
    display: none;
}
.events .year {
    display: inline;
}
.events .thisweek .time {
    display: inline;
}
.events .thisweek .year {
    display: none;
}
.events .thisweek .month:after {
    content: ",";
}

/*Live*/
.events .live:before {
    content: "LIVE";
    color: white;
    background-color: red;
    padding: 0 .5em;
    font-size: 90%;
    float: left;
}
.events .live .time {
    display: none;
}
.events .live .year {
    display: none;
}
.events .live .month:after {
    content: none;
}

@media only screen and (max-width: 600px) {
    .events .name {
        padding-left: 0.42em;
    }
    .events .datetime {
        padding-left: 0.56em;
    }
    .events .place {
        padding-left: 0.56em;
    }
}
